<?php
		include("header.tpl.php");
		include("bodytop.tpl.php"); 
		include("navigation.tpl.php"); 
		?>
		<div class="g_navigation">
		<a href="index.php">网站首页</a> >> <?php echo $categorytitle?>
		</div>
    <div class="clear"></div>
	<div id="articlelist">
       <div class="rm_u">&nbsp;</div>
		<div class="content">
			<h2><?php echo $categorytitle?></h2>
			<div class="div_p font_14">

			<form id="form_articlelist" method="post" >
			    <ul class="articlelist_ul">
				<li><b>标题</b></li>
				<li class="view"><b>点击/评论</b></li>
				<li class="date"><b>发布时间</b></li>
				<?php if($toparticles){?>
					<?php foreach($toparticles as $key => $toparticle){?>
				<li>
				<?php if($pervalue{17}){?>
				<input type="checkbox" id="top_article_check_<?php echo $key?>" name="top_article_check[]" value="<?php echo $toparticle['aid']?>">
				<a href="post.php?ipost=modifyarticle&mid=<?php echo $toparticle['aid']?>">[修改]</a>
				<?php }?>
				<img src="templates/default/images/topicon.gif" class="absmiddle">
					<a class="ls_purple" href="###"><font color="<?php echo $articleidentification[$toparticle['tag']][0]?>"><?php echo $articleidentification[$toparticle['tag']][1]?></font></a> | 
					<a href="viewarticle.php?aid=<?php echo $toparticle['aid']?>">
					<?php echo height_light($toparticle['articletitle'],$toparticle['hlight'],$hlightway)?></a>
				</li>
				<li class="view"><?php echo $toparticle['view']?>/<?php echo $toparticle['review']?></li>
				<li class="date"><?php echo gmdate($dateformat,$toparticle['subtime']+3600*8)?></li>
					<?php }?>
				<?php }?>
			<?php foreach($articles as $key => $article){?>
				<li>
				<?php if($pervalue{17}){?>
				<input type="checkbox" id="article_check_<?php echo $key?>" name="article_check[]" value="<?php echo $article['aid']?>">
				<a href="post.php?ipost=modifyarticle&mid=<?php echo $article['aid']?>">[修改]</a>
				<?php }?>

				<a class="ls_purple" href="###"><font color="<?php echo $articleidentification[$article['tag']][0]?>"><?php echo $articleidentification[$article['tag']][1]?></font></a>
				| <a href="viewarticle.php?aid=<?php echo $article['aid']?>">
				<?php echo height_light($article['articletitle'],$article['hlight'],$hlightway)?></a>
				</li>
				<li class="view"><?php echo $article['view']?>/<?php echo $article['review']?></li>
				<li class="date"><?php echo gmdate($dateformat,$article['subtime']+3600*8)?></li>
				<?php }?>
			    </ul>
				<div class="clear"></div>
				<div id="moveform" style="display:none;">
					<select id="move_select_cid" name="move_select_cid">
						<option value="0,0" selected >文章根分类</option >
						<?php echo $echoselectform?>
                    </select>
					<button onclick="asetting('post.php?','move',<?php echo $pid?>,<?php echo $categoryid?>)"> 开始转移 </button> 
					</div>
				</form>
				<div class="clear"></div>
				<?php if($pervalue{17}){?>
				<div id="toolbox">
				    <input type="checkbox" name="article_check_all" id="article_check_all" onclick="checkall_onclick('article')"> 全选
					<button onclick="asetting('post.php?','settop',<?php echo $pid?>,<?php echo $categoryid?>)">文章置顶</button>
					<button onclick="asetting('post.php?','unsettop',<?php echo $pid?>,<?php echo $categoryid?>)"> 取消置顶</button>
					<button onclick="asetting('post.php?','priority',<?php echo $pid?>,<?php echo $categoryid?>)"> 文章优先</button>
					<button onclick="asetting('post.php?','unpriority',<?php echo $pid?>,<?php echo $categoryid?>)"> 取消优先</button>
					<button onclick="asetting('post.php?','sethlight',<?php echo $pid?>,<?php echo $categoryid?>)"> 高亮显示</button>
					<button onclick="asetting('post.php?','unsethlight',<?php echo $pid?>,<?php echo $categoryid?>)"> 取消高亮</button>
					<button onclick="asetting('post.php?','delete',<?php echo $pid?>,<?php echo $categoryid?>)"> 删除文章</button>
					<button onclick='showmoveform()'> 转移文章</button>
					<button onclick='postarticle(<?php echo $pid?>,<?php echo $categoryid?>)'> 发布文章</button>
				</div>
			   <?php }?>
			   	
			</div>
		</div>
		<div class="rm_d">&nbsp;</div>

				<div class="pages_btns font_14">
				<?php echo $multipage?>
				</div>
	</div>


	
	<div id="articlemenu">
		<div class="rs_u">&nbsp;</div>
		<div class="content">
			<h2>快速导航</h2>
		 <div class="div_p font_14">
			<ul class="articlemenu_ul">
			<?php foreach($maincategory as $key => $val){?>
			<li><img src="./images/common/arrow_03.gif"> <a class="font_12" href="articledisplay.php?pid=<?php echo $val['pid']?>&categoryid=<?php echo $key?>"><?php echo $val['categorytitle']?></a>
			</li>
			<?php if(isset($subcategory[$key])){?>
				<?php foreach($subcategory[$key] as $subkey => $subval){?>
				<li class="sub"><img src="./images/common/arrow_03.gif"> <a class="font_12" href="articledisplay.php?pid=<?php echo $subval['pid']?>&categoryid=<?php echo $subkey?>"><?php echo $subval['categorytitle']?></a>
				</li>
				<?php }?>
			<?php }?>
			<?php }?>
			</ul>
			</div>
		</div>
		<div class="rs_d">&nbsp;</div>
	</div>

	<div class="clear"></div>

<?php
include("tail.tpl.php"); 
?>
