<
%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="sub/webvar.asp"-->
<!--#include file="sub/fun.asp"-->
<!--#include file="sub/econn.asp"-->
<!--#include file="sub/md5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" c>
<title><%=webtitle%></title>
<link href="sub/main.css" rel="stylesheet" type="text/css">
</head>
<%=webbody%>
<!--#include file="top.asp"-->
<table width="778" height="7" border="0" align="center" cellpadding="0" cellspacing="0" background="images/05_title_son_back.gif" bgcolor="FFC3DD">
<tr>
<td width="24"></td>
<td valign="top"><img src="images/05_title_son2.gif" width="26" height="7"></td>
<td width="95"></td>
<td width="71"></td>
<td width="68" ></td>
<td width="68"></td>
<td width="68"></td>
<td width="67"></td>
<td width="58"></td>
<td width="48"></td>
<td width="87"></td>
</tr>
</table>
<table width="778" height="9" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="center" valign="top"><img src="images/zeai/3.gif" width="760" height="22"></td>
</tr>
</table>
<table width="778" height="24" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-left:#FFD7ED 1px solid;border-right:#FFD7ED 1px solid;">
<tr>
<td width="201" align="right" valign="top"><font color="#FF6699">请登录本站以享受更好的服务!</font></td>
<td width="567" align="center" valign="top" style="padding-bottom:6px;"> </td>
</tr>
</table>
<%If request("action")="chk" Then
call chklogin()
if founderr then call yzlove_error("<font style='font-size:18pt;font-family: Verdana, Arial, Helvetica, sans-serif;color:1D90AD'>Sorry!</font> <br><br> 用户验证失败,拒绝登录,请重试!<br><br><a href=javascript:history.back()><< 返回</a> <br><br>")
Else
%>
<table width="778" height="292" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-left:#FFD7ED 1px solid;border-right:#FFD7ED 1px solid;border-bottom:#FFD7ED 1px solid;">
<tr>
<td valign="top"><br>
<table width="498" align=center cellpadding=3 cellspacing=0 class=tableborder1 style="border:#EEEEEE 8px solid;">
<tr>
<td width="28%" rowspan="2" valign=middle><img src="images/login002.jpg" width="145" height="200"></td>
<td height="40" align="center" valign=top bgcolor="FD9232" style="border-top:#ffffff 3px solid;border-right:#ffffff 3px solid;"><img src="images/login001.gif" width="271" height="40"></td>
</tr>
<tr>
<td height="160" align="center" valign=top class=tablebody1><table width="75" height="11" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="289" border="0" cellpadding="0" cellspacing="0">
<form action="login.asp?action=chk" method=post>
<tr>
<td width="15"> </td>
<td width="227">用户名:
<input name=username type="text" class=tx id="username3" style="font-size:9pt;" size="15" maxlength="16">
<a href=reg.asp><u><font color="#666666">没有注册</font></u></a>?
<table width="75" height="6" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
密 码:
<input name=password type="password" style="font-size:9pt;" size="15" maxlength="16">
<a href=gbook><u><font color="#666666">忘记密码</font></u></a>?
<table width="75" height="6" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
验证码: <font color="F78C0D">
<input name="vercode" style="font-size: 9pt;" size="6" maxlength="4">
<img src="sub/verifycodebs.asp" alt="验证码" border="0" width="38" height="10">
</font>
<table width="75" height="6" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<input name="Submit33" type="image" value=" 开始上传 " src="images/06/login.gif" width="58" height="20" >
<a href="reg.asp"><img src="images/06/reg.gif" width="58" height="20" hspace="3" border="0"></a>
<input type=hidden name=usercookies value=0 ><input type="hidden" name="postulr" value="<%=surl%>">
<table width="75" height="6" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" height="6" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><font color="#FF6600"><b>>></b></font>
<a href="Help.asp"><u><font color="006FA2">第一次来这边请?</font></u></a><font color="#FF6600"> </font></td>
</tr>
</table></td>
<td width="29" align="center" valign="bottom" ><img src="images/picd.gif" width="29" height="46"></td>
<td width="18"> </td>
</tr>
</form>
</table></td>
</tr>
</table> </td>
</tr>
</table>
<table width="770" height="5" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td></td>
</tr>
</table>
<%End if%>
<!--#include file="bottom.asp"-->
</body>
</html>
<%
sub chklogin()
dim UserIP
dim username
dim userclass
dim password
dim article
dim cookies_path_s,cookies_path_d,cookies_path,usercookies
UserIP=replace(Request.ServerVariables("REMOTE_ADDR"),"'","")
if trim(request.form("username"))="" then
session.Abandon
errmsg=errmsg+"<br>"+"<li>请输入您的用户名。"
founderr=true
else
username=trim(replace(replace(request.form("username"),"'",""),"[",""))
end if
if trim(request.form("password"))="" then
session.Abandon
errmsg=errmsg+"<br>"+"<li>请输入您的密码。"
founderr=true
session("ValidCode")=""
exit sub
else
password=md5(trim(replace(replace(request.form("password"),"'",""),"[","")))
end if
'验证码
if trim(Request("vercode"))=empty or trim(Request("vercode"))="" then
session.Abandon
errmsg=errmsg+"<br>"+"<li>验证码不能为空,提交失败!请重试。"
founderr=true
session("ValidCode")=""
exit sub
elseif lcase(trim(Request("vercode")))<>lcase(session("ValidCode")) then
session.Abandon
errmsg=errmsg+"<br>"+"<li>验证码校对错误,提交失败!请重试。"
founderr=true
session("ValidCode")=""
exit sub
end if
if founduser then
Response.Cookies("yzlove").path=cookiepath
Response.Cookies("yzlove")("username")=""
Response.Cookies("yzlove")("password")=""
Response.Cookies("yzlove")("usercookies")= 0
end if
'和数据库比较
set rs=server.createobject("adodb.recordset")
sql="select username,password,sex,kind,grade,id from love_main where username='"&username&"' and password='"&password&"' and flag=1"
rs.open sql,conn,1,1
If rs.bof and rs.eof Then
session.Abandon
founderr=true
rs.close:set rs=nothing
errmsg=errmsg+"<br>"+"<li>您的用户名不存在,或者密码错误,或者刚注册还没通过审核,或者您的帐号已被管理员锁定。"
session("ValidCode")=""
exit sub
Elseif password<>rs(1) Then
session.Abandon
founderr=true
rs.close:set rs=nothing
errmsg=errmsg+"<br>"+"<li>您的密码错误,或者刚注册还没通过审核,或者帐号已被管理员锁定。"
session("ValidCode")=""
exit sub
Else
'session.Abandon
sex=rs("sex")
kind=rs("kind")
grade=rs("grade")
userid=rs("id")
'更新登录次数
sql="update love_main set endtime='"&now()&"',endip='"&UserIP&"',logined_count=logined_count+1 where id="&userid
conn.execute sql
rs.close
sql="select * from love_online where userid="&userid&" or username='"&username&"'"
rs.open sql,conn,1,3
if not(rs.eof and rs.bof) then
rs("lasttime")=now()
else
rs.addnew
rs("username")=username
rs("userid")=userid
rs("sex")=sex
rs("grade")=grade
rs("ip")=UserIP
rs("userid")=userid
rs("logintime")=now()
rs("lasttime")=now()
end if
rs.update
rs.close:set rs=nothing
Response.Cookies("yzlove")("userid") = userid
Response.Cookies("yzlove")("username") = username
Response.Cookies("yzlove")("password") = password
Response.Cookies("yzlove")("sex") = sex
Response.Cookies("yzlove")("grade") = grade
Response.Cookies("yzlove")("kind") = kind
Closeconn
strUsername = request("username")
strPassword = request("password")
response.Redirect "u_logined.asp"
End if
end sub
Closeconn
%><script language="javascript">
function postdntloginform(username, password )
{
document.dntloginform.action="<%=url_dnt%>/login.aspx?reurl=<%=url_return%>";
document.dntloginform.username.value=username;
document.dntloginform.password.value=password;
document.dntloginform.submit();
}
</script>
实在搞不定了。。 谁帮忙一下~