home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / zb / Notepad-1 / login.asp < prev    next >
Text File  |  2004-12-09  |  3KB  |  116 lines

  1. <!--#include file=conn.asp-->
  2. <!--#include file=const.asp -->
  3. <!--#include file=md5.asp -->
  4. <% dim rs , exec %>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  8. <title>╫═▓⌐╩╨╞°╧≤╨┼╧ó╞╜╠¿</title>
  9. <META name="Author" content="─╛─±">
  10. <link rel="stylesheet" href="style/<%=skin%>.css" type="text/css">
  11. </head>
  12.  
  13. <body>
  14. <!--#include file="head.asp"-->
  15. <br>
  16. <table border="0" width="400" cellspacing="0" cellpadding="10" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center" class="table004">
  17.  <tr> 
  18.   <td class=table003 align=center>╙├╗º╡╟┬╜
  19.   </td>
  20.   </tr>
  21.   <tr>
  22.   
  23.   <td class="table001" align="center"> 
  24. <%
  25. main()
  26. connclose()
  27.  
  28. sub main()
  29.     dim backInput, homeInput
  30.     backInput= "<br><br><input type=button value=╖╡╗╪╟░╥│ onClick=history.back() class=input2 name=button ><br>"
  31.     homeInput="<br><br><input type=button value=╜°╚δ┴⌠╤╘▒╛╩╫╥│ onClick=""location.href='index.asp?' "" class=input2><br>"
  32.     if request.form="" then
  33. %>
  34.  
  35.    <form name="form" method="post">
  36.     <table width="80%" border="0">
  37.      <tr> 
  38.       <td width="30%">╙├ ╗º ├√ú║</td>
  39.       <td width="70%"> 
  40.        <input type="text" name="name" size="20" class="input1" value="" maxlength="20">
  41.       </td>
  42.     </tr>
  43.      <tr> 
  44.       <td>├▄íííí┬δú║</td>
  45.       <td> 
  46.        <input type="password" name="pass" size="20" class="input1" value="" maxlength="20" >
  47.       </td>
  48.      </tr>
  49.      <tr align="center"> 
  50.       <td colspan="2" height="40">
  51.       ╡╟┬╜▒ú┴⌠ú║<input type=radio name="expTime" value="" checked>▓╗▒ú┴⌠
  52.       <input type=radio name="expTime" value="<%=dateAdd("d",1,now)%>">1╠∞
  53.       <input type=radio name="expTime" value="<%=dateAdd("ww",1,now)%>">1╓▄
  54.       <input type=radio name="expTime" value="<%=dateAdd("m",1,now)%>">1╘┬
  55.       <input type=radio name="expTime" value="<%=dateAdd("yyyy",1,now)%>">1─Ω
  56.       <br>
  57.        <input type="submit" value=" ╡╟ ┬╜ " class="input2" name="Submit" >
  58.       </td>
  59.     </tr>
  60.    </table>
  61.    </form>
  62. <%
  63.     else
  64.         dim name, pass, expTime
  65.         name=Encodestr(request.form("name"))
  66.         pass=Encodestr(request.form("pass"))
  67.         expTime=request.form("expTime")
  68.         'response.write expTime
  69.         'response.end
  70.         if name="" or pass="" then
  71.             response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╟δ╩Σ╚δ╙├╗º├√║═├▄┬δúíúíúí"
  72.             response.write backInput
  73.             exit sub
  74.         end if
  75.  
  76.         pass=MD5(pass)
  77.         
  78.         exec="select * from [user] where username='"&name&"' "
  79.         set rs=server.createobject("adodb.recordset")
  80.         rs.open exec,conn,1,1
  81.         if rs.eof then
  82.             rsclose()
  83.             response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>╙├╗º├√▓╗┤µ╘┌úíúíúí"
  84.             response.write backInput
  85.             exit sub
  86.         elseif (StrComp(name,rs("username"),0) <>0 or StrComp(pass,rs("userpassword"),0)<>0) then
  87.             rsclose()
  88.             response.write "<font color=red>╖ó╔·┤φ╬≤</font><br><br>├▄┬δ┤φ╬≤úíúíúí"
  89.             response.write backInput
  90.             exit sub
  91.         end if
  92.  
  93.         rsclose()
  94.         response.write "<font color=red>╡╟┬╜│╔╣ªúíúíúí</font>"
  95.         response.write homeInput
  96.         
  97.         if cookiePath<>"" then
  98.             response.cookies("gbook").Path=cookiePath
  99.         end if
  100.         response.cookies("gbook")("username")=vbescape(name)
  101.         response.cookies("gbook")("password")=pass
  102.         if expTime<>"" then
  103.             expTime=Cdate(expTime)
  104.             response.cookies("gbook").expires=expTime
  105.         end if
  106.     end if
  107. end sub %>
  108.    </td>
  109.  </tr>
  110. </table>
  111. <!--#include file="foot.asp"-->
  112.  
  113. </body>
  114.  
  115. </html>
  116.