<?php
/**
 * 解梦分类编集
 * $Id: product_category_new_input.inc,v 1.1 2015/10/08 11:18:53 wanggb Exp $
 * @author wanggb
 * @access public
 * @package manager.templates
 **/
global $upload_thumbnail;
global $thumbnail_error_msg;
?>
<b>文章系列添加/编集</b><br />
<br />
<form name="article_category_edit_input" action="article_category_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?=$id ?>" />
<table>
	<tr>
		<td>名称</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" name="title" value="<?=htmlspecialchars($title) ?>" />
		</td>
	</tr>

	<tr>
		<td>封面</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="file" id="upload_thumbnail_file" name="upload_thumbnail_file" onChange="checkUploadThumbnailFile()" />
			<?=!empty($thumbnail_error_msg) ? "<font color=\"red\">{$thumbnail_error_msg}</font>" : "" ?>
			<br />
			<span id="upload_thumbnail">
				<?
				if (!empty($upload_thumbnail)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($upload_thumbnail) ?>" style="width:40px;height:40px;" /><?
				} else if (!empty($category_mst->thumbnail)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($category_mst->thumbnail, "category", "") ?>" style="width:40px;height:40px;" /><?
				} else {
					?><img id="upload_thumbnail_preview" src="" style="width:40px;height:40px;display:none;" /><?
				}
				?>
			</span>
		</td>
	</tr>

	<tr>
		<td>观看权限</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<?
			foreach ($user_status_list as $user_status_obj) {
			?>
			<label><input type="checkbox" name="user_status[]" value="<?=$user_status_obj->id ?>"<?=in_array($user_status_obj->id, $user_status_array) ? " checked=\"checked\"" : "" ?> /><?=$user_status_obj->title ?></label>
			<?
			}
			?>
		</td>
	</tr>
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheck();" />
</form>
