
<link rel="stylesheet" href="img/code43.css" type="text/css">

<TABLE align="center" cellSpacing=0 cellPadding=0 width=95% border=0>
  <TR> 
      <TD vAlign=top>
	   <TABLE height=5 cellSpacing=1 cellPadding=0 width=100% border=0>
           
        </TABLE>
         <% if LngUserID="0" then 
	  		 %>
      <table width=90% border=0 align=center cellpadding=0 cellspacing=0>
        <tr></tr>
          <form name=loginfo method=post action=chkuser.asp>
            <tr > 
              
            <td style='padding-left:5px' height="20"><font color="C6DCDE"><b><font color="227776">用户名：</font></b></font> 
              <input name=username type=text style="background-color: #FFFFFF;border-left: 1px ridge #C6DCDE; border-right: 1px ridge #C6DCDE; border-top: 1px ridge #C6DCDE; border-bottom:1px ridge #C6DCDE" cursor: pointer; size="15" maxlength="15"> 
              </td>
              </tr>
            <tr > 
            <td style='padding-left:5px' height="20"><b><font color="227776">密　码：</font></b> 
              <input name=UserPassword type=password style="background-color: #FFFFFF;border-left: 1px ridge #C6DCDE; border-right: 1px ridge #C6DCDE; border-top: 1px ridge #C6DCDE; border-bottom:1px ridge #C6DCDE" size="15" maxlength="15"></td>
            </tr>
            <tr > 
              
            <td style='padding-left:5px' height="20"><font color="C6DCDE"><b><font color="227776">验证码：</font></b></font> 
              <input style="background-color: #FFFFFF;border-left: 1px ridge #C6DCDE; border-right: 1px ridge #C6DCDE; border-top: 1px ridge #C6DCDE; border-bottom:1px ridge #C6DCDE" name=passcode type=text size=8 maxlength="4">
              <img src="code.asp"></td>
			  </tr>
            <tr > 
            <td colspan="2" align="left" height="20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                  <td height="4"></td>
  </tr>
</table>
 
              <input type="image" border="0" name="submit" src="img/bu_login.gif" onClick="return checkuu();" width="54" height="37" style="cursor:hand" class="inputfields">
              <a href="REG.ASP"><img src="img/register.gif" width="54" height="37" border="0"></a> 
              <a href="profile.asp?action=repass" target="_blank"><img src="img/FORGET.gif" width="54" height="37" border="0"></a> 
            </td>
          </tr>
          </form>
        </table>
<%
else 

dim IntOrderNum
set rsvip=server.CreateObject("adodb.recordset")
rsvip.Open "select distinct(goods) from orders where username='"&strUserName&"' and state=2 ",conn,1,1
IntOrderNum = rsvip.recordcount
rsvip.Close

rsvip.open "select [User].GrpID,TimesGrp.GrpName,TimesGrp.Stars from [User] Inner Join TimesGrp On [User].GrpID = TimesGrp.GrpID where username='"&strUserName&"' ",conn,1,1
strTitle = rsVip("GrpName")
LngDiscount = rsVip("Stars")
rsvip.close
set rsvip=nothing 

if IntOrderNum=0 then %>

      <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
        <TR> 
	<td width="100％" align="center"><font color="#ff6600">我的帐户</font></td>
</TR>
<tr><td background=images/bg_04.gif border=0></td></tr>
  <tr height=20>
    <td>欢迎<font color=FF6600><% = strUserName %></font>&nbsp;您是<font color=FF6600><b><% = strTitle %></b></font></td>
  </tr>
  <tr>
    <td height=20>&nbsp;您目前没有未处理订单</td>
  </tr>
  <tr>
    <td height=20>&nbsp;共计:0.00元</td>
  </tr>
  <tr><td align="center" height=20><a href=profile.asp?action=profile>用户中心</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=logout.asp>注销登录</a></td></tr>
</table>

<%

else
dim shopjiage
shopjiage = 0
set rs=server.CreateObject("adodb.recordset")
rs.open "select product.vipprice,product.amount,product." & LstPrice & ",orders.productnum from product inner join orders on product.id=orders.id where orders.state=2 and orders.username='"&trim(strUserName)&"' ",conn,1,1
do while not rs.eof
shopjiage=shopjiage+(rs("" & LstPrice & "")+rs("vipprice"))*rs("productnum")
rs.movenext
loop 
shopjiage=round(shopjiage,2)
%>

      <table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
        <TR> 
	<td width="100％" align="center" height=20><font color="#ff6600">我的帐户</font></td>
</TR>
<tr><td background=images/bg_04.gif border=0></td></tr>
  <tr>
    <td height=20>欢迎<font color=FF6600><% = strUserName %></font>&nbsp;您是<font color=FF6600><b><% = strTitle %></b></font></td>
  </tr>
  <tr>
    <td height=20>&nbsp;您目前有<font color="#FF6600">&nbsp;<% =IntOrderNum %>&nbsp;</font>笔<a href="profile.asp?action=goods"><font color="#FF6600">未处理订单</font></a></td>
  </tr>
  <tr>
    <td height=20>&nbsp;共计：<font color="#FF6600"><% = shopjiage %></font>&nbsp;元(不含邮费)</td>
  </tr>
  <tr><td align="center" height=20><a href=profile.asp?action=profile>用户中心</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=logout.asp>注销登录</a></td></tr>
</table>
<%
end if 
rs.close	
end if %></TD>
    </TR>
</TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
  function checkuu()
{
    if(checkspace(document.loginfo.username.value)) {
	document.loginfo.username.focus();
    alert("用户名不能为空！");
	return false;
  }
    if(checkspace(document.loginfo.UserPassword.value)) {
	document.loginfo.UserPassword.focus();
    alert("密码不能为空！");
	return false;
  }
    if(checkspace(document.loginfo.passcode.value)){
	document.loginfo.passcode.focus();
	alert("验证码不能为空");
	return false;
	}
	
  }

//-->
</script> 
