<!DOCTYPE html>
<html>
	<?php echo $this->fetch('head.html'); ?>
	<body>
		<div class="header">
			<div class="header-back"></div>
			<div class="header-title">产品分类编辑</div>
		</div>
		<div class="header-row"></div>
		<div class="main-body">
		<form method="post" action="/moduleshop.php?m=b2b_shop_product_category&a=save">
			<input type="hidden" name="catid" style="display:none;" value="<?php echo $this->_var['data']['catid']; ?>">
			<table class="table-add">
				<div class="input-flex">
					<div class="input-flex-label">分类名称：</div>
					<input class="input-flex-text" type="text" name="title" id="title" value="<?php echo $this->_var['data']['title']; ?>">
				</div>
				<div class="input-flex flex-ai-center">
					<div class="input-flex-label">logo</div>
					<div class="flex-1">
						<div class="upimg-box bg-fff">
							<div class="upimg-item <?php if (! $this->_var['data']['imgurl']): ?>none<?php endif; ?> js-upimg-btn">
								<img class="upimg-img" src="<?php echo images_site($this->_var['data']['imgurl']); ?>.100x100.jpg" >								 
							</div>
							<?php if (! $this->_var['data']['imgurl']): ?>	
							<div class="upimg-btn js-upimg-btn">
								<i class="upimg-btn-icon"></i>
							</div>
							<?php endif; ?>
							<input type="hidden" name="imgurl" value="<?php echo $this->_var['data']['imgurl']; ?>" class="imgurl" />
							<input style="display: none;" type="file" name="upimg" id="upimg" /> 
						</div> 
					</div>
				</div>
				 
				<div class="input-flex">
					<div class="input-flex-label">上级分类：</div>
					 
						<select  class="input-flex-select" name="pid">
							<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['c']['catid'] == $this->_var['data']['pid']): ?>selected<?php endif; ?>><?php echo $this->_var['c']['title']; ?></option>
							<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
						</select>
					 
				</div>
				<div class="input-flex">
					<div class="input-flex-label">排序：</div>
					<input class="input-flex-text"  type="text" name="orderindex" id="orderindex" value="<?php echo $this->_var['data']['orderindex']; ?>">
				</div>
				<div class="input-flex">
					<div class="input-flex-label">状态</div>
					<div class="flex-1 flex flex-ai-center">
						<input type="radio" <?php if ($this->_var['data']['status'] != 1): ?> checked="" <?php endif; ?> name="status" value="2" /> 下线
						<input type="radio" <?php if ($this->_var['data']['status'] == 1): ?> checked="" <?php endif; ?> name="status" value="1" /> 上线
					</div>
				</div>
				 
			 
			<div class="btn-row-submit js-submit" >保存</div>
		</form>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script src="/plugin/lrz/lrz.bundle.js"></script>
		<script src="/plugin/dt-ui/dt-ui-upload.js"></script>
	</body>
</html>
