<?php
	!defined('IN_MANAGE') && exit('Access Denied!');
?>
<!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=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="admin/template/images/tm_right.css" type="text/css" rel="stylesheet" />
<link href="statics/ui-jquery/jquery-ui.css" type="text/css" rel="stylesheet" />
<title>网站后台管理</title>
<script language="javascript" src="statics/ui-jquery/jquery-1.8.3.js"></script>
<script language="javascript" src="statics/ui-jquery/jquery-ui.js"></script>
<script language="javascript" src="admin/template/images/tm-core.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		$('#status').val('<?php echo $status;?>');
		$('#ishidden').val('<?php echo $ishidden;?>');
		$('#typeid').val('<?php echo $typeid;?>');
	});
</script>
</head>

<body>
	<div class="status-tips">统计：共有 <font style="font-size:14px;font-weight:bold;color:#0000ff"><?php echo $moduleobj->getmodulename($mod);?></font> <a style="color:#FF0000" href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=manage"><?php echo $conobj->constatis($moduleid,0,-1);?></a>条，其中：
	已审核<a style="color:#FF0000" href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=manage&status=1"><?php echo $conobj->constatis($moduleid,0,1);?></a>条，
	待审核<a style="color:#FF0000" href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=manage&status=0"><?php echo $conobj->constatis($moduleid,0,0);?></a>条
	
	</div>
	<div class="seatch-tips">
	<form action="?" method="get" name="mysearchform">
	<input type="hidden" name="mod" value="<?php echo $mod;?>" />
	<input type="hidden" name="action" value="<?php echo $action;?>" />
	<input type="hidden" name="file" value="<?php echo $file;?>" />
	信息分类：
	<select name="typeid" id="typeid">
		<option value="0">不限</option>
		<?php echo $conobj->type_select($moduleid,0,3);?>
	</select>
	审核状态：<select name="status" id="status">
	<option value="-1">不限</option>
	<option value="1">通过</option>
	<option value="0">待审</option>
	</select>
	显示状态：<select name="ishidden" id="ishidden">
	<option value="-1">不限</option>
	<option value="0">显示</option>
	<option value="1">隐藏</option>
	</select>
	 日期：
	<?php echo $formobj->datetime('info','starttime',$starttime?$starttime:TIME-3600*24);?> ~ <?php echo $formobj->datetime('info','endtime',$endtime?$endtime:TIME);?>
	关键词：<input type="text" name="k" size="4" value="" class="input-txt" />
	<input type="submit" value="查找" class="save-btn-small" />
	</form>
	</div>
	<div class="manage-tips">
	<p>
	<a href="###" onclick="if(ischecked()){$('#job').val('settop');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="pass">加入Top15排行</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('unsettop');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="del">取消Top15排行</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('settopic');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="pass">加入头版</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('unsettopic');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="del">取消头版</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('setfocus');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="pass">加入幻灯</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('unsetfocus');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="del">取消幻灯</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('pass');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="pass">审核</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('unpass');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="del">待审</a>
	<a href="###" onclick="if(ischecked()){$('#job').val('setshow');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}" class="pass">显示</a>
	&nbsp;
	<a href="###" onclick="if(ischecked()){$('#job').val('sethide');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}"  class="del">隐藏</a>
	</p>
	<p>
	<a href="###" onclick="if(ischecked()){$('#job').val('delete');$('#myform').submit();}else{alert('请选择要'+$(this).html()+'的项目！')}"  class="del">放到回收站</a>
	&nbsp;将选中新闻转移至
	<select name="movetotypeid2" id="movetotypeid2">
		<?php echo $conobj->type_select($moduleid,0,3);?>
	</select>
	<input type="button" onclick="if(ischecked()){$('#movetotypeid').val($('#movetotypeid2').val());$('#job').val('move');$('#myform').submit();}else{alert('请选择要'+$(this).val()+'的项目！')}"value="确定转移" class="save-btn-small" />
	</p>
	</div>
	<form action="" method="post" name="myform" id="myform">
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="movetotypeid" id="movetotypeid" value="0" />
	<input type="hidden" name="mod" value="<?php echo $mod;?>" />
	<input type="hidden" name="action" value="<?php echo $action;?>" />
	<input type="hidden" name="file" value="<?php echo $file;?>" />
	<input type="hidden" name="job" id="job" value="settop" />
	<table class="table-list" cellpadding="1" cellspacing="1">
		<tr>
			<th><input id="checkAll" title="全选/反选" type="checkbox" /></th>
			<th>ID</th>
			<th>信息标题</th>
			<th>属性</th>
			<th>发布人</th>
			<th>日期</th>
			<th>发布IP</th>
			<th>分类</th>
			<?php if(SITETYPE){?><th>分站</th><?php }?>
			<th>审核</th>
			<th>显示</th>
			<th>点击</th>
			<th>操作</th>
		</tr>
		<?php if($result){?>
		<?php foreach($result as $no => $r){?>
		<tr id="tr_<?php echo $r['contentid'];?>" <?php echo ($no%2)?'':'class="light"';?>>
			<td><input type="checkbox" name="id[]" <?php echo $r['islink']?'disabled="disabled" ':'la="checkbox"';?> value="<?php echo $r['contentid'];?>" /></td>
			<td><?php echo $r['contentid'];?></td>
			<td title="<?php echo $r['title'];?>" style="text-align:left"><?php echo $r['thumb']?'<font style="color:#ff0000">[图]</font>':'';?><a href="<?php echo $conobj->formatconurl($r['contentid']);?>" target="_blank"><?php echo sub_string($r['title'],20,'...');?></a></td>
			<td><?php echo $r['islink']?'<font style="color:#000000">[外链]</font>':'';?> <?php echo $r['istop']>=time()?'<font style="color:#009900">[置顶]</font>':'';?> <?php echo $r['istopic']>=time()?'<font style="color:#ff0000">[头版]</font>':'';?> <?php echo $r['isfocus']>=time()?'<font style="color:#0000ff">[焦点]</font>':'';?></td>
			<td><?php echo $r['userid']?username($r['userid']):($r['adminpost']?'管理员':'游客');?>
			<td><?php echo date('Y-m-d',$r['inputtime']);?></td>
			<td><?php echo ip2area($r['ip']);?></td>
			<td><a href="<?php echo typeurl($r['typeid']);?>" title="<?php echo typename($r['typeid']);?>" target="_blank"><?php echo typename($r['typeid']);?></a></td>
			<?php if(SITETYPE){?><td><?php echo $siteidobj->sitename($r['siteid']);?></td><?php }?>
			<td><?php echo $r['status']?'<font style="color:#009900">通过</font>':'<font style="color:#ff0000">待审核</font>';?></td>
			<td><?php echo !$r['ishidden']?'<font style="color:#009900">显示</font>':'<font style="color:#ff0000">隐藏</font>';?></td>
			<td><font style="color:#990000"><?php echo $r['clicks'];?></font></td>
			<td><a href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=comment&contentid=<?php echo $r['contentid'];?>">评论</a><?php echo $r['comments']?'(<font style="color:#ff0000">'.$r['comments'].'</font>)':'';?> | <a href="?mod=<?php echo $mod;?>&file=<?php echo $file;?>&action=edit&contentid=<?php echo $r['contentid'];?>">编辑</a></td>
		</tr>
		<?php }?>
		<tr class="page">
			<td colspan="<?php echo SITETYPE?'13':'12';?>">
			<?php echo $conobj->pagestring;?>
			</td>
		</tr>
		<?php }else{echo '<tr class="light"><td colspan="'.(SITETYPE?'13':'12').'">暂无数据</td></tr>';}?>
		</form>
	</table>
</body>
</html>
