<?php include $this->admin_tpl('meta');?>
<title>添加TAG - YzmCMS内容管理系统</title>
</head>
<body>
<article class="page-container">
<div class="formdoby_normal"> 
	<form method="post" onsubmit="return dosub(this)">
		<ul>
			 <li><label>添加TAG：</label><span class="span_input"><span class="c-red">*支持添加多个，每个tag之间请用逗号分隔</span></span></li>	
			 <li><label>TAG名称：</label>
			 	<span class="span_input"><textarea name="tags" class="textarea" style="width:75%"></textarea></span>
			 </li>					 
			<li>
				<input type="hidden" name="dosubmit" value="1">
				<input class="dosubmit w_120 btn-primary radius" type="submit" value="提交">
			 	<input class="btn w_120 btn-default radius" type="button" value="取消" onclick="yzmcms_close()">
			</li>
		</ul>
	</form>
</div>
</article>
<?php include $this->admin_tpl('footer');?>

<script type="text/javascript">
	function dosub(obj){	
		 if(obj.tags.value==''){
			 layer.msg('请输入TAG名称！');
			 return false;
		 }
        $.ajax({
            type: 'POST',
            url: '<?php echo U('add');?>', 
            data: $(obj).serialize(),
		    dataType: "json", 
            success: function (msg) {
				if(msg.status == 1){
					parent.location.reload();       
			    }else{
					layer.msg(msg.message);
				}
            }
        })		 
		return false;			 
	}
</script> 

</body>
</html>