if postion="" or not IsNumeric(postion) then
errmsg=""
postion=trim(1)
else
errmsg="<font color=#FF0000><b>您没有登陆或者停留的时间过长,请重新登陆!</b></font>"
end if
Function checkenter()
If username<>"" and password<>"" and otherpwd<>"" and Instr(username,"'")<1 and Instr(username," ")<1 and Instr(username,"""")<1 and Instr(username,"&")<1 then
checkenter=TRUE
Else
checkenter=FALSE
End If
End Function
Function checksysUser()
sql="SELECT * FROM admin WHERE userID='"&username&"'"
Set rs=Server.CreateObject("adodb.recordset")
rs.Open sql,conn,1,1
if rs.eof then
checksysUser=FALSE
else
passwd=trim(rs("pwd"))
if passwd=password then
Session("admin")=username
Session("userLever")=rs("userLever")
checksysUser=TRUE
else
checksysUser=FALSE
end if
End if
rs.close
conn.close
End Function
%>
<HTML>
<HEAD>
<TITLE><%=homepage_title%>--管理中心-用户登陆</TITLE>
<script language="JavaScript">
<!--
function window_onload() {
document.mail.username.focus();
}
function cancel()
{
mail.reset();
}
function IsValid()
{
if (document.mail.username.value=="")
{
alert("用户名不能为空");
document.mail.username.focus();
return false;
}
if (document.mail.password.value=="")
{
alert("密码不能为空");
document.mail.password.focus();
return false;
}
if (document.mail.otherpwd.value=="")
{
alert("附加码不能为空");
document.mail.otherpwd.focus();
return false;
}
}
//-->
</script>
</HEAD>
<BODY background="images/diwen.gif" topMargin=0 leftmargin="0" onload="return window_onload()">
<p> </p>
<%
if Request.Form("action")="true" then
username=trim(Request.Form("username"))
password=trim(Request.Form("password"))
position = Trim(Request.form("postion"))
otherpwd = Trim(Request.form("otherpwd"))
reotherpwd = Trim(Request.form("reotherpwd"))