course_edit_input.inc 3.42 KB
<?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="course_edit_input" action="course_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) ?>" 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="checkUploadThumbnailFile1()" />
			<?=!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="height:50px;" /><?
				} else if (!empty($course_mst->thumbnail)) {
					?><img id="upload_thumbnail_preview" src="<?=KoalaHandler::getImageUrl($course_mst->thumbnail, "course", "") ?>" style="height:50px;" /><?
				} else {
					?><img id="upload_thumbnail_preview" src="" style="height:50px;display:none;" /><?
				}
				?>
			</span>
		</td>
	</tr>
	
	<tr>
		<td>文字介绍</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<textarea name="comment" style="width:300px;height:100px;"><?=htmlspecialchars($comment) ?></textarea>
		</td>
	</tr>
	
	<tr>
		<td>详细图片</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="file" id="upload_thumbnail_file2" name="upload_thumbnail_file2" onChange="checkUploadThumbnailFile2()" />
			<?=!empty($thumbnail_error_msg) ? "<font color=\"red\">{$thumbnail_error_msg}</font>" : "" ?>
			<br />
			<span id="upload_thumbnail2">
				<?
				if (!empty($upload_thumbnail2)) {
					?><img id="upload_thumbnail_preview2" src="<?=KoalaHandler::getImageUrl($upload_thumbnail) ?>" style="height:50px;" /><?
				} else if (!empty($course_mst->detail_image)) {
					?><img id="upload_thumbnail_preview2" src="<?=KoalaHandler::getImageUrl($course_mst->detail_image, "course", "") ?>" style="height:50px;" /><?
				} else {
					?><img id="upload_thumbnail_preview2" src="" style="height:50px;display:none;" /><?
				}
				?>
			</span>
		</td>
	</tr>

	<tr>
		<td>原价</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" name="original_price" value="<?=htmlspecialchars($original_price) ?>" style="width:150px;"/>
		</td>
	</tr>
	
	<tr>
		<td>活动价</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<input type="text" name="price" value="<?=htmlspecialchars($price) ?>" style="width:150px;"/>
		</td>
	</tr>
	
	<tr>
		<td>花呗分期</td>
	</tr>
	<tr>
		<td class="begin_blank">
			<label><input type="checkbox" name="is_free3" value="1" <?=($is_free3) ? " checked=\"checked\"" : "" ?> />3期免息(参考:2.3%)</label>
			<label><input type="checkbox" name="is_free6" value="1" <?=($is_free6) ? " checked=\"checked\"" : "" ?> />6期免息(参考:4.5%)</label>
			<label><input type="checkbox" name="is_free12" value="1" <?=($is_free12) ? " checked=\"checked\"" : "" ?> />12期免息(参考:7.5%)</label>
		</td>
	</tr>
	
</table>
<br />
<input type="button" value="编集" class="button_width_normal" onClick="doCheck();" />
</form>