Locker Protection v2.0
I believe you have entered "John" as the user name
and "unlock" as password, it is easy to use and provides a okay security
shield. One major change between v1.0 and v2.0 is that MULTI-ACCOUNTS
can be made (of course username and password have to match the same account).
To use this script, just copy the source below and paste it between your
<HEAD> and </HEAD> tags in your HTML file.
<SCRIPT>
<!--
// Script Editor: Howard Chen
// Browser Compatible for this script: IE 3.0 or Higher
// Netscape 3.0 or Higher
// Get more JavaScripts at http://www.geocities.com/SiliconValley/Network/7432/
// Bug report to hchen007@geocities.com
// This script is free as long as you keep its credits
function locker()
{
var ask = prompt("Please enter the username", "")
var ask2 = prompt("Please enter the password for " + ask, "")
for(var i=0; i<login.length; i++) {
if (ask == login[i].nam && ask2 == login[i].pwd) {return}
}
alert("Username/Password Incorrect\nAccess denied!")
location.href= "index2.htm" // The url to be sent to if username/password is incorrect.
}
function id(nam,pwd) {
this.nam = nam
this.pwd = pwd
}
login = new Array()
//===================================================
// Add new users this way, the next user will be login[1] = new id("username","password")
login[0] = new id("John","unlock")
//===================================================
locker()
//-->
</SCRIPT>
IMPORTANT: The scripts provided in this
page are free as long as you keep the credits in the code. E-mail
me or use Script Rebuild Service for additional
help about Cut N Paste or to ask for a script
that is just for you.
Post Your Script Home