AddFeedbackClass.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"feedbackf");
  20. $enews=ehtmlspecialchars($_GET['enews']);
  21. $btype=" checked";
  22. $usernames='';
  23. $r['mustenter']=",title,";
  24. $record="<!--record-->";
  25. $field="<!--field--->";
  26. $url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反馈</a>&nbsp;>&nbsp;<a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反馈分类</a>&nbsp;>&nbsp;增加反馈分类";
  27. if($enews=="AddFeedbackClass"&&$_GET['docopy'])
  28. {
  29. $bid=(int)$_GET['bid'];
  30. $btype="";
  31. $r=$empire->fetch1("select * from {$dbtbpre}enewsfeedbackclass where bid='$bid'");
  32. $url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反馈</a>&nbsp;>&nbsp;<a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反馈分类</a>&nbsp;>&nbsp;复制反馈分类: ".$r['bname'];
  33. $usernames=substr($r['usernames'],1,-1);
  34. }
  35. //修改
  36. if($enews=="EditFeedbackClass")
  37. {
  38. $bid=(int)$_GET['bid'];
  39. $btype="";
  40. $url="<a href=feedback.php".$ecms_hashur['whhref'].">管理信息反馈</a>&nbsp;->&nbsp;<a href=FeedbackClass.php".$ecms_hashur['whhref'].">管理反馈分类</a>&nbsp;->&nbsp;修改反馈分类";
  41. $r=$empire->fetch1("select * from {$dbtbpre}enewsfeedbackclass where bid='$bid'");
  42. $usernames=substr($r['usernames'],1,-1);
  43. }
  44. //取得字段
  45. $fsql=$empire->query("select f,fname from {$dbtbpre}enewsfeedbackf order by myorder,fid");
  46. while($fr=$empire->fetch($fsql))
  47. {
  48. $like=$field.$fr[f].$record;
  49. $slike=",".$fr[f].",";
  50. //录入项
  51. $enterchecked="";
  52. if(strstr($r[enter],$like))
  53. {
  54. $enterchecked=" checked";
  55. //取得字段标识
  56. $dor=explode($like,$r[enter]);
  57. if(strstr($dor[0],$record))
  58. {
  59. $dor1=explode($record,$dor[0]);
  60. $last=count($dor1)-1;
  61. $fr[fname]=$dor1[$last];
  62. }
  63. else
  64. {
  65. $fr[fname]=$dor[0];
  66. }
  67. }
  68. //标题
  69. if($enews=="AddFeedbackClass"&&$fr[f]=="title")
  70. {
  71. $enterchecked=" checked";
  72. }
  73. $entercheckbox="<input name=center[] type=checkbox value='".$fr[f]."'".$enterchecked.">";
  74. //必填项
  75. $mustfchecked="";
  76. if(strstr($r[mustenter],$slike))
  77. {$mustfchecked=" checked";}
  78. if($enews=="AddFeedbackClass"&&$fr[f]=="title")
  79. {
  80. $mustfchecked=" checked";
  81. }
  82. $mustfcheckbox="<input name=menter[] type=checkbox value='".$fr[f]."'".$mustfchecked.">";
  83. $data.="<tr>
  84. <td height=25> <div align=center>
  85. <input name=cname[".$fr[f]."] type=text value='".$fr[fname]."'>
  86. </div></td>
  87. <td> <div align=center>
  88. <input name=cfield type=text value='".$fr[f]."' readonly>
  89. </div></td>
  90. <td><div align=center>
  91. ".$entercheckbox."
  92. </div></td>
  93. <td><div align=center>
  94. ".$mustfcheckbox."
  95. </div></td>
  96. </tr>";
  97. }
  98. //----------会员组
  99. $sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
  100. while($l_r=$empire->fetch($sql1))
  101. {
  102. if($r[groupid]==$l_r[groupid])
  103. {$select=" selected";}
  104. else
  105. {$select="";}
  106. $membergroup.="<option value=".$l_r[groupid].$select.">".$l_r[groupname]."</option>";
  107. }
  108. db_close();
  109. $empire=null;
  110. ?>
  111. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  112. <html>
  113. <head>
  114. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  115. <title>增加反馈分类</title>
  116. <link href="../adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  117. </head>
  118. <body>
  119. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  120. <tr>
  121. <td>位置:<?=$url?></td>
  122. </tr>
  123. </table>
  124. <form name="form1" method="post" action="FeedbackClass.php">
  125. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  126. <?=$ecms_hashur['form']?>
  127. <tr>
  128. <td height="25" colspan="2" class="header">增加反馈分类
  129. <input name="bid" type="hidden" id="bid" value="<?=$bid?>"> <input name="enews" type="hidden" id="enews" value="<?=$enews?>">
  130. </td>
  131. </tr>
  132. <tr bgcolor="#FFFFFF">
  133. <td width="23%" height="25">分类名称</td>
  134. <td width="77%" height="25"><input name="bname" type="text" id="bname" value="<?=$r[bname]?>" size="43">
  135. <font color="#666666">(比如:&quot;建议与反馈&quot;)</font></td>
  136. </tr>
  137. <tr bgcolor="#FFFFFF">
  138. <td height="25">管理反馈的用户</td>
  139. <td height="25"><input name="usernames" type="text" id="usernames" value="<?=$usernames?>" size="42">
  140. <font color="#666666">
  141. <input type="button" name="Submit32" value="选择" onclick="window.open('../ChangeUser.php?field=usernames&form=form1<?=$ecms_hashur['ehref']?>','','width=300,height=520,scrollbars=yes');">
  142. (空为不限,多个用户用“,”逗号隔开)</font></td>
  143. </tr>
  144. <tr bgcolor="#FFFFFF">
  145. <td height="25">提交会员组权限</td>
  146. <td height="25"><select name="groupid" id="groupid">
  147. <option value="0">游客</option>
  148. <?=$membergroup?>
  149. </select></td>
  150. </tr>
  151. <tr bgcolor="#FFFFFF">
  152. <td height="25" valign="top">选择本表单的字段项<br>
  153. (<font color="#FF0000">
  154. <input name="btype" type="checkbox" value="1"<?=$btype?>>
  155. 自动生成表单</font>)<br> <br> <input type="button" name="Submit3" value="字段管理" onclick="window.open('ListFeedbackF.php<?=$ecms_hashur['whehref']?>');">
  156. </td>
  157. <td height="25" valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3">
  158. <tr bgcolor="#DBEAF5">
  159. <td width="35%" height="25"> <div align="center">字段标识</div></td>
  160. <td width="35%" height="25"> <div align="center">字段名</div></td>
  161. <td width="15%"> <div align="center">提交项</div></td>
  162. <td width="15%"> <div align="center">必填项</div></td>
  163. </tr>
  164. <?=$data?>
  165. </table></td>
  166. </tr>
  167. <tr bgcolor="#FFFFFF">
  168. <td height="25" valign="top"><p>录入表单模板<br>
  169. (如<font color="#FF0000">自动生成表单模板</font><br>
  170. ,不用填模板内容)<br>
  171. <br>
  172. 控制面板头部标签:<br>
  173. [!--cp.header--]<br>
  174. <br>
  175. 控制面板尾部标签:<br>
  176. [!--cp.footer--]<br>
  177. <br>
  178. 会员中心头部标签:<br>
  179. [!--member.header--]<br>
  180. <br>
  181. 会员中心尾部标签:<br>
  182. [!--member.footer--]<br>
  183. <br>
  184. (支持公共模板变量)</p></td>
  185. <td height="25"><textarea name="btemp" cols="75" rows="20" style="WIDTH: 100%" id="btemp"><?=ehtmlspecialchars(stripSlashes($r[btemp]))?></textarea></td>
  186. </tr>
  187. <tr bgcolor="#FFFFFF">
  188. <td height="25" valign="top">注释:</td>
  189. <td height="25"><textarea name="bzs" cols="75" rows="10" style="WIDTH: 100%" id="textarea"><?=stripSlashes($r[bzs])?></textarea></td>
  190. </tr>
  191. <tr bgcolor="#FFFFFF">
  192. <td height="25">&nbsp;</td>
  193. <td height="25"><input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重置"></td>
  194. </tr>
  195. </table>
  196. </form>
  197. </body>
  198. </html>