BVB Source Codes

Jie Yang v0.6.3 article system Show admin_login.asp Source code

Return Download Jie Yang v0.6.3 article system: download admin_login.asp Source code - Download Jie Yang v0.6.3 article system Source code - Type:.asp
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <!--#include file="../conn/conn.asp" -->
  3. <!--#include file="../inc/md5.asp"-->
  4. <%
  5. '禁止网页快取
  6. Response.Buffer = True
  7. response.expires = 0
  8. response.expiresabsolute = now() - 0
  9. response.addHeader "pragma","no-cache"
  10. response.addHeader "cache-control","private"
  11. Response.CacheControl = "no-cache"
  12. %>
  13. <%
  14. '判断登录
  15. action=request("action")
  16. if action="login" then
  17.         '取得登录ip
  18.         loginip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
  19.     If loginip = "" Then loginip = Request.ServerVariables("REMOTE_ADDR")
  20.        
  21.         '取得提交的值
  22.         adminlogin=Replace_Text(request.form("username"))
  23.         adminpwd=MD5(trim(request.form("password")))
  24.         verifycode=request.form("checkcodestr")
  25.        
  26.         Function isletternumber(strng)
  27.                  isletternumber = false
  28.                  Dim regEx, Match ' Create variables.
  29.                  Set regEx = New RegExp   ' Create a regular expression object (stupid, huh?)
  30.                  regEx.Pattern = "^[A-Za-z0-9]+$" ' Sets pattern.
  31.                  regEx.IgnoreCase = True   ' Set case insensitivity.
  32.                  Set Match = regEx.Execute(strng)   ' Execute search.
  33.                  if match.count then isletternumber= true
  34.         End Function
  35.        
  36.         Function isletternumbers(strng)
  37.                  isletternumbers = false
  38.                  Dim regEx, Match ' Create variables.
  39.                  Set regEx = New RegExp   ' Create a regular expression object (stupid, huh?)
  40.                  regEx.Pattern = "^[0-9]+$" ' Sets pattern.
  41.                  regEx.IgnoreCase = True   ' Set case insensitivity.
  42.                  Set Match = regEx.Execute(strng)   ' Execute search.
  43.                  if match.count then isletternumbers= true
  44.         End Function
  45.        
  46.         '判断输入的管理帐号是否为字母和数字的组合
  47.         if not isletternumber(adminlogin) then 
  48.                 response.cookies("userchk") = "温馨提示:用户名:要求为字母或数字!请重新输入。"
  49.                 response.write ("<script>history.go(-1);</script>")
  50.                 response.End
  51.         end if
  52.        
  53.         if not isletternumbers(verifycode) then
  54.                 response.cookies("userchk") = "温馨提示:验证码:要求为数字!请重新输入。"
  55.                 response.write ("<script>history.go(-1);</script>")
  56.                 response.End
  57.         end if 
  58.        
  59.         '判断输入的验证码是否正确
  60.         if cint(session("verifycode"))<>cint(verifycode) then
  61.                 response.cookies("userchk") = "温馨提示:验证码输入错误! 请重新输入。"
  62.                 response.write ("<script>history.go(-1);</script>")
  63.                 response.End
  64.         end if
  65.        
  66.         '查管理员表输入的帐号是否存在
  67.         sql="select * from Article_Admin where A_user='"&adminlogin&"'"
  68.         rs.open sql,conn,1,1
  69.         if rs.eof then
  70.                 response.cookies("userchk") = "温馨提示:管理帐号错误请重新输入!"
  71.                 response.write ("<script>history.go(-1);</script>")
  72.                 response.End
  73.         else
  74.                 if adminpwd<>rs("A_pass") then
  75.                         response.cookies("userchk") = "温馨提示:管理密码错误请重新输入!"
  76.                         response.write ("<script>history.go(-1);</script>")
  77.                         response.End
  78.                 else
  79.                 '更新登录日志表JY_log,保存cookie,登录到首页
  80.                         Closers(rs)
  81.                         conn.execute("Insert into Article_Adminlog(A_user,L_ip,L_addtime) values('"&adminlogin&"','"&loginip&"','"&now()&"')")
  82.                         response.Cookies("JYcms")("A_user")=adminlogin
  83.                         response.Cookies("JYcms")("A_pass")=adminpwd
  84.                         '关闭数据库连接
  85.                         Call Closeconn()
  86.                         response.Redirect("admin_index.asp")
  87.                         response.End()
  88.                 end if
  89.         end if         
  90. end if
  91. %>
  92. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  93. <html xmlns="http://www.w3.org/1999/xhtml">
  94. <head>
  95. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  96. <title><%=sitenames%>后台管理登录</title>
  97. </head>
  98. <style type="text/css">
  99. *{ margin:0; padding:0;}
  100. body{ font-size:12px; line-height:150%; background-color:#FFFFFF; color:#000000;}
  101. a{font-size:12px; color:#ff6600; text-decoration:none;}
  102. a:link{ color:#ff6600;}
  103. a:visited{ color:#ff6600;}
  104. a:hover{ text-decoration:underline; color:#ff6600;}
  105. a:active{ color:#000000;}
  106. img{ border:none;}
  107. ul,li{ list-style-type:none; padding:0; margin:0;}
  108. .login{ border:1px #99D3FB solid; width:400px; height:190px; margin:100px auto 0 auto;}
  109. .login_tit{ background:url(Img/tit_bg.gif) repeat-x; height:24px; border-bottom:1px #ffffff solid; line-height:24px; padding:2px 0 0 10px; font-size:13px; font-weight:bold; color:#077AC7;}
  110. .login_form span{ display:block; height:20px; width:96%; margin:0 auto; padding-top:6px; border-bottom:1px #CCCCCC dashed;}
  111. #wrongmsg{ color:#FF0000; text-align:center;}
  112. .login_btntd{ padding-left:70px;}
  113. .login_btn{border:1px #909090 solid; background:url(Img/btnbg.gif) repeat-x; width:auto; padding:2px 2px 0 2px;}
  114. .copy_right{ margin:10px auto 0 auto; text-align:center;}
  115. .inputs{ width:140px; height:16px;}
  116. </style>
  117. <script language="javascript">
  118. function loginCheck()
  119. {
  120. if(document.myform.username.value=="")
  121. {
  122.         document.getElementById("wrongmsg").innerHTML="温馨提示:管理账号不能为空!";
  123.         document.myform.username.focus();
  124.         return false;
  125. }
  126. if(document.myform.password.value=="")
  127. {
  128.         document.getElementById("wrongmsg").innerHTML="温馨提示:管理密码不能为空!";
  129.         document.myform.password.focus();
  130.         return false;
  131. }
  132. if(document.myform.checkcodestr.value=="")
  133. {
  134.         document.getElementById("wrongmsg").innerHTML="温馨提示:请输入4位数的验证码!";
  135.         document.myform.checkcodestr.focus();
  136.         return false;
  137. }
  138.         //判断填写的验证码是否位数字
  139.         var objv = document.myform.checkcodestr.value;
  140.         var pattern = /^[0-9]+$/;
  141.         flag = pattern.test(objv);
  142.         if(!flag)
  143.         {
  144.                 document.getElementById("wrongmsg").innerHTML="温馨提示:验证码:要求为数字!";
  145.                 document.myform.checkcodestr.select();
  146.                 return false;
  147.         }
  148.         else
  149.         {
  150.                 if(document.myform.checkcodestr.value.length!=4)
  151.                 {
  152.                         document.getElementById("wrongmsg").innerHTML="温馨提示:验证码:要求为4位数字!";
  153.                         document.myform.checkcodestr.select();
  154.                         return false;
  155.                 }
  156.         }
  157. }
  158. function hh()
  159. {
  160. document.getElementById("codestr").value="";
  161. document.getElementById("aa").innerHTML="<img src='../inc/verifycode.asp'  alt='验证码,看不清楚?请点击刷新验证码' height='10' style='cursor:pointer;' onClick=this.src=this.src+'?'+Math.random(); />"
  162. }
  163. </script>
  164. <script language = "javascript">
  165. <!--
  166.         if (self !=  top)
  167.         {
  168.                 top.location = self.location;
  169.         }
  170. -->
  171. </script>
  172. <body onload="javascript:document.myform.username.focus();">
  173. <div class="login">
  174.         <div class="login_tit">管理员登录</div>
  175.         <div class="login_form">
  176.                 <span id="wrongmsg"><%if request.cookies("userchk")<>"" then%><%=request.cookies("userchk")%><%else%>温馨提示:请输入账号、密码和验证码!<%end if%></span>
  177.                 <table width="100%" border="0" cellpadding="3" cellspacing="10">
  178.                 <form name="myform" method="post" action="?action=login" onsubmit="return loginCheck();">
  179.                   <tr>
  180.                         <td width="32%" align="right">管理账号</td>
  181.                         <td width="68%"><input type="text" name="username" class="inputs" /></td>
  182.                   </tr>
  183.                   <tr>
  184.                         <td align="right">管理密码</td>
  185.                         <td><input type="password" name="password" class="inputs" /></td>
  186.                   </tr>
  187.                   <tr>
  188.                         <td align="right">验 证 码</td>
  189.                         <!--<td><input name="checkcodestr" id="codestr" type="text" size="14" value="点击获取验证码" onclick="hh();" /> <div style="display:inline;" id="aa"></div></td>-->
  190.                         <td><input name="checkcodestr" id="codestr" type="text" size="10" /> <img src="../inc/verifycode.asp"  alt="验证码,看不清楚?请点击刷新验证码" height="10" style="cursor:pointer;" onClick="this.src=this.src+'?'+Math.random();" /></td>
  191.                   </tr>
  192.                   <tr>
  193.                         <td colspan="2" class="login_btntd"><input type="submit" name="Submit" class="login_btn" value="登 录" /></td>
  194.                   </tr>
  195.                  </form>
  196.           </table>
  197.         </div> 
  198. </div>
  199. <div class="copy_right">Copyright &copy; <a href="http://www.059it.com" target="_blank" title="捷扬文章系统">059it.com</a>  2008-2011 All rights reserved.</div>
  200. </body>
  201. </html>
  202.  
downloadadmin_login.asp Source code - Download Jie Yang v0.6.3 article system Source code
Related Source Codes/Software:
Jilin classification information release system v5.0 trial version - A ready-made classifieds site publishing system, h... 2016-09-21
Linyi CMS v6.5 market classification information - A. supply and demand information function: informa... 2016-09-21
Tesco discount net SQL version - And presentations, faster. 2016-09-21
- electronic enterprise website management system In a fully functional version - Super suitable for enterprise agents build a corpo... 2016-09-21
Rio mesh network hard disk system v3.0 - System functions: 1, increase the progress of Asp... 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
Pcook CMS bubble guest v3.0 SDCMS version - Developed by Asp+Access, and meet the needs of sma... 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top