<?php
/**
 * 解梦分类一览
 * $Id: product_category_list.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
 * @author zhouhj
 * @access public
 * @package manager.templates
 */

?>

<b>文章系列一览</b><br /><br />
<a class="flatbutton" href="article_category_edit_input.php">添加系列</a>
<br /><br />
<div id="result_list">
	<table>
		<tr>
			<th class="contents_title" width="5%">系列ID</th>
			<th class="contents_title" width="10%">系列名称</th>
			<th class="contents_title" width="15%">封面</th>
			<th class="contents_title" width="50%">观看限制</th>
			<th class="contents_title" width="10%">排序</th>
			<th class="contents_title">操作</th>
		</tr>

		<?
		if (count($category_list) > 0) {
			foreach ($category_list as $category) {
				$user_status_ids = explode("|", $category->user_status);
				$user_status_titles = "";
				foreach($user_status_ids as $user_status_id) {
					if(is_numeric($user_status_id)) {
						$user_status_titles .= "[" . UserStatus::getTitleById($user_status_id) . "]";
					}
				}
		?>
				<tr<?=!$category->is_valid ? " class=\"gray_mask\"" : "" ?>>
					<td align="center"><?=$category->id ?></td>
					<td align="center"><?=htmlspecialchars($category->title) ?></td>
					<td align="center">
						<?
							if(!empty($category->thumbnail)) {
						?>
						<img src="<?=KoalaHandler::getImageUrl($category->thumbnail, "category", "") ?>" style="width:60px;" />
						<?
							}
						?>
					</td>
					<td align="left"><?=htmlspecialchars($user_status_titles) ?></td>
					<td align="center">
						<a class="flatbutton" href="article_category_change_display_order.php?id=<?=$category->id ?>&type=up">↑</a>
						<a class="flatbutton" href="article_category_change_display_order.php?id=<?=$category->id ?>&type=down">↓</a>
					</td>
					<td align="center">
						<a class="flatbutton" href="article_category_edit_input.php?id=<?=$category->id ?>">编集</a>
						<a class="flatbutton" href="article_dat_list.php?category_id=<?=$category->id ?>">文章列表</a>
					</td>
				</tr>
				<?
			}
		}
		?>
	</table>
</div>