<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../HSK_Cls/HSK.MemberCls.asp"-->
<!--#include file="../HSK_Cls/HSK.Label.CommonCls.asp"-->
<%
Dim KSCls
Set KSCls = New User_ShopNameBuy
KSCls.HSK_Run()
Set KSCls = Nothing

Class User_ShopNameBuy
        Private KS,KSUser
		Private CurrentPage,totalPut,TotalPages,SQL
		Private RS,MaxPerPage
		Private Para,SqlStr
		Private Sub Class_Initialize()
			MaxPerPage =20
		  Set KS=New PublicCls
		  Set KSUser = New UserCls
		End Sub
        Private Sub Class_Terminate()
		 Set KS=Nothing
		 Set KSUser=Nothing
		End Sub
		%>
		<!--#include file="../HSK_Cls/UserFunction.asp"-->
		<%
       Public Sub loadMain()
		
		Call KSUser.Head()
		Call KSUser.InnerLocation("淘宝小号销售中心")
	   If KS.S("page") <> "" Then
			  CurrentPage = CInt(KS.S("page"))
		Else
			  CurrentPage = 1
		End If
%>
<script type="text/javascript" src="/style/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/HSK_JS/HSK.box.js"></script>
<script type="text/javascript">
function View(ID,N)
{
  new KesionPopup("#fff",4,true,"font-size:12px;background:url(/style/images/w_b_2.gif) #1B76B7 0 -4px;color:#20537A;height:22px;").popupIframe('&nbsp; 购买淘宝小号','User_ShopNameDetail.asp?ID=' + ID +'&N='+ N ,500,320,'auto')
}
</script>
<div class="tabs">
    <ul>
        <li<%If KS.S("View")<>"MyOrder" Then KS.Echo " class=""select"""%>><a href="User_ShopName_Buy.asp">小号销售中心</a></li>
        <li<%If KS.S("View")="MyOrder" Then KS.Echo " class=""select"""%>><a href="?View=MyOrder">我购买的小号</a></li>
    </ul>
</div>

<table  width="100%" border="0" align="center" cellpadding="1" cellspacing="1">
  <tr>
  	<td align="center" bgcolor="#FFFEDF" style="height:30px; line-height:30px; color:red; font-weight:bold; border:1px solid #FC3;">
    <p>好消息！接手任务没有买号的用户请注意了！<br />
    本站出售的买号绝对安全、放心，没有使用过的，可修改密码！欢迎选购！</p></td>
  </tr>
</table>			
            
				<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="border">
					<tr class="titlename">
					<td nowrap width="18%" height="32" align="center"><strong>淘宝账号</strong></td>
					<td nowrap width="14%" align="center"><strong>账号类型</strong></td>
					<td nowrap width="15%" align="center"><strong>账号注册日期</strong></td>
					<td nowrap width="12%" align="center"><strong>信誉值</strong></td>
					<td nowrap width="15%" align="center"><strong>支付宝账号</strong></td>
					<td nowrap width="10%" align="center"><strong>单价</strong></td>
					<td nowrap align="center"><strong>操作</strong></td>
				  </tr>
					<%  
						If KS.S("View") = "MyOrder" Then Para = Para & " And BuyUserName ='" & KSUser.UserName & "'"
						 SqlStr="Select ID, Account, AccountType, RegDate, Credit, Alipay, Price, Status From ShopNameBuy Where Status < 2 " & Para & " Order By Status,ID Desc"
						 Set RS=Server.createobject("adodb.recordset")
						 RS.open SqlStr,conn,1,1

						 If RS.EOF And RS.BOF Then
								  Response.Write "<tr class='tdbg'><td align=center height=25 colspan=7 valign=top>暂时还没有小号出售!</td></tr>"
						 Else
							TotalPut=rs.recordcount
							if (TotalPut mod MaxPerPage)=0 then
								TotalPages = TotalPut \ MaxPerPage
							else
								TotalPages = TotalPut \ MaxPerPage + 1
							end if
							if CurrentPage > TotalPages then CurrentPage=TotalPages
							if CurrentPage < 1 then CurrentPage=1
							rs.move (CurrentPage-1)*MaxPerPage
							SQL = rs.GetRows(MaxPerPage)
							rs.Close:set rs=Nothing
							ShowContent
				End If

						
						 %>
          </table>
		  </td>
		  </tr>
</table>
		  <%Call KS.ShowPage(totalput, MaxPerPage, "", CurrentPage,false,true)%>
		  <%
  End Sub
    
Sub ShowContent
Dim i
For i=0 To Ubound(SQL,2)
	%>
  <tr height="32" class='tdbg' onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'">
    <td class="splittd" align="center"><strong style="color:green"><%=Left(SQL(1,I),Len(SQL(1,I))-3) & "***"%></strong></td>
    <td class="splittd" align="center"><%=SQL(2,I)%></td>
    <td class="splittd" align="center"><%=SQL(3,I)%></td>
    <td class="splittd" align="center"><%=SQL(4,I)%></td>
    <td class="splittd" align="center"><%If Not KS.IsNul(SQL(5,I)) Then KS.Echo Left(SQL(5,I),3) & "****" Else KS.Echo "&nbsp;"%></td>
    <td class="splittd" align="center"><strong class="red"><%=KS.GetN(SQL(6,I),2)%></strong> 元</td>
    <td class="splittd" align="center"><%
	If KS.S("View") = "MyOrder" Then
		KS.Echo "<a href=""javascript:;"" onclick=""View(" & SQL(0,I) & ",1)""><img src=""/style/images/view_bt.gif"" border=0 width=""90"" height=""28"" align=""absmiddle""></a>"
	Else
		If KS.ChkClng(SQL(7,I))=0 Then
			KS.Echo "<a href=""javascript:;"" onclick=""View(" & SQL(0,I) & ",0)""><img src=""/style/images/Card_bt.gif"" border=0 width=""90"" height=""32"" align=""absmiddle""></a>"
		Else
			KS.Echo "<span style=""color:green"">已出售</span>"
		End If
	End If
	%></td>
  </tr>
  <%Next%>

  <%  
End Sub
  
End Class
%>