📄 login.asp
字号:
<!-- #include file = "../include/asphead.asp" -->
<!-- #include file = "../include/function.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function Login()
{
if(frmData.SystemType.value==2)
{
if(frmData.LoginID.value=="" || frmData.CompanyID.value=="" )
{
alert("请输入公司名、用户名和密码。");
return false
}
}
else
{
if(frmData.LoginID.value=="")
{
alert("请输入用户名和密码。");
return false
}
}
frmData.ScreenWidth.value=window.screen.width;
frmData.target="_top";
frmData.submit();
}
function Apply()
{
if(window.showModalDialog("../home/frame.asp?target=apply.asp?Solution=gis", "","dialogwidth:560px;dialogheight:445px;Status:0;center:1;resizable=1;")==true)
{
}
}
//-->
</script>
<%
dim NextURL
dim CompanyID,LoginID,PWD,IP,PreLoginTime,PreIP
dim ErrNo,ErrDesc
dim CookieEnabled
dim ScreenWidth
dim RemainLogin
dim WelcomeTitle1,WelcomeTitle2
dim AutoFillLogin
dim WExcel
set WExcel=server.CreateObject("WExcel.UserAuth")
NextURL = "mainframe.asp"
CompanyID = Request.Form("CompanyID")
LoginID = Request.Form("LoginID")
PWD = Request.Form("PWD")
ScreenWidth=Request.Form("ScreenWidth")
IP = getClientIP()
ErrDesc=""
Admin=""
Logined=false
TokenKey=""
ErrNo=""
WExcel.GetTitle WelcomeTitle1,WelcomeTitle2,AppTitle
AutoFillLogin=WExcel.IsAutoFillLogin
Response.Cookies("Login")("AppTitle") = AppTitle
if LoginID <> "" then
CookieEnabled=true
if Request.Cookies("Login")("Test1") <> "Test1" then
CookieEnabled=false
end if
if CookieEnabled=false then
ErrDesc="系统无法使用 Cookie,可能的原因有:(1) 本机禁用了 Cookie。请放开此权限,位置:工具→Internet 选项→安全。(2) 您修改了系统日期,导致 Cookie 数据错乱。请清空 IE 的缓存数据,位置:工具 → Internet 选项 → 常规,删除 Cookies,删除文件。然后,关闭 IE 浏览器并重新打开。"
else
RemainLogin=trim(lcase(Request.Form("chkRemainLogin")))
if RemainLogin="on" then
Response.Cookies("RemainLogin")("Remain") = RemainLogin
Response.Cookies("RemainLogin")("CompanyID") = CompanyID
Response.Cookies("RemainLogin")("LoginID") = LoginID
Response.Cookies("RemainLogin")("PWD") = PWD
else
Response.Cookies("RemainLogin") = ""
end if
Response.Cookies("RemainLogin").Expires = CookieLife
if WExcel.CheckEnv(ErrNo,ErrDesc) then
if WExcel.CheckRootDBConn(ErrNo,ErrDesc) then
Logined=WExcel.Login(cstr(CompanyID), cstr(LoginID), cstr(PWD), cstr(IP), CoID, UserID, Admin, AccountType, TokenKey, ErrNo,ErrDesc,PreLoginTime,PreIP)
end if
end if
CheckErr
if ScreenWidth="" then
ScreenWidth=800
elseif not isnumeric(ScreenWidth) then
ScreenWidth=800
end if
Response.Cookies("Temp")("ScreenWidth")=ScreenWidth
Response.Cookies("Temp")("LoginFrom")=Request.ServerVariables("HTTP_REFERER")
Response.Cookies("Login")("CoID") = CoID
Response.Cookies("Login")("UserID") = UserID
Response.Cookies("Login")("Admin") = Admin
Response.Cookies("Login")("AccountType") = AccountType
if Logined =true then
Response.Cookies("Login")("Logined") = "1"
Response.Cookies("Login")("TokenKey") = TokenKey
Response.Redirect NextURL
else
if ErrNo<>"" then
if ErrNo="0104" then
Response.Cookies("Login")("UserID") = UserID
Response.Redirect "conflict.asp?PreLoginTime=" & PreLoginTime & "&PreIP=" & PreIP
Response.End
elseif ErrNo="0103" then
ErrDesc=ErrDesc & "<a href='onlineframe.asp'>查看在线用户</a>"
end if
end if
end if
end if
else
Response.Cookies("Login")("Test1") = "Test1" 'Test for cookie enabled
RemainLogin=trim(lcase(Request.Cookies("RemainLogin")("Remain")))
if RemainLogin="on" then
CompanyID=Request.Cookies("RemainLogin")("CompanyID")
LoginID=Request.Cookies("RemainLogin")("LoginID")
PWD=Request.Cookies("RemainLogin")("PWD")
else
CompanyID=""
LoginID=""
PWD=""
end if
end if
%>
<html>
<head>
<title><%=AppTitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="description" content="A General Information System">
<meta name="keywords" content="HC General Information System, hcgis, excel, web excel, office software, office system, information system, management system, management information system, information management system, information share, 华创, 华创通用信息系统, 网络excel, 办公软件, 办公系统, 信息系统, 管理系统, 管理信息系统, 信息管理系统, 协同处理, 信息共享">
</head>
<body>
<form METHOD="post" name="frmData">
<div id="loginbox" align="center">
<table cellSpacing="0" cellPadding="0" width="720" border="0">
<tr>
<td colspan="4">
<a href="http://www.hc-software.com" border="0" target="_blank"><img align="left" src="../images/hclogo.gif" border="0" WIDTH="149" HEIGHT="45"></a>
</td>
</tr>
<tr>
<td colspan="4">
<p align="left">
<font color="#BBBBBB" style="font-family:黑体;FONT-SIZE: 12pt;">
<%if trom(lcase(WelcomeTitle1))<>trom(lcase(WelcomeTitle1)) then%>
<%=WelcomeTitle1%>
<%end if%>
</font>
</p>
</td>
</tr>
<tr height="80" valign="center">
<td colspan="4">
<font STYLE="font-family:黑体;FONT-SIZE: 19pt;FONT-WEIGHT: bold;color=#888888; LETTER-SPACING: 5px">
<%=WelcomeTitle2%>
</font>
</td>
</tr>
<tr>
<td width="30"><img height="258" src="../images/loginleft.gif" width="30"></td>
<td width="364" background="../images/loginbgleft.gif">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td vAlign="top" width="330">
<table cellSpacing="2" cellPadding="2" width="350" align="center" border="0" style="COLOR: #00458a;">
<tr>
<td colspan="2">
<b>用户登录</b>
</td>
</tr>
<tr height="25">
<td colspan="2">
<table WIDTH="100%" align="center" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<tr><td><font color="red"><%=ErrDesc%></font></td></tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table cellSpacing="0" cellPadding="0" width="200" align="center" border="0" style="COLOR: #00458a;">
<%if SystemType=2 then%>
<tr>
<td width="80" style="TEXT-ALIGN:left;">
公司名
</td>
<td width="130">
<input TYPE="text" NAME="CompanyID" style="WIDTH: 130px; COLOR: #00458a;" maxLength="20" value="<%=server.HTMLEncode(CompanyID)%>">
</td>
</tr>
<%end if%>
<tr>
<td width="80" style="TEXT-ALIGN:left;">
用户名
</td>
<td width="130">
<input TYPE="text" NAME="LoginID" style="WIDTH: 130px; COLOR: #00458a;" maxLength="20" value="<%=server.HTMLEncode(LoginID)%>">
</td>
</tr>
<tr>
<td width="80" style="TEXT-ALIGN:left;">
密码
</td>
<td width="130">
<input TYPE="password" NAME="PWD" style="WIDTH: 130px; COLOR: #00458a;" maxLength="20" value="<%=server.HTMLEncode(PWD)%>">
</td>
</tr>
</table>
</td>
</tr>
<tr height="30" valign="bottom">
<td width="80">
</td>
<td width="130" style="TEXT-ALIGN:left;">
<%if not AutoFillLogin then%>
<input name="chkRemainLogin" type="checkbox" <%if RemainLogin="on" then%> checked <%end if%>> 保留登录信息
<%end if%>
</td>
</tr>
<tr height="40" valign="bottom">
<td colspan="2">
<%if AutoFillLogin then%>
<input type="submit" id="submit" name="submit" value="登录" style="cursor:hand; WIDTH: 60px; HEIGHT: 24px; COLOR: #00458a;" LANGUAGE="javascript" onclick="return Login()">
<%else%>
<input type="button" id="btnLogin" name="btnLogin" value="登录" style="cursor:hand; WIDTH: 60px; HEIGHT: 24px; COLOR: #00458a;" LANGUAGE="javascript" onclick="return Login()">
<%end if%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td vAlign="top" background="../images/loginbgright.gif">
<p><br><br></p>
<table cellSpacing="2" cellPadding="2" width="240" align="right" border="0" style="COLOR: #ffffff;">
<tr vAlign="top">
<td height="20" style="FONT-SIZE: 10pt;FONT-WEIGHT: bold;TEXT-ALIGN:left;">华创软件,</td>
</tr>
<tr>
<td height="40" style="FONT-SIZE: 10pt;FONT-WEIGHT: bold;TEXT-ALIGN:left;">致力于企业管理软件的研发,一切以客户为中心,竭诚为您提供优质的产品和服务!</td>
</tr>
<tr>
<td> </td>
</tr>
<tr vAlign="top">
<td height="18" style="FONT-SIZE: 9pt;TEXT-ALIGN:left;">咨询热线:022-23736481</td>
</tr>
<tr vAlign="top">
<td height="18" style="FONT-SIZE: 9pt;TEXT-ALIGN:left;">华创网站:<a style="COLOR: #ffffff;" href="http://www.hc-software.com">http://www.hc-software.com</a></td>
</tr>
<%if SystemType=2 then%>
<tr height="60" valign="bottom">
<td style="FONT-SIZE: 10pt;FONT-WEIGHT: bold;TEXT-ALIGN:left;">
还没有登录帐号?<input type="button" id="btnApply" name="btnApply" value="立即申请" style="cursor:hand; WIDTH: 80px; HEIGHT: 24px; COLOR: #00458a;" LANGUAGE="javascript" onclick="return Apply()">
</td>
</tr>
<%end if%>
</table>
</td>
<td width="30"><img height="258" src="../images/loginright.gif" width="30"></td>
</tr>
</table>
</div>
<input TYPE="hidden" NAME="ScreenWidth">
<input TYPE="hidden" NAME="SystemType" value="<%=SystemType%>">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -