<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加单页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script src="images/js/jquery.min.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){checkForm(0);});
$(document).ready(function(){$("#info_parentid_").val(<?php echo $parentid;?>);});
$(function () {
	$(".tab a").each(function () {
		$(this).click(function () {
			$(".tab a").each(function(){
				$(this).attr('class','');
				$("#tab_" + $(this).attr('id')).css('display','none');
			});
			$(this).attr('class', 'on');
			$("#tab_" + $(this).attr('id')).css('display','block');

		});
	});
});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
	<ul>
		<li><a href="javascript:void(0);" class="on" id="1">基本设置</a></li>
		<li><a href="javascript:void(0);" id="2">SEO设置</a></li>
		<li><a href="javascript:void(0);" id="3">模板设置</a></li>
	</ul>
	</div>
	<div class="main">
		<fieldset>
		<legend>操作提示</legend>
		如果点击 <font style="background:#2782D6; color:#fff; padding:3px">保存页面</font> 时提交不了，仔细检查下是不是某项没有填写正确。
		</fieldset>
	<form action="" method="post" name="myform">		
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="id" value="<?php echo $id;?>" />
	<input type="hidden" name="pageid" value="<?php echo $r['pageid'];?>" /> 
		<table width="100%">
		<tr><td>
			
			<div id="tab_1">
			<table class="sub">
				<tr>
					<td width="200" align="right">上级栏目：</td>
					<td><?php echo $categoryselect;?></td>
				</tr>
				<tr>
					<td width="200" align="right">单页名称：</td>
					<td><input type="text" name="info[pagename]" size="15" datatype="limit" min="2" max="50" /></td>
				</tr>
				<tr>
					<td width="200" align="right">存放目录：</td>
					<td><input type="text" name="info[dir]" size="15" datatype="table"  /></td>
				</tr>
				<tr>
					<td width="200" align="right">文件名称：</td>
					<td>
					<input type="text" name="info[filename]" size="15" datatype="table" /> .html
					</td>
				</tr>
				<tr>
					<td width="200" align="right">起用单页：</td>
					<td>
					<input type="radio" class="radio"  name="info[isshow]" value="1" checked="checked"/>启用
					&nbsp;&nbsp;
					<input type="radio" class="radio"  name="info[isshow]" value="0" />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">设为推荐：</td>
					<td>
					<input type="radio"  class="radio" name="info[istop]" value="1"  checked="checked"/>启用
					&nbsp;&nbsp;
					<input type="radio"  class="radio" name="info[istop]" value="0" />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">页面内容：</td>
					<td>
					<?php echo $form->editor('content','',$js='',$css='',$preg='limit',$minsize=0,$maxsize=50,$width=650,$heigh=300);?>
					</td>
				</tr>
			</table>
			</div>
		
			<div id="tab_2" style="display:none">
			<table class="sub">
				<tr>
					<td width="200" align="right">meta_title：</td>
					<td><input type="text" name="info[meta_title]" size="45" datatype="limit" min="0" max="200" /> <span>针对搜索引擎设置的标题</span></td>
				</tr>
				<tr>
					<td width="200" align="right">meta_keywords：</td>
					<td><input type="text" name="info[meta_keywords]" size="55" datatype="limit" min="0" max="200" /> <span>多个关键字用 , 隔开</span></td>
				</tr>
				<tr>
					<td width="200" align="right">meta_description： </td>
					<td>
					<textarea name="info[meta_description]" datatype="limit" min="0" max="255" cols="60" rows="5" ></textarea> 
					</td>
				</tr>
			</table>
			</div>
		
			<div id="tab_3" style="display:none">
			<table class="sub">
				<tr>
					<td width="200"  align="right">页面模板： </td>
					<td>
					<?php echo $select;?>
					</td>
				</tr>			
			</table>
			</div>
			</td>
		</tr>
		<tr>
			<td><input type="button" onfocus="blur();" value="保存页面" class="button" onclick="doSubmit(this);" style="margin-left:160px" /></td>
		</tr>
	</table>
	</form>
	</div>
</div>
</body>
</html>