常州五颜六色网络技术有限公司 -> 网站建设 -> 一个简单的用户登录接口asp实现 登录 -> 注册 -> 回复主题 -> 发表主题

阿七 2006-04-03 14:01
一个简单的用户登录接口asp实现 x@@k_'~t%  
出处   Th])jQ*  
o AS 'Z|  
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> #5kg3OO  
YF");it H  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> $/i;UUd  
yw?UA  
<html xmlns="http://www.w3.org/1999/xhtml"> oX]c$<w5  
V,9UOC,Gn  
<head> |w^nCsv  
my3W[3#  
<script language="javascript" type="text/javascript"> Z"<tEOs/En  
H"g p  
<!-- ^$O,Gy)V  
Hb *&&  
  function SaveCookie() ~4tu*\P  
&mvC<_1n  
  { kO\ aNtK  
aTY\mKk  
    document.cookie = "name=" + document.getElementById("name").value Yf(QU`w_  
fL&bN[XA"$  
              + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 Ol]+l]  
F .JvMy3  
    document.cookie = "pass=" + document.getElementById("pass").value `H6kC$^Ofx  
FCEFg)c5=  
              + "expires=01-Jan-2008 23:59:59";//此处可根据需要自行修改 #4*~ 4/  
+H~ })PeQ  
  } @nS+!t{  
5l"v:Px  
--> rBZ 0(XSZQ  
7x^P74  
</script> *.J)7~(P  
4` gAluJ#  
=:zmF]j9  
(P[:g  
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> /JfRy%31  
@<tkwu  
<title>[Request samples]</title> ,tZWPF-  
uf (`I  
</head> 7 p(^I*|  
;aip1Df  
<body> Bg*Oj)NM  
Ms.1RCup  
  <% `Li3=!V[  
S$Tc\ /{  
    username = Request.Cookies("name") N246RV1W  
j^}p'w Tu{  
    password = Request.Cookies("pass") 'Jww}^h1  
:[oFe/1K!4  
    '此处可以插入用户数据查询。并替换下面默认密码“admin” G%w hOIFRq  
"If]qX(w  
    if username = "" or password <> "admin" then   9pD=E>4?#  
_6v|k}tW'Y  
  %> ^b=9{. 5  
/(Se:jH$>  
  `VT[YhO#}  
=^m,|j|d>4  
  <form method="post"> :gMcl"t--  
LwQq0<v  
  <table> Sdl1k+u  
c=iv\hn  
  <tr> N6Mo|  
RHc63b\  
    <td>please input your name:</td> / E~)xgPM<  
QZ!;` ?(  
    <td><input type="text" name="name" id="name" /></td> WVUa:_5{  
>h+[#3vD  
  </tr> z DDvXz  
?-mDvW  
  <tr> ?}4 =A&][  
k*)O]M<,  
    <td>please input password:</td> n\8;4]n  
acd8?>%[  
    <td><input type="password" name="pass" id="pass" /></td> = WFn+#&^  
y{CyjYpz^  
  </tr> X=O}k&  
T~B'- >O  
  <tr> ,MkldCV  
'BY{]{SL  
    <td><input type="submit" value="submit" onclick="SaveCookie()" /></td> ?M'_L']N[  
,VK! 3$;|  
    <td><input type="reset" value="reset" /></td> |BrD:+  
c5 ~d^  
  </tr> ^zjQ(ca@"x  
lLD-QO}/  
  </table> -cW`qWbd  
K}^Jf ;  
  </form>    q0Rd^c  
>?b<)Q*<  
  <%else%> qucw%hJr  
8ut:cCrmg  
  <h1>Welcome to ASP</h1> Zkn$D:  
/rRQ*m_  
  <br /> DwTqj=l  
BaSNr6 YW  
  <p> }hT1@I   
~'/I[y4t  
  hello! <%=username%>.<br> 0(9]m)e  
|JVeW[C  
  there are <%=Request.TotalBytes%> bit.... Rg*zUfu5%o  
6km{= ```  
  </p> (n{sp  
R#Z1+&='  
  <%end if%> @a.Y9;O  
h3^ &,U  
</body> &lYKi3}x  
-C$Z%I7 0  
</html>


查看完整版本: [-- 一个简单的用户登录接口asp实现 --] [-- top --]



Copyright © 2005-2014 5y6s Inc. 苏ICP备05001866号 Powered by PHPWind 5.0.1
Time 0.025855 second(s),query:5 Gzip enabled