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

📄 login.asp

📁 客户资源管理系统 1.显示所有客户资料 2.添加/修改客户资料; 3.添加客户拜访记录; 4.模糊搜索; 5.数据导出导入excal-access; 6.信息录入人员管理; 7.数据转移
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True
Response.Expires = 0
Response.Expiresabsolute = Now() - 1 
Response.AddHeader "pragma","no-cache" 
Response.AddHeader "cache-control","private" 
Response.CacheControl = "no-cache"
%>
<!--#include file="Connections/conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="http://127.0.0.1/">
<meta name="Date" content="2003-08">
<title>劲轩商务 客户管理系统</title>
<script language="JavaScript">
<!--
if (this.location.href == top.location.href){
    top.location.href = "";
}

function checkInput()
{
    var strItem1 = document.all.item1.value;
	var strItem2 = document.all.item2.value;
	if (strItem1 == ""){
	    document.all.errMsg.innerHTML = "<font color=\"#FF0000\">请输入账号。</font>"
		document.all.item1.focus();
		return false;
	}
	if (strItem2 == ""){
	    document.all.errMsg.innerHTML = "<font color=\"#FF0000\">请输入密码。</font>"
		document.all.item2.focus();
		return false;
	}
}

function checkChr(chr)
{
    var str0 = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var intLen = chr.length;
	for (var i=0;i<intLen;i++){
	    
	}
}
-->
</script>
<link href="myStyle.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="images/test.css" type="text/css">
<style type="text/css">
<!--
a:link {
	font-family: "宋体";
	font-size: 12px;
	color: #005288;
	text-decoration: none;
}
a:visited {
	font-family: "宋体";
	font-size: 12px;
	color: #005288;
	text-decoration: none;
}
a:hover {
	font-family: "宋体";
	font-size: 12px;
	color: #005288;
	text-decoration: underline;
}
a:active {
	font-family: "宋体";
	font-size: 12px;
	color: #005288;
	text-decoration: none;
}

-->
</style>
</head>

<body style="background-color: menu;" >
<%
If Session("CRM_account") <> "" And Session("CRM_name") <> "" And Session("CRM_level") > 0 Then Response.Redirect("listAll.asp")
Dim action
action = Trim(Request("action"))
Select Case action
Case "login"
    Call login()
Case Else
    Call loginForm()
End Select

Sub login()
    Dim account,password
	account = Trim(Request("item1"))
	password = Trim(Request("item2"))
	If account = "" Or password = "" Then
	    Response.Redirect("login.asp?errMsg=2")
		Response.End()
	End If
	Dim rs
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.Open "Select * From baidu_user Where uAccount = '" & account & "'",conn,3,1
	If rs.RecordCount <> 1 Then
	    Response.Redirect("login.asp?errMsg=1")
		Response.End()
	End If
	If password <> rs("uPassword") Then
	    Response.Redirect("login.asp?errMsg=1")
		Response.End()
	End If
	If rs("uBlock") = True Then
	    Response.Redirect("login.asp?errMsg=3")
		Response.End()
	End If
	Session("CRM_account") = account
	Session("CRM_name") = rs("uName")
	Session("CRM_level") = rs("uLevel")
	Session("CRM_group") = rs("uGroup")
	rs.Close
	Set rs = Nothing
	Response.Redirect("listAll.asp")
End Sub

Sub loginForm()
    Dim errMsg
	errMsg = CInt(ABS(Request("errMsg")))
	Select Case errMsg
	Case 2
	    errMsg = "<font color=""#FF0000"">请输入账号和密码。</font>"
	Case 1
	    errMsg = "<font color=""#FF0000"">账号密码错误。</font>"
	Case 3
	    errMsg = "<font color=""#FF0000"">账号被冻结。</font>"
	Case Else
	    errMsg = ""
	End Select
%>

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgColor=#ffffff >
  <tr>
    <td align="center" valign="middle"><table width="364" border="0" cellspacing="0" cellpadding="2" style="border-left: 1px solid #FFFFFF; border-right: 1px solid #888888; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #888888;">
        <form name="loginForm" action="?action=login" method="post" onSubmit="return checkInput();">
		<tr> 
          <td style="border-left: 0px solid #888888; border-right: 0px solid #888888; border-top: 1px solid #FFFFFF; border-bottom: 1px solid #888888;"><img src="images/head.gif" width="360" height="45"></td>
        </tr>
        <tr> 
          <td height="24" id="errMsg"><% = errMsg %></td>
        </tr>
        <tr> 
          <td height="24" align="center"><font color=#000000>账号:</font> 
            <input name="item1" type="text" id="item1" size="12" maxlength="16" style="ime-mode: disabled;" onFocus="this.select(); this.value='';"></td>
        </tr>
        <tr> 
          <td height="24" align="center"><font color=#000000>密码:</font>
              <input name="item2" type="password" id="item2" size="12" maxlength="16" style="ime-mode: disabled;" onFocus="this.select(); this.value='';"></td>
        </tr>
        <tr> 
          <td height="30" align="center">
            <input type="submit" name="Submit" value="提交"> &nbsp;&nbsp; 
            <input name="Reset" type="reset" id="Reset" value="重置"></td>
        </tr>
        <tr>
          <td height="40" align="center">&nbsp;<font color="#ff0000">注意:</font>连续输入三次错误,账号将被冻结!</td>
        </tr>
		</form>
      </table></td>
  </tr>
</table>
<%
End Sub
%>
</body>
</html>

⌨️ 快捷键说明

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