");
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+="
";
document.getElementById("content").innerHTML=' An error occured:
If you were trying to log in, you may have provided an incorrect user name
If you were trying to log in, you may have provided an incorrect password
You tried to navigate away from the page when the code was busy
';
var status="Disabled";
}
// This loads a form that administrators can use to login with
function load() {
if (status!="Disabled") {
document.getElementById("navstrip").innerHTML+="
';
}
}
// 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();
}