代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
If Session("SecurityID") = "659169487253" Then
Response.Write "<script language='javascript'>"
Response.Write "location.href='default.asp'"
Response.Write "</script>"
Response.End
End if
%>
<!--#include file="config.asp"-->
<!--#include file="include/inc_advsecu.asp"-->
<!--#include file="include/inc_class.asp"-->
<!--#include file="include/md5.asp"-->
<%
UserName = Request.Form("Username")
Password = MD5(Request.Form("Password"))
If Len(UserName) > 0 Then
'ValidateUser=false
'if ValidateUser(UserName,Password,trim(Request.Form("vcode")),Request.Form("vcode2"),Request.Form("role")) then
'ShowUserLevelInfo
'end if
'Response.Cookies("Role")=Request.Form("role")
'response.cookies("kiss_cms_UserName_N")=username
'mLev = cLng(chkUser(UserName,Password,-1,trim(Request.Form("vcode")),Request.Form("vcode2"),Request.Form("role")))
If ValidateUser(UserName,Password,trim(Request.Form("vcode")),Request.Form("vcode2"),Request.Form("role")) Then
'记录登陆时间
Session("SecurityID") = "659169487253"
Session("kiss_cms_UserName") = username
Msql="update " & strDbTable & "user set u_userlogtime='"&now&"' where u_username='"&username&"'"
Conn.execute(Msql)
Response.redirect "default.asp"
else
ErrorMessage = "请检查密码,验证码,角色选择是否正确"
End if
End If
strUA = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(strUA, "MSIE") Then 'it's a Microsoft Browser
intVersion = Mid(strUA, InStr(strUA, "MSIE") + 5, 3)
If intVersion < 5.5 Then
%>
<script>
alert("为正常使用本系统,建议使用 Microsoft Internet Explorer 5.5. 或更高版本IE浏览器.")
</script>
<%
end if
else
%>
<script>
alert("为正常使用本系统,建议使用 Microsoft Internet Explorer 5.5. 或更高版本浏览器.")
</script>
<%
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>登录 KISS CMS 内容管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="new_css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
html, body {
border: 0;
overflow: auto;
background-image:url(images/dl_bg.gif);
background-repeat:repeat-x;
background-color:#E0E0E0;
}
td{color:#000;}
-->
</style>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function VF_login(){ //v2.0
var theForm = document.login;
var errMsg = "";
var setfocus = "";
if (theForm['vcode'].value == ""){
errMsg = "请填写验证码";
setfocus = "['vcode']";
}
if (theForm['password'].value == ""){
errMsg = "请填写登录密码";
setfocus = "['password']";
}
if (theForm['username'].value == ""){
errMsg = "请填写用户名";
setfocus = "['username']";
}
if (errMsg != ""){
alert(errMsg);
eval("theForm" + setfocus + ".focus()");
}
else theForm.submit();
}
function defaultfocus(){
if (document.login.username.value=="")
document.login.username.focus();
else
document.login.password.focus();
}
function submitonce(theform){
if (document.all||document.getElementById){
for (i=0;i<theform.length;i++){
var tempobj=theform.elements[i]
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true
}
}
}
</script>
</head>
<body>
<div id="login_all">
<div id="login_out">
<div id="login_top">
<div id="login_log"><img src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original=""images/dl_log.gif"" alt="login_log" /></div>
<div id="login_p2a"><img src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original=""images/dl_p2a.gif"" alt="login_p2a" /></div>
<div class="clear"></div>
</div>
<div id="login_cont"><form action="login.asp" method="post" name="login" onsubmit="submitonce(this)"><table width="245" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20%" height="26">角 色:</td>
<td>
<select name="role">
<%
msql ="SELECT * FROM " & strDbTable & "Role_Group"
set rsrolelist=conn.Execute (msql)
If not rsrolelist.eof Then
do while not rsrolelist.eof%>
<option value="<%=rsrolelist("UserLevelID")%>"><%=rsrolelist("UserLevelName")%></option><%
rsrolelist.movenext
loop
end if
rsrolelist.close%>
</select></td>
</tr>
<tr>
<td height="26">用户名:</td>
<td><label>
<input name="username" type="text" class="login_input1" value="" />
</label></td>
</tr>
<tr>
<td height="26">密 码:</td>
<td><input name="password" type="password" class="login_input1" /></td>
</tr>
<tr>
<td height="26">验证码:</td>
<td><input name="vcode" type="text" class="login_input2" />
<span class="login_font"><%
Randomize()
intRangeSize = 5000 - 1000 + 1
sngRandomValue = intRangeSize * Rnd()
sngRandomValue = sngRandomValue + intLowerBound
intRandomInteger = Int(sngRandomValue)
For intWriteDigitLoopCount = 1 to Len(intRandomInteger)
Response.Write("<img width=10 height=13 src=""icon/clear_vercode/")
Response.Write(Mid(intRandomInteger, intWriteDigitLoopCount, 1) & ".gif""")
Response.Write("alt=""" & Mid(intRandomInteger, intWriteDigitLoopCount, 1) & """>")
Next
%> <INPUT NAME="vcode2" TYPE="hidden" ID="vcode2" VALUE="<%=intRandomInteger%>"></span> </td>
</tr>
<tr>
<td height="26" colspan="2" class="login_red"><%=ErrorMessage%></td>
</tr>
<tr>
<td height="26"> </td>
<td>
<div class="login">
<ul>
<li><input name="登录" type="submit" class="login_button" value="登 录" onClick="this.value='验证中...'" /></li>
<li><input name="取消" type="reset" class="login_button" value="取 消" /></li>
</ul>
<div class="clear"></div>
</div></td>
</tr>
</table>
</form>
</div>
</div>
<div id="login_cr"><img src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original=""images/dl_copyright01.gif"" alt="copyright1" /><a href="http://www.p-2-a.com" target="_blank"><img src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original=""images/dl_copyright02a.gif"" alt="P2A" border="0" onMouseOver="this.src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original="images/dl_copyright02b.gif"" onMouseOut="this.src="http://www.97605.com/skin/qymbskinv52/image/lazy.gif" class="lazy" original="images/dl_copyright02a.gif""/></a></div>
</div>
</body></html>
<%
Conn.close
Set Conn = Nothing%>