<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"-->
<%
if Not ChkPost then response.redirect ("chklogin.asp?login=4")
Response.Expires = 0
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-store"
%>
<SCRIPT language=javascript>
//--检测登陆-->

	   function DoLogin() {

	      var UsernameGet = trim(document.loginForm.UsernameGet.value);
		  var PasswordGet = trim(document.loginForm.PasswordGet.value);
          if(UsernameGet == "") {
		    alert("请输入会员登录名！");
			document.loginForm.UsernameGet.focus();
		    return false;
		  } 
		  if(PasswordGet == "") {
		    alert("请输入密码！");
			document.loginForm.PasswordGet.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>
<title>会员登陆</title>
<style type="text/css">
<!--
.style1 {
	font-size: 14px;
	font-weight: bold;
}
.style2 {font-size: 16px}
-->
</style>
<div align="center">
<%
dim UsernameGet,PasswordGet
UsernameGet=Replace_Text(Request("UsernameGet"))
PasswordGet=Replace_Text(Request("PasswordGet"))
if UsernameGet<>"" and PasswordGet<>"" then
sql="select * from corporation where [User]='"&UsernameGet&"' and Pass='"&PasswordGet&"' "
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof then
response.write"<FONT color='ff0000' class=l><b>  您的操作有错误发生！</b></font><br><br><br>"
response.write"<ul>"
response.write"<li><FONT color='ff0000'> 会员登录名或密码错误</font><br><br>"
response.write"您刚才登陆时输入的会员名是 <font color=ff0000><b>"&Request("UsernameGet")&"</b></font> <br><br>"
response.write"输入的密码是<font color=ff0000><b>"&Request("PasswordGet")&"</b></font>，请核对一下刚才输入的登录名和密码是否正确，包括大小写，再重新试一下 "
response.write"</li>"
response.write"</ul>"
else 

'将用户资料记录到各自的Session变量中去
'session("id")=rs("id")
'session("user")=rs("user")
'session("pass")=rs("pass")
'session("question")=rs("question")
'session("answer")=rs("answer")
'session("Qymc")=rs("Qymc")
'session("Qylb")=rs("Qylb")
'session("Qyxz")=rs("Qyxz")
'session("Zczj")=rs("Zczj")
'session("Frdb")=rs("Frdb")
'session("Ygrs")=rs("Ygrs")
'session("Zh")=rs("zh")
'session("Bank")=rs("Bank")
'session("Nyye")=rs("Nyye")
'session("Zycp")=rs("Zycp")
'session("jygs")=rs("jygs")
'session("Qyjj")=rs("Qyjj")
'session("Sf")=rs("Sf")
'session("City")=rs("City")
'session("mobile")=rs("mobile")
'session("Post")=rs("Post")
'session("Address")=rs("Address")
'session("Phone")=rs("Phone")
'session("Fax")=rs("Fax")
session("Email")=rs("Email")
'session("Web")=rs("Web")
'session("name")=rs("name")
'session("ch")=rs("ch")
'session("bm")=rs("bm")
'session("zw")=rs("zw")
'session("cimg")=rs("cimg")
'session("idate")=rs("idate")
'session("sortid")=rs("sortid")
'session("typeid")=rs("typeid")
'session("url")=rs("url")
session("id")=rs("id")
session("user")=rs("user")
'session("hybz")=rs("hybz")
session("cflag")=rs("cflag")
session("uflag")=rs("uflag")
session("Flag")=rs("Flag")

if Request.Cookies("Myworldname")="" then
Response.Cookies("Myworldname")=rs("user")
Response.Cookies("Myworldname").Expires=date()+365
end if

if session("geturl")>"" then
Response.Redirect session("geturl")
else
Response.Redirect("../index.asp")
end if

end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
</div>
<div align="center">
  <p><br>
  </p>
  <p class="style1"><a href="/login/getanswer.asp" target="_blank">忘记了登录密码？</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:history.back()" class="style2">返回重新填写!</a></p>
</div>
