gdhf.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?php
  2. include("../config/conn.php");
  3. include("../config/function.php");
  4. AdminSes_audit();
  5. $bh=$_GET[bh];
  6. while0("*","yjcode_gd where bh='".$bh."'");if(!$row=mysql_fetch_array($res)){php_toheader("gdlist.php");}
  7. $id=$row[id];
  8. $gdzt=$row[gdzt];
  9. //函数开始
  10. if($_GET[control]=="add"){
  11. zwzr();
  12. $txt=sqlzhuru1($_POST[content]);
  13. $sj=date("Y-m-d H:i:s");
  14. if(!empty($txt)){
  15. intotable("yjcode_gdhf","userid,gdbh,admin,txt,sj,zt","".$row[userid].",'".$bh."',1,'".$txt."','".$sj."',0");
  16. }
  17. updatetable("yjcode_gd","gdzt=".$_POST[Rgdzt]." where id=".$id);
  18. if(sqlzhuru($_POST[Rtz1])=="yes" && !empty($row[mail])){
  19. require("../config/mailphp/sendmail.php");
  20. $lj=weburl."user/gdlist.php";
  21. $tit="您好,您的工单".strip_tags(returngdzt($_POST[Rgdzt]));
  22. $txt="尊敬的用户:".returnuser($row[userid])." 您好:<br>";
  23. $txt=$txt."感谢您对".webname."(".weburl.")的支持!<br>";
  24. $txt=$txt."您于".$row[sj]."提交工单状态已经变更为:".returngdzt($_POST[Rgdzt])."。您可以访问以下链接登录网站查看工单详情<br><a href='".$lj."' target='_blank'>".$lj."</a><hr>";
  25. $txt=$txt."本邮件由系统自动发出,请勿直接回复!";
  26. @yjsendmail($tit,$row[mail],$txt);
  27. }
  28. if(sqlzhuru($_POST[Rtz2])=="yes" && $rowcontrol[ifmob]=="on" && !empty($row[mot])){
  29. while1("*","yjcode_smsmb where mybh='007'");
  30. if($row1=mysql_fetch_array($res1)){$txt=$row1[txt];}else{$txt="您的工单状态已经变更为:${zttz}";}
  31. $yz=strip_tags(returngdzt($_POST[Rgdzt]));
  32. $yz=iconv('gbk','utf-8',$yz);
  33. if(empty($rowcontrol[smsmode])){
  34. include("../config/mobphp/mysendsms.php");
  35. $str=str_replace("\${zttz}",$yz,$txt);
  36. yjsendsms($row[mot],$str);
  37. }else{
  38. if(1==$rowcontrol[smsmode]){$sms_txt="{zttz:'".$yz."'}";}else{$sms_txt="{\"zttz\":\"".$yz."\"}";}
  39. $sms_mot=$row[mot];
  40. $sms_id=$row1[mbid];
  41. @include("../config/mobphp/mysendsms.php");
  42. }
  43. updatetable("yjcode_control","smskc=smskc-1");
  44. }
  45. php_toheader("gdhf.php?t=suc&bh=".$bh);
  46. }elseif($_GET[control]=="del"){
  47. deletetable("yjcode_gdhf where gdbh='".$bh."' and id=".$_GET[id]);
  48. php_toheader("gdhf.php?t=suc&bh=".$bh);
  49. }
  50. //函数结果
  51. ?>
  52. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  53. <html xmlns="http://www.w3.org/1999/xhtml">
  54. <head>
  55. <meta http-equiv="x-ua-compatible" content="ie=7" />
  56. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  57. <title><?=webname?>管理系统</title>
  58. <link href="css/basic.css" rel="stylesheet" type="text/css" />
  59. <link href="css/ad.css" rel="stylesheet" type="text/css" />
  60. <script type="text/javascript" src="js/jquery.min.js"></script>
  61. <script language="javascript" src="js/basic.js"></script>
  62. <script language="javascript" src="js/layer.js"></script>
  63. <script type="text/javascript" src="../config/ueditor/ueditor.config.js"></script>
  64. <script type="text/javascript" src="../config/ueditor/ueditor.all.min.js"> </script>
  65. <script type="text/javascript" src="../config/ueditor/lang/zh-cn/zh-cn.js"></script>
  66. <script type="text/javascript">
  67. function tj(){
  68. layer.msg('正在提交', {icon: 16 ,time: 0,shade :0.25});
  69. f1.action="gdhf.php?bh=<?=$bh?>&control=add";
  70. }
  71. function del(x){
  72. if(!confirm("确定要删除吗?")){return false;}else{location.href="gdhf.php?control=del&bh=<?=$bh?>&id="+x;}
  73. }
  74. </script>
  75. </head>
  76. <body>
  77. <? include("top.php");?>
  78. <script language="javascript">
  79. document.getElementById("menu5").className="a1";
  80. </script>
  81. <? if(!strstr($adminqx,",0,") && !strstr($adminqx,",0602,")){echo "<div class='noneqx'>无权限</div>";exit;}?>
  82. <div class="yjcode">
  83. <? $leftid=4;include("menu_ad.php");?>
  84. <div class="right">
  85. <? if($_GET[t]=="suc"){systs("恭喜您,操作成功!","gdhf.php?bh=".$bh);}?>
  86. <div class="bqu1">
  87. <a href="javascript:void(0);" class="a1">回复记录</a>
  88. </div>
  89. <!--B-->
  90. <div class="rkuang">
  91. <div class="gdhflist">
  92. <ul class="u1">
  93. <li class="l1"><img src="../upload/<?=$row[userid]?>/user.jpg" width="40" height="40" /></li>
  94. <li class="l2"><?=$row[txt]?><br><?=$row[sj]?></li>
  95. </ul>
  96. <?
  97. while0("*","yjcode_gdhf where gdbh='".$bh."' and zt=0 order by sj asc");while($row=mysql_fetch_array($res)){
  98. $txt=$row[txt];
  99. $tp="../upload/".$row[userid]."/user.jpg";
  100. if($row[admin]==1){$txt="<strong>".$txt."</strong>";$tp="img/nonetx.jpg";}
  101. ?>
  102. <ul class="u1">
  103. <li class="l1"><img src="<?=$tp?>" width="40" height="40" style="margin:0 0 6px 0;" /><br>[<a href="javascript:void(0);" onclick="del(<?=$row[id]?>)" class="red">删除</a>]</li>
  104. <li class="l2"><?=$txt?><br><?=$row[sj]?></li>
  105. </ul>
  106. <? }?>
  107. <form name="f1" method="post" onsubmit="return tj()">
  108. <ul class="uk">
  109. <li class="l1">邮件通知:</li>
  110. <li class="l2">
  111. <label><input name="Rtz1" type="radio" value="yes" /> <span class="blue">发送邮件</span></label>
  112. <label><input name="Rtz1" checked="checked" type="radio" value="no" /> 不发送邮件</label>
  113. </li>
  114. <li class="l1">短信通知:</li>
  115. <li class="l2">
  116. <label><input name="Rtz2" type="radio" value="yes" /> <span class="blue">发送短信</span></label>
  117. <label><input name="Rtz2" checked="checked" type="radio" value="no" /> 不发送短信</label>
  118. </li>
  119. <li class="l1">工单状态:</li>
  120. <li class="l2">
  121. <? for($i=1;$i<=4;$i++){?>
  122. <label><input name="Rgdzt" type="radio" value="<?=$i?>" <? if($i==$gdzt){?>checked="checked"<? }?> /> <strong><?=returngdzt($i)?></strong></label>
  123. <? }?>
  124. </li>
  125. <li class="l10"><span class="red">*</span> 详细描述:</li>
  126. <li class="l11"><script id="editor" name="content" type="text/plain" style="width:853px;height:330px;"><?=$rowtask[txt]?></script></li>
  127. <li class="l3"><input type="submit" value="保存修改" class="btn1" /></li>
  128. </ul>
  129. </form>
  130. </div>
  131. </div>
  132. <!--E-->
  133. </div>
  134. </div>
  135. <?php include("bottom.php");?>
  136. <script type="text/javascript">
  137. //实例化编辑器
  138. var ue = UE.getEditor('editor');
  139. </script>
  140. </body>
  141. </html>