ListBuyBak.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. require("../../member/class/user.php");
  7. require "../".LoadLang("pub/fun.php");
  8. require("../../data/dbcache/MemberLevel.php");
  9. $link=db_connect();
  10. $empire=new mysqlquery();
  11. $editor=1;
  12. //验证用户
  13. $lur=is_login();
  14. $logininid=$lur['userid'];
  15. $loginin=$lur['username'];
  16. $loginrnd=$lur['rnd'];
  17. $loginlevel=$lur['groupid'];
  18. $loginadminstyleid=$lur['adminstyleid'];
  19. //ehash
  20. $ecms_hashur=hReturnEcmsHashStrAll();
  21. //验证权限
  22. CheckLevel($logininid,$loginin,$classid,"member");
  23. $userid=(int)$_GET['userid'];
  24. $username=ehtmlspecialchars($_GET['username']);
  25. $search="&username=".$username."&userid=".$userid.$ecms_hashur['ehref'];
  26. $page=(int)$_GET['page'];
  27. $page=RepPIntvar($page);
  28. $start=0;
  29. $line=20;//每页显示条数
  30. $page_line=12;//每页显示链接数
  31. $offset=$page*$line;//总偏移量
  32. $totalquery="select count(*) as total from {$dbtbpre}enewsbuybak where userid='$userid'";
  33. $num=$empire->gettotal($totalquery);//取得总条数
  34. $query="select * from {$dbtbpre}enewsbuybak where userid='$userid'";
  35. $query=$query." order by buytime desc limit $offset,$line";
  36. $sql=$empire->query($query);
  37. $returnpage=page2($num,$line,$page_line,$start,$page,$search);
  38. ?>
  39. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  40. <html>
  41. <head>
  42. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  43. <title>购买记录</title>
  44. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  45. </head>
  46. <body>
  47. <table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1">
  48. <tr>
  49. <td>查看<b><?=$username?></b>购买记录</td>
  50. </tr>
  51. </table>
  52. <br>
  53. <table width="98%%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  54. <tr class="header">
  55. <td width="11%"><div align="center">充值类型</div></td>
  56. <td width="37%" height="25"><div align="center">充值卡号</div></td>
  57. <td width="11%" height="25"><div align="center">充值金额</div></td>
  58. <td width="11%" height="25"><div align="center">购买点数</div></td>
  59. <td width="11%"><div align="center">有效期</div></td>
  60. <td width="19%" height="25"><div align="center">购买时间</div></td>
  61. </tr>
  62. <?
  63. while($r=$empire->fetch($sql))
  64. {
  65. //类型
  66. if($r['type']==0)
  67. {
  68. $type='点卡充值';
  69. }
  70. elseif($r['type']==1)
  71. {
  72. $type='在线充值';
  73. }
  74. elseif($r['type']==2)
  75. {
  76. $type='充值点数';
  77. }
  78. elseif($r['type']==3)
  79. {
  80. $type='充值金额';
  81. }
  82. else
  83. {
  84. $type='';
  85. }
  86. ?>
  87. <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
  88. <td><div align="center"><?=$type?></div></td>
  89. <td height="25"><div align="center">
  90. <?=$r[card_no]?>
  91. </div></td>
  92. <td height="25"><div align="center">
  93. <?=$r[money]?>
  94. </div></td>
  95. <td height="25"><div align="center">
  96. <?=$r[cardfen]?>
  97. </div></td>
  98. <td><div align="center"><?=$r[userdate]?></div></td>
  99. <td height="25"><div align="center">
  100. <?=$r[buytime]?>
  101. </div></td>
  102. </tr>
  103. <?
  104. }
  105. db_close();
  106. $empire=null;
  107. ?>
  108. <tr bgcolor="#FFFFFF">
  109. <td height="25" colspan="6">
  110. <?=$returnpage?>
  111. </td>
  112. </tr>
  113. </table>
  114. </body>
  115. </html>