productlist.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $sj=date("Y-m-d H:i:s");
  6. $sqluser="select * from yjcode_user where uid='".$_SESSION[SHOPUSER]."' and shopzt=2";mysql_query("SET NAMES 'GBK'");$resuser=mysql_query($sqluser);
  7. if(!$rowuser=mysql_fetch_array($resuser)){php_toheader("openshop3.php");}
  8. $ncapv=1;
  9. $ses=" where zt<>99 and userid=".$rowuser[id];
  10. if($_GET[zt]=="1"){$ses=$ses." and zt=1";}
  11. elseif($_GET[zt]=="2"){$ses=$ses." and zt=2";}
  12. if($_GET[t1v]!=""){$ses=$ses." and tit like '%".$_GET[t1v]."%'";}
  13. $t2v=$_GET[t2v];if(is_numeric($t2v)){$ses=$ses." and id=".$t2v;}
  14. $t3v=$_GET[t3v];if(is_numeric($t3v)){$ses=$ses." and money2>=".$t3v."";}
  15. $t4v=$_GET[t4v];if(is_numeric($t4v)){$ses=$ses." and money2<=".$t4v."";}
  16. $t5v=$_GET[t5v];if(is_numeric($t5v)){$ses=$ses." and xsnum>=".$t5v."";}
  17. $t6v=$_GET[t6v];if(is_numeric($t6v)){$ses=$ses." and xsnum<=".$t6v."";}
  18. $t7v=$_GET[t7v];if(is_numeric($t7v)){$ses=$ses." and kcnum>=".$t7v."";}
  19. $t8v=$_GET[t8v];if(is_numeric($t8v)){$ses=$ses." and kcnum<=".$t8v."";}
  20. if($_GET[sd1v]!=""){$ses=$ses." and ty1id=".$_GET[sd1v]."";}
  21. if($_GET[ifxj]=="1"){$ses=$ses." and ifxj=1";$ncapv=3;}
  22. if($_GET[page]!=""){$page=$_GET[page];}else{$page=1;}
  23. ?>
  24. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  25. <html xmlns="http://www.w3.org/1999/xhtml">
  26. <head>
  27. <meta http-equiv="x-ua-compatible" content="ie=7" />
  28. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  29. <title>用户管理面板 - <?=webname?></title>
  30. <? include("cssjs.html");?>
  31. <link href="css/sell.css" rel="stylesheet" type="text/css" />
  32. <script language="javascript">
  33. function psel(){
  34. str="t1v="+document.getElementById("t1").value;
  35. str=str+"&t2v="+document.getElementById("t2").value;
  36. str=str+"&t3v="+document.getElementById("t3").value;
  37. str=str+"&t4v="+document.getElementById("t4").value;
  38. str=str+"&t5v="+document.getElementById("t5").value;
  39. str=str+"&t6v="+document.getElementById("t6").value;
  40. str=str+"&t7v="+document.getElementById("t7").value;
  41. str=str+"&t8v="+document.getElementById("t8").value;
  42. str=str+"&sd1v="+document.getElementById("sd1").value;
  43. location.href="productlist.php?"+str;
  44. }
  45. </script>
  46. </head>
  47. <body>
  48. <? include("../tem/top.html");?>
  49. <? include("top.php");?>
  50. <div class="yjcode">
  51. <? include("left.php");?>
  52. <!--RB-->
  53. <div class="userright">
  54. <!--搜索B-->
  55. <div class="prosel">
  56. <ul class="u1">
  57. <li class="l1">宝贝名称:</li>
  58. <li class="l2"><input type="text" value="<?=$_GET[t1v]?>" id="t1" class="inp" style="width:194px;" /></li>
  59. <li class="l1">宝贝ID:</li>
  60. <li class="l2"><input type="text" value="<?=$_GET[t2v]?>" id="t2" class="inp" style="width:194px;"/></li>
  61. <li class="l1">宝贝类目:</li>
  62. <li class="l2">
  63. <select id="sd1"class="inp" >
  64. <option value="">不限</option>
  65. <? while1("*","yjcode_type where admin=1 order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  66. <option value="<?=$row1[id]?>"<? if($row1[id]==$_GET[sd1v]){?> selected="selected"<? }?>><?=$row1[type1]?></option>
  67. <? }?>
  68. </select>
  69. </li>
  70. <li class="l1">价格:</li>
  71. <li class="l2"><input type="text" class="inp" value="<?=$_GET[t3v]?>" style="width:80px;" id="t3" /><span class="fd">到</span><input type="text" class="inp" value="<?=$_GET[t4v]?>" style="width:80px;" id="t4"/></li>
  72. <li class="l1">总销量:</li>
  73. <li class="l2"><input type="text" class="inp" value="<?=$_GET[t5v]?>" style="width:80px;" id="t5"/><span class="fd">到</span><input type="text" class="inp" value="<?=$_GET[t6v]?>" style="width:80px;" id="t6"/></li>
  74. <li class="l1">库存量:</li>
  75. <li class="l2"><input type="text" class="inp" value="<?=$_GET[t7v]?>" style="width:80px;" id="t7"/><span class="fd">到</span><input type="text" class="inp" value="<?=$_GET[t8v]?>" style="width:80px;" id="t8"/></li>
  76. <li class="ltj"><input type="button" onclick="psel()" class="bt1" value="搜索" /> <input type="button" onclick="gourl('productlist.php')" class="bt2" value="重置" /></li>
  77. </ul>
  78. </div>
  79. <!--搜索E-->
  80. <!--白B-->
  81. <div class="rkuang">
  82. <ul class="procz">
  83. <li class="l1"><label><input name="C2" type="checkbox" onclick="xuan()" /> 全选</label></li>
  84. <li class="l2">
  85. <a href="javascript:void(0);" onclick="NcheckDEL(1,'yjcode_pro')" class="a1">批量上/下架</a>
  86. <a href="javascript:void(0);" onclick="NcheckDEL(2,'yjcode_pro')" class="a1">删除选中</a>
  87. <a href="javascript:void(0);" onclick="NcheckDEL(7,'yjcode_pro')" class="a1">更新商品</a>
  88. <span class="fd">说明:更新一个商品将消耗<strong class="feng"><?=$rowcontrol[sxjf]?></strong>积分,您剩余<strong class="blue"><?=$rowuser[jf]?></strong>积分 【<a href="jfbank.php">兑换积分</a>】</span>
  89. </li>
  90. <li class="l3"><a href="productlx.php">+添加新商品</a></li>
  91. </ul>
  92. <ul class="prou1">
  93. <li class="l1">商品信息(共找到<?=returncount("yjcode_pro".$ses)?>个)</li>
  94. <li class="l2">售价(元)</li>
  95. <li class="l3">库存</li>
  96. <li class="l4">销量</li>
  97. <li class="l5">最近更新</li>
  98. <li class="l6">操作</li>
  99. </ul>
  100. <?
  101. pagef($ses,10,"yjcode_pro","order by lastsj desc");while($row=mysql_fetch_array($res)){
  102. $au1="product.php?bh=".$row[bh];
  103. $au2="../product/view".$row[id].".html";
  104. if(0==$row[ifxj]){$xjv="&nbsp;";}else{$xjv="<span class='red'>已下架</span>";}
  105. ?>
  106. <ul class="prou2">
  107. <li class="l1"><input name="C1" type="checkbox" value="<?=$row[bh]?>" /></li>
  108. <li class="l2">
  109. 商品编码:<?=$row[bh]?>&nbsp;&nbsp;&nbsp;&nbsp;
  110. 所属类目:<?=returntype(1,$row[ty1id])." - ".returntype(2,$row[ty2id])?>
  111. </li>
  112. <li class="l3"><?=$xjv?></li>
  113. <li class="l4">
  114. <a href="<?=$au2?>" target="_blank"><img border="0" src="<?=returntp("bh='".$row[bh]."' order by xh asc","-2")?>" onerror="this.src='img/none60x60.gif'" /></a>
  115. </li>
  116. <li class="l5"><a href="<?=$au2?>" target="_blank" class="a1"><?=returntitdian($row["tit"],75)?></a><br><?=returnztv($row[zt],$row[ztsm])?></li>
  117. <li class="l6">
  118. <strong class="feng"><?=returnyhmoney($row[yhxs],$row[money2],$row[money3],$sj,$row[yhsj1],$row[yhsj2],$row[id])?>元</strong><br>
  119. <s class="hui">原价<?=returnjgdw($row[money1],"元","暂无")?></s>
  120. </li>
  121. <li class="l7">
  122. <? if(4==$row[fhxs]){?><?=$row[kcnum]?><br>【<a href="kclist.php?bh=<?=$row[bh]?>" class="blue">管理库存</a>】<? }else{?>
  123. <?=$row[kcnum]?>
  124. <? }?>
  125. </li>
  126. <li class="l8"><?=$row[xsnum]?></li>
  127. <li class="l9"><?=$row[lastsj]?></li>
  128. <li class="l10">
  129. <a href="<?=$au1?>" class="a1">修改</a>
  130. <a href="<?=$au2?>" target="_blank" class="a2">预览</a>
  131. </li>
  132. </ul>
  133. <? }?>
  134. <?
  135. $nowurl="productlist.php";
  136. $nowwd="zt=".$_GET[zt]."&t1v=".$_GET[t1v]."&t2v=".$_GET[t2v]."&t3v=".$_GET[t3v]."&t4v=".$_GET[t4v]."&t5v=".$_GET[t5v]."&t6v=".$_GET[t6v]."&t7v=".$_GET[t7v]."&t8v=".$_GET[t8v]."&sd1v=".$_GET[sd1]."&ifxj=".$_GET[ifxj];
  137. include("page.php");
  138. ?>
  139. <div class="clear clear15"></div>
  140. </div>
  141. <!--白E-->
  142. </div>
  143. <!--RE-->
  144. </div>
  145. <div class="clear clear15"></div>
  146. <? include("../tem/bottom.html");?>
  147. </body>
  148. </html>