gd.php 6.0 KB

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