www.gusucode.com > 维六酷博客管理系统 1.1源码程序 > master/login.asp

    <!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/function.asp" -->
<!-- #include file="../inc/md5.asp" -->
<%
If RequestQueryStr("action")="LOGOUT" Then
	session("admin")=""
	session("role")=""
	Session.Abandon
	Response.Redirect ("../index.asp")
	'Call MessageBox("退出成功","../index.asp")
End If
Dim MyValue
Randomize 
MyValue = Int((9999 - 1000 + 1) * Rnd + 1000)
If RequestFormStr("action")="LOGIN" then
	admin=RequestFormStr("admin")
	password=RequestFormStr("password")
	checkcode=RequestFormNum("checkcode")
	checkcodeO=RequestFormNum("checkcodeO")
	If admin="" Then
		Call MessageBox("用户名不能为空!","")
		Response.End
	End If
	If password="" Then
		Call MessageBox("密码不能为空!","")
		Response.End
	End If
	If checkcode <> checkcodeO Then
		Call MessageBox("验证码不正确!","")
		Response.End
	End If
	'Response.Write md5(password)
	'Response.End
	Set rs=conn.Execute("Select * From admin Where admin='"& admin &"' and password='"& md5(password) &"'")
	If rs.eof And rs.bof Then
		Call MessageBox("用户名或密码不正确!","")
		Response.End
	Else
		session("admin")=admin
		session("role")=rs("role")
		session.timeOut=60
		Response.Redirect("index.asp")
	End If
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>让我更出色_后台管理v1.1</title>
<style type="text/css">
<!--
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
}
body {
	background-color: #000000;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #999999;
	font-weight: bold;
}

-->

</style>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {color: #CCCCCC}
-->
</style>
</head>

<body>
<table width="195" height="505" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="images/login/bg.gif"><br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
          <table width="75%" height="83" border="0" align="center" cellpadding="0" cellspacing="0">
      <form  name="form1" method="post" action="">
<input name="action" type="hidden" value="LOGIN">
<input name="checkcodeO" type="hidden" value="<%=MyValue%>">
      <tr>
        <td width="30%"><span class="STYLE1">用户名
          
        </span></td>
        <td width="70%"><input name="admin" type="text" class="css" size="12"></td>
      </tr>
      <tr>
        <td><span class="STYLE1">密  &nbsp;&nbsp;码</span></td>
        <td><input name="password" type="password" class="css" size="12"></td>
      </tr>
      <tr>
        <td><span class="STYLE1">验证码</span></td>
        <td><input name="checkcode" type="text" class="css" size="4">&nbsp;<b class="STYLE1"><%=MyValue%></b></td>
      </tr>
    </table>
    <br>
          <br>
          <br>      
          <table width="27%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><input type="image" src="images/login/denglu.gif" width="77" height="54" border="0"></a></td>
            </tr>
          </table>
    <br></td>
  </tr>
  </form>
</table>
<br>
<table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><span class="STYLE2"><a href="http://www.v6k.net/" target="_blank">维六酷管理平台</a></span></td>
  </tr>
</table>
</body>
</html>

</body>