<?php
require("../class/connect.php");
include("../class/db_sql.php");
include("../class/config.php");
include("../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=getcvar('loginuserid');
$loginin=getcvar('loginusername');
$loginrnd=getcvar('loginrnd');
$loginlevel=getcvar('loginlevel');
is_login($logininid,$loginin,$loginrnd);
//验证权限
CheckLevel($logininid,$loginin,$classid,"class");
$enews=$_GET['enews'];
if($_GET['from'])
{
	$listclasslink="ListPageClass.php";
}
else
{
	$listclasslink="ListClass.php";
}
$url="<a href=".$listclasslink.">栏目管理</a>&nbsp;->&nbsp;增加栏目";
$hiddenclass="";
$zt="";
$b_ok=1;
$hiddenclass="<script>smallclass.style.display='none';</script>";
//初使化数据
$r[listorderf]="id";
$r[listorder]="DESC";
$r[reorderf]="newstime";
$r[reorder]="DESC";
$islast="";
$filename0=" checked";
$filename1="";
$filename2="";
$openpl0=" checked";
$openpl1="";
$openadd0=" checked";
$openadd1="";
$r[classtype]=".html";
$r[filetype]=".html";
$r[newspath]="Y-m-d";
$r[link_num]="10";
$r[lencord]=25;
$read="";
$newshowdate="";
$hotshowdate="";
$goodshowdate="";
$hotplshowdate="";
$firstshowdate="";
$r[newline]=10;
$r[newstrlen]=26;
$r[hotline]=10;
$r[hotstrlen]=26;
$r[goodline]=10;
$r[goodstrlen]=26;
$r[hotplline]=10;
$r[hotplstrlen]=26;
$r[firstline]=10;
$r[firststrlen]=26;
$r[maxnum]=0;
$r[addinfofen]=0;
$r[doctime]=0;
$checked=" checked";
$defaultbclassid=" selected";
$islist="";
$islast="<input name=islast type=checkbox id=islast onclick='small_class(this.checked)' value='1'>是";
//复制栏目
$docopy=$_GET['docopy'];
if($docopy&&$enews=="AddClass")
{
	$copyclass=1;
}
//修改栏目
if($enews=="EditClass"||$copyclass)
{
	if($copyclass)
	{
		$thisdo="复制";
	}
	else
	{
		$thisdo="修改";
	}
	$read="";
	$classid=(int)$_GET['classid'];
	$r=$empire->fetch1("select * from {$dbtbpre}enewsclass where classid='$classid'");
	if(!empty($r[bclassid]))
	{$defaultbclassid="";}
	$url="<a href=".$listclasslink.">管理栏目</a>&nbsp;->&nbsp;".$thisdo."栏目：".$r[classname];
	if($r[islist])
	{$islist=" checked";}
	//修改大栏目
	if(!$r[islast])
	{
		//主栏目
		if(empty($r[bclassid]))
		{
			$b_ok=1;
			$hiddenclass="<script>smallclass.style.display='none';</script>";
			$indextext=htmlspecialchars($r[indextext]);
		}
		//中级栏目
		else
		{
			$b_ok=1;
			$hiddenclass="<script>smallclass.style.display='none';</script>";
			$indextext=htmlspecialchars($r[indextext]);
		}
	}
	//终级栏目
	else
	{
		$hiddenclass="<script>smallbclass.style.display='none';</script>";
		$b_ok=0;
	}
	//终级类别
	if($r[islast])
	{
		$islast="<b>是</b>";
		$islastcheck=" checked";
	}
	else
	{
		$islast="<b>否</b>";
		$islastcheck="";
	}
	$islast.="<input type=hidden name=islast value='".$r[islast]."'>";
	if($r[filename]==1)
	{
		$filename0="";
		$filename1=" checked";
		$filename2="";
	}
	elseif($r[filename]==2)
	{
		$filename0="";
		$filename1="";
		$filename2=" checked";
	}
	else
	{}
	if($r[openpl])
	{
		$openpl0="";
		$openpl1=" checked";
	}
	if($r[checkpl])
	{
		$checkpl=" checked";
	}
	if($r[openadd])
	{
		$openadd0="";
		$openadd1=" checked";
	}
	if($r[newshowdate])
	{$newshowdate=" checked";}
	if($r[hotshowdate])
	{$hotshowdate=" checked";}
	if($r[goodshowdate])
	{$goodshowdate=" checked";}
	if($r[hotplshowdate])
	{$hotplshowdate=" checked";}
	if($r[firstshowdate])
	{$firstshowdate=" checked";}
	//栏目目录
	$mycr=GetPathname($r[classpath]);
	$pripath=$mycr[1];
	$classpath=$mycr[0];
	$read="";
	//复制栏目
	if($copyclass)
	{
		$r[classname].="(1)";
		$classpath.="1";
		$read="";
		$islast="<input name=islast type=checkbox id=islast onclick='small_class(this.checked)' value='1'".$islastcheck.">是";
    }
	if($r[checked])
	{$checked=" checked";}
	else
	{$checked="";}
	if($r[docheckuser])
	{$docheckuser=" checked";}
}
//系统模型
$m_sql=$empire->query("select mid,mname from {$dbtbpre}enewsmod order by mid");
while($m_r=$empire->fetch($m_sql))
{
	if($m_r[mid]==$r[modid])
	{$m_d=" selected";}
	else
	{$m_d="";}
	$mod_options.="<option value=".$m_r[mid].$m_d.">".$m_r[mname]."</option>";
	//列表模板
	$listtemp_options.="<option value=0 style=background-color:99C4E3>".$m_r[mname]."</option>";
	$lt_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewslisttemp")." where modid='$m_r[mid]'");
	while($lt_r=$empire->fetch($lt_sql))
	{
		if($lt_r[tempid]==$r[listtempid])
		{$lt_d=" selected";}
		else
		{$lt_d="";}
		$listtemp_options.="<option value=".$lt_r[tempid].$lt_d."> |-".$lt_r[tempname]."</option>";
	}
	//搜索模板
	$searchtemp.="<option value=0 style=background-color:99C4E3>".$m_r[mname]."</option>";
	$st_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewssearchtemp")." where modid='$m_r[mid]'");
	while($st_r=$empire->fetch($st_sql))
	{
		if($st_r[tempid]==$r[searchtempid])
		{$st_d=" selected";}
		else
		{$st_d="";}
		$searchtemp.="<option value=".$st_r[tempid].$st_d."> |-".$st_r[tempname]."</option>";
	}
	//内容模板
	$newstemp_options.="<option value=0 style=background-color:99C4E3>".$m_r[mname]."</option>";
	$nt_sql=$empire->query("select tempid,tempname from ".GetTemptb("enewsnewstemp")." where modid='$m_r[mid]'");
	while($nt_r=$empire->fetch($nt_sql))
	{
		if($nt_r[tempid]==$r[newstempid])
		{$nt_d=" selected";}
		else
		{$nt_d="";}
		$newstemp_options.="<option value=".$nt_r[tempid].$nt_d."> |-".$nt_r[tempname]."</option>";
	}
}
//栏目
$fcfile="../data/fc/ListEnews.php";
$fcjsfile="../data/fc/cmsclass.js";
if(file_exists($fcjsfile)&&file_exists($fcfile))
{
	$options=GetFcfiletext($fcjsfile);
	$options=str_replace("<option value='$r[bclassid]'","<option value='$r[bclassid]' selected",$options);
}
else
{
	$options=ShowClass_AddClass("",$r[bclassid],0,"|-",0,0);
}
//会员组
//----------会员组
$sql1=$empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while($l_r=$empire->fetch($sql1))
{
	if($r[groupid]==$l_r[groupid])
	{$select=" selected";}
	else
	{$select="";}
	$group.="<option value=".$l_r[groupid].$select.">".$l_r[groupname]."</option>";
	if($r[qaddgroupid]==$l_r[groupid])
	{$qselect=" selected";}
	else
	{$qselect="";}
	$qgroup.="<option value=".$l_r[groupid].$qselect.">".$l_r[groupname]."</option>";
}
//js模板
$jstempsql=$empire->query("select tempid,tempname from ".GetTemptb("enewsjstemp")." order by tempid");
while($jstempr=$empire->fetch($jstempsql))
{
	$select="";
	if($r[jstempid]==$jstempr[tempid])
	{
		$select=" selected";
	}
	$jstemp.="<option value='".$jstempr[tempid]."'".$select.">".$jstempr[tempname]."</option>";
}
//风格
$loginadminstyleid=(int)getcvar('loginadminstyleid');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" type="text/css">
<link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="adminstyle/<?=$loginadminstyleid?>/tab.winclassic.css" disabled="disabled" /> 
<title>管理栏目</title>
<!-- the id is not needed. It is used here to be able to change css file at runtime -->
<style type="text/css"> 
   .dynamic-tab-pane-control .tab-page { 
         height:                100px; 
 } 
  .dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page { 
         height:                150px; 
 } 
  form { 
         margin:        0; 
         padding:        0; 
 } 
  /* over ride styles from webfxlayout */ 
  .dynamic-tab-pane-control h2 { 
         text-align:        center; 
         width:                auto;
		 height:            20; 
 } 
   .dynamic-tab-pane-control h2 a { 
         display:        inline; 
         width:                auto; 
 } 
  .dynamic-tab-pane-control a:hover { 
         background: transparent; 
 } 
  </style>
 <script type="text/javascript" src="../data/images/tabpane.js"></script> <script type="text/javascript"> 
  function setLinkSrc( sStyle ) { 
         document.getElementById( "luna-tab-style-sheet" ).disabled = sStyle != "luna"; 
  
         //document.documentElement.style.background = "";
         //document.body.style.background = sStyle == "webfx" ? "white" : "ThreeDFace"; 
 } 
function chgBg(obj,color){
 if (document.all || document.getElementById)
   obj.style.backgroundColor=color;
 else if (document.layers)
   obj.bgColor=color;
}
  setLinkSrc( "luna" ); 
  </script>
  
<script>
function small_class(mycheck)
{
if(mycheck)
{
smallclass.style.display="";
smallbclass.style.display="none";
}
else
{
smallclass.style.display="none";
smallbclass.style.display="";
}
}

function mybclass()
{
bclass=new Array();
bclass[0]=new Array();
bclass[0][0]='';
<?
//-----------类别js数组
$psql=$empire->query("select classid,classpath from {$dbtbpre}enewsclass order by classid");
$i=0;
while($pr=$empire->fetch($psql))
{
?>
bclass[<?=$pr[classid]?>]=new Array();
bclass[<?=$pr[classid]?>][0]="<?=$pr[classpath]?>/";
<?
}
?>
}
mybclass();

function changeitem(myfrm)
{var SelectedBigId;
SelectedBigId=myfrm.bclassid.options[myfrm.bclassid.selectedIndex].value;
myfrm.pripath.value=bclass[SelectedBigId][0];
myfrm.classpath.focus();
}

//检查
function CheckForm(obj)
{
if(obj.classname.value=="")
{
alert("请输入栏目名称");
return false;
}
if(obj.classpath.value=="")
{
alert("请输入栏目目录");
return false;
}
//终极栏目
if(obj.islast.checked)
{
	if(obj.modid.value==0||obj.modid.value=="")
	{
	alert("请选择所属系统模型");
	return false;
	}
	if(obj.listtempid.value==0)
	{
	alert("请选择列表模板");
	return false;
	}
	if(obj.newstempid.value==0)
	{
	alert("请选择内容模板");
	return false;
	}
	if(obj.filetype.value=="")
	{
	alert("请输入信息文件扩展名");
	return false;
	}
}
//大栏目
else
{
	if(obj.islist.checked&&obj.blisttempid.value==0)
	{
	alert("列表式的栏目,需选择列表模板");
	return false;
	}
}
return true;
}
</script>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="6" cellspacing="1">
  <tr>
    <td>位置：<?=$url?> </td>
  </tr>
</table>
  <form name="form1" method="post" action="enews.php" onsubmit="return CheckForm(document.form1);">
  <div class="tab-pane" id="TabPane1"> <script type="text/javascript">
tb1 = new WebFXTabPane( document.getElementById( "TabPane1" ) );
</script>
<div class="tab-page" id="baseinfo"> 
                    
      <h2 class="tab">&nbsp;<font class=tabcolor>基本属性</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "baseinfo" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <input type=hidden name=enews value=<?=$enews?>>
        <tr class="header"> 
          <td height="30" colspan="2">增加栏目</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="23%" height="25">栏目名称：</td>
          <td> <input name="classname" type="text" id="classname" value="<?=$r[classname]?>"> 
            <?
	  if($enews=="AddClass")
	  {
	  ?>
            <input type="button" name="Submit5" value="生成拼音目录" onclick="window.open('GetPinyin.php?hz='+document.form1.classname.value+'&returnform=opener.document.form1.classpath.value','','width=160,height=100');"> 
            <?
	  }
	  ?>
            <input name="oldbclassid" type="hidden" id="oldbclassid" value="<?=$r[bclassid]?>"> 
            <input name="classid" type="hidden" id="classid" value="<?=$classid?>"> 
            <input name="oldclassname" type="hidden" id="oldclassname" value="<?=$r[classname]?>"> 
            <input name="oldislast" type="hidden" id="oldislast" value="<?=$r[islast]?>"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25" valign="top">所属父栏目：</td>
          <td><select name="bclassid" size="12" id="bclassid" onchange='javascript:changeitem(document.form1);' style="width:320">
              <option value="0"<?=$defaultbclassid?>>根栏目</option>
              <?=$options?>
            </select> </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">是否终级栏目：</td>
          <td> 
            <?=$islast?>
            (<strong>终级栏目下才能增加信息</strong>)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25" valign="top">栏目存放文件夹： 
            <input name="oldclasspath" type="hidden" id="oldclasspath" value="<?=$r[classpath]?>"> 
            <br>
             
            <input name="oldcpath" type="hidden" id="oldcpath" value="<?=$classpath?>"></td>
          <td><table width="100%" border="0" cellspacing="1" cellpadding="3">
              <tr bgcolor="DBEAF5"> 
                <td width="13%">&nbsp;</td>
                <td width="37%">上层栏目目录</td>
                <td width="23%">本栏目目录</td>
                <td width="27%">&nbsp;</td>
              </tr>
              <tr> 
                <td><div align="right">根目录/</div></td>
                <td><input name="pripath" type="text" id="pripath" value="<?=$pripath?>" size="30" readonly> 
                </td>
                <td><input name="classpath" type="text" id="classpath3" value="<?=$classpath?>" size="16"<?=$read?>></td>
                <td> <div align="left"> 
                    <input type="button" name="Submit3" value="检测目录" onclick="javascript:window.open('enews.php?enews=CheckPath&pripath='+document.form1.pripath.value+'&classpath='+document.form1.classpath.value,'','width=100,height=100,top=250,left=450');">
                  </div></td>
              </tr>
            </table></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">栏目文件扩展名：</td>
          <td><input name="classtype" type="text" id="classtype" value="<?=$r[classtype]?>" size="10"> 
            <select name="select" onchange="document.form1.classtype.value=this.value">
              <option value=".html">扩展名</option>
              <option value=".html">.html</option>
              <option value=".htm">.htm</option>
              <option value=".php">.php</option>
              <option value=".shtml">.shtml</option>
            </select> <input name="oldclasstype" type="hidden" id="oldclasstype" value="<?=$r[classtype]?>">
            (如.html,.xml,.htm等)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">栏目访问域名：</td>
          <td><input name="classurl" type="text" id="classurl" value="<?=$r[classurl]?>" size="38"> 
            <input name="UrlToSmall" type="checkbox" id="UrlToSmall" value="1">
            应用于子栏目 (如没有绑定，请留空.后面无需加&quot;/&quot;)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td width="23%" height="25"><strong>绑定的系统模型：</strong></td>
          <td width="77%"><select name="modid" id="modid">
              <?=$mod_options?>
            </select> <input type="button" name="Submit6" value="管理系统模型" onclick="window.open('db/ListTable.php');">
            * 
            <input name="oldmodid" type="hidden" id="oldmodid" value="<?=$r[modid]?>"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">搜索模板：</td>
          <td><select name="searchtempid" id="searchtempid">
              <option value="0">使用默认模板 </option>
              <?=$searchtemp?>
            </select> <input type="button" name="Submit62" value="管理搜索模板" onclick="window.open('template/ListSearchtemp.php');"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">管理信息列表默认排序方式：</td>
          <td>按字段： 
            <input name="listorderf" type="text" id="listorderf" value="<?=$r[listorderf]?>" size="16"> 
            <select name="select4" onchange="document.form1.listorderf.value=this.value">
              <option>选择</option>
              <option value="newstime">发布时间</option>
              <option value="id">ID</option>
              <option value="onclick">点击率</option>
              <option value="totaldown">下载数</option>
              <option value="plnum">评论数</option>
            </select>
            ，排列方式： 
            <select name="listorder" id="listorder">
              <option value="DESC"<?=$r[listorder]=="DESC"?' selected':''?>>倒序排序</option>
              <option value="ASC"<?=$r[listorder]=="ASC"?' selected':''?>>顺序排序</option>
            </select></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">列表式页面排序方式：</td>
          <td>按字段： 
            <input name="reorderf" type="text" id="reorderf" value="<?=$r[reorderf]?>" size="16"> 
            <select name="select5" onchange="document.form1.reorderf.value=this.value">
              <option>选择</option>
              <option value="newstime">发布时间</option>
              <option value="id">ID</option>
              <option value="onclick">点击率</option>
              <option value="totaldown">下载数</option>
              <option value="plnum">评论数</option>
            </select>
            ，排列方式： 
            <select name="reorder" id="select">
              <option value="DESC"<?=$r[reorder]=="DESC"?' selected':''?>>倒序排序</option>
              <option value="ASC"<?=$r[reorder]=="ASC"?' selected':''?>>顺序排序</option>
            </select></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">列表模式：</td>
          <td><input type="radio" name="listdt" value="0"<?=$r[listdt]==0?' checked':''?>>
            静态列表 
            <input type="radio" name="listdt" value="1"<?=$r[listdt]==1?' checked':''?>>
            动态列表<font color="#666666"> (交互性的列表可选择动态)</font></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">内容页模式：</td>
          <td><input type="radio" name="showdt" value="0"<?=$r[showdt]==0?' checked':''?>>
            静态页面 
            <input type="radio" name="showdt" value="1"<?=$r[showdt]==1?' checked':''?>>
            动态刷新<font color="#666666"> (交互性的信息可选择动态刷新)</font></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">栏目缩略图：</td>
          <td><input name="classimg" type="text" id="classimg" value="<?=$r[classimg]?>" size="52"> 
            <a onclick="window.open('editor/file.php?userid=<?=$logininid?>&username=<?=$loginin?>&rnd=<?=$loginrnd?>&type=1&classid=&doing=2&field=classimg','','width=700,height=550,scrollbars=yes');" title="选择已上传的图片"><img src="../data/images/changeimg.gif" width="22" height="22" border="0" align="absbottom"></a></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="25" valign="top">页面关键字：</td>
          <td><input name="classpagekey" type="text" id="classpagekey" value="<?=$r[classpagekey]?>" size="52"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25" valign="top">栏目简介：</td>
          <td><textarea name="intro" cols="70" rows="8" id="intro"><?=stripSlashes($r[intro])?></textarea></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25" valign="top">是否显示到导航：</td>
          <td><input type="radio" name="showclass" value="0"<?=$r[showclass]==0?' checked':''?>>
            是 
            <input type="radio" name="showclass" value="1"<?=$r[showclass]==1?' checked':''?>>
            否<font color="#666666">（如：导航标签，地图标签）</font></td>
        </tr>
      </table>
  </div>
  <div class="tab-page" id="changevar"> 
      <h2 class="tab">&nbsp;<font class="tabcolor">选项设置</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "changevar" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" id=smallbclass>
        <tr class="header"> 
      <td height="30" colspan="2">选项</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2" valign="top"><div align="center">主页面内容[标签同首页的标签]：</div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2" valign="top"> <div align="center"> 
          <textarea name="indextext" cols="96" rows="23" id="indextext"><?=stripSlashes($indextext)?></textarea>
        </div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25" colspan="2" valign="top"><div align="center">说明：栏目导行标签:[!--newsnav--]，调用标签介绍请点 
          <input type="button" name="Submit32" value="这里" onclick="window.open('template/EnewsBq.php','','width=600,height=500,scrollbars=yes');">
          或JS调用点 
          <input type="button" name="Submit322" value="这里" onclick="window.open('ListClass.php','','width=800,height=600,scrollbars=yes');">
          。</div></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="23%" height="25">列表式：</td>
      <td height="25">
<input name="islist" type="checkbox" id="islist" value="1"<?=$islist?>>
        是(选中此栏,主页面内容无效)
        <input name="oldislist" type="hidden" id="oldislist" value="<?=$r[islist]?>"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">&nbsp;</td>
      <td height="25">所属列表模板： <select name="blisttempid" id="select2">
          <?=$listtemp_options?>
        </select>
            <input type="button" name="Submit622" value="管理列表模板" onclick="window.open('template/ListListtemp.php');">
            <br>
        显示总记录数： 
        <input name="bmaxnum" type="text" id="bmaxnum" value="<?=$r[maxnum]?>" size="5">
        条，生成信息每页显示： 
        <input name="blencord" type="text" id="blencord" value="<?=$r[lencord]?>" size="5">
        条记录
<input name="oldblencord" type="hidden" id="oldblencord" value="<?=$r[lencord]?>"></td>
    </tr>
  </table>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" id=smallclass>
        <tr class="header"> 
          <td height="30" colspan="2">选项</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">栏目别名：</td>
          <td><input name="bname" type="text" id="bname" value="<?=$r[bname]?>">
            (为空的话，与栏目名相同)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">所属列表模板：</td>
          <td><select name="listtempid" id="listtempid">
              <?=$listtemp_options?>
            </select> <input type="button" name="Submit6222" value="管理列表模板" onclick="window.open('template/ListListtemp.php');">
            *</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">所属内容模板：</td>
          <td><select name="newstempid" id="newstempid">
              <?=$newstemp_options?>
            </select> <input type="button" name="Submit62222" value="管理内容模板" onclick="window.open('template/ListNewstemp.php');">
            *( 
            <input name="tobetempinfo" type="checkbox" id="tobetempinfo" value="1">
            应用于已生成的信息 )</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">显示总记录数：</td>
          <td> <input name="maxnum" type="text" id="maxnum" value="<?=$r[maxnum]?>" size="5">
            条(0为显示所有记录)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">生成信息每页显示：</td>
          <td><input name="lencord" type="text" id="lencord" value="<?=$r[lencord]?>" size="5">
            条记录 
            <input name="oldlencord" type="hidden" id="oldlencord3" value="<?=$r[lencord]?>"></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">相关链接显示：</td>
          <td><input name="link_num" type="text" id="link_num" value="<?=$r[link_num]?>" size="5">
            条记录</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="26">信息页目录存放形式：</td>
          <td><input name="newspath" type="text" id="newspath" value="<?=$r[newspath]?>" size="10"> 
            <select name="select2" onchange="document.form1.newspath.value=this.value">
              <option value="Y-m-d">选择</option>
              <option value="Y-m-d">2005-01-27</option>
              <option value="Y/m-d">2005/01-27</option>
              <option value="Y/m/d">2005/01/27</option>
              <option value="Ymd">20050127</option>
              <option value="">不设置目录</option>
            </select>
            (如Y-m-d，Y/m-d，Y/m/d，Ymd等形式)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">信息页文件命名形式：</td>
          <td>[前缀] 
            <input name="filename_qz" type="text" id="filename_qz" value="<?=$r[filename_qz]?>" size="15">
            命名: 
            <input type="radio" name="filename" value="0"<?=$filename0?>>
            信息ID 
            <input type="radio" name="filename" value="1"<?=$filename1?>>
            time() 
            <input type="radio" name="filename" value="2"<?=$filename2?>>
            md5()</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">信息页文件扩展名：</td>
          <td><input name="filetype" type="text" id="filetype" value="<?=$r[filetype]?>" size="10"> 
            <select name="select3" onchange="document.form1.filetype.value=this.value">
              <option value=".html">扩展名</option>
              <option value=".html">.html</option>
              <option value=".htm">.htm</option>
              <option value=".php">.php</option>
              <option value=".shtml">.shtml</option>
            </select>
            (如.html,.xml,.htm等)</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">是否开放评论功能：</td>
          <td><input type="radio" name="openpl" value="0"<?=$openpl0?>>
            是 
            <input type="radio" name="openpl" value="1"<?=$openpl1?>>
            否</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">&nbsp;</td>
          <td>评论需要审核: 
            <input name="checkpl" type="checkbox" id="checkpl" value="1"<?=$checkpl?>>
            是</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">开放投稿功能：</td>
          <td><input type="radio" name="openadd" value="0"<?=$openadd0?>>
            是 
            <input type="radio" name="openadd" value="1"<?=$openadd1?>>
            否 
            <input name="oldopenadd" type="hidden" id="oldopenadd" value="<?=$r[openadd]?>">
            ，投稿会员组： 
            <select name="qaddgroupid" id="select3">
              <option value="0">游客</option>
              <?=$qgroup?>
            </select>
            ，验证码验证: 
            <input name="qaddshowkey" type="checkbox" id="qaddshowkey" value="1"<?=$r['qaddshowkey']==1?' checked':''?>></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">&nbsp;</td>
          <td><p>投稿需要审核: 
              <input name="checkqadd" type="checkbox" id="checkqadd" value="1"<?=$r['checkqadd']==1?' checked':''?>>
              直接通过审核 ，投稿生成列表: 
              <select name="qaddlist" id="qaddlist">
                <option value="0"<?=$r['qaddlist']==0?' selected':''?>>不生成</option>
                <option value="1"<?=$r['qaddlist']==1?' selected':''?>>生成当前栏目</option>
				<option value="2"<?=$r['qaddlist']==2?' selected':''?>>生成首页</option>
				<option value="3"<?=$r['qaddlist']==3?' selected':''?>>生成父栏目</option>
                <option value="4"<?=$r['qaddlist']==4?' selected':''?>>生成当前栏目与父栏目</option>
				<option value="5"<?=$r['qaddlist']==5?' selected':''?>>生成父栏目与首页</option>
                <option value="6"<?=$r['qaddlist']==6?' selected':''?>>生成当前栏目、父栏目与首页</option>
              </select>
            </p></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">&nbsp;</td>
          <td>单篇投稿审核后获得 
            <input name="addinfofen" type="text" id="addinfofen" value="<?=$r[addinfofen]?>" size="6">
            点数 <font color="#666666">(不增加请设为0,扣点请设为负数)</font></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">&nbsp;</td>
          <td>管理投稿：<strong> 
            <select name="adminqinfo" id="adminqinfo">
              <option value="0"<?=$r['adminqinfo']==0?' selected':''?>>不能管理信息</option>
              <option value="1"<?=$r['adminqinfo']==1?' selected':''?>>可管理未审核信息</option>
			  <option value="2"<?=$r['adminqinfo']==2?' selected':''?>>只可编辑未审核信息</option>
			  <option value="3"<?=$r['adminqinfo']==3?' selected':''?>>只可删除未审核信息</option>
              <option value="4"<?=$r['adminqinfo']==4?' selected':''?>>可管理所有信息</option>
			  <option value="5"<?=$r['adminqinfo']==5?' selected':''?>>只可编辑所有信息</option>
			  <option value="6"<?=$r['adminqinfo']==6?' selected':''?>>只可删除所有信息</option>
            </select>
            </strong></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td rowspan="3"><strong>审核设置：</strong></td>
          <td height="25"><input name="checked" type="checkbox" id="checked" value="1"<?=$checked?>>
            直接审核</td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">强制签发 
            <input name="docheckuser" type="checkbox" id="docheckuser" value="1"<?=$docheckuser?>> 
            &nbsp;&nbsp;签发人员： 
            <input name="checkuser" type="text" id="checkuser" value="<?=$r[checkuser]?>" size="32"> 
            <input type="button" name="Submit4" value="选择用户" onclick="window.open('ChangeUser.php?field=checkuser&form=form1','','width=300,height=520,scrollbars=yes');"> 
          </td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25"><font color="#666666">(签发说明：多个用户请用&quot;,&quot;格开,强制签发将应用于本栏目的信息)</font></td>
        </tr>
        <tr bgcolor="#FFFFFF"> 
          <td height="25">默认查看信息权限：</td>
          <td><select name="groupid" id="groupid">
              <option value="0">游客</option>
              <?=$group?>
            </select> <font color="#666666">(方便录入)</font></td>
        </tr>
        <tr bgcolor="#FFFFFF">
          <td height="25">信息归档</td>
          <td>归档大于 
            <input name="doctime" type="text" id="doctime" value="<?=$r[doctime]?>" size="6">
            天的信息<font color="#666666">(0为不归档)</font></td>
        </tr>
      </table>
  </div>
  <div class="tab-page" id="specialmod"> 
      <h2 class="tab">&nbsp;<font class="tabcolor">特殊模型设置</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "specialmod" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr class="header"> 
      <td width="23%" height="30">特殊模型设置</td>
      <td>&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">下载/影视模型：</td>
      <td height="25">每行显示 
        <input name="down_num" type="text" id="link_num3" value="<?=$r[down_num]?>" size="5">
        个下载地址</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">影视模型：</td>
      <td height="25">每行显示 
        <input name="online_num" type="text" id="down_num" value="<?=$r[online_num]?>" size="5">
        个在线观看地址</td>
    </tr>
  </table>
  </div>
  <div class="tab-page" id="setjs"> 
      <h2 class="tab">&nbsp;<font class="tabcolor">JS调用设置</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "setjs" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr class="header"> 
      <td height="30" colspan="2">JS调用相关设置</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">所用JS模板：</td>
      <td><select name="jstempid" id="jstempid">
	  <?=$jstemp?>
        </select>
            <input type="button" name="Submit62223" value="管理JS模板" onclick="window.open('template/ListJstemp.php');"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td width="23%" height="25">最新信息js设置：</td>
      <td> 调用 
        <input name="newline" type="text" id="newline" value="<?=$r[newline]?>" size="6">
        条记录,标题截取 
        <input name="newstrlen" type="text" id="newstrlen" value="<?=$r[newstrlen]?>" size="6">
        个字节, 
        <input name="newshowdate" type="checkbox" id="newshowdate" value="1"<?=$newshowdate?>>
        显示日期</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">热门信息js设置：</td>
      <td>调用 
        <input name="hotline" type="text" id="hotline" value="<?=$r[hotline]?>" size="6">
        条记录,标题截取 
        <input name="hotstrlen" type="text" id="hotstrlen" value="<?=$r[hotstrlen]?>" size="6">
        个字节, 
        <input name="hotshowdate" type="checkbox" id="hotshowdate" value="1"<?=$hotshowdate?>>
        显示日期</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">推荐信息js设置：</td>
      <td>调用 
        <input name="goodline" type="text" id="goodline" value="<?=$r[goodline]?>" size="6">
        条记录,标题截取 
        <input name="goodstrlen" type="text" id="goodstrlen" value="<?=$r[goodstrlen]?>" size="6">
        个字节, 
        <input name="goodshowdate" type="checkbox" id="goodshowdate" value="1"<?=$goodshowdate?>>
        显示日期</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">热门评论信息js设置：</td>
      <td>调用 
        <input name="hotplline" type="text" id="hotplline" value="<?=$r[hotplline]?>" size="6">
        条记录,标题截取 
        <input name="hotplstrlen" type="text" id="hotplstrlen" value="<?=$r[hotplstrlen]?>" size="6">
        个字节, 
        <input name="hotplshowdate" type="checkbox" id="hotplshowdate" value="1"<?=$hotplshowdate?>>
        显示日期</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">头条信息js设置：</td>
      <td>调用 
        <input name="firstline" type="text" id="firstline" value="<?=$r[firstline]?>" size="6">
        条记录,标题截取 
        <input name="firststrlen" type="text" id="firststrlen" value="<?=$r[firststrlen]?>" size="6">
        个字节, 
        <input name="firstshowdate" type="checkbox" id="firstshowdate" value="1"<?=$firstshowdate?>>
        显示日期</td>
    </tr>
  </table>
  </div>
</div>
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr> 
      <td width="100%" height="30"><div align="center"><strong> 
          <input type="submit" name="Submit" value="提交">
          &nbsp;&nbsp;<input type="reset" name="Submit2" value="重置">
          <input type=hidden name=from value="<?=$_GET['from']?>"></strong></div></td>
    </tr>
  </table>
  </form>
</body>
</html>
<?
db_close();
$empire=null;
?>
<?=$hiddenclass?>
