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

📄 login.asp

📁 诚信商店系统源代码
💻 ASP
字号:
<!--#include file="./public/wxl_conn.asp"--><meta name=keywords content="诚信商店,血饮狂刀,Clanboo,lanboo,金统联,webmaster@xytime.com,jsbuy.com,cebuy.com,王星亮,完美商店,超级商店,商城,冷面">
<%
Session.Timeout=20

if session("YnAgri_KeyId")="" then 
  dim LoginName, wxl, Password, ErrorMesg, objRsOper, strSql, strURL
  
  strURL=Request.ServerVariables("QUERY_STRING")
  If IsEmpty(strURL) Or strURL="" Then
	strURL=""
  Else
	strURL="?" & strURL
  End If
  strURL=Request.ServerVariables("SCRIPT_NAME") & strURL
  
  wxl=request("wxl")
  if wxl = "login" then
    LoginName=request("loginname")
    Password=request("loginpwd")
    if LoginName="" or Password="" then Back("错误:用户名和密码必须填写!")
    if InStr(LoginName,"'") > 0 then Back("用户名中包含非法字符!")
    if InStr(Password,"'") > 0 then Back("密码中包含非法字符!")
    strSql = "Select * From web_SysOperators Where bln_sOperIsDeleted=0 and str_sOperLoginName = '" & LoginName & "'"
    set objRsOper = conn.Execute(strSql)
    if objRsOper.EOF then Back("用户名错误!")
	if objRsOper("bln_sOperIsDeleted")=1 then Back("该用户已经被删除!")
	if objRsOper("int_sOperType")<1 then Back("该用户已经被禁用!")
    if objRsOper("str_sOperLoginPwd")<>Encrypt(Password) then Back("登录密码错误!")
    Query="select * from Web_SysOnline where str_sOleLoginName='"&LoginName&"'"
    set sql=conn.Execute(Query)
    if sql.eof then
		 key_id = GetKey
         set tmpSql=conn.execute("select * from Web_SysOnline where str_sOleKeyId='"&key_id&"'")
          while not tmpSql.eof
             key_id = GetKey
             set tmpSql=conn.execute("select * from Web_SysOnline where str_sOleKeyId='"&key_id&"'")
          wend
          Query="Insert into Web_SysOnline values('"&key_id&"',"&objRsOper("int_sOperID")&",'"&LoginName&"','"&objRsOper("str_sOperName")&"','"&objRsOper("str_sDeptID")&"',"&objRsOper("int_sOperGrpID")&",#"&Now&"#,'"&AddIp&"',#"&Now&"#)"
          conn.Execute(Query)
 		  session("YnAgri_KeyId")=key_id
		  session("YnAgri_Name")=objRsOper("str_sOperName")
	else
      if sql("str_sOleLoginIP")<>AddIp then Back("对不起,本帐号已经有人正在使用!")
   	  session("YnAgri_KeyId")=sql("str_sOleKeyId")
    end if
	conn.Execute("Insert into web_SysLog (LoginName,LoginTime,LoginIp,LeaveTime) values('"&LoginName&"',#"&Now&"#,'"&AddIp&"',#"&Now&"#)")
    response.redirect "index.asp"  
'		response.end
%>
<script language=JavaScript>
 woiwo=window.open('index.asp','woiwo','resizable=no,scrollbars=no,toolbar=no,menubar=no,fullscreen=no');
 woiwo.moveTo(0,0)
// woiwo.resizeTo(screen.availWidth,screen.availHeight)
 woiwo.resizeTo(800,580)
// woiwo.outerWidth=screen.availWidth
// woiwo.outerHeight=screen.availHeight
 window.close();
</script>
<%
        response.end
  else
    LoginHtml
  end if
end if

 sub LoginHtml()
  %>
<html>
<head>
<title>诚信商店---用户登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META  HTTP-EQUIV="Pragma"  CONTENT="no-cache">   
<META  HTTP-EQUIV="Cache-Control"  CONTENT="no-cache">   
<META  HTTP-EQUIV="Expires"  CONTENT="0">
<style>
td { text-decoration: none; color: #FFFFFF; font-size: 10pt; }
a { color: #FFFFFF; font-size: 10pt; }
.inputnormal
  {
    BACKGROUND-COLOR: #002C63;
    BORDER-BOTTOM: white 1pt solid;
    BORDER-LEFT: medium none;
    BORDER-RIGHT: medium none;
    BORDER-TOP: medium none;
    FONT-FAMILY: 宋体;
    FONT-SIZE: 10pt;
    FONT-WEIGHT: normal;
	COLOR: #FFFFFF;
  }
</style>
<script src="js/function.asp"></script>
<script language="JavaScript">
function closewindow()
{
  window.opener = null;
  window.close();
}

function ChangeKey(option)
{
  if(event.keyCode == 13)
    if (option == 1)
      document.frmlogin.loginpwd.focus();
    else
      login_submit();
}

function login_submit() {
  if (document.all("loginname").value=="") {
    alert("请输入用户名!");
    document.frmlogin.loginname.focus();
    return;
  }
  
  if (document.all("loginpwd").value=="") {
    alert("请输入口令!");
    document.frmlogin.loginpwd.focus();
    return;
  }

  document.frmlogin.action="login.asp";
  document.frmlogin.submit();
}
</script>
</head>

<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 style='overflow:scroll;overflow-y:hidden;overflow-x:hidden;cursor:default;' onkeyDown="javascript:return vConfirm();" ondragstart = "CancelEvent()" onselectstart = "CancelEvent()">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<form name="frmlogin" method="post" action="">
  <tr>
    <td><div align="center"> 
        <TABLE WIDTH=602 BORDER=0 CELLPADDING=0 CELLSPACING=0>
          <TR> 
            <TD> <IMG SRC="images/login_01.jpg" WIDTH=602 HEIGHT=174 ALT=""></TD>
          </TR>
          <TR> 
            <TD width="602" height="94" valign="top" background="images/login_02.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="69%" height="38">&nbsp;</td>
                  <td width="31%" valign="bottom"> <input name="loginname" type="text" size="16" onKeyDown="javascript:ChangeKey(1);"></td>
                </tr>
                <tr> 
                  <td height="37">&nbsp;</td>
                  <td valign="bottom">
					<input name="loginpwd" type="password" size="16" onKeyDown="javascript:ChangeKey(2);">
					<input type='hidden' name='wxl' value='login'>
                  </td>
                </tr>
              </table> </TD>
          </TR>
          <TR> 
            <TD> <IMG SRC="images/login_03.jpg" ALT="" WIDTH=602 HEIGHT=134 border="0" usemap="#Map"></TD>
          </TR>
        </TABLE>
      </div></td>
  </tr>
</table>
<map name="Map">
  <area shape="rect" coords="376,12,438,34" href="#" onclick="javascript:login_submit();">
  <area shape="rect" coords="466,11,531,35" href="#" title="关闭窗口" style="cursor:hand" onclick="javascript:closewindow();">
  <area shape="rect" coords="404,41,491,64" href="#" onClick="window.open('delonline.asp','非正常处理','resizable=no,scrollbars=no,toolbar=no,menubar=no,fullscreen=no,width=350,Height=200,left=190,top=120');">
</map>
</BODY>

<script language="JavaScript">
  document.frmlogin.loginname.focus();
</script>
</form>
</body>
</html>
<%
 Response.End
end sub
%>

⌨️ 快捷键说明

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