<?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
 **/

?>
<b>文章添加/编辑</b><br />
<br />
<form name="article_edit_input" action="article_edit_result.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_type" value="<?=$action_type ?>" />
<input type="hidden" name="id" value="<?=$id ?>" />
<table width="80%">
	<tr>
		<td>系列选择</td>
	</tr>
	<tr>
		<td class="begin_blank">
				<select name="category_id" name="category_id" size="150" style="width:200px;height:40px;line-height:20px;">
					<?
					foreach ($category_list as $category_mst) {
					?>
						<option value="<?=$category_mst->id ?>"<?=$category_mst->id == $article_dat->category_id ? " selected " : "" ?>><?=$category_mst->title ?></option>
					<?
					}
					?>
				</select>
		</td>
	</tr>
	<tr>
		<td>标题</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" id="title" name="title" value="<?=htmlspecialchars($article_dat->title) ?>" style="width:300px;"/>
		</td>
		
	</tr>
	<tr>
		<td>图片</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="file" id="upload_thumbnail_file" name="upload_thumbnail_file" onChange="checkUploadThemeFront()" />
			<?=!empty($thumbnail_error_msg) ? "<font color=\"red\">{$thumbnail_error_msg}</font>" : "" ?>
			<br />
			<span id="upload_preview">
				<?
				if (!empty($upload_thumbnail)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($upload_thumbnail) ?>" style="width:75px;" /><?
				} else if (!empty($article_dat->front)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($article_dat->front, "theme", "") ?>" style="width:75px;" /><?
				} else {
					?><img id="upload_thumbnail_preview" src="" style="width:75px;display:none;" /><?
				}
				?>
			</span>
		</td>
	</tr>
	<tr>
		<td>MP3(指定文件名)</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" id="mp3" name="mp3" value="<?=$article_dat->mp3?>" style="width:300px;"/>
		</td>
	</tr>	
	<tr>
		<td>视频地址</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" id="video_url" name="video_url" value="<?=htmlspecialchars($article_dat->video_url) ?>" style="width:400px;"/>
		</td>
	</tr>
	<tr>
		<td>内容</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<textarea name="comment" style="width:400px;height:300px;"><?=htmlspecialchars($article_dat->comment) ?></textarea>
		</td>
	</tr>
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheck();"/>
</form>
