Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 6th, 2004, 12:43 PM
Rich's Avatar
Rich Rich is offline
Administrator
Developer Shed Admin.
 
Join Date: Sep 2003
Location: Fort Lauderdale, FL
Posts: 152 Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level)Rich User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 11 h 47 m 28 sec
Reputation Power: 10
Login and Password Protection

<HTML>

<HEAD>
<TITLE>Login and Password Protection</TITLE>
<!------------------------------------------########## Script Part 1 ###################Copy this part into the HEAD of your page------------------------------------------->
<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
function key(pass)


{
//configuration: you may change the html
// _ext to ".html"
var html_ext = ".htm" //the file extension of the secured pages
//configuration: the absolute or relativ
// e path to the protected pages
var path_to_secured_pages = "../common/" //don't forget the trailing slash
//end of conf.
var location = path_to_secured_pages+ pass + html_ext;
this.location.href = location
}
//-->
</SCRIPT>
<!------------------------------------------########## End of Script Part 1 ############------------------------------------------->
</HEAD>
<BODY bgcolor="black" text="cyan" link="#00FFFF" vlink="#C0C0C0">
<P align="center"><Img src="../../bitmaps/demo.gif" WIDTH="480" HEIGHT="43"></P>
<CENTER><P><H2>Login and Password Protection</H2></P></CENTER>
<P> this script offers perhaps the best type of password protection you
can get using Javascript (it is still far less secured than proper server-side password protection). Here is how it works: the concatenation of the login and password form
the name of the hidden page to be loaded. for example if <EM> Mon </EM> is the login and
<EM> day </EM> is the password, then the system will attempt to load the page <EM>a_path/Monday.htm</EM>, where <EM>a_path</EM> is a configurable absolute or relative directory to the hidden pages. You may also configure the file extension of the hidden pages(".htm" or ".html").</P>
<P> try <EM>Mon, Tue, Wednes, Thur, Fri, Satur</EM> or <EM>Sun</EM> as the login name and <EM>day</EM> as password. In this server, the login and password are case-sensitive. </P>
<!------------------------------------------########## Script Part 2 ###################Copy this part into the BODY of your page------------------------------------------->
<CENTER><TABLE align="center" border="1" bgcolor="blue">
<TR><TD colspan="1" align="left">
<FORM NAME="password">
<FONT color="yellow" <P>
Login <BR>
<INPUT NAME="user" TYPE="text" SIZE="25"><BR>
Password <BR>
<INPUT NAME="pwd" TYPE="password" SIZE="25">
<BR><CENTER>
<INPUT VALUE="Okay" TYPE="button" OnClick="key(document.password.user.value+document.password .pwd.value)">
</CENTER></FONT></FORM>
</TD></TR>
</TABLE></CENTER>
<!------------------------------------------########## End of Script Part 2 ############------------------------------------------->
</BODY>
</HTML>

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > Login and Password Protection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT