<?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);});
$(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>
		<li><a href="javascript:void(0);" id="4">模板设置</a></li>
		<li><a href="javascript:void(0);" id="5">权限设置</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" enctype="multipart/form-data">		
	<input type="hidden" name="do_submit" value="1" />
	<input type="hidden" name="info[pagesize]" value="<?php echo $val_r['pagesize'];?>" /> 
		<table width="100%">
		<tr><td>
			
			<div id="tab_1">
			<table class="sub">
				<tr>
					<td width="200" align="right">内容模型：</td>
					<td>
					<?php echo $modelselect;?>
					<a href="?file=model&action=manage" target="_blank"><u>管理模型</u></a>
					</td>
				</tr>
				<tr>
					<td width="200" align="right">栏目名称：</td>
					<td><input type="text" name="info[categoryname]" datatype="limit"  min="2" max="50" value="<?php echo $val_r['categoryname'];?>" size="40" /></td>
				</tr>
				
				<tr>
					<td width="200" align="right">栏目图片：</td>
					<td><input type="file" name="categorylogo" style="border:1px inset;width:350px;height:20px"  /></td>
				</tr>
				<tr>
					<td width="200" align="right">栏目目录：</td>
					<td><input type="text" name="info[categorydir]" value="<?php echo $val_r['categorydir'];?>" datatype="table" /></td>
				</tr>
				<tr>
					<td width="200" align="right">起用栏目：</td>
					<td>
					<input type="radio" class="radio"  name="info[isshow]" value="1"  <?php echo $val_r['isshow']?'checked="checked"':'';?>/>启用
					&nbsp;&nbsp;
					<input type="radio" class="radio"  name="info[isshow]" value="0"  <?php echo !$val_r['isshow']?'checked="checked"':'';?> />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">推荐栏目：</td>
					<td>
					<input type="radio"  class="radio" name="info[istop]" value="1"  <?php echo $val_r['istop']?'checked="checked"':'';?>/>启用
					&nbsp;&nbsp;
					<input type="radio"  class="radio" name="info[istop]" value="0"  <?php echo !$val_r['istop']?'checked="checked"':'';?> />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">启用缩略图：</td>
					<td>
					<input type="radio"  class="radio" name="info[isthumb]" value="1" <?php echo $val_r['isthumb']?'checked="checked"':'';?>/>启用
					&nbsp;&nbsp;
					<input type="radio"  class="radio" name="info[isthumb]" value="0"  <?php echo !$val_r['isthumb']?'checked="checked"':'';?> />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">缩略图高宽： </td>
					<td>
					宽度：<input type="text" name="info[thumb_width]" size="8" datatype="number" value="<?php echo $val_r['thumb_width'];?>" /> 
					&nbsp;&nbsp;
					高度：<input type="text" name="info[thumb_height]" datatype="number" size="8" value="<?php echo $val_r['thumb_height'];?>" />
					</td>
				</tr>
				<tr>
					<td width="200" align="right">绑定二级域名： </td>
					<td>
					<input type="text" name="info[domain]" size="35" value="<?php echo $val_r['domain'];?>" />
					<span>如不绑定请留空，如需绑定请以http://开头</span>
					</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" value="<?php echo $val_r['meta_title'];?>" 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" value="<?php echo $val_r['meta_keywords'];?>" 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" ><?php echo $val_r['meta_description'];?></textarea> 
					</td>
				</tr>
			</table>
			</div>
		
			<div id="tab_3" style="display:none">
			<table class="sub">
				<tr>
					<td width="200" align="right">生成HTML：</td>
					<td>
					<input type="radio" class="radio"  name="info[ishtml]" value="1"  <?php echo $val_r['ishtml']?'checked="checked"':'';?>/>启用
					&nbsp;&nbsp;
					<input type="radio" class="radio"  name="info[ishtml]" value="0"  <?php echo !$val_r['ishtml']?'checked="checked"':'';?> />禁用
					</td>
				</tr>
				<tr>
					<td width="200" align="right">允许生成列表：</td>
					<td>
					<input type="radio" class="radio" name="info[listpage]" value="1"  <?php echo $val_r['listpage']?'checked="checked"':'';?>/>启用
					&nbsp;&nbsp;
					<input type="radio" class="radio" name="info[listpage]"  <?php echo !$val_r['listpage']?'checked="checked"':'';?>/>禁用
					<span>如果启用，则在更新内容时，不论该栏目是否是最终栏目，都会生成分页列表。</span></td>
				</tr>
				<tr>
					<td width="200" align="right">内容页URL规则：</td>
					<td>
					<select name="info[content_html]">
						<option value="content_html_1" <?php echo $val_r['content_html']=='content_html_1'?' selected="selected"':'';?>>栏目名/日期/ID.html</option>
						<option value="content_html_2" <?php echo $val_r['content_html']=='content_html_2'?' selected="selected"':'';?>>HTML/日期/ID.html</option>
						<option value="content_html_3" <?php echo $val_r['content_html']=='content_html_3'?' selected="selected"':'';?>>日期/ID.html</option>
					</select>
					<span>如果修改需要重新生成栏目，内容和模板链接</span></td>
				</tr>
			</table>
			</div>
		
			<div id="tab_4" style="display:none">
			<table class="sub">
				<tr>
					<td width="200"  align="right">有下级栏目页模板： </td>
					<td>
					<?php echo $indextlpselect;?>
					<span>当该栏目有子栏目时使用的模板</span>
					</td>
				</tr>
				<tr>
					<td width="200"  align="right">无下级栏目页模板： </td>
					<td>
					<?php echo $listtlpselect;?>
					<span>当该栏目无子栏目时使用的模板</span>
					</td>
				</tr>
				<tr>
					<td width="200"  align="right">内容页模板：</td>
					<td>
					<?php echo $showtlpselect;?>
					</td>
				</tr>				
			</table>
			</div>
		
			<div id="tab_5" style="display:none">
			<table class="sub">
				<tr>
					<td width="200"  align="right">栏目积分设置： </td>
					<td>
					投稿增加 <input type="text" name="info[presentpoint]" datatype="number" size="6" value="<?php echo $val_r['presentpoint'];?>" /> 积分 					&nbsp;&nbsp;
					浏览扣除 <input type="text" name="info[viewpoint]" datatype="number" size="6" value="<?php echo $val_r['viewpoint'];?>" /> 积分
					</td>
				</tr>
				<tr>
					<td width="200"  align="right">投稿权限配置： </td>
					<td>
					<?php if($membergroup)foreach($membergroup as $_membergroup){?>
					<input type="checkbox" class="checkbox" align="middle" name="info[postpriv][]" value="<?php echo $_membergroup['id'];?>" <?php echo in_array($_membergroup['id'],$val_r['postpriv'])?' checked="checked"':'';?> /><?php echo $_membergroup['groupname'];?>&nbsp;
					<?php }?>
					</td>
				</tr>
				<tr>
					<td width="200"  align="right">投稿审核配置：</td>
					<td>
					<?php if($membergroup)foreach($membergroup as $_membergroup){?>
					<input type="checkbox" class="checkbox" align="middle" name="info[passpriv][]" value="<?php echo $_membergroup['id'];?>" <?php echo in_array($_membergroup['id'],$val_r['passpriv'])?' checked="checked"':'';?> /><?php echo $_membergroup['groupname'];?>&nbsp;
					<?php }?>
					<span>如果选中，投稿无须审核即可通过</span>
					</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>