<?php
	!defined('DIRCMS_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>
<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>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=content&action=all_cache">一键更新</a></li>
			<li><a href="?file=content&action=create_category">更新栏目</a></li>
			<li><a href="javascript:void(0);" class="on">更新内容</a></li>	
		</ul>
	</div>
	<div class="main">
		<fieldset>
			<legend>操作提示</legend>
			1：如果想更新某个栏目，必须选中该栏目； 2：每轮更新信息条数建议不要超过100条。
		</fieldset>
		<table cellspacing="0" class="datalist" id="list">
		<form action="" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<input type="hidden" name="type" id="type" value="all" />
		<tr>
			<td width="30%"> &nbsp;每轮更新信息条数：</td>
			<td width="70%"><input type="text" name="pagesize" size="4" value="50" /> 条</td>
		</tr>
		<tr>
			<td width="30%">  &nbsp;开始更新所有信息：</td>
			<td width="70%"><input type="button" value="开始更新" name="dosubmit1" onclick="javascript:$('#type').val('all');this.form.submit();" class="button" /></td>
		</tr>
		<tr>
			<td width="30%">  &nbsp;更新最近的 
		  <input type="text" name="number" size="4" value="100" /> 条信息：</th>
		  <td width="70%"><input type="button" value="开始更新" name="dosubmit2" onclick="javascript:$('#type').val('realate');this.form.submit();" class="button" /></td>
		</tr>
		<tr>
			<td width="30%">  &nbsp;更新内容ID
		  <input type="text" name="fromid" size="4" value="1" /> 到 <input type="text" name="toid" size="4"  value="500" /> 的信息： </td>
			<td width="70%"> <input type="button" value="开始更新" name="dosubmit3" onclick="javascript:$('#type').val('limit');this.form.submit();" class="button" /></td>
		</tr>
		<tr>
			<th width="30%" class="firstcol"><input type="checkbox" name="chkall2" value="1" class="checkbox" checked="checked" onclick="check_all_bycatid(this)" /></th>
			<th width="70%">选择需要更新的栏目</th>
		</tr>
		<?php if($category){foreach($category as $_category){if(!$_category['ispage']){?>
		<tr>
		  <td width="30%" align="center"><input type="checkbox" class="checkbox" checked="checked" name="catid[]" value="<?php echo $_category['id'];?>" /></td>
			<td width="70%" align="left" style="padding-left:8px"><b><?php echo $_category['categoryname'];?></b></td>
        </tr>
		<?php 
		tree ($_category['id']);
		}}?>
		</form>
		<?php }else{?>
		<tr><td colspan="2">目前尚未添加任何栏目...</td></tr>	
		<?php }?>
		</table>
	</div>
</div>
</body>
</html>