<?php include $this->admin_tpl('meta');?>
<title>移动分类/复制内容 - YzmCMS内容管理系统</title>
</head>
<body>
<article class="page-container">

<form class="form form-horizontal" onsubmit="return dosub(this)" method="post">
	<div class="row cl">
		<label class="form-label col-xs-3"><span class="c-red">*</span>选择栏目：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<?php echo select_category('catid', 0, '≡ 请选择栏目 ≡', 0, 'style="height:30px;line-height:30px"', true, true, $flag ? 0 : $modelid); ?>
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-3"><span class="c-red">*</span>内容ID：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value=""  name="ids" id="ids" readonly >
			<input type="hidden" class="input-text" value="<?php echo $modelid; ?>"  name="modelid">
			<input type="hidden" class="input-text" value="1"  name="dosubmit">
		</div>
	</div>
	<div style="margin-top:20px;margin-left:10px">
			<button name="dosubmit" class="btn btn-primary radius" type="submit">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>&nbsp;&nbsp;&nbsp;&nbsp;
			<button onclick="yzmcms_close()" class="btn btn-default radius" type="button">&nbsp;&nbsp;关闭&nbsp;&nbsp;</button>
	</div>
</form>

</article>
<?php include $this->admin_tpl('footer');?> 

<script type="text/javascript">
	function dosub(obj){
		if($("select[name='catid']").val()=='0'){
			layer.msg('请选择内容分类！', {icon:2});
			return false;
		}
		if($("input[name='ids']").val()==''){
			layer.msg('内容ID不能为空！', {icon:2});
			return false;
		}
		$.ajax({
			type: 'POST',
			url: '<?php echo U(ROUTE_A)?>', 
			data: $(obj).serialize(),
			dataType: "json", 
			success: function (msg) {
				if(msg.status == 1){
					layer.msg(msg.message, {icon:1,time:1500}, function(){
						parent.location.reload();
					});      
				}else{
					layer.msg(msg.message, {icon:2});
				}
			}
		})
		return false;		
	}
	</script> 
</body>
</html>