www.gusucode.com > 绿色环保工作企业网站源码程序 > UserServer.asp

    <!--#include file="Inc/conn.asp" -->
<!--#include file="Inc/Function.asp" -->
<!--#include file="Inc/Config.asp" -->
<!-- #include file="Head.asp" -->
<!--#include file="inc/md5.asp"-->
<script language=javascript>
	function CheckForm()
	{
		if(document.UserLogin.UserName.value=="")
		{
			alert("请输入用户名!");
			document.UserLogin.UserName.focus();
			return false;
		}
		if(document.UserLogin.Password.value == "")
		{
			alert("请输入密码!");
			document.UserLogin.Password.focus();
			return false;
		}
	}
</script>
<%
Action=Trim(request("Action"))
if Action="Login" then
 dim sql
 dim rs
 dim username
 dim password
 username=replace(trim(request("username")),"'","")
 password=replace(trim(Request("password")),"'","")
 password=md5(password)
 set rs=server.createobject("adodb.recordset")
 sql="select * from [User] where LockUser=False and username='" & username & "' and password='" & password &"'"
 rs.open sql,conn,1,3
 if not(rs.bof and rs.eof) then
	if password=rs("password") then
	    rs("LoginIP")=Request.ServerVariables("REMOTE_ADDR")
		rs("LastLoginTime")=now()
		rs("logins")=rs("logins")+1
		rs.update
		session("UserName")=rs("username")		
		Response.Redirect "UserServer.asp"
	end if
 end if
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
end if
%>
<TABLE cellSpacing=0 cellPadding=0 width=1002 align=center border=0>
  <TBODY>
    <TR>
      <TD vAlign=top width=210><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR>
              <TD><IMG height=40 src="imgbly/lt29.gif" width=210></TD>
            </TR>
            <TR>
              <TD align=middle><TABLE 
            style="BORDER-RIGHT: #e9e9e9 1px solid; BORDER-TOP: #e9e9e9 1px solid; BORDER-LEFT: #e9e9e9 1px solid; BORDER-BOTTOM: #e9e9e9 1px solid" 
            cellSpacing=0 cellPadding=0 width=178 border=0>
                  <TBODY>
                    <TR>
                      <TD height=15>&nbsp;</TD>
                    </TR>
                    <TR>
                      <TD><TABLE cellSpacing=0 cellPadding=0 width=162 align=center 
                  border=0>
                          <TBODY>
                            <TR>
                              <TD class=lNav1><a href="UserEdit.asp">修改会员资料</a></TD>
                            </TR>
                            <TR>
                              <TD class=lNav><a href="UserEditPwd.asp">修改会员密码</a></TD>
                            </TR>
                            <TR>
                              <TD class=lNav><a href="UserOrder.asp">购物订单查询</a></TD>
                            </TR>
                            <TR>
                              <TD class=lNav><a href="FeedbackMember.asp">站内留言中心</a></TD>
                            </TR>
                            <TR>
                              <TD class=lNav><a href="UserLogout.asp?Action=Ch">退出会员中心</a></TD>
                            </TR>
                          </TBODY>
                      </TABLE></TD>
                    </TR>
                    <TR>
                      <TD height=15>&nbsp;</TD>
                    </TR>
                  </TBODY>
              </TABLE></TD>
            </TR>
          </TBODY>
      </TABLE>      </TD>
      <TD style="BACKGROUND: url(imgbly/bg_body.gif) repeat-y 50% top" vAlign=top><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
          <TBODY>
            <TR>
              <TD><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY>
                    <TR>
                      <TD background=imgbly/bg_rt.gif><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                            <TR>
                              <TD><IMG src="imgbly/rt16.gif" width="209" height=41></TD>
                              <TD>&nbsp;</TD>
                              <TD class=loc 
                      style="BACKGROUND: url(img/bg_rtjiao.gif) no-repeat right 50%; COLOR: #9f9f9f" 
                      align=right>你现在的位置:<A href="index.asp">首页</A> &gt; 服务中心 &gt;客户服务</TD>
                            </TR>
                          </TBODY>
                      </TABLE></TD>
                      <TD width=17>&nbsp;</TD>
                    </TR>
                  </TBODY>
              </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE>
          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="3%" height="34" rowspan="3">&nbsp;</td>
              <td width="94%">&nbsp;</td>
              <td width="3%" rowspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td><table width="90%" height="50%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="206" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <TR>
                        <TD><%If Session("UserName")="" Then%>
                            <table width="100%" border="0" cellpadding="0" cellspacing="3">
                              <tr>
                                <td colspan="2" align="right"><p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp;</p></td>
                              </tr>
                              <tr>
                                <td colspan="2" align="right"><div align="center">
                                    <table class="main" cellSpacing="0" cellPadding="2" width="100%" border="0" height="1">
                                      <tbody>
                                        <tr>
                                          <td width="100%" height="1"><table class='border'  width='83%' border='0' align="center" cellpadding='0' cellspacing='0'>
                                              <form action='UserServer.asp?Action=Login' method='post' name='UserLogin' onSubmit='return CheckForm();'>
                                                <tr>
                                                  <td height='35' colspan="2" align='left'><div align="center" class="STYLE1">您无法进入会员中心,请先登录!如果您不是我们的会员,请立即<font color="#006699"><a href="UserReg.asp"><font color="#FF0000">注册</font></a>。</font></div></td>
                                                </tr>
                                                <tr>
                                                  <td width="45%" height='35' align='right'>用户名:</td>
                                                  <td width="55%" height='35'><input name='UserName' type='text' id='UserName' size='15' maxlength='20'></td>
                                                </tr>
                                                <tr>
                                                  <td height='35' align='right'>密&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
                                                  <td height='35'><input name='Password' type='password' id='Password' size='15' maxlength='20'></td>
                                                </tr>
                                                <tr align='center'>
                                                  <td height='35' colspan='2'><input name='Login' type='submit' id='Login' value=' 登录 '>
                                                      <input name='Reset' type='reset' id='Reset' value=' 清除 '></td>
                                                </tr>
                                                <tr>
                                                  <td height='35' colspan='2' align='center'><a href='UserReg.asp' target='_blank'>用户注册</a>&nbsp;&nbsp;<a href='GetPassword.asp' target='_blank'>忘记密码</a></td>
                                                </tr>
                                              </form>
                                          </table></td>
                                        </tr>
                                      </tbody>
                                    </table>
                                </div></td>
                              </tr>
                              <tr>
                                <td height="19" colspan="2" align="right">&nbsp;</td>
                              </tr>
                              <tr>
                                <td width="20%" align="right"></td>
                                <td width="80%"><span style="font-size: 10pt; font-weight: bold; color: #FF9900">我们的会员有以下功能:</span></td>
                              </tr>
                              <tr>
                                <td width="20%" align="right">&nbsp;</td>
                                <td width="80%" height="20">1、修改您的会员注册资料;</td>
                              </tr>
                              <tr>
                                <td width="20%" align="right">&nbsp;</td>
                                <td width="80%" height="20"><p>2、查询您的询价,以及询价的处理情况;</p></td>
                              </tr>
                              <tr>
                                <td width="20%" align="right">&nbsp;</td>
                                <td width="80%" height="20">3、专用私人留言簿,您可在此给我们留言和查看我们的回复。</td>
                              </tr>
                            </table>
                            <%else%>
                            <TABLE width="85%" align="center" cellPadding=0 cellSpacing=0>
                              <TBODY>
                                <TR vAlign=top >
                                  <TD  width="100%"><p style="margin-bottom: 0"> <br>
                      亲爱的<%=Session("UserName")%>:</p>
                                      <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">&nbsp; </p>
                                      <p style="word-spacing: 0; margin-top: 0; margin-bottom: 0">   您现在已经进入会员服务中心,这里只有注册会员才能访问。您可在这里修改您的注册信息、给我们留言、查看我们对您留言的答复,也可以查询您的询价及询价处理情况。</p></TD>
                                </TR>
                              </TBODY>
                            </TABLE>
                            <%end if%>
                        </TD>
                      </TR>
                  </table></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
        </table></TD>
    </TR>
  </TBODY>
</TABLE>
<!-- #include file="Inc/Foot.asp" -->
</BODY></HTML>