<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<title><%=webname%>--用户登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<style>
td{font-size:9pt;line-height:120%;color:#353535} 
body{font-size:9pt;line-height:120%} 

a:link          { color: #000000; text-decoration: none }
a:visited       { color: #000000; text-decoration: none }
a:active        { color: #000000; text-decoration: none }
a:hover         { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onMouseOver="window.status='【<%=webname%>】<%=weburl%> 如果您喜欢本站,别忘了把本站介绍给您的好友哦！：）';return true">
<!--#include file="webtop.asp"-->
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="0">
  <tr> 
    <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
      <table border="0" align="center" cellpadding="0" cellspacing="0" width="480">
        <tr> 
          <td align="center"> <div align="center"><br>
              <font color="#FF0000"><b><font color="#666666">购买商品请先登录</font></b></font> 
              <br>
              <table border="0" cellspacing="0" cellpadding="1" align="center" width="489">
                <tr> 
                  <td> 
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td rowspan="2"> 
                          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v">
                            <tr> 
                              <td class="12v" > 
                                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%">
                                  <tr> 
                                    <td> 
                          <%if request.cookies("songxf")("username")="" then%>
                          <%'禁止网页缓存
Response.Buffer = True 
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache"
'验证码生成
dim yz1
randomize timer
yz1=Int((8999)*Rnd +1009)
session("ok")=yz1
%>
                          <script language="javascript">
	<!--//
	function checksignup() {

		if ( document.userlogin.username.value == '' ) {
			window.alert('请输入名称!!');
			document.userlogin.name.focus();
			
		}
		else if ( document.userlogin.userpassword.value == '' ) {
			window.alert('请输入密码!!');
			document.userlogin.pass.focus();
		}
		else if ( document.userlogin.yz1.value == '' ) {
			window.alert('请输入网页上显示的4位数的验证码!!');
			document.userlogin.yz1.focus();
		}
else {
			return true;
			}
		return false;
	}

	//-->
	              </script>
                          <table width="100%" border="0" cellspacing="1" cellpadding="1" align="center">
                            <form name="userlogin" method="post" action="checkuserlogin.asp">
                              <tr>
                                <td align="center"><table width="58%" border="0" align="center" cellpadding="0" cellspacing="2">
                                    <tr valign="middle">
                                      <td width="91" height="20" align="center" class="text"><div align="center">用户名称</div></td>
                                      <td colspan="2"><div align="left">
                                          <input name="username" type="text" class="wenbenkuang" id="username" size="15" maxlength="15">
                                      </div></td>
                                    </tr>
                                    <tr valign="middle">
                                      <td align="center" class="text">用户密码 </td>
                                      <td colspan="2"><div align="left">
                                          <input name="userpassword" type="password" class="wenbenkuang" id="userpassword" size="15" maxlength="15">
                                      </div></td>
                                    </tr>
                                    <tr valign="middle">
                                      <td align="center" class="text">输验证码</td>
                                      <td width="118" class="text_title"><input name="yz1" type="password" class="wenbenkuang" id="yz1" size="8" maxlength="5">
                                          <font color="#ff3333"><%=yz1%></font> </td>
                                      <td width="63" class="text_title"><input name="Submit" type="submit" class="go-wenbenkuang" value="登 录" onClick="javascript:return checksignup()"></td>
                                    </tr>
                                    <tr valign="middle">
                                      <td colspan="3" align="center">&nbsp;
                                          <div align="center"><A class=link 
                                href="reg.asp">加入会员</A><SPAN 
                                class=pointstyle>　</SPAN><A class=link 
                                href="getpwd.asp">忘记密码</A></div></td></tr>
                                </table></td>
                              </tr>
                            </form>
                          </table>
                                    </td>
                                  </tr>
                                </table>
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
              <%else%>
                                <br>
                            <table width="250" border="0" align="center" cellpadding="0" cellspacing="2">
                            <tr>
                              <td height="22" colspan="2" align="left"><div align="center">
                                <%if request.cookies("songxf")("shjianame")<>"" then%>
商家您好！
  <%elseif request.cookies("songxf")("username")="" and request.cookies("songxf")("shjianame")="" then%>
  <%else
						set rs=server.createobject("adodb.recordset")
                        rs.open "select jifen,yucun,reglx,vipdate from [user] where username='"&request.cookies("songxf")("username")&"'",conn,1,3
                        if rs("vipdate")<>"" then 
                          '看是不是过期VIP
                          if rs("vipdate")<date and rs("reglx")=2 then
                          rs("reglx")=1
                          rs.update
                          end if
                        end if
                        Response.Cookies("songxf")("yucun")=rs("yucun")
                        Response.Cookies("songxf")("jifen")=rs("jifen")
                        Response.Cookies("songxf")("reglx=")=rs("reglx")
                        rs.close
                        set rs=nothing
				if Request.Cookies("songxf")("reglx")=2 then
				response.write "<font color=red>"&Request.Cookies("songxf")("username")&" 贵宾</font>您好!欢迎来到本商城购物"
				else
				response.write "<font color=red>"&Request.Cookies("songxf")("username")&"</font>您好!欢迎来到本商城购物"
				end if
                        end if%>
                              </div></td>
                              </tr>
                            <tr>
                              <td height="22" width="50%" align="left"><div align="center"><a href="user.asp" class="link">专区首页</a></div></td>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=shoucang" class="link">我的收藏</a></div></td>
                            </tr>
                            <tr>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=myinfo" class="link">我的信息</a></div></td>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=jifen" class="link">我的积分</a></div></td>
                            </tr>
                            <tr>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=userziliao" class="link">个人资料</a></div></td>
                              <td height="22" align="left"><div align="center"><a href="help.asp?action=fukuan" class="link">付款方式</a></div></td>
                            </tr>
                            <tr>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=savepass" class="link">修改密码</a></div></td>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=sqvip" class="link">申请VIP</a></div></td>
                            </tr>
                            <tr>
                              <td height="22" align="left"><div align="center"><a href="user.asp?action=dindan" class="link">我的订单</a></div></td>
                              <td height="22" align="left"><div align="center"><a href=logout.asp class="link">退出登录</a></div></td>
                            </tr>
                            <%if Request.Cookies("songfx")("reglx")=2 then%>
                            <%else%>
                            <%end if%>
                            </table>
                            <%end if%>
              <br>
              </div>
          </div></td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!--#include file="service1.asp"-->
<!--#include file="copyright.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkfk()
{
   if(checkspace(document.fkinfo.username.value)) {
	document.fkinfo.username.focus();
    alert("请填写用户名！");
	return false;
  }
   if(checkspace(document.fkinfo.userpassword.value)) {
	document.fkinfo.userpassword.focus();
    alert("请填写密码！");
	return false;
  }
}
//-->
</script> 