<?php
/**
 * 词集编集
 * $Id: word_theme_edit.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="word_theme_edit" action="word_theme_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">
				<select name="theme_type" id="theme_type" size="150" style="width:200px;height:40px;line-height:20px;">
					<?
					foreach ($theme_type_list as $theme_type) {
					?>
						<option value="<?=$theme_type->id ?>"<?=$theme_type->id == $word_theme_mst->theme_type ? " selected " : "" ?>><?=$theme_type->title ?></option>
					<?
					}
					?>
				</select>
		</td>
	</tr>
	<tr>
		<td>名称</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" id="title" name="title" value="<?=htmlspecialchars($word_theme_mst->title) ?>" size=20/>
		</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($word_theme_mst->front)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($word_theme_mst->front, "theme", "") ?>" style="width:75px;" /><?
				} 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"><textarea name="comment" cols=50 rows=3?><?=htmlspecialchars($word_theme_mst->comment) ?></textarea></td>
	</tr>
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheckWordTheme();" />
</form>
