adlxlist.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $zt=$_GET[zt];
  6. if($_GET[control]=="sd"){
  7. $userid=returnuserid($_SESSION[SHOPUSER]);
  8. while1("*","yjcode_ad where zt=1 and userid=".$userid." and id=".$_GET[id]);if(!$row1=mysql_fetch_array($res1)){php_toheader("adlxlist.php?zt=1");}
  9. PointUpdateM($userid,$row1[money1]);
  10. PointIntoM($userid,"撤消自助广告位".$row1[adbh],$row1[money1]);
  11. if($row1[type1]=="图片" || $row1[type1]=="动画"){
  12. delFile("../ad/".$row1[bh].".".$row1[jpggif]);
  13. delFile("../ad/".$row1[bh]."-99.".$row1[jpggif]);
  14. }
  15. deletetable("yjcode_ad where id=".$_GET[id]);
  16. php_toheader("adlxlist.php?zt=1&t=suc");
  17. }
  18. ?>
  19. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  20. <html xmlns="http://www.w3.org/1999/xhtml">
  21. <head>
  22. <meta http-equiv="x-ua-compatible" content="ie=7" />
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  24. <title>用户管理面板 - <?=webname?></title>
  25. <? include("cssjs.html");?>
  26. <link href="css/hudong.css" rel="stylesheet" type="text/css" />
  27. <script language="javascript">
  28. function addel(x){
  29. if(!confirm("确定要撤消吗?撤消后费用会自动退还至您的帐户内")){return false;}
  30. layer.msg('正在提交', {icon: 16 ,time: 0,shade :0.25});
  31. location.href="adlxlist.php?control=sd&zt=1&id="+x;
  32. }
  33. </script>
  34. </head>
  35. <body>
  36. <? include("../tem/top.html");?>
  37. <? include("top.php");?>
  38. <div class="yjcode">
  39. <? include("left.php");?>
  40. <!--RB-->
  41. <div class="userright">
  42. <? include("rcap14.php");?>
  43. <script language="javascript">
  44. <? if($zt==0){?>document.getElementById("rcap2").className="l1 l2";<? }elseif($zt==1){?>document.getElementById("rcap3").className="l1 l2";<? }?>
  45. </script>
  46. <!--白B-->
  47. <div class="rkuang">
  48. <? systs("恭喜您,操作成功!","adlxlist.php?zt=".$zt)?>
  49. <ul class="adlistcap">
  50. <li class="l1">广告编号</li>
  51. <li class="l2">广告标题</li>
  52. <li class="l3">广告形式</li>
  53. <li class="l4">广告状态</li>
  54. <li class="l5">操作</li>
  55. </ul>
  56. <?
  57. $ses=" where userid=".$luserid;
  58. if($zt==0){$ses=$ses." and zt=0";}
  59. elseif($zt==1){$ses=$ses." and zt=1";}
  60. $page=$_GET["page"];if($page==""){$page=1;}else{$page=intval($_GET["page"]);}
  61. pagef($ses,30,"yjcode_ad","order by sj desc");while($row=mysql_fetch_array($res)){
  62. autoAD($row[adbh]);
  63. ?>
  64. <ul class="adlist" onmouseover="this.className='adlist adlist1';" onmouseout="this.className='adlist';">
  65. <li class="l1"><?=$row[adbh]?></li>
  66. <li class="l2"><?=$row[tit]?></li>
  67. <li class="l3"><?=$row[type1]?></li>
  68. <li class="l4">
  69. <?
  70. if(0==$row[zt]){
  71. $str="<span class='blue'>展示中</span>";
  72. $str=$str."<br>戴止:".$row[dqsj];
  73. $astr="";
  74. }elseif(1==$row[zt]){
  75. $str="<span class='feng'>队列中</span>";
  76. if(0==$row[fflx]){$s="";}else{$s=" and xh=".$row[xh]."";}
  77. $pd=returncount("yjcode_ad where zt=1 and sj>'".$row[sj]."'".$s);
  78. $str=$str."<br><span class='green'>前面还有".$pd."人</span>";
  79. $astr="<br><a href=\"javascript:void(0);\" onclick=\"addel(".$row[id].")\">撤单</a>";
  80. }
  81. echo $str;
  82. ?>
  83. </li>
  84. <li class="l5">
  85. <a href="adlxLook.php?id=<?=$row[id]?>" target="_blank">预览</a><?=$astr?>
  86. </li>
  87. </ul>
  88. <? }?>
  89. <div class="npa">
  90. <?
  91. $nowurl="adlxlist.php";
  92. $nowwd="zt=".$zt;
  93. require("page.php");
  94. ?>
  95. </div>
  96. <div class="clear clear15"></div>
  97. </div>
  98. <!--白E-->
  99. </div>
  100. <!--RE-->
  101. </div>
  102. <div class="clear clear15"></div>
  103. <? include("../tem/bottom.html");?>
  104. </body>
  105. </html>