国内流行的内容管理系统(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.

145 lines
4.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. <script>
  8. function selAll()
  9. {
  10. for(i=0;i<document.form2.askid.length;i++)
  11. {
  12. if(!document.form2.askid[i].checked)
  13. {
  14. document.form2.askid[i].checked=true;
  15. }
  16. }
  17. }
  18. function noSelAll()
  19. {
  20. for(i=0;i<document.form2.askid.length;i++)
  21. {
  22. if(document.form2.askid[i].checked)
  23. {
  24. document.form2.askid[i].checked=false;
  25. }
  26. }
  27. }
  28. //获得选中文件的文件名
  29. function getCheckboxItem()
  30. {
  31. var allSel="";
  32. if(document.form2.askid.value) return document.form2.askid.value;
  33. for(i=0;i<document.form2.askid.length;i++)
  34. {
  35. if(document.form2.askid[i].checked)
  36. {
  37. if(allSel=="")
  38. allSel=document.form2.askid[i].value;
  39. else
  40. allSel=allSel+"`"+document.form2.askid[i].value;
  41. }
  42. }
  43. return allSel;
  44. }
  45. //获得选中其中一个的id
  46. function getOneItem()
  47. {
  48. var allSel="";
  49. if(document.form2.askid.value) return document.form2.askid.value;
  50. for(i=0;i<document.form2.askid.length;i++)
  51. {
  52. if(document.form2.askid[i].checked)
  53. {
  54. allSel = document.form2.askid[i].value;
  55. break;
  56. }
  57. }
  58. return allSel;
  59. }
  60. function digestask(aid){
  61. var qstr=getCheckboxItem();
  62. if(aid==0) aid = getOneItem();
  63. location="ask_admin.php?aid="+aid+"&action=digest&qstr="+qstr;
  64. }
  65. function checkask(aid){
  66. var qstr=getCheckboxItem();
  67. if(aid==0) aid = getOneItem();
  68. location="ask_admin.php?aid="+aid+"&action=check&qstr="+qstr;
  69. }
  70. function deleteask(aid){
  71. var qstr=getCheckboxItem();
  72. if(aid==0) aid = getOneItem();
  73. location="ask_admin.php?qstr="+qstr+"&aid="+aid+"&action=delete";
  74. }
  75. </script>
  76. </head>
  77. <body>
  78. <div class="bodytitle">
  79. <div class="bodytitleleft"></div>
  80. <div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 用户提问管理</div>
  81. </div>
  82. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;">
  83. <tr>
  84. <td height="24" colspan="9" align="left" bgcolor="#EDF9D5" background="images/tbg.gif">
  85. &nbsp;§<b>问题列表 &nbsp; <a href="ask_admin.php">全部问题</a> | <a href="ask_admin.php?status=-1">未审核的问题</a></b>
  86. </td>
  87. </tr>
  88. <form name="form2" action="ask_admin.php">
  89. <tr align="center" height="25" bgcolor="#FBFCE2">
  90. <td width="6%">id</td>
  91. <td width="4%">选择</td>
  92. <td width="28%">问题</td>
  93. <td width="6%">推荐</td>
  94. <td width="10%">提问时间</td>
  95. <td width="10%">所属大分类</td>
  96. <td width="10%">所属小分类</td>
  97. <td width="8%">回答数</td>
  98. <td width="6%">问题状态</td>
  99. </tr>
  100. {dede:datalist}
  101. <?php
  102. if($fields['status'] == 0){
  103. $fields['status'] = '待解决';
  104. }else if($fields['status'] == 1){
  105. $fields['status'] = '已解决';
  106. }else if($fields['status'] == 2 ){
  107. $fields['status'] = '已关闭';
  108. }else if($fields['status'] == 3){
  109. $fields['status'] = '已过期';
  110. }else if($fields['status']<0){
  111. $fields['status'] = '未审核';
  112. }
  113. $fields['dateline'] = gmdate('Y-m-d' , $fields['dateline'] + 3600*8);
  114. ?>
  115. <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
  116. <td><?php echo $fields['id']; ?></td>
  117. <td><input name="askid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td>
  118. <td align='left'><a href="../ask/question.php?id=<?php echo $fields['id']; ?>" target="_blank"><?php echo $fields['title']; ?></a></td>
  119. <td><?php echo $fields['digest']; ?></td>
  120. <td><?php echo $fields['dateline']; ?></td>
  121. <td><a href="ask_admin.php?tid=<?php echo $fields['tid']; ?>"><?php echo $fields['tidname']; ?></a> </td>
  122. <td><a href="ask_admin.php?tid2=<?php echo $fields['tid2']; ?>"><?php echo $fields['tid2name']; ?></a></td>
  123. <td><?php echo $fields['replies']; ?></td>
  124. <td><?php echo $fields['status']; ?></td>
  125. </tr>
  126. {/dede:datalist}
  127. <tr bgcolor="#ffffff">
  128. <td height="24" colspan="10" align="left">
  129. &nbsp;
  130. <a href="javascript:selAll()" class="coolbg">全选</a>
  131. <a href="javascript:noSelAll()" class="coolbg">取消</a>
  132. <a href="javascript:digestask(0)" class="coolbg">推荐</a>
  133. <a href="javascript:checkask(0)" class="coolbg">审核</a>
  134. <a href="javascript:deleteask(0)" class="coolbg">删除</a></td>
  135. </tr>
  136. </form>
  137. <tr align="right">
  138. <td height="20" colspan="9" align="center" bgcolor="#F9FCEF">
  139. {dede:pagelist /}
  140. </td>
  141. </tr>
  142. </table>
  143. </body>
  144. </html>