tpxh.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $bh=$_GET[bh];
  6. $userid=returnuserid($_SESSION["SHOPUSER"]);
  7. if($_GET[control]=="xh"){
  8. zwzr();
  9. $xhall=intval($_POST["xhall"]);
  10. for($i=1;$i<$xhall;$i++){
  11. $xh=intval($_POST["xht".$i]);
  12. $xhid=intval($_POST["xhid".$i]);
  13. updatetable("yjcode_tp","xh=".$xh." where userid=".$userid." and id=".$xhid);
  14. }
  15. php_toheader("tpxh.php?t=suc&bh=".$bh);
  16. }
  17. ?>
  18. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  19. <html xmlns="http://www.w3.org/1999/xhtml">
  20. <head>
  21. <meta http-equiv="x-ua-compatible" content="ie=7" />
  22. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  23. <title><?=webname?>管理系统</title>
  24. <? include("cssjs.html");?>
  25. <style type="text/css">
  26. .tplist{float:left;width:610px;}
  27. .tplist .d1{float:left;width:90px;margin:10px 0 0 10px;}
  28. .tplist .d1 img{width:90px;height:90px;}
  29. .tplist .d1 a{float:left;width:100%;}
  30. .tplist .d1 input{float:left;width:88px;text-align:center;margin:5px 0 0 0;}
  31. .tplist .xhbtn{float:left;width:100%;}
  32. .tplist .xhbtn input{float:left;width:200px;height:30px;margin:10px 0 10px 205px;cursor:pointer;border:0;color:#fff;background-color:#ff6600;}
  33. </style>
  34. <script language="javascript">
  35. function tj(){
  36. layer.msg('正在保存', {icon: 16 ,time: 0,shade :0.25});
  37. f1.action="tpxh.php?control=xh&bh=<?=$bh?>";
  38. }
  39. <? if($_GET[t]=="suc"){?>
  40. parent.xgtread("<?=$bh?>");
  41. parent.layer.closeAll();
  42. <? }?>
  43. </script>
  44. </head>
  45. <body>
  46. <div class="tplist">
  47. <form name="f1" method="post" onsubmit="return tj()">
  48. <?
  49. $i=1;
  50. while1("*","yjcode_tp where bh='".$bh."' and userid=".$userid." order by xh asc");while($row1=mysql_fetch_array($res1)){
  51. if(empty($row1[upty])){
  52. $tp1="../".$row1[tp];
  53. $tp2="../".str_replace(".","-1.",$row1[tp]);
  54. }else{
  55. $tp1=$row1[tp];
  56. $tp2=returnnotp($row1[tp],"-1");
  57. }
  58. ?>
  59. <div class="d1">
  60. <a href="<?=$tp1?>" class="a1" target="_blank"><img class="img" border="0" src="<?=$tp2?>" /></a>
  61. <input type="text" value="<?=$row1[xh]?>" name="xht<?=$i?>" />
  62. <input type="hidden" value="<?=$row1[id]?>" name="xhid<?=$i?>" />
  63. </div>
  64. <? $i++;}?>
  65. <input type="hidden" value="<?=$i?>" name="xhall" />
  66. <div class="xhbtn">
  67. <input type="submit" value="保存序号" />
  68. </div>
  69. </form>
  70. </div>
  71. </body>
  72. </html>