productlx.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. AdminSes_audit();
  5. //函数开始
  6. if($_GET[control]=="add"){
  7. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){Audit_alert("权限不够","default.php");}
  8. zwzr();
  9. $sj=date("Y-m-d H:i:s");
  10. $uip=$_SERVER["REMOTE_ADDR"];
  11. $uid=sqlzhuru($_POST[t1]);
  12. while1("uid,zt,shopzt","yjcode_user where uid='".$uid."' and zt=1 and shopzt=2");if(!$row1=mysql_fetch_array($res1)){Audit_alert("会员不存在!","productlx.php");}
  13. $userid=returnuserid($uid);
  14. $bh=time()."-".$userid;
  15. createDir("../upload/".$userid."/".$bh."/");
  16. if(!empty($rowcontrol[alioss]) && $rowcontrol[alioss]!=",,,"){$upty=1;}else{$upty=0;}
  17. intotable("yjcode_pro","bh,userid,sj,lastsj,uip,ty1id,ty2id,ty3id,ty4id,ty5id,zt,djl,xsnum,yhxs,ifxj,pf1,pf2,pf3,iftj,fhxs,upty","'".$bh."',".$userid.",'".$sj."','".$sj."','".$uip."',".sqlzhuru($_POST[type1id]).",".sqlzhuru($_POST[type2id]).",".sqlzhuru($_POST[type3id]).",".sqlzhuru($_POST[type4id]).",".sqlzhuru($_POST[type5id]).",99,0,0,1,0,5,5,5,0,1,".$upty."");
  18. php_toheader("product.php?bh=".$bh);
  19. }elseif($_GET[control]=="update"){
  20. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){Audit_alert("权限不够","default.php");}
  21. zwzr();
  22. updatetable("yjcode_pro","ty1id=".sqlzhuru($_POST[type1id]).",ty2id=".sqlzhuru($_POST[type2id]).",ty3id=".sqlzhuru($_POST[type3id]).",ty4id=".sqlzhuru($_POST[type4id]).",ty5id=".sqlzhuru($_POST[type5id])." where id=".$_GET[id]);
  23. php_toheader("product.php?bh=".$_GET[bh]);
  24. }
  25. //函数结束
  26. ?>
  27. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  28. <html xmlns="http://www.w3.org/1999/xhtml">
  29. <head>
  30. <meta http-equiv="x-ua-compatible" content="ie=7" />
  31. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  32. <title><?=webname?>管理系统</title>
  33. <link href="../css/pty.css" rel="stylesheet" type="text/css" />
  34. <link href="css/basic.css" rel="stylesheet" type="text/css" />
  35. <script language="javascript" src="../js/pty.js"></script>
  36. <script type="text/javascript" src="js/jquery.min.js"></script>
  37. <script language="javascript" src="js/basic.js"></script>
  38. <script language="javascript" src="js/layer.js"></script>
  39. <style type="text/css">
  40. .productlx{margin-left:20px;}
  41. .uk{float:left;width:100%;margin-top:20px;}
  42. .uk li{float:left;}
  43. .uk .l1{width:125px;height:43px;text-align:right;font-size:14px;padding:10px 5px 0 0;}
  44. .uk .l2{width:-moz-calc(100% - 130px);width:-webkit-calc(100% - 130px);width:calc(100% - 130px);height:53px;}
  45. .uk .l2 .inp{float:left;height:27px;border:#B6B7C9 solid 1px;border-radius:2px;font-size:14px;padding:9px 0 0 5px;background-color:#fff;}
  46. @media screen and (-webkit-min-device-pixel-ratio:0) {
  47. .uk .l2 .inp{padding:0 0 0 5px;height:36px;}
  48. }
  49. </style>
  50. <script language="javascript">
  51. function uidsel(){
  52. document.f1.t1.value=document.f1.d1.value;
  53. }
  54. </script>
  55. </head>
  56. <body>
  57. <? include("top.php");?>
  58. <script language="javascript">
  59. document.getElementById("menu3").className="a1";
  60. </script>
  61. <div class="yjcode">
  62. <? $leftid=1;include("menu_product.php");?>
  63. <div class="right">
  64. <div class="bqu1">
  65. <a href="javascript:void(0);" class="a1">商品编辑</a>
  66. <a href="productlist.php">返回列表</a>
  67. </div>
  68. <!--begin-->
  69. <? if($_GET[action]==""){?>
  70. <form name="f1" method="post" onsubmit="return tjadd('productlx.php',1)">
  71. <input type="hidden" name="type1id" value="0" />
  72. <input type="hidden" name="type2id" value="0" />
  73. <input type="hidden" name="type3id" value="0" />
  74. <input type="hidden" name="type4id" value="0" />
  75. <input type="hidden" name="type5id" value="0" />
  76. <div class="productlx">
  77. <div class="ptype">
  78. <a href="javascript:void(0);" class="a1">选择分类 <img border="0" src="../img/jiandown.gif" width="7" height="4" /></a>
  79. <? while1("*","yjcode_type where admin=1 order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  80. <a href="javascript:typeonc(<?=$row1[id]?>,'<?=$row1[type1]?>')" class="a2"><?=$row1[type1]?></a>
  81. <? }?>
  82. </div>
  83. <div class="ptype">
  84. <iframe name="ptype2" id="ptype2" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0"></iframe>
  85. </div>
  86. <div class="ptype">
  87. <iframe name="ptype3" id="ptype3" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0"></iframe>
  88. </div>
  89. <div class="ptype">
  90. <iframe name="ptype4" id="ptype4" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0"></iframe>
  91. </div>
  92. <div class="ptype">
  93. <iframe name="ptype5" id="ptype5" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0"></iframe>
  94. </div>
  95. <div class="sel">
  96. <strong>您当前选择的是:</strong>
  97. <span id="type1name"></span>
  98. <span id="type2name"></span>
  99. <span id="type3name"></span>
  100. <span id="type4name"></span>
  101. <span id="type5name"></span>
  102. </div>
  103. <ul class="uk">
  104. <li class="l1">输入会员帐号:</li>
  105. <li class="l2">
  106. <input type="text" class="inp" name="t1" />
  107. <select name="d1" class="inp" style="margin-left:20px;" onchange="uidsel()">
  108. <option value="">最近使用</option>
  109. <? while1("uid,nc,zt,shopzt","yjcode_user where zt=1 and shopzt=2 order by sj desc limit 5");while($row1=mysql_fetch_array($res1)){?>
  110. <option value="<?=$row1[uid]?>"><?=$row1[uid]." ".$row1[nc]?></option>
  111. <? }?>
  112. </select>
  113. </li>
  114. </ul>
  115. <div class="fb"><input type="submit" value="我已阅读以下规则,现在发布商品" /></div>
  116. <div class="gz"><input id="C1" checked="checked" type="checkbox" value="1" /> 我已阅读《<a href="../help/aboutview8.html" class="feng" target="_blank">商品发布须知条款</a>》并同意</div>
  117. </div>
  118. </form>
  119. <?
  120. }elseif($_GET[action]=="update"){
  121. while0("*","yjcode_pro where id=".$_GET[id]."");if(!$row=mysql_fetch_array($res)){php_toheader("productlist.php");}
  122. ?>
  123. <form name="f1" method="post" onsubmit="return tjupdate('productlx.php',<?=$_GET[id]?>,'<?=$row[bh]?>')">
  124. <input type="hidden" name="type1id" value="<?=$row[ty1id]?>" />
  125. <input type="hidden" name="type2id" value="<?=$row[ty2id]?>" />
  126. <input type="hidden" name="type3id" value="<?=$row[ty3id]?>" />
  127. <input type="hidden" name="type4id" value="<?=$row[ty4id]?>" />
  128. <input type="hidden" name="type5id" value="<?=$row[ty5id]?>" />
  129. <div class="productlx">
  130. <div class="ptype">
  131. <a href="javascript:void(0);" class="a1">选择分类 <img border="0" src="../img/jiandown.gif" width="7" height="4" /></a>
  132. <? while1("*","yjcode_type where admin=1 order by xh asc");while($row1=mysql_fetch_array($res1)){?>
  133. <a href="javascript:typeonc(<?=$row1[id]?>,'<?=$row1[type1]?>')" class="a2"><?=$row1[type1]?></a>
  134. <? }?>
  135. </div>
  136. <div class="ptype">
  137. <iframe name="ptype2" id="ptype2" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0" src="../tem/protype2.php?type1id=<?=$row[ty1id]?>"></iframe>
  138. </div>
  139. <div class="ptype">
  140. <iframe name="ptype3" id="ptype3" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0" src="../tem/protype3.php?type1id=<?=$row[ty1id]?>&type2id=<?=$row[ty2id]?>"></iframe>
  141. </div>
  142. <div class="ptype">
  143. <iframe name="ptype4" id="ptype4" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0" src="../tem/protype4.php?type1id=<?=$row[ty1id]?>&type2id=<?=$row[ty2id]?>&type3id=<?=$row[ty3id]?>"></iframe>
  144. </div>
  145. <div class="ptype">
  146. <iframe name="ptype5" id="ptype5" marginwidth="1" scrolling="no" marginheight="1" height="100%" width="100%" border="0" frameborder="0" src="../tem/protype5.php?type1id=<?=$row[ty1id]?>&type2id=<?=$row[ty2id]?>&type3id=<?=$row[ty3id]?>&type4id=<?=$row[ty4id]?>"></iframe>
  147. </div>
  148. <div class="sel">
  149. 您当前选择的是:
  150. <span id="type1name"><?=returntype(1,$row[ty1id])?> >> </span>
  151. <span id="type2name"><?=returntype(2,$row[ty2id])?> >> </span>
  152. <span id="type3name"><?=returntype(3,$row[ty3id])?> >> </span>
  153. <span id="type4name"><?=returntype(4,$row[ty4id])?> >> </span>
  154. <span id="type5name"><?=returntype(5,$row[ty5id])?></span>
  155. </div>
  156. <div class="fb"><input type="submit" value="我已阅读以下规则,现在发布商品" /></div>
  157. <div class="gz"><input id="C1" checked="checked" type="checkbox" value="1" /> 我已阅读《<a href="../help/aboutview8.html" class="feng" target="_blank">商品发布须知条款</a>》并同意</div>
  158. </div>
  159. </form>
  160. <? }?>
  161. <!--end-->
  162. </div>
  163. </div>
  164. <?php include("bottom.php");?>
  165. </body>
  166. </html>