/* ------------------------------------------------------------------- INSTRUCTIONS - Read Before Using Script If you are using frames, the code referred to in steps 2 - 5 must be put in the pages displayed in the frames and NOT in the parent document. Step 1 In the Usernames & Passwords section, configure the variables as indicated by the comments. Step 2: Add the following code to the
section of your login page: Change "scripts/login.js" to reflect the correct path to this script file on your server. Step 3: Add this code to the login page, at the place you want the login panel to show: Step 4: Add the following code to the section of each page procteded by this script: Change "scripts/login.js" to reflect the correct path to the script file on your server. Step 5: On the page that is to have the logout button, paste this code where you want the button to be: To use your own image instead of the grey button change the type from button to image and add src="myimage.gif" where myimage.gif is the image (including the path to it if needed, you want to use. Step 6: Upload this script and your html pages to the relevant directories on your server. */ //---------------------------------------------------------------- // Usernames, Passwords & User Pages - These require configuration. //---------------------------------------------------------------- var successpage = "test.html"; // The page users go to after login, if they have no personal page. var loginpage = "logintest.html"; //Change this to the page the login panel is on. var imgSubmit = ""; //Change to the path to your login image,if you don't want the standard button, otherwise do not change. var imgReset = ""; //Change to the path to your reset image,if you don't want the standard button, otherwise do not change. var users = new Array(); users[0] = new Array("client","alandavies","../users/statelib/index_lb.html"); // Change these two entries to valid logins. users[1] = new Array("client1","alandavies","../users/statelib 1/index_lb.html"); // Change these two entries to valid logins. users[2] = new Array("client2","alandavies","../users/statelib2/index_lb.html"); // Change these two entries to valid logins. users[3] = new Array("client3","alandavies","../users/statelib 3/index_lb.html"); // Change these two entries to valid logins. users[4] = new Array("client","sinisapaspal","../users/statelib/index_lb.html"); // Change these two entries to valid logins. users[5] = new Array("client1","sinisapaspal","../users/statelib 1/index_lb.html"); // Change these two entries to valid logins. users[6] = new Array("client4","alandavies","../users/statelib 4/index_lb.html"); // Change these two entries to valid logins. users[7] = new Array("client5","alandavies","../users/statelib 5/index_lb.html"); // Change these two entries to valid logins. users[8] = new Array("client6","alandavies","../users/statelib 6/index_lb.html"); // Change these two entries to valid logins. users[9] = new Array("client7","alandavies","../users/statelib 7/index_lb.html"); // Change these two entries to valid logins. users[10] = new Array("NPG","mdesmond","../users/NPG/index_lb.html"); // Change these two entries to valid logins. users[11] = new Array("client8","alandavies","../users/NPG/index_lb.html"); // Change these two entries to valid logins. // required, followig the same format. Increment the // numbers in the square brackets, in new each one. Note: // the 3rd parameter is the the page that user goes to // after successful login. Ensure the paths are correct. // Make this "" if user has no personal page. //---------------------------------------------------------------- // Login Functions //---------------------------------------------------------------- function login(username,password){ var member = null; var loggedin = 0; var members = users.length; for(x=0;x| '); document.write('Username: | '); document.write('|
| Password: | '); document.write('|
'); } else { document.write(' | |
'); } if(imgReset == ""){ document.write(''); } else { document.write(''); } document.write(' | |