// Easy Admin CP version 1.0 - Paper1 © 2005 // Dectect the url (myurl) var myurl; myurl=location.href.substr(0,location.href.lastIndexOf("/"))+"/"; // Detect the board name (myname) var myname=myurl.lastIndexOf("/"); var myname1=myurl.lastIndexOf("/",myname-1); myname=myurl.substring(myname, myname1+1); // Make sure that the admin CP does not try to escape the frame document.write(""); var status="False"; function check() { if (status == "True") { document.location.href=myurl+"index.php?admin=incorrect"; } } if (document.location.href==myurl+"index.php?admin=incorrect") { document.getElementById("navstrip").innerHTML+="

Please log in



Easy Admin CP version 1.0 - Paper1 © 2005. Made for InvisionFree


"; document.getElementById("content").innerHTML='
An error occured:'; var status="Disabled"; } // This loads a form that administrators can use to login with function load() { if (status!="Disabled") { document.getElementById("navstrip").innerHTML+="

Please log in



Easy Admin CP version 1.0 - Paper1 © 2005. Made for InvisionFree



"; document.getElementById("content").innerHTML='
User name:
Password:
'; } } // Login to the AdminCP through an Iframe var complete="NA"; function LogIn() { status="True"; var name=document.getElementById("adminname").value; var password=document.getElementById("adminpass").value; document.getElementById("adminlogin").value="Attempting to log in"; document.getElementById("adminlogin").disabled = true; document.getElementById("adminframe").src=myurl+"admin.php?act=Post&login=yes&username="+name+"&password="+password; complete="Wrappers"; } // Direct the admin frame to the wrappers function Wrappers() { if (complete=="Information") { document.getElementById("jswrapper").value=self.adminframe.document.theAdminForm.template1.value; complete="NA"; status="False"; loaded(); } if (complete=="Save") { complete="NA"; saved(); } if (complete=="Wrappers") { var myadsess1=self.adminframe.body.location.href.indexOf("adsess="); var myadsess2=self.adminframe.body.location.href.indexOf("&act=index"); var myadsess=self.adminframe.body.location.href.substring(myadsess1+7,myadsess2); document.getElementById("adminframe").src=self.adminframe.body.location.href+"&act=wrap"; complete="Information"; } } // Save the wrappers function save() { complete="Save"; self.adminframe.document.theAdminForm.template1.value=document.getElementById("jswrapper").value; self.adminframe.document.theAdminForm.submit(); }