index.asp

来自「管理员可以后台设置是否需要审核」· ASP 代码 · 共 143 行

ASP
143
字号
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="qwbm_conn.asp"--><!--#include file="qwbm_md5.asp"--><%

if request("action")="login" then

	dim xzename,xzpassword,yianzhen,formss	
	
	xzename = username(replace(trim(request("passname")),"'","''"))	
	xzpassword = md5(username(replace(trim(request("password")),"'","''")))
	yianzhen = username(trim(request("yianzhen")))
	yianzhenma = session("qwbm_code")
	
	call requesturl(xzename,"提交的用户名中有非法参数,禁止提交","","","")
	
	if yianzhen <> yianzhenma then
		call errbox("验证码不正确,请正确输入验证码","","","","")
	end if
	
	set man=server.createobject("adodb.recordset")
	man.open "select * from qwbmxuser where qwbmuname='"& xzename &"'",conn,1,3
		
		if man.eof and man.bof then
			call errbox("用户不存在","","","","")
		else
			if xzpassword <> man("qwbmupwds") then
				call errbox("密码不正确","","","","")
			else
				man("qwbmloginip") = Request.ServerVariables("REMOTE_ADDR")
				man("qwbmlogintime") = now()
				man("qwbmlogincounts") = man("qwbmlogincounts")+1
				man.update	
			
				qwbmuname = request.cookies(""& qwbmcms2 &"username")
				response.cookies(""& qwbmcms2 &"username") = man("qwbmuname")
				response.cookies(""& qwbmcms2 &"username").expires = dateadd("h",100000,now())
				
			end if
		end if
	man.close
	set man = nothing
	conn.close
	set conn=nothing
	session(""& qwbmcms2 &"bb") = ""
	call errbox("成功登录后台,现在进入后台","qwbm_index.asp","","","")
end if
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=qwbmcms1%></title>
<style type="text/css">
html,body,td,th {font-size:12px;color:#979596;font:normal 12px/160% Tahoma,Arial,宋体,sans-serif;}
form{margin:0;padding:0;border:0;}
input {font:normal 12px/160% Tahoma,Arial,宋体,sans-serif;}
.text1,.text2,.text3 {height:23px;border:1px #969696 solid;background:#ffffff;font-weight:bold;font-size:18px;letter-spacing:1px;color:#000;line-height:18px;}
.text1 {width:70px;}
.text2 {width:70px;}
.text3 {width:60px;}
.text4 {width:65px;height:23px;border:1px #969696 solid;background:#969696;font-weight:bold;color:#fff;line-height:18px;}
a:link,a:visited  {color:#000;text-decoration:none;}
a:hover {color:#f00;}
.footer {clear:both;text-align:center;font:normal 12px/160% Tahoma,Arial,宋体,sans-serif;font-size:14px;}
.footer a {margin:0 8px 0 0;}
</style>
<script language="javascript" type="text/javascript">
function cheack(){
var form = document.getElementById("form1");
	if (form.passname.value.replace(/ /g,"") == ""){
	    alert("用户名不能为空");
		form.passname.focus();
		return false;
	    }
	if (form.password.value.replace(/ /g,"") == ""){
	    alert("密码不能为空");
		form.password.focus();
		return false;
	    }
	if (isNaN(form.yianzhen.value)){
	    alert("验证码必须为数字");
		form.yianzhen.focus();
		return false;
	    }	
	if (form.yianzhen.value.replace(/ /g,"")==""){
	    alert("验证码不能为空");
		form.yianzhen.focus();
		return false;
	    }
return true;
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="index.asp?action=login" onSubmit="return cheack();">
  <table width="475" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10%;">
    <tr>
      <td colspan="3" align="center"><img src="images/logintop.gif" width="525" height="9" /></td>
    </tr>
    <tr>
      <td width="11" rowspan="3" align="left"><img src="images/loginleft.gif" width="10" height="272" /></td>
      <td width="504" style="border:1px solid #979596;line-height:27px;text-align:right;padding-right:10px;">深山行者信息管理系统 V2.0</td>
      <td width="10" rowspan="3" align="right"><img src="images/loginright.gif" width="10" height="272" /></td>
    </tr>
    <tr>
      <td height="212" align="center"><img src="images/adminlogin.gif" width="505" height="214" /></td>
    </tr>
    <tr>
      <td style="border:1px solid #979596;line-height:25px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-weight:bold;line-height:23px;">
        <tr>
          <td width="11%" height="27" align="right">用户名:</td>
          <td width="15%"><input name="passname" type="text" class="text1" size="10" maxlength="25" /></td>
          <td width="9%" align="right">密码:</td>
          <td width="15%"><input name="password" type="password" class="text2" size="10" maxlength="25" /></td>
          <td width="11%" align="right">验证码:</td>
          <td width="13%"><input name="yianzhen" type="text" class="text3" size="5" maxlength="4" /></td>
          <td width="11%" align="right"><img src="qwbm_code.asp"  alt="验证码,看不清楚?请点击刷新验证码" style="cursor:pointer; vertical-align:middle;height:18px;" onClick="this.src='qwbm_code.asp?t='+Math.random()" /></td>
          <td width="15%" align="center"><input type="submit" class="text4" name="Submit" value="登 陆" /></td>
        </tr>
      </table>
      </td>
    </tr>
    
    <tr>
      <td colspan="3" align="center"><img src="images/loginbottom.gif" width="525" height="9" /></td>
    </tr>
  </table>
</form>
<div class="footer">制作:<a title="深山行者" href="tencent://message/?uin=565449214&amp;Site=深山行者&amp;Menu=yes" target="blank">深山行者</a> 网站:<a href="http://www.qwbm.com" target="_blank">http://www.qwbm.com</a></div>
<!--
'----------------------------------------------------------------------
'**********************************************************************
'转发时请保留此声明信息,这段声明不并会影响你的速度!
'*******************  深山行者文章管理系统	*******************************
'作者:深山行者
'网站:http://www.qwbm.com
'电子邮件:sosufolj@163.com
'联系QQ:565449214
'版权声明:版权所有,源代码公开,各种用途均可免费使用,但是修改后必须把修改后的文件
'发送一份给作者.并且保留作者此版权信息
'**********************************************************************
'----------------------------------------------------------------------
-->
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?