ask_admin.htm
4.48 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!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.askid.length;i++)
{
if(!document.form2.askid[i].checked)
{
document.form2.askid[i].checked=true;
}
}
}
function noSelAll()
{
for(i=0;i<document.form2.askid.length;i++)
{
if(document.form2.askid[i].checked)
{
document.form2.askid[i].checked=false;
}
}
}
//获得选中文件的文件名
function getCheckboxItem()
{
var allSel="";
if(document.form2.askid.value) return document.form2.askid.value;
for(i=0;i<document.form2.askid.length;i++)
{
if(document.form2.askid[i].checked)
{
if(allSel=="")
allSel=document.form2.askid[i].value;
else
allSel=allSel+"`"+document.form2.askid[i].value;
}
}
return allSel;
}
//获得选中其中一个的id
function getOneItem()
{
var allSel="";
if(document.form2.askid.value) return document.form2.askid.value;
for(i=0;i<document.form2.askid.length;i++)
{
if(document.form2.askid[i].checked)
{
allSel = document.form2.askid[i].value;
break;
}
}
return allSel;
}
function digestask(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="ask_admin.php?aid="+aid+"&action=digest&qstr="+qstr;
}
function checkask(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="ask_admin.php?aid="+aid+"&action=check&qstr="+qstr;
}
function deleteask(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="ask_admin.php?qstr="+qstr+"&aid="+aid+"&action=delete";
}
</script>
</head>
<body>
<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="9" align="left" bgcolor="#EDF9D5" background="images/tbg.gif">
§<b>问题列表 <a href="ask_admin.php">全部问题</a> | <a href="ask_admin.php?status=-1">未审核的问题</a></b>
</td>
</tr>
<form name="form2" action="ask_admin.php">
<tr align="center" height="25" bgcolor="#FBFCE2">
<td width="6%">id</td>
<td width="4%">选择</td>
<td width="28%">问题</td>
<td width="6%">推荐</td>
<td width="10%">提问时间</td>
<td width="10%">所属大分类</td>
<td width="10%">所属小分类</td>
<td width="8%">回答数</td>
<td width="6%">问题状态</td>
</tr>
{dede:datalist}
<?php
if($fields['status'] == 0){
$fields['status'] = '待解决';
}else if($fields['status'] == 1){
$fields['status'] = '已解决';
}else if($fields['status'] == 2 ){
$fields['status'] = '已关闭';
}else if($fields['status'] == 3){
$fields['status'] = '已过期';
}else if($fields['status']<0){
$fields['status'] = '未审核';
}
$fields['dateline'] = gmdate('Y-m-d' , $fields['dateline'] + 3600*8);
?>
<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="askid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td>
<td align='left'><a href="../ask/question.php?id=<?php echo $fields['id']; ?>" target="_blank"><?php echo $fields['title']; ?></a></td>
<td><?php echo $fields['digest']; ?></td>
<td><?php echo $fields['dateline']; ?></td>
<td><a href="ask_admin.php?tid=<?php echo $fields['tid']; ?>"><?php echo $fields['tidname']; ?></a> </td>
<td><a href="ask_admin.php?tid2=<?php echo $fields['tid2']; ?>"><?php echo $fields['tid2name']; ?></a></td>
<td><?php echo $fields['replies']; ?></td>
<td><?php echo $fields['status']; ?></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:digestask(0)" class="coolbg">推荐</a>
<a href="javascript:checkask(0)" class="coolbg">审核</a>
<a href="javascript:deleteask(0)" class="coolbg">删除</a></td>
</tr>
</form>
<tr align="right">
<td height="20" colspan="9" align="center" bgcolor="#F9FCEF">
{dede:pagelist /}
</td>
</tr>
</table>
</body>
</html>