shopmenu1.php 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. sesCheck();
  5. $bh=$_GET[bh];
  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)){Audit_alert("来源错误","openshop3.php","parent.");}
  8. $userid=$rowuser[id];
  9. while0("*","yjcode_shopmenu where userid=".$userid." and bh='".$bh."'");if(!$row=mysql_fetch_array($res)){Audit_alert("来源错误","shopmenulist.php","parent.");}
  10. if($_GET[control]=="update"){
  11. zwzr();
  12. if(panduan("*","yjcode_shopmenu where admin=1 and tit1='".sqlzhuru($_POST[ttit1])."' and userid=".$userid." and id<>".$row[id])==1)
  13. {Audit_alert("该导航已存在!","shopmenu1.php?bh=".$bh);}
  14. if(!empty($row[tit1])){$s="tit1='".$row[tit1]."'";}else{$s="id=".$row[id];}
  15. updatetable("yjcode_shopmenu","tit1='".sqlzhuru($_POST[ttit1])."',aurl='".sqlzhuru($_POST[taurl])."',xh=".sqlzhuru($_POST[txh]).",targ=".sqlzhuru($_POST[R1]).",zt=0 where userid=".$userid." and ".$s);
  16. php_toheader("shopmenu1.php?t=suc&bh=".$bh);
  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>商铺导航</title>
  25. <style type="text/css">
  26. body{margin:0;font-size:12px;text-align:center;color:#333;word-wrap:break-word;font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu;}
  27. *{margin:0 auto;padding:0;}
  28. ul{list-style-type:none;margin:0;padding:0;}
  29. .uk{float:left;width:600px;font-size:14px;padding:10px;}
  30. .uk li{float:left;}
  31. .uk .l1{width:80px;padding:7px 10px 0 0;height:36px;text-align:right;}
  32. .uk .l2{width:510px;height:43px;}
  33. .uk .l2 .inp{float:left;border:#CCCCCC solid 1px;height:27px;padding:4px 0 0 5px;outline:medium;}
  34. .uk .l2 label{float:left;cursor:pointer;margin:-2px 10px 0 0;padding:8px 10px 0 10px;height:22px;background-color:#FCFCFD;border:#ECECEC solid 1px;border-radius:5px;}
  35. .uk .l3{width:211px;padding-left:89px;}
  36. .uk .l3 input{cursor:pointer;float:left;width:211px;border:0;font-weight:700;color:#fff;background-color:#ff6600;height:35px;}
  37. </style>
  38. <script language="javascript" src="../js/jquery.min.js"></script>
  39. <script language="javascript" src="../js/layer.js"></script>
  40. <script language="javascript">
  41. function tj(){
  42. layer.msg('正在保存', {icon: 16 ,time: 0,shade :0.25});
  43. f1.action="shopmenu1.php?control=update&bh=<?=$bh?>";
  44. }
  45. <? if($_GET["t"]=="suc"){?>
  46. parent.location.reload();
  47. <? }?>
  48. </script>
  49. </head>
  50. <body>
  51. <form name="f1" method="post" onsubmit="return tj()">
  52. <input type="hidden" value="menu" name="yjcode" />
  53. <ul class="uk">
  54. <li class="l1">导航名称:</li>
  55. <li class="l2"><input type="text" class="inp" name="ttit1" value="<?=$row[tit1]?>" /></li>
  56. <li class="l1">导航链接:</li>
  57. <li class="l2"><input type="text" class="inp" style="width:500px;" name="taurl" value="<?=$row[aurl]?>" /></li>
  58. <li class="l1">打开方式:</li>
  59. <li class="l2">
  60. <label><input name="R1" type="radio" value="1"<? if($row[targ]==1){?> checked="checked"<? }?> /> 当前页面</label>
  61. <label><input name="R1" type="radio" value="2"<? if($row[targ]==2){?> checked="checked"<? }?> /> 新窗口</label>
  62. </li>
  63. <li class="l1">分组序号:</li>
  64. <li class="l2"><input type="text" class="inp" name="txh" value="<?=$row[xh]?>" /></li>
  65. <li class="l3"><? tjbtnr("保存修改")?></li>
  66. </ul>
  67. </form>
  68. </body>
  69. </html>