<table width="200" border="0" align="center" cellpadding="1" cellspacing="1" background="<%=weburl%>images/skin<%=cssid%>/z02.jpg">
      <tr>
        <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30" background="<%=weburl%>images/skin<%=cssid%>/z01.jpg" ><div align="center"><span style="font-weight: bold; color: #000000">Sign In</span></div></td>
            </tr>
            <tr>
              <td valign="middle"><%if session("username")="" Then%>
		<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		<form name="userlogin" method="post" action="<%=weburl%>checkuserlogin.asp">
          <tr>
            <td height="30">Username:<input name="username" type="text" class="wenbenkuang" id="username" style='background:url(<%=weburl%>images/login01.gif); padding:2 0 0 5;' onFocus="this.style.background='#F7F7F7'" value="wygkcn" size="13" maxlength="15" ></td>
          </tr>
          <tr>
            <td height="30">Password:<input name="userpassword" type="password" class="wenbenkuang"  style="background:url(<%=weburl%>images/login01.gif); padding:2 0 0 5;" onFocus="this.style.background='#F7F7F7'" value="123456" size="13" maxlength="15">
            <a onClick="showkeyboard(curEditName)" ><img src="<%=weburl%>img/login/login.gif" alt="使用软键盘" width="14" height="13" hspace="5" align="absMiddle"></a>
              <input name="yzm" type="hidden" class="wenbenkuang" id="yzm" value="<%=yz%>" size="5">
            <input name="yzm1" type="hidden" class="wenbenkuang" id="yzm1" value="<%=yz%>" size="8" maxlength="5"></td>
          </tr>
          <tr>
            <td height="30"><div align="center">
              <input name="image222" type="image" src="<%=weburl%>images/login02.gif" height="28" border="0" />
            </div></td>
          </tr>
          <tr>
            <td height="25">&nbsp;<a href="<%=weburl%>reg.asp" >Free Register!</a></td>
          </tr>
          <tr>
            <td height="25">&nbsp;<a href="<%=weburl%>getpwd.asp">Forgot your password?</a></td>
          </tr>
	      </form>
        </table>  
		<%
			Else
			username = session("username")                       
			set rslg = server.CreateObject("ADODB.RecordSet")
			mailnewno = "SELECT  Count(isnew) FROM sms where  tname='"&username&"' and isnew=1"   
			rslg.open mailnewno,conn,1,1
			 if rslg.Eof or rslg.Bof then
			 tishi="<a href="&weburl&"bbs/mysms.asp?id=0>0</a>"                  
			 else                    
			tishi="<a href="&weburl&"bbs/mysms.asp?id=0><font color=red>"&rslg(0)&"</font></a>"                        
			end If
			rslg.close
            set rslg = nothing
		%>
		<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
		<form name="userlogin" method="post" action="<%=weburl%>checkuserlogin.asp">
          <tr>
            <td height="25"><%
						set rslg=server.createobject("adodb.recordset")
						sql = "select jifen,yucun,reglx,vipdate from [shop_user] where username='"&nosql(session("username"))&"'"
                        rslg.open sql,conn,1,3
                        if rslg("vipdate")<>"" then 
                          '检查VIP是否过期
                          if rslg("vipdate") < date and rslg("reglx") = 2 then
                          rslg("reglx") = 1
                          rslg.update
                          end if
                        end if
                        session("yucun") = rslg("yucun")
                        session("jifen") = rslg("jifen")
                        session("reglx") = rslg("reglx")
                        rslg.close
                        set rslg = nothing%>Username:<%=session("username")%>						</td>
          </tr>
          <tr>
            <td height="25">Usertype:<%if session("reglx") = 2 then
				response.write " <font color=red>VIP</font>&nbspMessage:"&tishi&""
								elseif session("reglx")=3 then
				response.write "<font color=red>Wholesale</font>&nbspMessage:"&tishi&""
				else
				response.write "<font color=red>Member</font>&nbspMessage:"&tishi&""
				end if%></td>
          </tr>
          <tr>
            <td height="25">Account:<%=session("yucun")%>&nbsp;Score:<%=session("jifen")%></td>
          </tr>
          
          
          <tr>
            <td height="30"><div align="center"><a href="<%=weburl%>user.asp"><img src="<%=weburl%>images/login03.gif" width="140" height="28" border="0" /></a></div></td>
          </tr>
          <tr>
            <td height="30"><div align="center"><a href="<%=weburl%>logout.asp"><img src="<%=weburl%>images/login04.gif" width="140" height="28" border="0" /></a></div></td>
          </tr>
	      </form>
        </table>		        </td>
      </tr>
	  <tr>
	  <td height="1"><img src="<%=weburl%>images/ge.gif" width="1" height="5" /></td>
      </tr>
      
      <tr>
        <td height="117" valign="middle"><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
          <tr>
            <td height="23">&nbsp;<span class="STYLE3"><%
			if session("username")<>"" then 
					  set rscar=server.CreateObject("adodb.recordset")
					  rscar.open "select count(*) as rec_count from shop_action where username='"&nosql(session("username"))&"' and zhuangtai=7",conn,1,1
					  rec_count=rscar("rec_count")
					  rscar.close
					  rscar.open "select sum(zonger) as zongji from shop_action where username='"&nosql(session("username"))&"' and zhuangtai=7",conn,1,1
					  else
					  set rscar=server.CreateObject("adodb.recordset")
					  rscar.open "select count(*) as rec_count from shop_action where username='"&nosql(session("tmp_usersessionid"))&"' and zhuangtai=7",conn,1,1
					  rec_count=rscar("rec_count")
					  rscar.close
					  rscar.open "select sum(zonger) as zongji from shop_action where username='"&nosql(session("tmp_usersessionid"))&"' and zhuangtai=7",conn,1,1
					  end if
					  %><img src="images/en01.gif" width="10" height="8" /> <a href="<%=weburl%>gouwu.asp?action=show&lx=1">Shopping Cart(<%=rec_count%>)</a></span></td>
          </tr>
          <tr>
            <td height="23">&nbsp;<span class="STYLE3"><img src="images/en02.gif" width="4" height="5" /> Total(<%if (rscar("zongji")="") or isNull(rscar("zongji")) then
            response.write "0"
           else 
	        response.write formatnumber(cdbl(rscar("zongji")),2)
           end if
		   rscar.close
          set rscar = nothing%>) </span></td>
          </tr>
          <tr>
            <td height="23">&nbsp;<span class="STYLE3"><img src="images/en02.gif" width="4" height="5" /> <a href="<%=weburl%>user.asp?action=dindan">My Orders</a></span></td>
          </tr>
          <tr>
            <td height="23">&nbsp;<span class="STYLE3"><img src="images/en02.gif" width="4" height="5" /> <a href="<%=weburl%>shoucang.asp?action=show">Collection</a></span></td>
          </tr>
          <tr>
            <td height="23">&nbsp;<span class="STYLE3"><img src="images/en02.gif" width="4" height="5" /> <a href="<%=weburl%>to.asp?action=show">Comparison</a></span></td>
          </tr>
        </table><%end if%></td>
          </tr>
        </table></td>
      </tr>
    </table>