<!--#include file="head.asp"-->
<!--#include file="subleft.asp"-->

<%
response.Write "该功能维护中"
response.End()
%>

<script>document.getElementById('o_4').setAttribute("class", "ed"); document.getElementById("t_4").style.display="";document.getElementById('s_4_5').setAttribute("class", "ed6");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-我购买的卡密</title>

<SCRIPT LANGUAGE="JavaScript">
var checkflag1 = "false";
function check1(field) {
if (checkflag1 == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag1 = "true";
return "false"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag1 = "false";
return "true"; }
}

function unselectall1()
{
    if(document.myform.chkAll1.checked){
	document.myform.chkAll1.checked = document.myform.chkAll1.checked&0;
	checkflag1 = "false";
    } 	
}
</script>
<%

act=SafeRequest("act")
cact=SafeRequest("cact")
link="mybuyka?ct="


catanquan=SafeRequestform("catanquan")
if catanquan="anquan" then
anquanma=trim(SafeRequestform("anquanma"))
if anquanma="" then call PopErr("请填写完整")
sql="select aynameid,ayanquan from ayname where aynameid="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,1
if trim(rs("ayanquan"))<>"0" or trim(rs("ayanquan"))="" then
if md5(anquanma)<>trim(rs("ayanquan")) then call PopErr("支付密码输入错误")
response.Cookies("yanzheng")="yes"
else
call PopErr2("请先设置支付密码","anquan")
end if
rs.close
end if

%>
<br>
<DIV id=main2> 
<%call webleft()%>

<%

page=SafeRequest("page")
if act="del" then
id=SafeRequest("id")
if id="" then call PopErr("获取参数错误")
sql="select * from "&request.Cookies("kamiku")&" where aykaid="&clng(id)&" and aykasuoyou="&clng(request.Cookies("aynameid"))&"" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then
call PopErr("未找到此项目")
else
rs.delete
rs.close
response.Redirect("mybuyka?page="&page&"")
end if
end if

if act="alldel" then

list1=SafeRequestform("list1")
if list1="" then call PopErr("未找到此项目")
	delid=split(list1,",")
	
	For dianka=0 To Ubound(delid) 
	'response.Write delid(dianka)
	sql="select * from "&request.Cookies("kamiku")&" where aykaid="&trim(delid(dianka))&" and aykasuoyou="&clng(request.Cookies("aynameid"))&"" 
	rs.open sql,conn,1,3
	if rs.bof and rs.eof then
	call PopErr("未找到此项目")
	else
	rs.delete
	rs.close
	end if
	next
	response.Redirect("mybuyka?page="&page&"")

end if

%>


<DIV id=main_right>
<DIV id=main_right_content>

<H2><SPAN>我购买的卡密</SPAN></H2>
<DIV class=main3>

  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="?act=alldel&page=<%=page%>" method="post" name="myform" id="myform"> 
       <tr>
        <th width="25" class="border_right border_bottom" >
        
        <th width="250" align="center" class="border_right border_bottom" >商品名称
        <th align="center" class="border_right border_bottom">卡密信息
        <th width="80" align="center" class="border_right border_bottom">商品价格
        <th align="center" class="border_right border_bottom">购买时间
        <th width="30" align="center" class="border_bottom">删除		</tr>
<%
sql="select * from "&request.Cookies("kamiku")&" where aykauser="&request.Cookies("aynameid")&" and aykayesno=1 order by aykakai desc" 
'response.Write sql
'response.End()
rs.open sql,conn,1,1
rs.pagesize=50
pagecount=rs.pagecount 
if request("page")="" then 
page=1 
else
page=int(request("page")) 
end if
if page<=0 then page=1 
if request("page")="" then page=1
if not(rs.bof and rs.eof) then
rs.absolutepage=page
do while not rs.eof%>

	  <tr onmouseover=this.bgColor='#D2FFFF' onmouseout=this.bgColor='#ffffff'>
        <td align="center" class="border_right border_bottom"><input name="list1" type="checkbox" id="list1" value="<%=rs("aykaid")%>" onClick="unselectall1()" disabled></td>
        <td align="center" class="border_right border_bottom">
		<%
		set rsgood=server.CreateObject("adodb.recordset")
		sqlgood="select * from aygood where aygoodid="&clng(rs("aykagoodid"))&"" 
		rsgood.open sqlgood,conn,1,1
		if not(rsgood.bof and rsgood.eof) then
		response.Write rsgood("aygoodname")
		else
		response.Write("商品或已删除")
		end if
		%>
		</td>
        <td align="center" class="border_right border_bottom">
		<%
		response.Write "卡号："&trim(rs("ayka"))&"<br>"
		if trim(rs("aykapass"))<>"0"  then
		response.Write "密码："&trim(rs("aykapass"))
		end if
		%></td>
        <td align="center" class="border_right border_bottom">
		
		<%if not(rsgood.bof and rsgood.eof) then
		response.Write Formatnumber(rsgood("ayjiage"),2,true,-1,0)
		else
		response.Write("商品或已删除")
		end if%>
		</td>
        <td align="center" class="border_right border_bottom"><%=rs("aykakai")%></td>
        <td align="center" class="border_bottom"><img src="<%=ossurl%>images/ico_del.gif" alt="删除" border="0"></td>
	  </tr>
<%		rsgood.close
n=n+1
rs.movenext  '指针向下移动
if n>=rs.pagesize then exit do  
loop
end if
zongshu=rs.RecordCount
rs.close%>
	  

      <tr>
        <td colspan="6">&nbsp;<input name="chkAll1" type="checkbox" id="chkAll1" onClick="this.value=check1(this.form.list1)" value="checkbox" disabled> 
        全选
          <input type="submit" name="Submit" value="删除选定" onClick="javascript:return confirm('您确定要删除吗？');" disabled> 

<%call pageye()
%>		</td>
      </tr></form>
    </table>

</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>
	<!--#include virtual="/show/foot.asp"-->


