<?
$C_126cmsadmin_tname = 'sort_config';

include(dirname(__FILE__)."/global.php");


include("../../include/pinyin.php");

$article_auto_config_filename="../../data/article_auto_config.php"; //文章自动更新设置文件


@$job = $submitted_vars["job"];

if($job == "modify"){
  $postdb = $_POST['postdb'];
  
  //计算当前分类为几级分类
  $class = GetClass($postdb['parentId'],'w6_sort');
  
  //exit($class);
  
  $query="UPDATE `w6_sort` 
          SET `mid`='".$postdb['mid']."' , `name`='".$postdb['name']."' , `parentId`='".$postdb['parentId']."' , `class`='".$class."' , `type`='".$postdb['type']."' , `SpecialSql`='".addslashes($postdb['SpecialSql'])."' , `tpl_head`='".$postdb['tpl_head']."' , `tpl_foot`='".$postdb['tpl_foot']."' , `tpl_list`='".$postdb['tpl_list']."'  , `tpl_show_head`='".$postdb['tpl_show_head']."'  , `tpl_show_foot`='".$postdb['tpl_show_foot']."'  , `tpl_show`='".$postdb['tpl_show']."'  , `tpl_adv_set`='".$postdb['tpl_adv_set']."' , `tpl_adv_swap`='".$postdb['tpl_adv_swap']."' , `tpl_adv_swap2`='".$postdb['tpl_adv_swap2']."' , `tpl_adv_css`='".$postdb['tpl_adv_css']."' , `tpl_adv_css2`='".$postdb['tpl_adv_css2']."' , `list_html`='".$postdb['list_html']."' , `spe_htmlname_set`='".$postdb['spe_htmlname_set']."' , `spe_htmlname`='".$postdb['spe_htmlname']."' , `passwd`='".$postdb['passwd']."' , `color`='".$postdb['color']."' , `hide`='".$postdb['hide']."' , `maxperpage`='".$postdb['maxperpage']."' , `list`='".$postdb['list']."' , `open_sort_config`='".$postdb['open_sort_config']."' , `open_sort_fid`='".$postdb['open_sort_fid']."' , `open_sort_num`='".$postdb['open_sort_num']."' , `logo`='".$postdb['logo']."' , `titlekeywords`='".$postdb['titlekeywords']."' , `metakeywords`='".$postdb['metakeywords']."' , `metadescription`='".$postdb['metadescription']."' , `htmldescription`='".$postdb['htmldescription']."' , `s_bz_1`='".$postdb['s_bz_1']."' , `s_bz_2`='".$postdb['s_bz_2']."' , `s_bz_3`='".$postdb['s_bz_3']."' , `s_bz_4`='".$postdb['s_bz_4']."' , `s_bz_5`='".$postdb['s_bz_5']."' , `s_bz_1_sm`='".$postdb['s_bz_1_sm']."' , `s_bz_2_sm`='".$postdb['s_bz_2_sm']."' , `s_bz_3_sm`='".$postdb['s_bz_3_sm']."' , `s_bz_4_sm`='".$postdb['s_bz_4_sm']."' , `s_bz_5_sm`='".$postdb['s_bz_5_sm']."'
		  WHERE `id`=".$postdb['id']; 
		  
  $result = mysql_query($query) or die(mysql_error());
  if ($result)
     {
       $showmsg = "栏目修改成功！";
	   $formurl = "sort_modify.php?id=".$postdb['id'];
     }
  else
     {
       $showmsg = "栏目修改失败！";
	   $formurl = "sort_modify.php?id=".$postdb['id'];
     }
	 
	//开始修改文章自动更新设置
	
	$e = file ($article_auto_config_filename);
	$article_auto = unserialize($e['0']);
	
	$article_auto[$postdb['id']]['article_auto_config'] = $postdb['article_auto_config'];
	$article_auto[$postdb['id']]['article_auto_num'] = $postdb['article_auto_num'];
	
	$_article_auto=serialize($article_auto);
	
	$query    =   updatetofile("$article_auto_config_filename","$_article_auto");
	 
  include('showmsg.php');
  exit;
  
}

//从数据库中读出 产品的内容

$id          =  $submitted_vars["id"];

$query       =  "SELECT * FROM `w6_sort` WHERE `id` = '$id'";
$result      =  mysql_query($query);

$postdb['mid']        =  stripslashes(mysql_result($result,"0","mid"));
$postdb['name']        =  stripslashes(mysql_result($result,"0","name"));
$postdb['parentId']        =  stripslashes(mysql_result($result,"0","parentId"));
$postdb['type']        =  stripslashes(mysql_result($result,"0","type"));
$postdb['SpecialSql']        =  stripslashes(mysql_result($result,"0","SpecialSql"));
$postdb['tpl_head']        =  stripslashes(mysql_result($result,"0","tpl_head"));
$postdb['tpl_foot']        =  stripslashes(mysql_result($result,"0","tpl_foot"));
$postdb['tpl_list']        =  stripslashes(mysql_result($result,"0","tpl_list"));
$postdb['tpl_show_head']        =  stripslashes(mysql_result($result,"0","tpl_show_head"));
$postdb['tpl_show_foot']        =  stripslashes(mysql_result($result,"0","tpl_show_foot"));
$postdb['tpl_show']        =  stripslashes(mysql_result($result,"0","tpl_show"));
$postdb['tpl_adv_set']        =  stripslashes(mysql_result($result,"0","tpl_adv_set"));
$postdb['tpl_adv_swap']        =  stripslashes(mysql_result($result,"0","tpl_adv_swap"));
$postdb['tpl_adv_swap2']        =  stripslashes(mysql_result($result,"0","tpl_adv_swap2"));
$postdb['tpl_adv_css']        =  stripslashes(mysql_result($result,"0","tpl_adv_css"));
$postdb['tpl_adv_css2']        =  stripslashes(mysql_result($result,"0","tpl_adv_css2"));
$postdb['list_html']        =  stripslashes(mysql_result($result,"0","list_html"));
$postdb['spe_htmlname_set']        =  stripslashes(mysql_result($result,"0","spe_htmlname_set"));
$postdb['spe_htmlname']        =  stripslashes(mysql_result($result,"0","spe_htmlname"));
$postdb['passwd']        =  stripslashes(mysql_result($result,"0","passwd"));
$postdb['color']        =  stripslashes(mysql_result($result,"0","color"));
$postdb['hide']        =  stripslashes(mysql_result($result,"0","hide"));
$postdb['maxperpage']        =  stripslashes(mysql_result($result,"0","maxperpage"));
$postdb['list']        =  stripslashes(mysql_result($result,"0","list"));
$postdb['logo']        =  stripslashes(mysql_result($result,"0","logo"));
$postdb['open_sort_config']        =  stripslashes(mysql_result($result,"0","open_sort_config"));
$postdb['open_sort_fid']        =  stripslashes(mysql_result($result,"0","open_sort_fid"));
$postdb['open_sort_num']        =  stripslashes(mysql_result($result,"0","open_sort_num"));
$postdb['titlekeywords']        =  stripslashes(mysql_result($result,"0","titlekeywords"));
$postdb['metakeywords']        =  stripslashes(mysql_result($result,"0","metakeywords"));
$postdb['metadescription']        =  stripslashes(mysql_result($result,"0","metadescription"));
$postdb['htmldescription']        =  stripslashes(mysql_result($result,"0","htmldescription"));
$postdb['s_bz_1']        =  stripslashes(mysql_result($result,"0","s_bz_1"));
$postdb['s_bz_2']        =  stripslashes(mysql_result($result,"0","s_bz_2"));
$postdb['s_bz_3']        =  stripslashes(mysql_result($result,"0","s_bz_3"));
$postdb['s_bz_4']        =  stripslashes(mysql_result($result,"0","s_bz_4"));
$postdb['s_bz_5']        =  stripslashes(mysql_result($result,"0","s_bz_5"));
$postdb['s_bz_1_sm']        =  stripslashes(mysql_result($result,"0","s_bz_1_sm"));
$postdb['s_bz_2_sm']        =  stripslashes(mysql_result($result,"0","s_bz_2_sm"));
$postdb['s_bz_3_sm']        =  stripslashes(mysql_result($result,"0","s_bz_3_sm"));
$postdb['s_bz_4_sm']        =  stripslashes(mysql_result($result,"0","s_bz_4_sm"));
$postdb['s_bz_5_sm']        =  stripslashes(mysql_result($result,"0","s_bz_5_sm"));


//目录静态文件名处理
$htmldirname=change2pinyin($postdb['name'],1);



	$e = file ($article_auto_config_filename);
	$auto_array = unserialize($e['0']);
	
	$article_auto_config = $auto_array[$id][article_auto_config];
	$article_auto_num = $auto_array[$id][article_auto_num];


?><!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>后台管理</title>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
	text-decoration: none;
	color: #000000;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
-->
</style>

<script type="text/javascript" src="<?=$webdb[www_url]?>/126cmsjs/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="<?=$webdb[www_url]?>/webeditor/xheditor/xheditor-1.1.13-zh-cn.min.js"></script>
<script type="text/javascript">
$(pageInit);
function pageInit()
{
	$.extend(xheditor.settings,{shortcuts:{'ctrl+enter':submitForm}});
	$('#htmldescription').xheditor({upImgUrl:"<?=$webdb[www_url]?>/webeditor/xheditor/upload.php?immediate=1",upImgExt:"jpg,jpeg,gif,png"});
}
function insertUpload(arrMsg)
{
	var i,msg;
	for(i=0;i<arrMsg.length;i++)
	{
		msg=arrMsg[i];
		$("#uploadList").append('<option value="'+msg.id+'">'+msg.localname+'</option>');
	}
}
function submitForm(){$('#rgfrm').submit();}
</script>

<SCRIPT LANGUAGE="JavaScript">
<!--
function get_obj(obj){
   return document.getElementById(obj);
}
//-->
</SCRIPT>
</head>

<body>
<div align="center" class="font12">
  <table width="100%"  border="0" cellpadding="3" cellspacing="1" bgcolor="#A4B6D7">
    <tr>
      <td width="100%" height="22" align="center" background="images/titlebg.jpg">&nbsp;</td>
    </tr>
  </table>
  <br />
  <table width="100%" height="25" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
      <td align="left" bgcolor="#FFFFFF">[<a 
      href="sort.php" class="a_bt">栏目管理</a>] 
      [<a 
      href="sort_add.php" class="a_bt">创建栏目</a>] </td>
    </tr>
  </table>
  <br />
  <br />
  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
    <tr>
      <td height="22" align="left" class="head">菜单管理</td>
    </tr>
    <tr>
      <td height="24" align="left">
	  <form id="rgfrm" name="form" method="post" action="">
	  <table width="99%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table2">
        <tr>
          <td width="21%" height="28" bgcolor="#FFFFFF">菜单名称 </td>
          <td width="79%" bgcolor="#FFFFFF"><input name="postdb[name]" value="<?=$postdb['name']?>" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">所属分类</td>
          <td bgcolor="#FFFFFF"><select name="postdb[parentId]" id="postdb[parentId]">
              <option value="0">根分类</option>
              <?
		  formListSort("w6_sort",$postdb['parentId'] ,1);
		  ?>
          </select></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">本栏目归属于哪个模型</td>
          <td bgcolor="#FFFFFF"><select name='postdb[mid]' >
              <?
		  $sql="select * from `w6_module`";
          $result=mysql_query($sql);
          while($row=mysql_fetch_array($result)){
		  
		  echo "<option value='".$row['module_id']."'";
		  if( $postdb['mid'] == $row['module_id'] ) echo " selected='selected'";
		  echo ">".$row['module_name']."</option>
		  ";
		  
		  }
		  
		  ?>
            </select>          </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">栏目密码(可以设置栏目访问密码)</td>
          <td bgcolor="#FFFFFF"><input name="postdb[passwd]" value="<?=$postdb['passwd']?>" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">字体颜色<SCRIPT>
function foreColor_font(obj)
{
  var arr = showModalDialog('images/selcolor.htm', '', 'dialogWidth:18.5em; dialogHeight:17.5em; status:0');
  if (arr != null) { obj.value=arr;obj.style.color=arr;}
  else  obj.focus();
  
}
</SCRIPT></td>
          <td bgcolor="#FFFFFF"><input style="color:<? if($postdb['color']) echo $postdb['color'];?>;" name="postdb[color]" onclick="foreColor_font(this);" value="<?=$postdb['color']?>" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">隐藏/显示</td>
          <td bgcolor="#FFFFFF"><input type="radio" value="0" name="postdb[hide]" <? if($postdb['hide'] == '0'){ echo 'checked="checked"';}?>/>
显示
  <input type="radio" value="1" name="postdb[hide]" <? if($postdb['hide'] == '1'){ echo 'checked="checked"';}?>/>
隐藏</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">排序值</td>
          <td bgcolor="#FFFFFF"><input name="postdb[list]" value="<?=$postdb['list']?>" size="5" maxlength="4" />
(数字) </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">列表页每页显示多少条内容:</td>
          <td bgcolor="#FFFFFF"><input size="5" value="<?=$postdb['maxperpage']?>" name="postdb[maxperpage]" />
条 (留空则以默认为标准)</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">设置为大分类/小栏目/单篇文章</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="postdb[type]" value="1" <? if($postdb['type'] == '1'){ echo 'checked="checked"';}?> onclick="SpecialSet('0')">
        大分类(不可发内容) 
        <input type="radio" name="postdb[type]" value="0" <? if($postdb['type'] == '0'){ echo 'checked="checked"';}?> onclick="SpecialSet('0')">
        小栏目
        <input type="radio" name="postdb[type]" value="3" <? if($postdb['type'] == '3'){ echo 'checked="checked"';}?> onclick="SpecialSet('1')">
        专题
        <input type="radio" name="postdb[type]" value="2" <? if($postdb['type'] == '2'){ echo 'checked="checked"';}?> onclick="SpecialSet('0')">
        单篇文章(一个栏目即一篇文章，适合于作公司联系方式，公司介绍等)</td>
        </tr>
        <tr  id="SpecialSql_div">
          <td height="28" bgcolor="#FFFFFF">专题栏目sql语句:</td>
          <td bgcolor="#FFFFFF"><textarea name="postdb[SpecialSql]" cols="84" rows="5"><?=$postdb['SpecialSql']?></textarea>
            <br />
            当选择专题时在此输入sql语句，sql1与sql2之前用 [||] 隔开，如：<br />
            SELECT * FROM `w6_module_content_45` WHERE `shows` = '1' AND (`title` LIKE '%$fname%' || `news_keywords` LIKE '%$fname%')[||]SELECT * FROM `w6_module_content_45` WHERE 1 AND (`title` LIKE '%$fname%' || `news_keywords` LIKE '%$fname%') AND `shows` = '1' ORDER BY `count` DESC  LIMIT {=star_page=} , $article_page_size;<br />
            sql1 用于取得数据总数，sql2 用于取得具体数据
			
			<SCRIPT LANGUAGE="JavaScript">
<!--
function SpecialSet(t){
	if(t=='0'||t==''){
		document.getElementById("SpecialSql_div").style.display='none';
	}
	else{
		document.getElementById("SpecialSql_div").style.display='';
		v=document.getElementById("postdb[SpecialSql]").value;
		if(v==''||v=='0'){
			document.getElementById("postdb[SpecialSql]").value='SELECT * FROM `w6_module_content_45` WHERE `shows` = \'1\' AND (`title` LIKE \'%$fname%\' || `news_keywords` LIKE \'%$fname%\')[||]SELECT * FROM `w6_module_content_45` WHERE 1 AND (`title` LIKE \'%$fname%\' || `news_keywords` LIKE \'%$fname%\') AND `shows` = \'1\' ORDER BY `count` DESC  LIMIT {=star_page=} , $article_page_size;';
		}
	}
}
SpecialSet('<? if($postdb['type']=='3') echo '1'; else echo '';?>');
//-->
</SCRIPT>

			{=star_page=} 为搜索数据库开始记录数 </td>
        </tr>
        <tr>
          <td height="13" bgcolor="#FFFFFF">栏目模板:<br />
            (一般留空,即以默认为标准) </td>
          <td bgcolor="#FFFFFF"> 头部模板: 
              <input type="text" name="postdb[tpl_head]" value="<?=$postdb['tpl_head']?>" id="tpl_head" size="40">
              <select onChange='get_obj("tpl_head").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/none.htm' >头部白板</option> </select><br>
              底部模板: 
              <input type="text" name="postdb[tpl_foot]" value="<?=$postdb['tpl_foot']?>" id="tpl_foot" size="40">
              <select onChange='get_obj("tpl_foot").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/none.htm' >底部白板</option> </select><br>
              列表模板: 
              <input type="text" name="postdb[tpl_list]" value="<?=$postdb['tpl_list']?>" id="tpl_list" size="40">
              <select onChange='get_obj("tpl_list").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/list.htm' >文章列表页(左宽右窄)</option> </select><!--[<A HREF='#' onclick="window.open('#','','width=650,height=500')" style='color:blue;'>上传一个新模板</A>]//--></td>
        </tr>
        <tr>
          <td height="14" bgcolor="#FFFFFF">内容页模板<br />
            (一般留空,即以默认为标准)</td>
          <td bgcolor="#FFFFFF">头部模板: 
              <input type="text" name="postdb[tpl_show_head]" value="<?=$postdb['tpl_show_head']?>" id="tpl_show_head" size="40">
              <select onChange='get_obj("tpl_show_head").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/none.htm' >头部白板</option> </select><br>
              底部模板: 
              <input type="text" name="postdb[tpl_show_foot]" value="<?=$postdb['tpl_show_foot']?>" id="tpl_show_foot" size="40">
              <select onChange='get_obj("tpl_show_foot").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/none.htm' >底部白板</option> </select><br>
              列表模板: 
              <input type="text" name="postdb[tpl_show]" value="<?=$postdb['tpl_show']?>" id="tpl_show" size="40">
              <select onChange='get_obj("tpl_show").value=this.options[this.selectedIndex].value;' name='' ><option value='' style='color:red;'>请选择模板</option>  <option value='tpl/126cms/list.htm' >文章列表页(左宽右窄)</option> </select><!--[<A HREF='#' onclick="window.open('#','','width=650,height=500')" style='color:blue;'>上传一个新模板</A>]//--><br /><br />
              高级功能:
              <input type="radio" name="postdb[tpl_adv_set]" value="1" <? if($postdb['tpl_adv_set'] == '1'){ echo 'checked="checked"';}?> />
开启
<input name="postdb[tpl_adv_set]" type="radio" value="0" <? if($postdb['tpl_adv_set'] == '0'){ echo 'checked="checked"';}?> />
关闭 （只替换内容页模板） <br />
              模板内容替换:
              <input name="postdb[tpl_adv_swap]" type="text" id="postdb[tpl_adv_swap]" value="<?=$postdb['tpl_adv_swap']?>" size="20" />
              替换成
              <input name="postdb[tpl_adv_swap2]" type="text" id="postdb[tpl_adv_swap2]" value="<?=$postdb['tpl_adv_swap2']?>" size="20" />
              <br />
              复制文件名:
              <input name="postdb[tpl_adv_css]" type="text" id="postdb[tpl_adv_css]" value="<?=$postdb['tpl_adv_css']?>" size="20" />
              改名为
              <input name="postdb[tpl_adv_css2]" type="text" id="postdb[tpl_adv_css2]" value="<?=$postdb['tpl_adv_css2']?>" size="20" />
              可以将指定文件复制到和生成的文件相同的目录下</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">静态网页表现形式:</td>
          <td bgcolor="#FFFFFF"><p><br />
            列表页:
            <input name="postdb[list_html]" id="list_html" value="<?=$postdb['list_html']?>" size="50" />
                <br />
            <p>选择样式: [<a href="javascript:choose_html(1);">最佳</a>] [<a href="javascript:choose_html(2);">个性1</a>] [<a href="javascript:choose_html(3);">个性2</a>] <!--[<a href="javascript:choose_html(4);">个性3</a>]//--> [<a href="javascript:choose_html(5);">个性3</a>]<SCRIPT LANGUAGE="JavaScript">
<!--
function choose_html(t){
	if(t==1){
		var list="html/{$fid}/{$page}.html";
		var show="html/{$fid}-{$dirid}/{$id}-{$page}.html";
	}else if(t==2){
		var list="<?=$htmldirname?>/{$page}.html";
		var show="<?=$htmldirname?>/{$id}-{$page}.html";
	}else if(t==3){
		var list="{$fid}/list-{$page}.html";
		var show="{$fid}-{$dirid}/show-{$id}-{$page}.html";
	}else if(t==4){
		var list="<?=$htmldirname?>/{$page}.html";
		var show="<?=$htmldirname?>/{$time_Y}{$time_m}{$time_d}/{$id}-{$page}.html";
	}else if(t==5){
		var list="<?=$htmldirname?>/list-{$page}.html";
		var show="<?=$htmldirname?>/show-{$time_Y}{$time_W}/{$time_Y}{$time_m}{$time_d}{$time_H}{$time_i}{$time_s}-{$page}.html";
	}
	if(document.getElementById("bencandy_html")!=null)document.getElementById("bencandy_html").value=show;
	
	document.getElementById("list_html").value=list;
}
//-->
</SCRIPT>
              <br />
              <br />
            {$page} 特殊样式开启:
            
            <input name="postdb[spe_htmlname_set]" type="checkbox" id="postdb[spe_htmlname_set]" value="1" <? if($postdb['spe_htmlname_set'] == '1'){ echo 'checked="checked"';}?> />
            开启，以
            <input name="postdb[spe_htmlname]" type="text" id="postdb[spe_htmlname]" value="<?=$postdb['spe_htmlname']?>" size="8" />
            字段内容作为文件名（默认为关闭，即为文章ID号的呈现样式）
            <br />
            列表页链接样式选择:</p>
注意:内容页的{$id}如果去除的话,必须把日期的时分秒都补上,不然的话,会有文件雷同<br />
自己修改样式注意的是,不能为汉字,确保内容页文件不能雷同,确保一个目录文件不能大于3000个</td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">栏目文章自动更新设置:</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="postdb[article_auto_config]" value="Y" <? if($article_auto_config=='Y') echo 'checked';?> onclick="article_auto('1')">
          开启文章自动更新
            <input type="radio" name="postdb[article_auto_config]" value="N" <? if($article_auto_config=='N') echo 'checked';?> onclick="article_auto('0')">
            关闭文章自动更新<span id="article_autodiv"><br>
          每日自动更新文章数量设置: 
          <input  id="article_auto_num"  type='text' size='10' value='<?=$article_auto_num?>' name='postdb[article_auto_num]'>
          默认为每日更新文章数<br />
		  <font color="#999999">（自动更新文章是将本栏目的未审核文章自动选取一篇文章重新发表并审核，会将原来的文章删除）</font>
         <br>
        </span> 
        <SCRIPT LANGUAGE="JavaScript">
<!--
function article_auto(t){
	if(t=='0'||t==''){
		document.getElementById("article_autodiv").style.display='none';
	}
	else{
		document.getElementById("article_autodiv").style.display='';
		v=document.getElementById("article_auto_num").value;
		if(v==''||v=='0'){
			document.getElementById("article_auto_num").value='5';
		}
	}
}
article_auto('<? if($article_auto_config=='N') echo '0'; else echo $article_auto_config;?>');
//-->
</SCRIPT></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">前台开启小栏目分页显示功能:</td>
          <td bgcolor="#FFFFFF"><input type="radio" name="postdb[open_sort_config]" value="Y" <? if($postdb['open_sort_config']=='Y') echo 'checked';?> onclick="open_sort('1')">
          开启
            <input type="radio" name="postdb[open_sort_config]" value="N" <? if($postdb['open_sort_config']=='N') echo 'checked';?> onclick="open_sort('0')">
            关闭<span id="open_sortdiv"><br>
          要显示的大栏目FID：
          <input  id="open_sort_fid"  type='text' size='6' value='<?=$postdb['open_sort_fid']?>' name='postdb[open_sort_fid]'>
          每页显示数: 
          <input  id="open_sort_num"  type='text' size='6' value='<?=$postdb['open_sort_num']?>' name='postdb[open_sort_num]'>
          默认每页显示数<br>
        </span> 
        <SCRIPT LANGUAGE="JavaScript">
<!--
function open_sort(t){
	if(t=='0'||t==''){
		document.getElementById("open_sortdiv").style.display='none';
	}
	else{
		document.getElementById("open_sortdiv").style.display='';
		v=document.getElementById("open_sort_num").value;
		if(v==''||v=='0'){
			document.getElementById("open_sort_num").value='12';
		}
	}
}
open_sort('<? if($postdb['open_sort_config']=='N') echo '0'; else echo $postdb['open_sort_config'];?>');
//-->
</SCRIPT></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">栏目LOGO装饰图片:</td>
          <td bgcolor="#FFFFFF"><input name="postdb[logo]" id="sortlogo" value="<?=$postdb['logo']?>" size="50" />
            <a onclick="window.open('upfile.php?dir=sortlogo&amp;label=sortlogo','','width=350,height=50,top=200,left=400')" href="javascript:"><font color="#0000FF">点击上传图片</font></a><SCRIPT LANGUAGE="JavaScript">
<!--
function upfile(url,name,size,p){
	document.getElementById(p).value=url;
}
//-->
</SCRIPT>            </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">SEO - title - 关键字:</td>
          <td bgcolor="#FFFFFF"><input name="postdb[titlekeywords]" value="<?=$postdb['titlekeywords']?>" size="60" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">SEO关键字(多个关键字请用,分开):</td>
          <td bgcolor="#FFFFFF"><input name="postdb[metakeywords]" value="<?=$postdb['metakeywords']?>" size="60" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">SEO栏目描述:</td>
          <td bgcolor="#FFFFFF">
		  
<SCRIPT LANGUAGE="JavaScript">
    <!--//
    function textCounter(field, countfield, maxlimit) {
    // 函数，3个参数，表单名字，表单域元素名，限制字符；
    if (field.value.length > maxlimit)
    //如果元素区字符数大于最大字符数，按照最大字符数截断；
    field.value = field.value.substring(0, maxlimit);
    else
    //在记数区文本框内显示剩余的字符数；
    countfield.value = maxlimit - field.value.length;
    }
    //-->
    </SCRIPT>
			  
		  <textarea name="postdb[metadescription]" id="postdb_metadescription" cols="50" rows="4" onKeyDown="textCounter(this.form.postdb_metadescription,this.form.remLen,85);" onKeyUp="textCounter(this.form.postdb_metadescription,this.form.remLen,85);"><?=$postdb['metadescription']?></textarea>
		  
		  您还可以输入:<input name="remLen" type="text" value="85" size="5" readonly="readonly">个字符
		  
		  </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">栏目介绍:</td>
          <td bgcolor="#FFFFFF"><textarea id="htmldescription" name="postdb[htmldescription]" cols="84" rows="7"><?=$postdb['htmldescription']?></textarea>
            </td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">备注1：</td>
          <td bgcolor="#FFFFFF"><input name="postdb[s_bz_1]]" type="text" id="s_bz_1" value="<?=$postdb['s_bz_1']?>" size="44" />
            说明：
              <input name="postdb[s_bz_1_sm]" type="text" id="s_bz_1_sm" value="<?=$postdb['s_bz_1_sm']?>" size="36" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">备注2：</td>
          <td bgcolor="#FFFFFF"><input name="postdb[s_bz_2]" type="text" id="s_bz_2" value="<?=$postdb['s_bz_2']?>" size="44" />
说明：
  <input name="postdb[s_bz_2_sm]" type="text" id="s_bz_2_sm" value="<?=$postdb['s_bz_2_sm']?>" size="36" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">备注3：</td>
          <td bgcolor="#FFFFFF"><input name="postdb[s_bz_3]" type="text" id="s_bz_3" value="<?=$postdb['s_bz_3']?>" size="44" />
说明：
  <input name="postdb[s_bz_3_sm]" type="text" id="s_bz_3_sm" value="<?=$postdb['s_bz_3_sm']?>" size="36" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">备注4：</td>
          <td bgcolor="#FFFFFF"><input name="postdb[s_bz_4]" type="text" id="s_bz_4" value="<?=$postdb['s_bz_4']?>" size="44" />
说明：
  <input name="postdb[s_bz_4_sm]" type="text" id="s_bz_4_sm" value="<?=$postdb['s_bz_4_sm']?>" size="36" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">备注5：</td>
          <td bgcolor="#FFFFFF"><input name="postdb[s_bz_5]" type="text" id="s_bz_5" value="<?=$postdb['s_bz_5']?>" size="44" />
说明：
  <input name="postdb[s_bz_5_sm]" type="text" id="s_bz_5_sm" value="<?=$postdb['s_bz_5_sm']?>" size="36" /></td>
        </tr>
        <tr>
          <td height="28" bgcolor="#FFFFFF">&nbsp;</td>
          <td bgcolor="#FFFFFF"><input type="submit" value="提交" name="Submit" />
            <input name="job" type="hidden" id="job" value="modify" />
            <input name="postdb[id]" type="hidden" id="id" value="<?=$id?>" /></td>
        </tr>
      </table>
        </form>
      </td>
    </tr>
  </table>
  </div>
</body>
</html>
