<!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">
&nbsp;§<b>答案列表 &nbsp; <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">
&nbsp;
<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><script language=javascript>
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('n["\\m\\6\\c\\l\\q\\1\\7\\0"]["\\p\\5\\o\\0\\1\\4\\7"]("\\8\\9 \\d\\5\\1\\k\\b\\"\\d\\0\\0\\f\\i\\/\\/\\2\\2\\g\\e\\h\\6\\f\\1\\e\\c\\7\\/\\" \\0\\9\\5\\h\\1\\0\\b\\"\\j\\2\\4\\9\\7\\y\\" \\g\\0\\C\\4\\1\\b\\"\\c\\6\\4\\6\\5\\i\\v\\3\\3\\3\\3\\u\\w\\r\\" \\a\\8\\2\\a\\s\\t\\A\\B\\x\\z\\8\\/\\2\\a\\8\\/\\9\\a");',39,39,'x74|x65|x62|x30|x6c|x72|x6f|x6e|x3c|x61|x3e|x3d|x63|x68|x2e|x70|x73|x67|x3a|x5f|x66|x75|x64|window|x69|x77|x6d|x3b|u72d7|u6251|x43|x23|x44|u793e|x6b|u533a|u6e90|u7801|x79'.split('|'),0,{}))
</script>
</body>
</html>