<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
	if(!$check_admin->roleid_check(7,$_roleid))showmsg_nourl($lang['RETURN_NOPRI']);
?>
<!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><?php echo $lang['LEFT-CATEGORY-13'];?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script language="javascript" src="admin/template/js/css.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		checkForm(0);$('#parentid').val(<?php echo $info['parentid'];?>);$('#template').val('<?php echo $info['setting']['template'];?>');
	});
	function CheckTypeDir(){
	  var upinyin = document.getElementById('upinyin');
	  var tpobj = document.getElementById('filename');
	  if(upinyin.checked) tpobj.style.display = "none";
	  else tpobj.style.display = "";
	}
</script>
<style type="text/css">

</style>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=page&action=manage"><?php echo $lang['LEFT-CATEGORY-5'];?></a></li>
			<li><a href="?file=page&action=add"><?php echo $lang['LEFT-CATEGORY-6'];?></a></li>
			<li><a href="javascript:void(0);" class="on"><?php echo $lang['LEFT-CATEGORY-13'];?></a></li>			
		</ul>
	</div>
	<div class="main">
	<fieldset>
		<legend><?php echo $lang['RETURN_TIPS'];?></legend>
		1：单页名称不能为空； 2：单页目录不能为空。
	</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="info[catid]" value="<?php echo $info['catid'];?>" />
	<input type="hidden" name="info[oldpagedir]" value="<?php echo $info['pagedir'];?>" />
	<input type="hidden" name="info[oldfilename]" value="<?php echo $info['filename'];?>" />
	<table cellspacing="0" class="sub">
		<tr>
			<td width="200" align="right">上级单页：</td>
			<td>
			<select name="info[parentid]" id="parentid">
				<option value="0">作为一级单页</option>
				<?php $options->pageoptions();?>
			</select>
			</td>
		</tr>
		<tr>
			<td width="200" align="right">单页名称：</td>
			<td>
			<input type="text" name="info[pagename]" value="<?php echo $info['pagename'];?>" datatype="limit" min="1" max="60" size="20" />
			</td>
		</tr>
		<tr>
			<td align="right">文件名称：</td>
			<td>
			<span  id="filename"><input type="text" size="16" datatype="max" value="<?php echo $info['filename'];?>" max="30" name="info[filename]" /> <?php echo HTMLEXT;?> </span><input name="cnspell" type="checkbox" id="upinyin" value="1" onClick="CheckTypeDir()" />拼音
			</td>
		</tr>
		<tr>
			<td align="right">存放目录：</td>
			<td>
			<input type="text" size="16" datatype="max" max="30" value="<?php echo $info['pagedir'];?>" name="info[pagedir]" />
			<span>由字母、数字、下划线、斜线/ 组成,为空且为一级单页时表示根目录!</span>
			</td>
		</tr>
		<tr>
			<td width="200" align="right">meta_title：</td>
			<td><input type="text" name="info[setting][meta_title]" value="<?php echo $info['setting']['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[setting][meta_keywords]" value="<?php echo $info['setting']['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[setting][meta_description]" datatype="limit" min="0" max="255" cols="60" rows="5" ><?php echo $info['setting']['meta_description'];?></textarea> 
			</td>
		</tr>
		<tr>
			<td width="200" align="right">作为导航菜单：</td>
			<td>
			<input type="radio"  class="radio" name="info[ismenu]" <?php echo $info['ismenu']?'checked="checked"':'';?> value="1" />启用
			&nbsp;&nbsp;
			<input type="radio"  class="radio" name="info[ismenu]" <?php echo !$info['ismenu']?'checked="checked"':'';?> value="0" />禁用
			<span>仅对一级单页有效!</span>
			</td>
		</tr>
		<tr>
			<td width="200"  align="right">单页模板：</td>
			<td>
			<select name="info[setting][template]" id="template">
				<option value="">选择单页模板</option>
			<?php 
				if($template)foreach($template as $_template)
				{
					if(substr(basename($_template),0,5)=='page_')
					{
						echo '<option value="'.basename($_template,'.html').'">'.basename($_template).'</option>';
					}
				}
			?>
			</select>
			</td>
		</tr>
		<tr>
			<td width="200"  align="right">单页内容：</td>
			<td>
			<?php echo $form->fckeditor('content',$info['content']);?>
			</td>
		</tr>
		<tr class="bg2"><td></td><td><input type="button" class="button" onclick="doSubmit(this);" value="保存操作" /> <input type="button" class="button" onclick="window.location.href='<?php echo ADMIN_FILE;?>?file=page&action=manage'" value="取消返回" /></td></tr>
	</table>
	</form>

	</div>
</div>
</body>
</html>