<?php /*a:1:{s:62:"/www/wwwroot/666.u7u.top/application/ohbbs/view/menu/edit.html";i:1551336382;}*/ ?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link rel="stylesheet" href="/public/static/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="/public/static/css/admin.css" media="all">
</head>
<body>
	<form class="layui-form column-content-detail">
		<div class="layui-tab-item layui-show">
			<div class="layui-form-item">
				<label class="layui-form-label">菜单名称：</label>
				<div class="layui-input-block">
					<input type="text" name="name" required lay-verify="required" placeholder="请输入菜单名称" autocomplete="off" class="layui-input" value="<?php echo htmlentities($data['name']); ?>">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">菜单别名：</label>
				<div class="layui-input-block">
					<input type="text" name="alias" placeholder="请输入菜单别名" autocomplete="off" class="layui-input" value="<?php echo htmlentities($data['alias']); ?>">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">菜单链接：</label>
				<div class="layui-input-block">
					<input type="text" name="url" placeholder="请输入菜单自定义链接，为空默认菜单链接" autocomplete="off" class="layui-input" value="<?php echo htmlentities($data['url']); ?>">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">菜单排序：</label>
				<div class="layui-input-block">
					<input type="text" name="sort" required lay-verify="required" placeholder="请输入菜单排序" autocomplete="off" class="layui-input" value="<?php echo htmlentities($data['sort']); ?>">
				</div>
			</div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">菜单类型：</label>
		    <div class="layui-input-block">
		      <input type="radio" name="type" value="1" title="下载" <?php if($data['type'] == 1): ?>checked<?php endif; ?>>
		      <input type="radio" name="type" value="0" title="文章" <?php if($data['type'] == 0): ?>checked<?php endif; ?>>
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label">菜单显示：</label>
		    <div class="layui-input-block">
		      <input type="radio" name="status" value="1" title="显示" <?php if($data['status'] == 1): ?>checked<?php endif; ?>>
		      <input type="radio" name="status" value="0" title="隐藏" <?php if($data['status'] == 0): ?>checked<?php endif; ?>>
		    </div>
		  </div>
		</div>
		<div class="layui-form-item" style="padding-left: 10px;">
			<div class="layui-input-block">
				<input type="hidden" name="id" value="<?php echo htmlentities($data['id']); ?>">
				<button class="layui-btn layui-btn-normal" lay-submit lay-filter="form">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
<script src="/public/static/layui/layui.js"></script>
<script src="/public/static/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>  
layui.use('form',function(){
  var form = layui.form;
  var $ = layui.jquery;
  form.on('submit(form)', function(data){
    $.post("<?php echo url(''); ?>",data.field,function(data){
      if(data.code == 1){
        layer.msg(data.msg, {time: 2000}, function(){
          location.href = data.url;
        });
      }else{
        layer.msg(data.msg, {time: 2000});
      }
    });
    return false;
  });
})
</script>
</body>
</html>