<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<?php echo $this->fetch('exue_course/nav.html'); ?>
		<div class="main-body">
			<form method="post" action="/moduleadmin.php?m=exue_course&a=save">
				<input type="hidden" name="courseid" style="display:none;" value="<?php echo $this->_var['data']['courseid']; ?>">
				<table class="table-add">
					 
					
					<tr>
						<td>名称：</td>
						<td><input type="text" name="title" id="title" value="<?php echo $this->_var['data']['title']; ?>"></td>
					</tr>
					<div class="input-flex">
						<div class="input-flex-label">平台大类</div>
						<select name="catid" class="input-flex-select">
							<option value="0">请选择</option>
							<?php $_from = $this->_var['catlist']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
								<option value="<?php echo $this->_var['c']['catid']; ?>" <?php if ($this->_var['data']['catid'] == $this->_var['c']['catid']): ?>selected<?php endif; ?>><?php echo $this->_var['c']['title']; ?></option>
								<?php if ($this->_var['c']['child']): ?>
								<?php $_from = $this->_var['c']['child']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'cc');if (count($_from)):
    foreach ($_from AS $this->_var['cc']):
?>
								<option value="<?php echo $this->_var['cc']['catid']; ?>" <?php if ($this->_var['data']['catid'] == $this->_var['cc']['catid']): ?>selected<?php endif; ?>>|--<?php echo $this->_var['cc']['title']; ?></option>
								<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
								<?php endif; ?>
							<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						</select>
					</div>
					<tr>
						<td>图片：</td>
						<td>
							<div class="js-upload-item">
								<input type="file" id="upa" class="js-upload-file" style="display: none;" />
								<div class="upimg-btn js-upload-btn">+</div>
								<input type="hidden" name="imgurl" class="js-imgurl" value="<?php echo $this->_var['data']['imgurl']; ?>" />
								<div class="js-imgbox">
									<?php if ($this->_var['data']['imgurl']): ?>
									<img src="<?php echo images_site($this->_var['data']['imgurl']); ?>.100x100.jpg">
									<?php endif; ?>
								</div>
							</div>
						</td>
					</tr>
					<tr>
						<td>描述：</td>
						<td><input type="text" name="description" id="description" value="<?php echo $this->_var['data']['description']; ?>"></td>
					</tr>
					<tr>
						<td>价格：</td>
						<td><input type="text" name="price" id="price" value="<?php echo $this->_var['data']['price']; ?>"></td>
					</tr>
					<tr>
						<td>市场价：</td>
						<td><input type="text" name="market_price" id="market_price" value="<?php echo $this->_var['data']['market_price']; ?>"></td>
					</tr>
					<tr>
						<td>综合评分：</td>
						<td><input type="text" name="raty_grade" id="raty_grade" value="<?php echo $this->_var['data']['raty_grade']; ?>"></td>
					</tr>
					<tr>
						<td>状态：</td>
						<td><input type="text" name="status" id="status" value="<?php echo $this->_var['data']['status']; ?>"></td>
					</tr>
					<tr>
						<td>首页推荐：</td>
						<td><input type="text" name="site_index" id="site_index" value="<?php echo $this->_var['data']['site_index']; ?>"></td>
					</tr>
					 
					<tr>
						<td>内容：</td>
						<td>
							<script type="text/plain" id="content" name="content"><?php echo $this->_var['data']['content']; ?></script>
						</td>
					</tr>
				</table>
				<div class="btn-row-submit js-submit">保存</div>
			</form>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/static/admin/js/upload.js"></script>
		<?php loadEditor();;?>
		<script>
			var editor = UE.getEditor('content', options);
		</script>
	</body>
</html>
