国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

198 lines
7.6KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
  5. <title>问答分类</title>
  6. <link href="css/base.css" rel="stylesheet" type="text/css" />
  7. <style type="text/css">
  8. <!--
  9. .STYLE1 {
  10. color: #FF0000;
  11. font-weight: bold;
  12. }
  13. -->
  14. </style>
  15. </head>
  16. <body background='img/allbg.gif' leftmargin='8' topmargin='8'>
  17. <div class="bodytitle">
  18. <div class="bodytitleleft"></div>
  19. <div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 问答栏目管理</div>
  20. </div>
  21. <?php
  22. if(empty($action))
  23. {
  24. ?>
  25. <form name="form2" action="ask_type.php" method="post">
  26. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;margin-bottom:6px;">
  27. <tr>
  28. <td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong>&nbsp;添加分类</strong>
  29. <input type="hidden" name="action" value="add" /></td>
  30. </tr>
  31. <tr>
  32. <td width="150" height="20" align="right" bgcolor="#FFFFFF">分类名称:</td>
  33. <td height="20" bgcolor="#FFFFFF"><input type="text" name="name" value="" />(分类名称长度最好不要超过10个字符,也就是5个汉字)</td>
  34. </tr>
  35. <tr>
  36. <td height="20" align="right" bgcolor="#FFFFFF">
  37. 隶属大类:
  38. </td>
  39. <td height="20" bgcolor="#FFFFFF">
  40. <select name="reid" style="width:150px;">
  41. <option value="0">无(作为一级分类)</option>
  42. <?php echo $sectorscache; ?>
  43. </select>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td height="35" bgcolor="#FFFFFF">&nbsp;</td>
  48. <td height="20" bgcolor="#FFFFFF"><input type="submit" name="submit2" value="提交" class="np coolbg"/></td>
  49. </tr>
  50. </table>
  51. </form>
  52. <form name="merge" action="ask_type.php" method="post">
  53. <input type="hidden" name="action" value="merge" />
  54. <table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="tbtitle" style="background:#CFCFCF;margin-bottom:6px;">
  55. <tr>
  56. <td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong>&nbsp;问答分类合并</strong></td>
  57. </tr>
  58. <tr>
  59. <td width="150" height="20" align="right" bgcolor="#FFFFFF">源分类:</td>
  60. <td bgcolor="#FFFFFF"><select name="sourcetype" >
  61. <?php
  62. foreach($sectors as $sector)
  63. {
  64. if($sector['reid'] == 0)
  65. {
  66. echo "<option value='$sector[id]'>$sector[name]</option>";
  67. }else
  68. {
  69. echo "<option value='$sector[id]'>|-- $sector[name]</option>";
  70. }
  71. }
  72. ?>
  73. </select>
  74. (源分类不能有下级分类,否则不能合并;合并后源分类将被删除且不可恢复,请谨慎操作) </td>
  75. </tr>
  76. <tr>
  77. <td height="20" align="right" bgcolor="#FFFFFF">目标分类:</td>
  78. <td bgcolor="#FFFFFF"><select name="targettype" >
  79. <?php
  80. foreach($sectors as $sector)
  81. {
  82. if($sector['reid'] == 0)
  83. {
  84. echo "<option value='$sector[id]'>$sector[name]</option>";
  85. }else
  86. {
  87. echo "<option value='$sector[id]'>|-- $sector[name]</option>";
  88. }
  89. }
  90. ?>
  91. </select></td>
  92. </tr>
  93. <tr>
  94. <td height="20" bgcolor="#FFFFFF">&nbsp;</td>
  95. <td bgcolor="#FFFFFF"><input type="submit" name="submit2" value="提交" class="np coolbg"/></td>
  96. </tr>
  97. </table>
  98. </form>
  99. <form name="form3" action="ask_type.php" method="post">
  100. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;">
  101. <tr>
  102. <td colspan="4" bgcolor="#EDF9D5" background="images/tbg.gif"><strong>&nbsp;编辑分类</strong>
  103. <input type="hidden" name="action" value="update" /></td>
  104. </tr>
  105. <tr height="25" bgcolor="#FBFCE2">
  106. <td align="center">id</td>
  107. <td>分类名称</td>
  108. <td>排序</td>
  109. <td align="center">管理操作</td>
  110. </tr>
  111. <?php
  112. foreach($sectors as $sector)
  113. {
  114. if($sector['reid'] == 0)
  115. {
  116. echo "<tr bgcolor='#ffffff'><td align='center'>$sector[id]</td><td><input type=\"text\" name=\"names[$sector[id]]\" value=\"$sector[name]\" /></td><td><input type=\"text\" name=\"disorders[$sector[id]]\" value=\"$sector[disorder]\" /></td><td align='center'><a href=\"ask_type.php?action=edit&amp;id=$sector[id]\">修改</a> <a href=\"ask_type.php?action=delete&amp;id=$sector[id]\">删除</a></td></tr>";
  117. }else
  118. {
  119. echo "<tr bgcolor='#ffffff'><td align='center'>$sector[id]</td><td>|- <input type=\"text\" name=\"names[$sector[id]]\" value=\"$sector[name]\" /></td><td><input type=\"text\" name=\"disorders[$sector[id]]\" value=\"$sector[disorder]\" /></td><td align='center'><a href=\"ask_type.php?action=edit&amp;id=$sector[id]\">修改</a> <a href=\"ask_type.php?action=delete&amp;id=$sector[id]\">删除</a></td></tr>";
  120. }
  121. }
  122. ?>
  123. <tr>
  124. <td height="35" align="center" bgcolor="#F9FCEF" colspan="4"><input name="submit3" type="submit" value="提交" class="np coolbg"/></td>
  125. </tr>
  126. </table>
  127. </form>
  128. <?php
  129. }elseif($action == 'edit')
  130. {
  131. ?>
  132. <form name="form4" action="ask_type.php" method="post">
  133. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;">
  134. <tr>
  135. <td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong>&nbsp;修改</strong>
  136. <input type=hidden name=action value=edit />
  137. <input type=hidden name=step value=2 />
  138. <input type=hidden name=id value=<?php echo $id; ?> /></td>
  139. </tr>
  140. <tr>
  141. <td width="150" align="right" bgcolor="#FFFFFF">所属分类:</td>
  142. <td bgcolor="#FFFFFF"><select name="reid">
  143. <?php echo $sectorscache; ?>
  144. </select> </td>
  145. </tr>
  146. <tr>
  147. <td align="right" bgcolor="#FFFFFF">分类名称:</td>
  148. <td bgcolor="#FFFFFF"><input type=text name=name value=<?php echo $sector['name']; ?> /></td>
  149. </tr>
  150. <tr>
  151. <td align="right" bgcolor="#FFFFFF">顺序:</td>
  152. <td bgcolor="#FFFFFF"><input type=text name=disorder value=<?php echo $sector['disorder']; ?> /></td>
  153. </tr>
  154. <tr>
  155. <td height="35" bgcolor="#FFFFFF">&nbsp;</td>
  156. <td bgcolor="#FFFFFF"><input name="submit4" type="submit" value="提交" class="np coolbg"/></td>
  157. </tr>
  158. </table>
  159. <br>
  160. <br>
  161. </form>
  162. <?php
  163. }elseif($action == 'delete')
  164. {
  165. ?>
  166. <form action=ask_type.php method=post name=form5>
  167. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;">
  168. <tr>
  169. <td height="20" bgcolor="#EDF9D5" background="img/wbg.gif">
  170. <strong>&nbsp;删除分类确认</strong>
  171. <input type=hidden name=action value=delete />
  172. <input type=hidden name=step value=2 />
  173. <input type=hidden name=id value=<?php echo $id; ?> />
  174. </td>
  175. </tr>
  176. <tr>
  177. <td height="60" align="center" bgcolor="#FFFFFF">
  178. <span class="STYLE1">删除分类时将删除该行业的所有下级分类,且不能恢复操作,请确认删除!</span>
  179. </td>
  180. </tr>
  181. <tr>
  182. <td height="35" align="center" bgcolor="#FFFFFF">
  183. <input name="submit5" type="submit" value="确认删除" class="np coolbg" />
  184. <input type='button' value='返 回 继 续 操 作' onclick='javascript:history.go(-1);' class="np coolbg" />
  185. </td>
  186. </tr>
  187. </table>
  188. </form>
  189. <?php
  190. }
  191. ?>
  192. </body>
  193. </html>