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

127 lines
4.1KB

  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.answerid.length;i++)
  11. {
  12. if(!document.form2.answerid[i].checked)
  13. {
  14. document.form2.answerid[i].checked=true;
  15. }
  16. }
  17. }
  18. function noSelAll()
  19. {
  20. for(i=0;i<document.form2.answerid.length;i++)
  21. {
  22. if(document.form2.answerid[i].checked)
  23. {
  24. document.form2.answerid[i].checked=false;
  25. }
  26. }
  27. }
  28. //获得选中文件的文件名
  29. function getCheckboxItem()
  30. {
  31. var allSel="";
  32. if(document.form2.answerid.value) return document.form2.answerid.value;
  33. for(i=0;i<document.form2.answerid.length;i++)
  34. {
  35. if(document.form2.answerid[i].checked)
  36. {
  37. if(allSel=="")
  38. allSel=document.form2.answerid[i].value;
  39. else
  40. allSel=allSel+"`"+document.form2.answerid[i].value;
  41. }
  42. }
  43. return allSel;
  44. }
  45. //获得选中其中一个的id
  46. function getOneItem()
  47. {
  48. var allSel="";
  49. if(document.form2.answerid.value) return document.form2.answerid.value;
  50. for(i=0;i<document.form2.answerid.length;i++)
  51. {
  52. if(document.form2.answerid[i].checked)
  53. {
  54. allSel = document.form2.answerid[i].value;
  55. break;
  56. }
  57. }
  58. return allSel;
  59. }
  60. function checkanswer(aid){
  61. var qstr=getCheckboxItem();
  62. if(aid==0) aid = getOneItem();
  63. location="ask_answer.php?aid="+aid+"&action=check&qstr="+qstr;
  64. }
  65. function deleteanswer(aid){
  66. var qstr=getCheckboxItem();
  67. if(aid==0) aid = getOneItem();
  68. location="ask_answer.php?qstr="+qstr+"&aid="+aid+"&action=delete";
  69. }
  70. </script>
  71. </head>
  72. <body background='img/allbg.gif' leftmargin='8' topmargin='8'>
  73. <div class="bodytitle">
  74. <div class="bodytitleleft"></div>
  75. <div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 用户答案管理</div>
  76. </div>
  77. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;">
  78. <tr>
  79. <td height="24" colspan="6" align="left" bgcolor="#EDF9D5" background="images/tbg.gif">
  80. &nbsp;§<b>答案列表 &nbsp; <a href="ask_answer.php">全部答案</a> | <a href="ask_answer.php?check=1">未审核的答案</a></b>
  81. </td>
  82. </tr>
  83. <form name="form2" action="ask_answer.php">
  84. <tr align="center" height="25" bgcolor="#FBFCE2">
  85. <td width="6%">id</td>
  86. <td width="4%">选择</td>
  87. <td width="62%">答案</td>
  88. <td width="10%">回答时间</td>
  89. <td width="6%">回答者</td>
  90. <td width="6%">答案状态</td>
  91. </tr>
  92. {dede:datalist}
  93. <?php
  94. if($fields['ifcheck'] == 1){
  95. $fields['ifcheck'] = '已审核';
  96. }elseif($fields['ifcheck']==0){
  97. $fields['ifcheck'] = '未审核';
  98. }
  99. $fields['dateline'] = gmdate('Y-m-d H:i:s' , $fields['dateline'] + 3600*$cfg_ask_timeoffset);
  100. ?>
  101. <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
  102. <td><?php echo $fields['id']; ?></td>
  103. <td><input name="answerid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td>
  104. <td align='left'><a title="点击查看问题页面" href="../ask/question.php?id=<?php echo $fields['askid']; ?>" target="_blank"><?php echo $fields['content']; ?></a></td>
  105. <td><?php echo $fields['dateline']; ?></td>
  106. <td><a href="member_view.php?ID=<?php echo $fields['uid'];?>" target="_blank"><?php echo $fields['username']; ?></a></td>
  107. <td><?php echo $fields['ifcheck']; ?></td>
  108. </tr>
  109. {/dede:datalist}
  110. <tr bgcolor="#ffffff">
  111. <td height="24" colspan="10" align="left">
  112. &nbsp;
  113. <a href="javascript:selAll()" class="coolbg">全选</a>
  114. <a href="javascript:noSelAll()" class="coolbg">取消</a>
  115. <a href="javascript:checkanswer(0)" class="coolbg">审核</a>
  116. <a href="javascript:deleteanswer(0)" class="coolbg">删除</a></td>
  117. </tr>
  118. </form>
  119. <tr align="right" bgcolor="#E5F9FF">
  120. <td height="20" colspan="10" align="center" bgcolor="#F9FCEF">
  121. {dede:pagelist /}
  122. </td>
  123. </tr>
  124. </table>
  125. </body>
  126. </html>