<!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">
			<?php $_from = $this->_var['list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
			<form action="/moduleshop.php?m=olprint_shop_ptype&a=save&ajax=1" class="row-box mgb-5">
				<input type="hidden" name="id" value="<?php echo $this->_var['c']['id']; ?>" />
				<div><?php echo $this->_var['c']['title']; ?></div>
				<div class="input-flex">
					<div class="input-flex-label">起步</div>
					<input value="<?php echo $this->_var['c']['start_money']; ?>" name="start_money" type="text" class="input-flex-text" />
					<div class="mgl-5">元</div>
				</div>
				<div class="input-flex">
					<div class="input-flex-label">每页</div>
					<input value="<?php echo $this->_var['c']['page_money']; ?>" name="page_money" type="text" class="input-flex-text" />
					<div class="mgl-5">元</div>
				</div>
				<div class="flex">
					<div url="/moduleshop.php?m=olprint_shop_ptype&a=status&ajax=1&id=<?php echo $this->_var['c']['id']; ?>" class="<?php if ($this->_var['c']['status'] == 1): ?>yes<?php else: ?>no<?php endif; ?> js-toggle-status"></div>
					<div class="flex-1"></div>
					<div class="btn-small submit">修改</div>
				</div>
			</form>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
		<script>
			$(document).on("click",".submit",function(){
				var f=$(this).parents("form");
				var that=this;
				$.ajax({
					url:f.attr("action"),
					data:f.serialize(),
					type:"POST",
					dataType:"json",
					success:function(res){
						skyToast(res.message)
					}
				})
			})
		</script>
	</body>
</html>
