www.gusucode.com > 盐城分类信息网asp源码程序 > login.asp

    <!--#include file="inc/conn.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file=inc/ipt.asp-->
<%if request("cnmai")="out" then
Response.cookies("cnmai")=""
Response.Redirect "index.asp"
end if
%>
<html>
<HEAD>
<title><%=title%>-注册会员-会员登陆</title>
<LINK href="images/at_news.css" type=text/css rel=stylesheet>

<SCRIPT language=javascript>
<!--
function CheckloginForm()
{
if(document.thisForm.username.value.length<1)
	{
	    alert("登陆帐号没有填写!");
	    return false;
	}
if(document.thisForm.password.value.length<1)
	{
	    alert("密码没有填写正确!");
	    return false;
	}
}

//-->
</SCRIPT>
</HEAD>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<%call t()%>
<DIV id=content>
<DIV id=left>
<DIV class=leftborder>
<DIV class=ltitle><SPAN class=font>&nbsp;&nbsp;&gt;&gt; 服务协议</SPAN></DIV>
<DIV class=lcontent> <SPAN class=tableleft>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <td width="250" class="td">
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
注册会员,享受强大的会员管理功能:</p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font color="#FF0000">&nbsp;①发布的信息可以直接管理</font></p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font color="#FF0000">&nbsp;②可以收藏/管理信息</font></p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font color="#FF0000">&nbsp;③置顶/推荐两大道具</font></p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font color="#FF0000">&nbsp;④发布天数更长</font></p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">
<font color="#FF0000">&nbsp;⑤可以免费发布/上传图片</font></p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0">更多功能,赶快注册享受吧!</p>
<p style="line-height: 200%; margin-top: 0; margin-bottom: 0"><a href="reg.asp">
特约商家还送强大网站管理系统,赶快体验&gt;&gt;&gt;</a>
 </td>
  </TBODY></TABLE></SPAN>
  </DIV>
  </DIV>
</DIV>
<!--left-->
<DIV id=right>
<DIV class=navigation>
<table border="0" width="100%" id="table1" style="border-collapse: collapse">
<%
if request("login")="cnmai" then

dim rsper,sqlper,rscom,sqlcom,k,per
per=Request.form("per")
m=Request.form("m")
if request.cookies("cnmai")("errs")="" then
k=0
else
k=request.cookies("cnmai")("errs")
end if
if request.cookies("cnmai")("errs")>5 then
Response.Write "<script language='javascript'>alert('您登陆的次数过多,系统保护中!');history.back();</script>" 
response.end
end if
username=replace(trim(request("username")),"'","‘")
password=md5(replace(trim(request("password")),"'","‘"))
chkcnmai(username)
if nothaveChinese(username)=false then
Response.Write "<script language='javascript'>alert('用户名为非中文');history.back();</script>" 
end if

if per<>"" then
set rsper=server.createobject("adodb.recordset")
sqlper="select * from [user] where username='"&UserName&"' and password='"&password&"'"
rsper.open sqlper,conn,1,3
if rsper.eof then
Response.cookies("cnmai")("errs")=k+1
Response.Write "<script language='javascript'>alert('您的用户名或密码不正确!');history.back();</script>" 
response.end
else
rsper("lasttime")=now()
rsper("jf")=rsper("jf")+jf_3
rsper("dlcs")=rsper("dlcs")+1
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then 
userip=Request.ServerVariables("REMOTE_ADDR")
end if
rsper("ip")=userip
rsper.update
Response.cookies("cnmai")("username")=rsper("username")
Response.cookies("cnmai")("domain")=Request.ServerVariables("SERVER_NAME")
Response.cookies("cnmai")("per")=rsper("username")
Response.cookies("cnmai")("vip")=rsper("vip")
Response.cookies("cnmai")("id")=rsper("id")
end if
Response.Redirect "user.asp"
rsper.close
set rsper=nothing
closedb

else

set rscom=server.createobject("adodb.recordset")
sqlcom="select * from [com] where UserName='"&UserName&"' and password='"&password&"'"
rscom.open sqlcom,conn,1,3
if rscom.eof then
Response.cookies("cnmai")("errs")=k+1
Response.Write "<script language='javascript'>alert('您的用户名或密码不正确!');history.back();</script>" 
response.end
else
rscom("lastdl")=now()
rscom("jf")=rscom("jf")+jf_3
rscom("dlcs")=rscom("dlcs")+1
userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then 
userip=Request.ServerVariables("REMOTE_ADDR")
end if
rscom("ip")=userip
rscom.update
Response.cookies("cnmai")("username")=rscom("username")
Response.cookies("cnmai")("com")=rscom("com")
Response.cookies("cnmai")("vip")=rscom("vip")
Response.cookies("cnmai")("comyz")=rscom("yz")
Response.cookies("cnmai")("domain")=Request.ServerVariables("SERVER_NAME")
Response.cookies("cnmai")("id")=rscom("id")
end if
Response.Redirect "com_user.asp"
rscom.close
set rscom=nothing
closedb
end if

else
%>
<form id="f1" name="thisForm" action="Login.asp" method="POST" style="line-height: 100%; margin-top: 0; margin-bottom: 0">
	<tr>
<td width="100%" colspan="0" class="td1" background="Images/menu_r.gif">
&nbsp;位置导航:<a href="/">首页</a>→会员登陆</td>
</tr></table></DIV>
<DIV class=rightbody>
<DIV class=tags_calss>
<!--注册会员开始-->
<div align="center">

<table width="99%" cellpadding="0" style="border-collapse: collapse" id="table8" height="115%" >
<tr>
<td class=tdh rowspan="7" width="14%"> </tr>
<td height="33" align="center" width="86%"> </tr>
<tr>
<td height="33" align="center" width="86%">登陆帐号:<input id="username2" maxLength="20" size="19" name="username" class=input></tr>
<tr>
<td height="33" align="center" width="86%">登陆密码:<input id="password2" type="password" maxLength="32" size="19" name="password" class=input></tr>
<tr>
<td height="31" width="86%"><p align="center">&nbsp;&nbsp;<input type="hidden" name="login" value="cnmai"><input  onclick="javascript:return CheckloginForm();" type="submit" value="商家登陆" name="m" style="font-size: 10pt; ">
<input onClick="javascript:return CheckloginForm();" type="submit" value="个人登陆" name="per"> </td></tr><tr>
<td height="25" align="center" width="86%">
<a href="reg.asp">注册新会员</a> <a href="getpass.asp">找回密码</a></td></tr><tr>
<td height="21" width="86%">
<p align="center"><a href="axx.asp?cnmai=free"><font color=red>
我是游客,我要马上发布信息>>>点这里进入</font></a><font color="#999999">(不用注册,但所发信息需要审核通过)</font></td></tr><tr>
<td width="86%">
 </td></tr></table>
</form>
<%end if%>
</table>
</center>
</div>
</DIV>
</DIV>
<!--底部-->
</td>
</tr>
</table>
</div>
<!--#include file="foot.asp"-->

</body>
</html>