kclist.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. $bh=$_GET[bh];
  5. $_SESSION["tzURL"]=weburl."user/kclist.php?bh=".$bh;
  6. sesCheck();
  7. $sqluser="select * from yjcode_user where uid='".$_SESSION[SHOPUSER]."' and zfmm='".$_SESSION[SAFEPWD]."'";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser);
  8. if(!$rowuser=mysql_fetch_array($resuser)){Audit_alert("卡密信息操作需要先进行安全码验证!","safepwd.php");}
  9. ?>
  10. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  11. <html xmlns="http://www.w3.org/1999/xhtml">
  12. <head>
  13. <meta http-equiv="x-ua-compatible" content="ie=7" />
  14. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  15. <title>用户管理面板 - <?=webname?></title>
  16. <? include("cssjs.html");?>
  17. <link href="css/sell.css" rel="stylesheet" type="text/css" />
  18. <style type="text/css">
  19. body{background-color:#fff;}
  20. .userright .onets{margin-top:0;}
  21. </style>
  22. <script language="javascript">
  23. function ser(){
  24. location.href="kclist.php?bh=<?=$bh?>&st1="+document.getElementById("st1").value+"&sd1="+document.getElementById("sd1").value;
  25. }
  26. function glover(x){
  27. document.getElementById("gl"+x).style.display="";
  28. }
  29. function glout(x){
  30. document.getElementById("gl"+x).style.display="none";
  31. }
  32. function del(x){
  33. document.getElementById("chk"+x).checked=true;
  34. NcheckDEL(5,'yjcode_kc');
  35. }
  36. </script>
  37. </head>
  38. <body>
  39. <div class="userright">
  40. <!--白B-->
  41. <div class="rkuang">
  42. <div class="onets">
  43. 库存提示:
  44. 已使用(<strong class="red"><?=returncount("yjcode_kc where userid=".$rowuser[id]." and probh='".$bh."' and ifok=1")?></strong>)&nbsp;&nbsp;&nbsp;&nbsp;
  45. 未使用(<strong class="blue"><?=returncount("yjcode_kc where userid=".$rowuser[id]." and probh='".$bh."' and ifok=0")?></strong>)
  46. </div>
  47. <div class="ksedi" style="margin-top:5px;">
  48. <div class="d1">
  49. <a href="javascript:;" onclick="NcheckDEL(5,'yjcode_kc')" class="a1">删除</a>
  50. <a href="kc.php?bh=<?=$bh?>" class="a2">添加信息</a>
  51. </div>
  52. <div class="d2">
  53. <input type="button" onclick="ser()" value="查询" class="btn" />
  54. <select id="sd1">
  55. <option value="">全部</option>
  56. <option value="0"<? if($_GET[sd1]=="0"){?> selected="selected"<? }?>>未使用</option>
  57. <option value="1"<? if($_GET[sd1]=="1"){?> selected="selected"<? }?>>已使用</option>
  58. </select>
  59. <span class="s1">使用情况:</span>
  60. <input type="text" id="st1" value="<?=$_GET[st1]?>" class="inp1" />
  61. <span class="s1">关键词:</span>
  62. </div>
  63. </div>
  64. <ul class="kamikccap">
  65. <li class="l1"><input name="C2" type="checkbox" onclick="xuan()" /></li>
  66. <li class="l2">排序</li>
  67. <li class="l3">卡号</li>
  68. <li class="l4">密码</li>
  69. <li class="l5">使用状况</li>
  70. <li class="l6">使用会员</li>
  71. <li class="l7">使用时间</li>
  72. <li class="l8">编辑</li>
  73. </ul>
  74. <?
  75. $ses=" where userid=".$rowuser[id]." and probh='".$bh."'";
  76. if($_GET[st1]!=""){$ses=$ses." and ka like '%".$_GET[st1]."%'";}
  77. if($_GET[sd1]!=""){$ses=$ses." and ifok=".$_GET[sd1];}
  78. $page=$_GET["page"];if($page==""){$page=1;}else{$page=intval($_GET["page"]);}
  79. pagef($ses,30,"yjcode_kc","order by id asc");while($row=mysql_fetch_array($res)){
  80. $au="kc.php?bh=".$bh."&action=update&id=".$row[id];
  81. ?>
  82. <ul class="kamikclist">
  83. <li class="l1"><input name="C1" type="checkbox" id="chk<?=$row[id]?>" value="<?=$row[id]?>" /></li>
  84. <li class="l2"><?=$row[id]?></li>
  85. <li class="l3"><a href="<?=$au?>"><?=returntitdian($row[ka],35)?></a></li>
  86. <li class="l4"><?=returntitdian($row[mi],35)?></li>
  87. <li class="l5"><? if(1==$row[ifok]){?><span class="red">已使用</span><? }else{?><span class="blue">未使用</span><? }?></li>
  88. <li class="l6"><?=returnuser($row[userid1])?></li>
  89. <li class="l7"><?=$row[sj]?></li>
  90. <li class="l8" onmouseover="glover(<?=$row[id]?>)" onmouseout="glout(<?=$row[id]?>)">
  91. <span class="s1">管理</span>
  92. <div class="gl" style="display:none;" id="gl<?=$row[id]?>">
  93. <a href="<?=$au?>">编辑信息</a>
  94. <a href="javascript:;" onclick="del(<?=$row[id]?>)">删除卡密</a>
  95. </div>
  96. </li>
  97. </ul>
  98. <? }?>
  99. <div class="npa">
  100. <?
  101. $nowurl="kclist.php";
  102. $nowwd="bh=".$bh."&st1=".$_GET[st1]."&sd1=".$_GET[sd1];
  103. require("page.php");
  104. ?>
  105. </div>
  106. <div class="clear clear10"></div>
  107. </div>
  108. <!--白E-->
  109. </div>
  110. </body>
  111. </html>