<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/md5.asp"-->
<!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> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=webname%>--用户登录</title>
<link rel="stylesheet" href="../hc360/hcB2B.css" type="text/css" />
<!--#include file="../inc/safe.asp"-->
<SCRIPT language=javascript>
//--检测登陆-->
 	   function DoLogin() {
 	      var UsernameGet = trim(document.loginForm.UsernameGet.value);
		  var PasswordGet = trim(document.loginForm.PasswordGet.value);
		  var Verifycode = trim(document.loginForm.Verifycode.value);
           if(UsernameGet == "") {
		    alert("请输入会员登录名！");
			document.loginForm.UsernameGet.focus();
		    return false;
		  } 
		  if(PasswordGet == "") {
		    alert("请输入密码！");
			document.loginForm.PasswordGet.focus();
		    return false;
		  } 
		  if(Verifycode == "") {
		    alert("请输入验证码！");
			document.loginForm.Verifycode.focus();
		    return false;
		  }  
 		 }
 	   function trim(inputString) {
   
		  if (typeof inputString != "string") { return inputString; }
		  var retValue = inputString;
		  var ch = retValue.substring(0, 1);
		  while (ch == " ") { 
		  //检查字符串开始部分的空格
			  retValue = retValue.substring(1, retValue.length);
			  ch = retValue.substring(0, 1);
		  }
		  ch = retValue.substring(retValue.length-1, retValue.length);
		  while (ch == " ") {
			 //检查字符串结束部分的空格
			 retValue = retValue.substring(0, retValue.length-1);
			 ch = retValue.substring(retValue.length-1, retValue.length);
		  }
		  while (retValue.indexOf("  ") != -1) { 
		 //将文字中间多个相连的空格变为一个空格
			 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
		  }
		  return retValue;
	   } 
 //-->
</SCRIPT>
  <%
  if issession=0 then
  username=Replace_Text(request.Cookies("Yxmember"))
  gsid=Replace_Text(request.Cookies("Yxmemberid"))
  else
  username=session("user")
  gsid=session("id")
  end if
  	if username<>"" or gsid<>"" then
	response.Redirect(HOPE_InstallDir&"member/index.asp")
	end if
  %>
<%
 if Replace_Text(Request("Websen_Action"))="Websen_Add" then 
%>
  <script language="JavaScript" type="text/JavaScript">
	<!--
	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	}
	MM_reloadPage(true);
	//-->
 </script>
  <%
    '--------------------------------------------------------------------
 	 if issession=0 then 
 	    safecode=Replace_Text(request.Cookies("safecode"))
     else
 	   safecode=Session("SafeCode")
 	 end if
	 '--------------------------------------------------------------------
  		 url=request.ServerVariables("HTTP_REFERER")
		 verifycodes= Replace_Text(request("Verifycode"))
		 if verifycodes=""  then
			  verifycodes=1
		 end if
 
		
  if  cstr(verifycodes)<>cstr(safecode)   then
				  Response.Write "<script>alert('输入表的验证码错误！');history.back();</script>"
				
		else
 		dim UsernameGet,PasswordGet
		UsernameGet=Replace_Text(Request("UsernameGet"))
		PasswordGet=Replace_Text(Request("PasswordGet"))
 		 if UsernameGet<>"" and PasswordGet<>"" and cstr(verifycodes)=cstr(safecode) then
		 
		 
 		sql="select * from Websen_corporation where [User]='"&UsernameGet&"' and Pass='"&PasswordGet&"' and flag=1 "
		
		Set rs= Server.CreateObject("ADODB.Recordset") 
		rs.open sql,conn,1,1
		if rs.eof then
		  Response.Write "<script>alert('您输入的会员名或密码错误，请重新输入！');history.back();  </script>"
	    end if
 	
 		if not rs.eof then
		if isSession=1 then
		 session("Email")=rs("Email")
		 session("id")=rs("id")
		 session("user")=rs("user")
 		 session("yxFlag")=rs("Flag") 
		 session("gradeid")=rs("gradeid")
		 session.Timeout=45
		 else
 		 Response.Cookies("Yxmember")=rs("user")
 		 Response.Cookies("Yxmemberid")=rs("id")
 	     Response.Cookies("Yxmemberlist")=md5(rs("Pass"),16)
	     Response.Cookies("Yxmemberip")=md5(Request.ServerVariables("REMOTE_ADDR"),16)
 		 Response.Cookies("gradeid")=rs("gradeid")  
		 Response.Cookies("yxFlag")=rs("Flag")  
		 Response.Cookies("Email")=rs("Email")
		 Response.Cookies("Yxtime")=now()
		 
		 Response.Cookies("Yxmember").Expires=dateadd("n",time_score,now())
 		 Response.Cookies("Yxmemberid").Expires=dateadd("n",time_score,now())
 	     Response.Cookies("Yxmemberlist").Expires=dateadd("n",time_score,now())
	     Response.Cookies("Yxmemberip").Expires=dateadd("n",time_score,now())
 		 Response.Cookies("gradeid").Expires=dateadd("n",time_score,now())
		 Response.Cookies("yxFlag").Expires=dateadd("n",time_score,now())
		 Response.Cookies("Email").Expires=dateadd("n",time_score,now())
		 Response.Cookies("Yxtime").Expires=dateadd("n",time_score,now())
		 end if
		
  	     Response.Redirect(HOPE_InstallDir&"member/index.asp")
		 end if
		rs.close
		set rs=nothing
		end if
		end if
	'----------------------------------------------------------	
	 if issession=0 then 
 	    response.Cookies("safecode")=""
     else
 	    Session("SafeCode")=""
 	 end if	
	'---------------------------------------------------------------
	
	
//'自动生成用户网站*******20080420********************************
if autozz=1  then
 %>
 <iframe src=" ../member/co.asp	" frameborder="0" scrolling="no" width=0 height=0></iframe>
 <%
end if
//****************************************************************
		
%>



</div>
<%
end if
%>


  <%
 		conn.close
		set conn=nothing
 
Function noHtml(str)
		Dim re
		Set re=New RegExp
		re.IgnoreCase =True
		re.Global=True
		re.Pattern="(\<.*?\>)"
		str=re.Replace(str,"")
		re.Pattern="(\<\/.*?\>)"
		str=re.Replace(str,"")
		noHtml=str
	End Function
%>
</head>
<body>
  <div id="topandex">
  <div id="topindex">
    <div class="buleft"></div>
	<div class="buright">
	  <div class="topdin"><a href="/index.html"><font color="#FFFFFF">首页</font></a></div>
	  <div class="freereg"><a href="../login/register.asp"><font color="#FFFFFF">免费注册</font></a></div>
	  <div class="top_login"><a href="../login/login1.asp"><font color="#FFFFFF">登录</font></a></div>
	  <div class="top_right">&nbsp; <a href="/wstong/" target="_blank">网胜通</a> | <a href="/price/" target="_blank">关键字竞价</a> | <a href="/wstong/" target="_blank">诚信安全</a> | <a href="../help/bin/" target="_blank">帮助中心</a></div>
	  <div class="bann_right">
	    <div class="len"><a href="../tradeinfo/index.html">我要采购</a></div>
		<div class="len"><a href="../seller/index.html">我要销售</a></div>
		<div class="len"><a href="../info/index.html">行业资讯</a></div>
		<div class="len"><a href="../bbs/" target="_blank">网络商圈</a></div>
		<div class="lean"><a href="../member/index.asp">我的商务中心</a>　</div>
	  </div>
	</div>
  </div>
  </div>
  <div id="shenxi">你目前进行的操作，需要“登录”后才能继续……</div>
  <div class="juzhong">
  <table width="760" height="39" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="23">&nbsp;</td>
    </tr>
  </table>
  <table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="408" height="130"><table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="../images/signin_01.gif"></td>
        </tr>
        <tr>
          <td height="161" align="center" valign="top" background="../images/signin_02.gif"><FORM name="loginForm" action="" method=post  onSubmit="javascript:if(DoLogin()==false) return false;">
            <table width="87%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="23"><DIV style=" font-size:12px">请输入登录名和密码，按“登录”即可。</DIV></td>
                <td><A     href="<%=HOPE_InstallDir%>login/getanswer.asp"><span style="color:#000 ">忘记了密码?</span></A></td>
              </tr>
            </table>
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="30" colspan="3"><table width="94%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="27%"><strong><span style=" font-size:14px; color:#000000">会员登录名:</span></strong>
                        <input name="Websen_Action" type="hidden" id="Websen_Action" value="Websen_Add"></td>
                    <td width="40%"><input name="UsernameGet" id="UsernameGet"    style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#979A9F;width:120;height:18; background-color: #ffffff"  tabindex=1 value="<%=replace_text(Request.cookies("Yxmember"))%>" size=17 maxlength=20 ></td>
                    <td width="32%"> <A href="<%=HOPE_InstallDir%>login/getmemberid.asp"><span style="color:#000000 ">忘了登陆名?</span></A></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="30" colspan="3"><table width="94%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="27%"><strong><span style=" font-size:14px; color:#000000">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 码:</span></strong></td>
                    <td width="41%"><input name="PasswordGet"  style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#979A9F;width:120;height:20; background-color: #ffffff" type="password" id="PasswordGet"   tabindex="2" size="17" maxlength="20"></td>
                    <td width="32%"><a href="<%=HOPE_InstallDir%>login/getanswer.asp"><span style="color:#000000 ">忘记了密码?</span></a></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="30" colspan="3"><table width="94%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="27%"><strong><span style=" font-size:14px; color:#000000">验&nbsp; 证&nbsp; 码:</span></strong></td>
                    <td width="40%">
                      <input name="Verifycode" class="mailboxbig" id="Verifycode"   tabindex=3 onKeyUp="value=value.replace(/[^\d]/g,'') " size=17 maxlength="5" tonbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"   style="border-width:1px; border-style:solid; border-collapse:collapse; border-color:#979A9F;width:120;height:20; background-color: #ffffff"></td>
                    <td width="32%"><img src="../vCode.asp?" alt="图片看不清？点击重新得到验证码" align="absbottom" style="cursor:hand;" onclick="this.src+=Math.random()" /></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td width="37%" height="30">&nbsp;</td>
                <td width="31%"><input name="imageField" type="image" src="../images/wansen_denlulu.gif" alt="会员登录" width="81" height="24" border="0" /></td>
                <td width="32%">&nbsp;</td>
              </tr>
            </table>
            </FORM>
          </td>
        </tr>
      </table></td>
      <td width="352"><table width="300" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="../images/signin_03.gif" width="352" height="26"></td>
        </tr>
        <tr>
          <td><a href="../login/register.asp"><img src="../images/signin_04.gif" width="352" height="118" border="0"></a></td>
        </tr>
        <tr>
          <td><img src="../images/signin_05.gif"></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <table width="720" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td></td>
    </tr>
  </table>
  <table width="720" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="20"><script src="/ads/JS/hpading.js"></script></td>
      <td style=" text-align:right"><script src="/ads/JS/hrading.js"></script></td>
    </tr>
  </table>
  <table width="720" height="10" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td></td>
    </tr>
  </table>
  <table width="720" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="4" colspan="2" bgcolor="#D01725"></td>
    </tr>
    <tr>
      <td width="225">&nbsp;</td>
      <td width="495" height="35">网胜网络科技有限公司版权所有 2007-2008</td>
    </tr>
  </table>
  </div>
  </body></html>