⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.asp

📁 航空订票系统基于asp.net和sql2005包含数据库和图片
💻 ASP
字号:
<!---#include file="../global/inc/ConstChar.asp"--->
<!---#include file="../global/inc/global.asp"--->
<!---#include file="../global/inc/library.asp"--->
<%
BBSID=request.QueryString("BBSID")
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
	AdminUserName = Request.Form("AdminUserName")
	AdminPassword = Request.Form("AdminPassword")
	if Not IsNot(AdminUserName,"s") Then
		Call InfoErrorWrite("您没有输入用户名")
	end if
	if Not IsNot(AdminPassword,"s") Then
		Call InfoErrorWrite("您没有输入密码")
	end if
	'格式化数据
	AdminUserName = FormatString(AdminUserName)
	AdminPassword = FormatString(AdminPassword)
	
	dim StrSql,Rs,errMsg
	StrSql = "Select * From Sm_WebAdmin Where "&_
			" AdminUserName='"&AdminUserName&"' And AdminPassword='"&AdminPassword&"'"
	'Response.Write(StrSql)
	'Response.End()
	oConn_Start
	Set Rs = oConn.execute(StrSql)
	'判断是否存在用户
	If Rs.eof Or Rs.bof Then
		errMsg = "用户名或密码验证失败"
	Else
		ValidFlag = Rs("ValidFlag")
		If ValidFlag<=0 Then
			errMsg = "您的用户名还没有激活,<br>请管理员核实后再开通"
		Else
			Session("AdminId") = Rs("AdminId")
			Session("U_Name") = AdminUserName
			Session("AdminFlag") = Rs("AdminFlag")
			Rs.Close
			Set Rs=nothing
			oConn.Execute("Update Sm_WebAdmin Set LoginCount = LoginCount + 1 ,LastLogin = '"&now()&"' Where AdminUserName='"&AdminUserName&"'")
			oConn_Close
			Server.Transfer("index.asp")
		end if
	end if
End If
%>
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上海神马旅游咨询有限公司管理平台</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
<link href="../style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #f7f7f7;
}
-->
</style><Script Language="JavaScript" src="../global/Script/CheckForm.js"></Script>
<script language="JavaScript" type="text/JavaScript">
  //Form校验
  function NoEntry()
  {
    if (!CheckNotNull(form1.AdminUserName, "登录名称")) {return false;}
    if (!CheckNotNull(form1.AdminPassword, "登录密码")) {return false;}
  }
    //设置初始光标
  function SetFocus() {
    if (form1.AdminUserName.value == "") form1.AdminUserName.focus();
    else form1.AdminPassword.focus();
  }
  onload = SetFocus;
</script></head>

<body>

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="420" id="AutoNumber1" height="100%">
    <tr>
      <td align="left">
      <table border="0" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" bgcolor="#E7E7E7">
        <tr>
          <td width="100%">
          <table border="0" cellpadding="0" cellspacing="1" style="border-collapse: collapse" width="100%" id="AutoNumber3" bgcolor="#CCCCCC">
            <tr>
              <td width="100%" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left"><img src="images/admin_logo.gif" width="165" height="47"></td>
                </tr>
                <tr>
                  <td align="left"><img src="images/line.gif" width="409" height="1"></td>
                </tr>
                <tr>
                  <td align="left">&nbsp;</td>
                </tr>
                <tr>
                  <td align="left" class="bborder"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><img src="images/admin_top.gif" width="375" height="26"></td>
                      </tr>
                    <tr>
                      <td><form name="form1" method="post" action="login.asp" onSubmit="return NoEntry()">
                        <table width="250" border="0" align="center" cellpadding="2" cellspacing="2">
                          <tr>
                            <td width="64" bgcolor="FFF7EF">用户名</td>
                            <td width="140"><input name="AdminUserName" type="text" class="input" id="AdminUserName" size="15">
                                <input type="hidden" name="act" value="loginok"></td>
                            <td width="48" rowspan="2"><input name="imageField" type="image" src="images/admin_login.gif" width="62" height="62" border="0"></td>
                          </tr>
                          <tr>
                            <td bgcolor="FFF7EF">密&nbsp;&nbsp;&nbsp;码</td>
                            <td width="140"><input name="AdminPassword" type="password" class="input" id="AdminPassword" size="15"></td>
                          </tr>
                        </table>
                      </form></td>
                      </tr>
                    <tr>
                      <td align="center"><b><%=errMsg%></b></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td align="left">&nbsp;</td>
                </tr>
                <tr>
                  <td align="center">· <a href="mailto:webmaster@surlink.cn">忘记密码</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;· <a href="mailto:webmaster@surlink.cn">联系网管</a></td>
                </tr>
                <tr>
                  <td align="left">&nbsp;</td>
                </tr>
              </table></td>
            </tr>
          </table>
          </td>
        </tr>
      </table>
      </td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>

⌨️ 快捷键说明

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