
         <% if request.cookies("sundxshop")("username")="" then 
	  		 Dim url %>
  
<table width=330 border=0 align=center cellpadding=0 cellspacing=0  >
<TR> 
	<td  height=40 background="images/login_pay_bg.png" style='padding-left:40px;color:#333333;font-weight: bold'>已经是会员的请在这里登录</td>
</TR>	  
<tr ><td  border=0></td></tr>
          <form name=loginfo method=post action=chkuser.asp>
            <tr > 
              <td style='padding-left:15px' height=30 >用户名：<input name=username type=text size="20" maxlength="15"> 
              </td>
              </tr>
            <tr > 
            <td style='padding-left:15px' height=30  >密　码：<input name=UserPassword type=password size="20" maxlength="15"></td>
            </tr>
            <tr > 
              <td style='padding-left:15px' height=30>验证码：<input name=passcode type=text size=6 maxlength="4">
              <img src="code.asp"></td>
			  </tr>
            <tr > <td colspan="2"  height=80 style='padding-left:30px;'>
                <input name="image1" type="image" src="images/top_17.gif" height="22" border="0" style='border:0px solid;height:22px' onClick="return checkuu();">&nbsp;<a href="reg.asp"><img src="images/top_18.gif" border="0"></a>
                <input name=comeurl type=hidden value=<% = url %>><a href="profile.asp?action=repass">忘记密码</a>
            </td></tr>
          </form>
        </table>

<%
else 
dim IntOrderNum
set rs=server.CreateObject("adodb.recordset")
rs.open "select price2,vipprice,amount,productnum from  orders  where state=2 and username='"&trim(strUserName)&"' ",conn,1,1
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 DV_User.GrpID,sundxGRP.GrpName,sundxGRP.Stars from DV_User Inner Join sundxGRP On DV_User.GrpID = sundxGRP.GrpID where username='"&strUserName&"' ",conn,1,1
strTitle = rsVip("GrpName")
LngDiscount = rsVip("Stars")
rsvip.close
set rsvip=nothing 

if IntOrderNum=0 then %>

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

<%

else
dim shopjiage
shopjiage = 0
do while not rs.eof
if  Lnggrpid = 4 or rs("amount") = 0 then
shopjiage=shopjiage+(rs("price2")+rs("vipprice"))*rs("productnum")
Else 
shopjiage=round(shopjiage+(rs("price2")*LngDiscount+rs("vipprice"))*rs("productnum"),0)
End IF
rs.movenext
loop 
shopjiage=round(shopjiage,2)
%>

<table width="330" border="0" cellspacing="1" cellpadding="1" align="center" >
<TR> 
	<td  height=40 background="images/login_pay_bg.png"  style='padding-left:30px'><font color="#333333">我的帐户</font></td>
</TR>
<tr><td background=images/bg_04.gif border=0></td></tr>
  <tr>
    <td height=30>&nbsp;欢迎<font color=FF6600><% = strUserName %></font>&nbsp;您是<font color=FF6600><b><% = strTitle %></b></font></td>
  </tr>
  <tr>
    <td height=30>&nbsp;您目前有<font color="#FF6600">&nbsp;<% =IntOrderNum %>&nbsp;</font>笔<a href="dan.asp"><font color="#FF6600">未处理订单</font></a></td>
  </tr>
  <tr>
    <td height=30>&nbsp;共计：<font color="#FF6600"><% = shopjiage %></font>元(不含邮费)</td>
  </tr>
  <tr><td align="center" height=30><a href=profile.asp?action=profile>用户中心</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=logout.asp>注销登录</a></td></tr>
</table>
<%
end if
rs.close
set rs=nothing	
end if %>
<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> 
