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