<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="b2b_includefile/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<TABLE align="center" cellSpacing=0 cellPadding=0 border=0>
    <TR> 
      <TD width="972" vAlign=top>
	   <% if LngUserID="0" then 
	  		 %>
<table width=100% border=0 align=center cellpadding=0 cellspacing=0>
<tr><td width="100" border=0></td></tr>
          <form name=loginfo method=post action=chkuser.asp>
            <tr bgcolor=#ffffff> 
              <td height="50" align="center" style='padding-left:5px'>用户名：
                <input name=username type=text class="input_sr" size="15" maxlength="15">
                密　码：
                <input name=UserPassword type=password class="input_sr" size="15" maxlength="15">
                验证码：
                <input name=passcode type=text class="input_sr" size=8 maxlength="4">
                <img src="code.asp">&nbsp;&nbsp;&nbsp;&nbsp;<input name=Submit type=submit class="input_bot" onClick="return checkuu();" value="登录">
                <input name="Submit1" type="button" class="input_bot" onClick="location.href='reg.asp';" value="注册">
              <input name="Submit2" type="button" class="input_bot" onClick="location.href='profile.asp?action=repass';" value="忘密"></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,b2b_userjb.GrpName,b2b_userjb.Stars from [User] Inner Join b2b_userjb On [User].GrpID = b2b_userjb.GrpID where username='"&strUserName&"' ",conn,1,1
strTitle = rsVip("GrpName")
LngDiscount = rsVip("Stars")
rsvip.close
set rsvip=nothing 

if IntOrderNum=0 then %>

<%

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)
%>

<%
end if 
rs.close	
end if %></TD>
    </TR>
    <TR>
      <TD vAlign=top>&nbsp;</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> 