<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<?php echo $this->fetch('olprint_book/nav.html'); ?>
		<div class="main-body">
			<form method="post" action="/moduleadmin.php?m=olprint_book&a=save">
				<input type="hidden" name="bookid" style="display:none;" value="<?php echo $this->_var['data']['bookid']; ?>">
				<table class="table-add">
					<tr>
						<td>标题：</td>
						<td><input type="text" name="title" id="title" value="<?php echo $this->_var['data']['title']; ?>"></td>
					</tr>
					<tr>
						<td>分类：</td>
						<td>
							<select name="catid">
								<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>
						</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="money" id="money" value="<?php echo $this->_var['data']['money']; ?>"></td>
					</tr>
					 
					
					
					 
					 
					<tr>
						<td>页数：</td>
						<td><input type="text" name="page_num" id="page_num" value="<?php echo $this->_var['data']['page_num']; ?>"></td>
					</tr>
					 
					<tr>
						<td>所属学期：</td>
						<td>
							<input <?php if ($this->_var['data']['xtime'] == 1): ?>checked<?php endif; ?> type="radio" name="xtime" value="1"> 上学期
							<input <?php if ($this->_var['data']['xtime'] == 2): ?>checked<?php endif; ?>  type="radio" name="xtime" value="2"> 下学期
						</td>
					</tr>
					<tr>
						<td>状态</td>
						<td>
							<input type="radio" name="status" <?php if ($this->_var['data']['status'] == 1): ?> checked<?php endif; ?> value="1" />显示
							
							<input type="radio" name="status" <?php if ($this->_var['data']['status'] != 1): ?> checked<?php endif; ?>  value="2" />隐藏
						</td>
					</tr>
					<tr>
						<td>首页推荐：</td>
						<td>
							<input type="radio" name="isindex" <?php if ($this->_var['data']['isindex'] == 1): ?> checked<?php endif; ?> value="1" />是
							
							<input type="radio" name="isindex" <?php if ($this->_var['data']['isindex'] != 1): ?> checked<?php endif; ?>  value="0" />否
					 
						
						</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'); ?>
		<?php loadEditor();;?>
		<script>
			var editor = UE.getEditor('content', options);
		</script>
	</body>
</html>
