jubaotype.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. AdminSes_audit();
  5. $sj=date("Y-m-d H:i:s");
  6. $bh=sqlzhuru($_GET[bh]);
  7. while0("*","yjcode_jubaotype where bh='".$bh."'");if(!$row=mysql_fetch_array($res)){php_toheader("jubaotypelist.php");}
  8. //函数开始
  9. if($_GET[control]=="update"){
  10. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0301,")){Audit_alert("权限不够","default.php");}
  11. zwzr();
  12. updatetable("yjcode_jubaotype","tit='".sqlzhuru($_POST[ttit])."',sj='".$sj."',xh=".sqlzhuru($_POST[t2]).",admin=".sqlzhuru($_POST[d1]).",zt=0 where bh='".$bh."'");
  13. php_toheader("jubaotype.php?t=suc&bh=".$bh);
  14. }
  15. //函数结果
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19. <head>
  20. <meta http-equiv="x-ua-compatible" content="ie=7" />
  21. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  22. <title><?=webname?>管理后台</title>
  23. <link href="css/basic.css" rel="stylesheet" type="text/css" />
  24. <script type="text/javascript" src="js/jquery.min.js"></script>
  25. <script language="javascript" src="js/basic.js"></script>
  26. <script language="javascript" src="js/layer.js"></script>
  27. </head>
  28. <body>
  29. <? include("top.php");?>
  30. <script language="javascript">
  31. document.getElementById("menu1").className="a1";
  32. </script>
  33. <? if(!strstr($adminqx,",0,") && !strstr($adminqx,",0302,")){echo "<div class='noneqx'>无权限</div>";exit;}?>
  34. <div class="yjcode">
  35. <? $leftid=1;include("menu_quan.php");?>
  36. <div class="right">
  37. <? if($_GET[t]=="suc"){systs("恭喜您,操作成功![<a href='jubaotypelx.php'>继续添加</a>]","jubaotype.php?bh=".$bh);}?>
  38. <div class="bqu1">
  39. <a href="javascript:void(0);" class="a1">举报类型管理</a>
  40. <a href="jubaotypelist.php">返回列表</a>
  41. </div>
  42. <!--begin-->
  43. <div class="rkuang">
  44. <script language="javascript">
  45. function tj(){
  46. if((document.f1.ttit.value).replace(/\s/,"")==""){alert("请输入举报类型!");document.f1.ttit.focus();return false;}
  47. if((document.f1.t2.value).replace(/\s/,"")=="" || isNaN(document.f1.t2.value)){alert("请输入有效的排序号!");document.f1.t2.focus();return false;}
  48. layer.msg('正在提交', {icon: 16 ,time: 0,shade :0.25});
  49. f1.action="jubaotype.php?control=update&bh=<?=$bh?>";
  50. }
  51. </script>
  52. <form name="f1" method="post" onsubmit="return tj()">
  53. <ul class="uk">
  54. <li class="l1"><span class="red">*</span> 举报类型:</li>
  55. <li class="l2"><input type="text" value="<?=$row[tit]?>" size="80" class="inp" name="ttit" /></li>
  56. <li class="l1"><span class="red">*</span> 针对对象:</li>
  57. <li class="l2">
  58. <select name="d1" class="inp">
  59. <? $arr=array("商品");for($i=0;$i<count($arr);$i++){?>
  60. <option value="<?=$i+1?>"<? if(($i+1)==$row[admin]){?> selected="selected"<? }?>><?=$arr[$i]?></option>
  61. <? }?>
  62. </select>
  63. </li>
  64. <li class="l1"><span class="red">*</span> 排序:</li>
  65. <li class="l2"><input type="text" class="inp" name="t2" value="<?=$row[xh]?>" /> <span class="fd">序号越小,越靠前</span></li>
  66. <li class="l3"><input type="submit" value="保存修改" class="btn1" /></li>
  67. </ul>
  68. </form>
  69. </div>
  70. <!--end-->
  71. </div>
  72. </div>
  73. <?php include("bottom.php");?>
  74. </body>
  75. </html>