阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
一个简单的用户登录接口asp实现
一个简单的用户登录接口asp实现 ^<e"OV 出处 B43o_H|s L^`oJ9k! <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> B`4[@$
sKX%<n$ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> z^f-MgWG h ,@x5q>g <html xmlns="http://www.w3.org/1999/xhtml"> \4SFD3$& $Q:5KNF+p <head> i#jCf3%+
h 5m+:GiI <script language="javascript" type="text/javascript"> pg~`NN *ihg' <!-- Oz9k.[j( oh;F]*k6 function SaveCookie() ^3`98y.Q ^}8_tZs8\ { )^!-Aj\x ^;
YD3EZw document.cookie = "name=" + document.getElementById("name").value 2|~&x~ "VWxHRVg4M + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 k#%19B
xuelo0h, document.cookie = "pass=" + document.getElementById("pass").value /]xd[^ YA^9, q6u? + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 CWkm\= HIhoYSwB } i6m;2 UAa t9pPG {1 --> 7<.f&1MgI '~ ]b;nA </script> {/7'uD\
H J
mYi& .
~|^du<X F"23>3 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> YgWnPp "Ln\ZYB] <title>[Request samples]</title> &2\.6rb. %n}]$
d </head> 6
*8G e {{DW P-v4 <body> FySK& U3U eTa_ <% b`:Eo+p x`e
YC i username = Request.Cookies("name") H{GbOI. 2C8M1^0:Z password = Request.Cookies("pass") zR<jZwo]# |]]fcJOBP '此处可以插入用户数据查询。并替换下面默认密码“admin” OIWo
*
% Lq&xlW
j if username = "" or password <> "admin" then L |H{;r' da<1,hF %> _88~uYG I%s/h4x^B[ G37_
`C g+CHF?O <form method="post"> 5y~[2jB: B=p'2lla <table> JEd/j
zR( 6Rt pB\hq <tr> 9(I4x]` 2KX *x_- <td>please input your name:</td> Av[jFk 9!OpW:bR| <td><input type="text" name="name" id="name" /></td> T<?;:MO88 xSf3Ir(, </tr> YJ0[BcZ > w'6ZDA*X <tr> Ea
!j-Lb o ,8
.`; <td>please input password:</td> (+@.L7>m+t )2A4vU-IR. <td><input type="password" name="pass" id="pass" /></td> r5"/EMieh 83n:
h08 </tr> 0Nfj}sXCWE Mc6y'w <tr> G1
l( e'`oisJU?q <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> ^/+sl-6/F x<l1s <td><input type="reset" value="reset" /></td> Vh<`MS0X i~;8'>:|,M </tr> j.6kjQN xEBjfn </table> (gZ!
o_ 1mX*0> </form> 0D'Wr(U( aPC!M4# <%else%> nqBuC c;^ J!e <h1>Welcome to ASP</h1> R+K[/AA C gx?K]>y <br /> fo.m&mKgo nR7\ o(! <p> ,:`6x[ + a%dx\&K hello! <%=username%>.<br> =CoT{LRQ_ yShHFlO= there are <%=Request.TotalBytes%> bit.... K>[H@|k\k
q}5A^QX </p> mw[4<vfB0a W(aRO <%end if%> 7m M;Q %U
GlAyj </body>
]D%k)<YK Aq!['G </html>
|
|
|
|
[楼 主]
|
Posted: 2006-04-03 14:01 |
| |