<!--#include file="inc/conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file=inc/ipt.asp-->
<%if request("cnmai")="out" then
Response.cookies("cnmai")=""
Response.Redirect "index.asp"
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="供求信息,二手网,二手商品,电子商务,供求网站,免费发布供求信息,商业信息,贸易网,求购,求购信息,出售，供应,供求信息网，招商投资 生活服务 家电家居  旅游出行 招聘求职  房产信息 
建材装饰 烟酒副食 电脑网络  餐饮酒店  医药保健  农林牧渔  安全防护  包装纸张 办公文教  电子通讯  
纺织皮革  服装服饰  工业机械 仪器仪表 交通运输 车及配件 工艺礼品 文化艺术 冶金矿产 出版印刷 能源动力 环境保护 
化工行业 玩具体育 园林绿化 广告服务 商务服务 分类广告 搜索引擎 企业行业黄页 分类信息网 集市">

<title>会员登陆-<%=title%></title>
<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">
<!--#include file="topcnmai2.asp" -->
<div align="center">
<table border="0" width="760" id="table1" cellspacing="0" style="border-left:1px solid #CCCCCC; border-right:1px solid #CCCCCC; padding:1px; border-top-width:1px; border-bottom-width:1px" bgcolor="#FFFFFF" cellpadding="0" height="223">
<tr>
<td height="30" class=td5_muen></td>
</tr>
<tr>
<td>
<%
if request("login")="cnmai" then

dim username,password,rsper,sqlper,rscom,sqlcom,k,per,com,userip
per=Request.form("per")
com=Request.form("com")
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=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")("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">
<div align="center">
<table width="510" cellpadding="0" style="border-collapse: collapse" id="table8" ><tr>
<td height="26" class=td2_muen align="center"><font color=white>会员登陆管理</font></tr>
<tr>
<td align="center">
<IMG src="image/a_1.gif" width="515" height="10"></tr>
<tr>
<td height="26" align="center" background="image/b_1.gif">登陆帐号：<input id="username2" maxLength="20" size="19" name="username"></tr>
<tr>
<td height="26" align="center" background="image/b_1.gif">登陆密码：<input id="password2" type="password" maxLength="32" size="19" name="password"></tr>
<tr>
<td height="36" background="image/b_1.gif"><p align="center">&nbsp;&nbsp;<input type="hidden" name="login" value="cnmai"><input  onclick="javascript:return CheckloginForm();" type="submit" value="商家登陆" name="com" style="font-size: 10pt; ">
<input onClick="javascript:return CheckloginForm();" type="submit" value="个人登陆" name="per"> </td></tr><tr> 
<td height="24" background="image/b_1.gif" align="center">
<a href="reg.asp">注册新会员</a>　<a href="getpass.asp">找回密码</a></td></tr><tr>
<td height="24" background="image/b_1.gif">
<p align="center"><a href="addxinxi.asp?cnmai=free"><font color="red">
游客快速发布信息</font></a></td></tr><tr>
<td>
<IMG src="image/c_1.gif" width="515" height="9"></td></tr></table>
</div>
</form>
<%end if%></td>
</tr>
</table>
</div>
<!--#include file="endcnmai.asp"-->
</body>
</html>
