<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
	if(!$module->roleid_check('notice',$_roleid))showmsg_nourl($lang['RETURN_NOPRI']);
?>
<!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>
<title>公告管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script type="text/javascript" src="admin/template/js/admin.js"></script>
<script language="javascript" src="admin/template/js/css.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
	$("#enabled").val('<?php echo isset($enabled)?$enabled:1;?>');
});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="javascript:void(0);" class="on">公告管理</a></li>
			<li><a href="?mod=notice&file=notice&action=add">添加公告</a></li>			
		</ul>
	</div>
	<div class="main">
		<fieldset>
			<legend>操作提示</legend>
			1：公告标题不能为空；2：排序应为数字
		</fieldset>
		<table cellspacing="0" class="datalist" id="list" width="98%">
		<tr>			
			<th width="7%" class="firstcol">排序</th>
			<th width="9%">公告ID</th>
			<th width="48%">公告标题</th>
			<th width="19%">发布时间</th>
			<th width="17%">管理</th>
		</tr>
		<form action="" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<?php if($result){foreach($result as $val){?>
		<tr>
			<td width="7%" align="center"><input type="hidden" name="id[]" value="<?php echo $val['id'];?>" /><input type="text" size="4" name="orderby[<?php echo $val['id'];?>]" value="<?php echo $val['orderby'];?>" /></td>
			<td width="9%" align="center"><?php echo $val['id'];?></td>
			<td width="48%" align="center"><input type="text" size="45" name="title[<?php echo $val['id'];?>]" value="<?php echo $val['title'];?>" /></td>
			<td width="19%" align="center"><?php echo date('Y-m-d H:i:s',$val['time']);?></td>
			<td width="17%" align="center"><a href="<?php echo ADMIN_FILE;?>?mod=notice&file=notice&action=edit&id=<?php echo $val['id'];?>"><u>修改</u></a> <a href="<?php echo ADMIN_FILE;?>?mod=notice&file=notice&action=delete&id=<?php echo $val['id'];?>" onclick="if(!confirm('您确定要删除改公告吗?'))return false;"><u>删除</u></a></td>
		</tr>
		<?php }?>
		<tr>
			<td colspan="5">
			<input type="button" onclick="this.form.submit();" class="submit" value="批量修改" />
			</td>
		</tr>
		</form>
		<?php }else{?>
		<tr><td colspan="5">目前尚未添加任何公告...</td></tr>	
		<?php }?>
		<tr>
			<td colspan="5"><?php echo $notice->pagestring;?></td>
		</tr>
		</table>
	</div>
</div>
</body>
</html>