<?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="javascript:void(0);" class="on">更新栏目</a></li>
			<li><a href="?file=content&action=create_content">更新内容</a></li>	
		</ul>
	</div>
	<div class="main">
		<fieldset>
			<legend>操作提示</legend>
			注意：如果想更新某个栏目，必须选中该栏目。
		</fieldset>
		<table cellspacing="0" class="datalist" id="list">
		<form action="" id="createcatform" method="post" name="myform">
		<input type="hidden" name="do_submit" value="1" />
		<input type="hidden" name="hidecatid" id="hidecatid" value="0" />
		<tr>
			<td width="9%" align="center" height="50">
			<input type="checkbox" name="chkall2" value="1" class="checkbox" checked="checked" onclick="check_all_bycatid(this)" />
			</td>
			<td colspan="2" align="left">
			<input type="button" onclick="this.form.submit();" class="submit" style="color:#FF0000; font-weight:bold" value="开始更新选中栏目" />
			</td>
		</tr>
		<tr>
			<th width="9%" class="firstcol">选中</th>
			<th width="91%">选择需要更新的栏目</th>
		</tr>
		<?php if($category){foreach($category as $_category){if(in_array($_category['id'],$_categorypriv) || $_roleid==1){?>
		<?php
			$tcatid=get_childrencatid($_category['id']);
			$tcatid=implode(',',$tcatid);
		?>
		<tr>
			<td width="9%" align="center"><input type="checkbox" class="checkbox" checked="checked" name="catid[]" value="<?php echo $_category['id'];?>" /></td>
			<td width="91%" align="left" style="padding-left:8px"><b><?php echo $_category['categoryname'];?></b> <input type="button" onclick="javascript:createcat('<?php echo $tcatid;?>');" value="更新栏目" style="border:#ccc 1px outset;height:20px" /></td>
        </tr>
		<?php 
		tree ($_category['id']);
		}}?>
		</form>
		<?php }else{?>
		<tr><td colspan="2">目前尚未添加任何栏目...</td></tr>	
		<?php }?>
		</table>
	</div>
</div>
</body>
</html>