<?php if (!defined('APP_PATH')) exit;?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/Data/Public/editor/kindeditor-min.js"></script>
<link href="http://127.0.0.5/Data/Public/editor/themes/default/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://127.0.0.5/Data/Public/editor/lang/zh_CN.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet"/>
</head>
<body>
<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li>首页</li>
		<li>栏目管理</li>
		<li>编辑栏目</li>
	</ul>
</div>
<div class="formbody">
	<div id="usual1" class="usual"> 
		<div class="itab">
			<ul> 
				<li class="selected">基本信息</li> 
				<li>模板设置</li>
				<li>栏目图标</li>
				<li>SEO设置</li>
				<li>栏目内容</li>
			</ul>
		</div>
		<iframe id="blank" name="blank"  style="display:none"></iframe>
		<form method="post"  target="blank" action="?r=class-index-save">
		<input type="hidden" name="catid"  value="<?php echo $class['catid'];?>">
		<input type="hidden" name="group_id"  value="<?php echo $class['group_id'];?>">
		<input type="hidden" name="artcount"  value="<?php echo $class['artcount'];?>">
		<table border="0" cellspacing="0" cellpadding="0" class="forminfo">
		<tr><td colspan="2">
		<div class="tabson" style="display:block">
			<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" >
				<tr>
				<td width="120" align="right">上级分类：</td>
				<td>
					<select name="pid" class="selectbox" onchange="changecat(this.value,this.options[this.selectedIndex].attributes['data'].value)">
						<option pid="<?php echo $vo['pid'];?>" value="0" <?php if($vo['catid']==$class['pid']){ ?> selected<?php }?>>一级栏目</option>
						<?php foreach ($list as $vo){?>
						<option data="<?php echo $vo['pid'];?>" value="<?php echo $vo['catid'];?>" <?php if($vo['catid']==$class['pid']){ ?> selected<?php }?>><?php echo $vo['_name'];?></option>
						<?php }?>
					</select>
				</td>
			</tr>
			<tr>
				<td width="120" align="right">内容模型：</td>
				<td>
					<select name="model" class="selectbox">
						<?php foreach ($model as $vo){?>
						<option value="<?php echo $vo['value'];?>"<?php if($vo['value']==$class['model']){ ?> selected<?php }?>><?php echo $vo['model'];?>&nbsp;[<?php echo $vo['value'];?>]</option>
						<?php }?>
					</select>
				</td>
			</tr>
			<tr>
				<td width="120" align="right">栏目主名称：</td><td ><input type="text" name="name" value="<?php echo $class['name'];?>" class="insty" size="35"></td>
			</tr>
			</tr>
				<td width="120" align="right">栏目副名称：</td><td ><input type="text" name="subname" value="<?php echo $class['subname'];?>" class="insty" size="35"></td>
			</tr>
			<tr>
				<td width="120" align="right">排列顺序：</td><td><input type="text" name="sorter" value="<?php echo $class['sorter'];?>" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" maxlength="5" class="insty" size="8"><cite>排序仅能为数字</cite></td>
			<tr>
			<tr>
				<td width="120" align="right">栏目标识：</td><td><input type="text" name="flag" value="<?php if(!empty($class['flag'])){ ?><?php echo $class['flag'];?><?php }?>" maxlength="20" class="insty" size="8" onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9\|]/g,'')" onpaste="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')" oncontextmenu = "value=value.replace(/[^\a-\z\A-\Z0-9\|]/g,'')"><cite>标识仅能为英文或数字，多个标识间请用“|”符号分隔开</cite></td>
			<tr>
			<tr>
				<td width="120" align="right">是否设为导航：</td><td>&nbsp;是&nbsp;<input type="radio" name="ismenu" value="1" <?php if($class['ismenu']==1){ ?> checked<?php }?>>&nbsp;否&nbsp;<input type="radio" name="ismenu" value="0" <?php if($class['ismenu']==0){ ?> checked<?php }?>></td>
			</tr>
			<tr>
				<td width="120" align="right">是否隐藏栏目：</td><td>&nbsp;是&nbsp;<input type="radio" name="status" value="0" <?php if($class['status']==0 && !empty($class['catid'])){ ?> checked<?php }?>>&nbsp;否&nbsp;<input type="radio" name="status" value="1" <?php if($class['status']==1 || empty($class['catid'])){ ?> checked<?php }?>></td>
			</tr>
			<tr>
				<td width="120" align="right">文件保存路径：</td><td ><input type="text" name="savepath" value="<?php echo $class['savepath'];?>"  class="insty" size="30"><cite>留空则程序根据栏目名称自动生成拼音</cite></td>
			</tr>
			<tr>
				<td width="120" align="right">栏目列表选项：</td><td>&nbsp;&nbsp;<input type="radio" id="l1" name="listoption" value="0" <?php if($class['listoption']==0){ ?> checked<?php }?>><label for="l1">链接到默认页</label>&nbsp;&nbsp;<input type="radio" id="l2" name="listoption" value="1" <?php if($class['listoption']==1){ ?> checked<?php }?>><label for="l2">链接到列表第一页</label></td>
			</tr>
			<tr>
				<td width="120" style="margin:0;PADDING:0" align="right">栏目属性：</td><td>
				<table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin:0;padding:0" align="center">
					 <tr>
					   <td width="10" ><input type="radio" id="s1" name="attribute" value="1" <?php if($class['attribute']==1 || empty($class['attribute'])){ ?> checked<?php }?>></td><td><label for="s1">栏目列表（允许在本栏目发布文档）</label></td>
					 <tr>
					 <tr>
					   <td><input type="radio" id="s4" name="attribute" value="4" <?php if($class['attribute']==4){ ?> checked<?php }?>></td><td><label for="s4">主频道封面（只能为顶级栏目，且同模型栏目子允许设置一个）</label></td>
					 <tr>
					  <tr>
					   <td><input type="radio" id="s2" name="attribute" value="2" <?php if($class['attribute']==2){ ?> checked<?php }?>></td><td><label for="s2">子频道封面（栏目本身不允许发布文档）</label></td>
					 <tr>
					  <tr>
					   <td style="border:none"><input type="radio" id="s3" name="attribute" value="3" <?php if($class['attribute']==3){ ?> checked<?php }?>></td><td style="border:none"><label for="s3">外部连接（在"文件保存目录"处填写网址）</label></td>
					 <tr>
				</table>
				</td>
			</tr>
			</table>
		</div>
		<div class="tabson">
		<table border="0" cellspacing="0" cellpadding="0" style="border:none" width="100%" height="100%">
				<tr>
					<td width="120" align="right">模板选项：</td>
					<td>
						<input type="radio" id="t1" name="tplattr" value="1" <?php if($class['tplattr']==1 || empty($class['tplattr'])){ ?> checked<?php }?>>&nbsp;<label for="t1">继承顶级栏目</label>&nbsp;&nbsp;
						<input type="radio" id="t2" name="tplattr" value="2" <?php if($class['tplattr']==2){ ?> checked<?php }?>>&nbsp;<label for="t2">继承上级栏目</label>&nbsp;&nbsp;
						<input type="radio" id="t3" name="tplattr" value="3" <?php if($class['tplattr']==3){ ?> checked<?php }?>>&nbsp;<label for="t3">自定义模板</label>&nbsp;&nbsp;
					</td>
				</tr>
					<tr>
					<td width="120" align="right">封面模板：</td><td ><input type="text" name="channeltpl" value="<?php if (empty($class['channeltpl'])){ ?>article_index.html<?php }else{ ?><?php echo $class['channeltpl'];?><?php }?>"  class="insty" size="40" id="channeltpl"> &nbsp;&nbsp;<input type="button" value=" 浏览 " class="scbtn7" onclick="selecttpl('channeltpl')"></td>
					</tr>
					<tr>
						<td width="120" align="right">列表模板：</td><td ><input type="text" name="listtpl" value="<?php if (empty($class['channeltpl'])){ ?>article_list.html<?php }else{ ?><?php echo $class['listtpl'];?><?php }?>" class="insty" size="40" id="listtpl"> &nbsp;&nbsp;<input type="button" value=" 浏览 " class="scbtn7" onclick="selecttpl('listtpl')"></td>
					</tr>
					<tr>
						<td width="120" align="right">内容模板：</td><td ><input type="text" name="contenttpl" value="<?php if (empty($class['channeltpl'])){ ?>article_content.html<?php }else{ ?><?php echo $class['contenttpl'];?><?php }?>"  class="insty" size="40" id="contenttpl"> &nbsp;&nbsp;<input type="button" value=" 浏览 " class="scbtn7" onclick="selecttpl('contenttpl')"></td>
					</tr>
					<tr>
					<td width="120" align="right">列表命名规则：</td><td>
					<div class="selectlist">
					  <input id="catroute" name="catroute" <?php if (empty($class['catroute'])){ ?>value="{cpath}"<?php }else{ ?>value="<?php echo $class['catroute'];?>"<?php }?> class="caninsty insty" size="35">
					  <select class="noselect" onchange="document.getElementById('catroute').value=this.options[this.selectedIndex].value" >
							<option value="{cid}">{cid}</option>
							<option value="{cpath}">{cpath}</option>
							<option value="{cpath}/{cid}">{cpath}/{cid}</option>
							<option value="{cid}.html">{cid}.html</option>
							<option value="{cpath}.html">{cpath}.html</option>
							<option value="{cpath}/{cid}.html">{cpath}/{cid}.html</option>
					  </select>
					</div>
					
					</td>
					</tr>
					<tr>
					<td width="120" align="right">文档命名规则：</td><td>
					<div class="selectlist">
					  <input id="artroute" name="artroute" <?php if (empty($class['artroute'])){ ?>value="{cpath}/{aid}.html"<?php }else{ ?>value="<?php echo $class['artroute'];?>"<?php }?> class="caninsty insty" size="35">
					  <select class="noselect" onchange="document.getElementById('artroute').value=this.options[this.selectedIndex].value"  >
							<option value="{aid}">{aid}</option>
							<option value="{cpath}/{aid}">{cpath}/{aid}</option>
							<option value="{cpath}/{y}/{m}/{d}/{aid}">{cpath}/{y}/{m}/{d}/{aid}</option>
							<option value="{aid}.html">{aid}.html</option>
							<option value="{cpath}/{aid}.html">{cpath}/{aid}.html</option>
							<option value="{cpath}/{y}/{m}/{d}/{aid}.html">{cpath}/{y}/{m}/{d}/{aid}.html</option>
					  </select>
					</div>
					</td>
					</tr>
					<tr>
					<td width="120" align="right"><cite>可用变量：</cite></td><td>&nbsp;&nbsp;栏目路径：{cpath}&nbsp;&nbsp;&nbsp;&nbsp;栏目ID：{cid}&nbsp;&nbsp;&nbsp;&nbsp;文档ID：{aid}&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;年：{y}&nbsp;&nbsp;&nbsp;&nbsp;月：{m}&nbsp;&nbsp;&nbsp;&nbsp; 日：{d}&nbsp;&nbsp;&nbsp;&nbsp; </td>
					</tr>
				</table>
		</div>
		<div class="tabson">
			<table border="0" cellspacing="0" cellpadding="0" style="border:none" width="100%" height="100%">
					<tr>
						<td width="120" align="right">栏目图标：</td><td style="padding:2px 0" align="left">
						<table border="0" cellspacing="0" cellpadding="0" width="90%" align="left" height="100%"  style="margin:5px 0">
						<tr>
							<td width="480" style="border:none;" align="left">
							<input type="text" name="ico" id="ico"  class="insty" size="40" value="<?php echo $class['ico'];?>" >&nbsp;&nbsp;
							<input type="button" class="scbtn7"  plugin="image" name="ico" view="true" value="选择图片" />
							</td>
							<td style="border:none;padding:2px;text-align:left">
							<img id="ico_view" src="<?php if($class['ico']!=''){ ?><?php echo $class['ico'];?><?php }else{ ?>http://127.0.0.5/Magic/Data/Public/images/pview.gif<?php }?>" onload="if(this.width>120){this.width=120;};if(this.height>120){this.height=120;}">
							</td>
						</tr>
						</table>
						</td>
					</tr>
					<tr>
					<td width="120" align="right">栏目副图标：</td><td style="padding:2px 0" align="left">
					<table border="0" cellspacing="0" cellpadding="0" width="90%" align="left" style="margin:5px 0">
						<tr>
							<td width="480" style="border:none;" align="left">
							<input type="text" name="subico" id="subico" class="insty" size="40" value="<?php echo $class['subico'];?>" >&nbsp;&nbsp;
							<input type="button" plugin="image" view="true" name="subico" value="选择图片" class="scbtn7"/>
							</td>
							<td style="padding:2px;text-align:left;border:none;" ><img src="<?php if( $class['subico']!=''){ ?><?php echo $class['subico'];?><?php }else{ ?>http://127.0.0.5/Magic/Data/Public/images/pview.gif<?php }?>" id="subico_view"  onload="if(this.width>120){this.width=120;};if(this.height>120){this.height=120;}"></td>
						</tr>
					</table>
					</td>
				</tr>
				</table>			
		</div>
		
		<div class="tabson">
			<table border="0" cellspacing="0" cellpadding="0" style="border:none" width="100%" height="100%">
				
					<tr>
						<td width="120" align="right">栏目标题：</td><td><input type="text" name="seotitle" value="<?php echo $class['seotitle'];?>" class="insty" size="45"><cite>建议标题中放3-5个关键词优化即可，将核心关键字放在开头，关键词之间使用“|”分隔开</cite></td>
					</tr>
					<tr>
						<td width="120" align="right">栏目关键字：</td><td><textarea class="textinput" name="keywords" rows="3" cols="60"><?php echo $class['keywords'];?></textarea><cite>关键词要与网站有相关性</cite><br><cite>选择搜索指数、竞争度较小的词</cite><br><cite>关键词范围不要太广泛</cite></td>
					</tr>
					<tr>
						<td width="120" align="right">栏目描述：</td><td><textarea class="textinput" name="description" rows="5" cols="60"><?php echo $class['description'];?></textarea><cite>建议不超过200个字符</cite><br><cite>描述内容应与正文内容相关</cite><br><cite>建议网站描述中出现长尾关键词</cite><br><cite>切记不可过分的使用关键词，造成关键词堆砌</cite></td>
					</tr>
				</table>			
		</div>
		<div class="tabson">
			<table border="0" cellspacing="0" cellpadding="0" width="100%" class="nobor">
				<tr>
					<td width="100%" height="45" align="left"><cite>说明：栏目内容是替代原来栏目单独页的更灵活的一种方式，通常用于企业简介之类的用途。在栏目模板中用&#123$fields.concent&#125或者使用&#123mac:field name='content'/&#125全局调用标签</cite><br></td>
				</tr>
				<tr>
					<td height="410"><textarea name="content" plugin="editor" style="height:450px;visibility:hidden;width: 100%;"><?php echo $class['content'];?></textarea></td>
				</tr>
			</table>
		</div>
		</form>
		<tr>
		<td width="100" height="40" align="right"></td><td><input type="submit" class="scbtn1" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="scbtn4"></td>
	</tr>
	</table>
	</div>
</div>
</body>
</html>