📄 category_edit.php
字号:
<?php
defined('IN_PHPCMS') or exit('Access Denied');
include admintpl('header');
?>
<script language='JavaScript' type='text/JavaScript'>
function CheckForm(){
if(document.myform.channelname.value==''){
ShowTabs(0);
alert('请输入栏目名称!');
document.myform.channelname.focus();
return false;
}
if(document.myform.channeltype[1].checked==true){
if(document.myform.channeldir.value==''){
ShowTabs(0);
alert('请输入栏目目录!');
document.myform.channeldir.focus();
return false;
}
}
else{
if(document.myform.linkurl.value==''){
ShowTabs(0);
alert('请输入栏目的链接地址!');
document.myform.linkurl.focus();
return false;
}
}
}
</script>
<body <?php if(!$cattype){ ?>onload="HideTabTitle('none')" <?php } ?>>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="10">
<tr>
<td></td>
</tr>
</table>
<?=$menu?>
<script language='javascript'>
var tID=0;
function ShowTabs(ID){
if(ID!=tID){
TabTitle[tID].className='title1';
TabTitle[ID].className='title2';
Tabs[tID].style.display='none';
Tabs[ID].style.display='';
tID=ID;
}
}
function HideTabTitle(displayValue,tempType){
for (var i = 1; i < TabTitle.length; i++) {
if(tempType==0&&i==2) {
TabTitle[i].style.display='none';
}
else{
TabTitle[i].style.display=displayValue;
}
}
}
</script>
<form name="myform" method="post" action="?file=category&action=edit&catid=<?=$catid?>&save=1&channelid=<?=$channelid?>&oldparentid=<?=$oldparentid?>" onSubmit='return CheckForm();'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr align='center' height='24'>
<td id='TabTitle' class='title2' onclick='ShowTabs(0)'>基本信息</td>
<td id='TabTitle' class='title1' onclick='ShowTabs(1)'>显示控制</td>
<td id='TabTitle' class='title1' onclick='ShowTabs(2)'>权限设置</td>
<td id='TabTitle' class='title1' onclick='ShowTabs(3)'>收费设置</td>
<td> </td>
</tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
<tbody id='Tabs' style='display:'>
<th colspan=2>基本信息</th>
<tr>
<td width='30%' class='tablerow'><strong>所属栏目</strong></td>
<td class='tablerow'>
<?=$parentid?>
<font color="red">*</font>
</td>
</tr>
<tr>
<td class='tablerow'><strong>栏目名称</strong></td>
<td class='tablerow'><input name='category[catname]' type='text' id='catname' size='40' maxlength='50' value='<?=$catname?>'> <font color="red">*</font></td>
</tr>
<tr>
<td class='tablerow'><strong>栏目图片</strong></td>
<td class='tablerow'><input name='category[catpic]' type='text' id='catpic' size='40' maxlength='50' value='<?=$catpic?>'> <input type="button" value=" 上传 " onclick="javascript:openwinx('?mod=phpcms&file=uppic&channelid=<?=$channelid?>&uploadtext=catpic&width=100&height=100','upload','350','200')"></td>
</tr>
<tr>
<td class='tablerow'><strong>栏目说明</strong><br></td>
<td class='tablerow'><input name='category[introduce]' type='text' id='introduce' size='40' maxlength='255' value='<?=$introduce?>'></td>
</tr>
<tr>
<td class='tablerow'><strong>打开方式</strong></td>
<td class='tablerow'>
<input type='radio' name='category[target]' value='_self' <?php if($target=='_self'){ ?> checked <?php } ?>> 在原窗口打开
<input type='radio' name='category[target]' value='_blank' <?php if($target=='_blank'){ ?> checked <?php } ?>> 在新窗口打开
</td>
</tr>
<tr>
<td width='40%' class='tablerow'><strong>Meta Keywords(栏目关键词)</strong><br>针对搜索引擎设置的关键词</td>
<td class='tablerow'><textarea name='category[meta_keywords]' cols='60' rows='2' id='meta_keywords'><?=$meta_keywords?></textarea></td>
</tr>
<tr>
<td width='40%' class='tablerow'><strong>Meta Description(栏目描述)</strong><br>针对搜索引擎设置的网页描述</td>
<td class='tablerow'><textarea name='category[meta_description]' cols='60' rows='2' id='meta_description'><?=$meta_description?></textarea></td>
</tr>
<tr>
<td class='tablerow'><strong>栏目类型:</strong><br><font color=red>请慎重选择,栏目一旦添加后就不能再更改栏目类型。</font></td>
<td class='tablerow'>
<input name='category[cattype]' type='radio' value='1' <?php if($cattype){ ?> checked <?php }else{ ?>disabled <?php } ?> onclick="HideTabTitle('',1)">
<font color=blue><b>内部栏目</b></font> 内部栏目具有详细的参数设置。可以添加子栏目和信息。<br>
内部栏目的目录名:<input name='category[catdir]' type='text' size='20' maxlength='20' value='<?=$catdir?>' disabled> <font color='#FF0000'>注意,目录名只能是英文</font><br><br>
<input name='category[cattype]' type='radio' value='0' <?php if(!$cattype){ ?> checked <?php }else{ ?>disabled <?php } ?> onclick="HideTabTitle('none')">
<font color=blue><b>外部栏目</b></font> 外部栏目指链接到本系统以外的地址中。当此栏目准备链接到网站中的其他系统时,请使用这种方式。不能在外部栏目中添加信息,也不能添加子栏目。<br>
外部栏目的链接地址:<input name='category[linkurl]' type='text' id='linkurl' value='<?=$linkurl?>' size='40' maxlength='200' <?php if($cattype){ ?>disabled <?php } ?>>
</td>
</tr>
</tbody>
<tbody id='Tabs' style='display:none'>
<th colspan=2>显示控制</th>
<tr>
<td width='30%' class='tablerow'><strong>栏目风格</strong></td>
<td class='tablerow'>
<?=$skinid?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>栏目首页模板</strong></td>
<td class='tablerow'>
<?=$templateid?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>栏目信息列表模板</strong></td>
<td class='tablerow'>
<?=$listtemplateid?>
</td>
</tr>
<tr>
<td width='25%' class='tablerow'><strong>栏目下的内容页默认风格</strong></td>
<td class='tablerow'>
<?=$defaultitemskin?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>栏目下的内容页默认模板</strong></td>
<td class='tablerow'>
<?=$defaultitemtemplate?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>是否在顶部导航栏显示</strong></td>
<td class='tablerow'>
<input type='radio' name='category[showonmenu]' value='1' <?php if($showonmenu){ ?> checked <?php } ?>> 是
<input type='radio' name='category[showonmenu]' value='0' <?php if(!$showonmenu){ ?> checked <?php } ?>> 否
</td>
</tr>
<tr>
<td class='tablerow'><strong>是否在父栏目的分类列表处显示</strong></td>
<td class='tablerow'>
<input type='radio' name='category[islist]' value='1' <?php if($islist){ ?> checked <?php } ?>> 是
<input type='radio' name='category[islist]' value='0' <?php if(!$islist){ ?> checked <?php } ?>> 否
</td>
</tr>
<tr>
<td class='tablerow'><strong>有子栏目时是否可以在此栏目添加信息</strong></td>
<td class='tablerow'>
<input type='radio' name='category[enableadd]' value='1' <?php if($enableadd){ ?> checked <?php } ?>> 是
<input type='radio' name='category[enableadd]' value='0' <?php if(!$enableadd){ ?> checked <?php } ?>> 否
</td>
</tr>
<tr>
<td class='tablerow'><strong>是否启用此栏目的防止复制、防盗链功能</strong></td>
<td class='tablerow'>
<input type='radio' name='category[enableprotect]' value='1' <?php if($enableprotect){ ?> checked <?php } ?>> 是
<input type='radio' name='category[enableprotect]' value='0' <?php if(!$enableprotect){ ?> checked <?php } ?>> 否
</td>
</tr>
<tr>
<td class='tablerow'><strong>子栏目在此栏目页显示的信息数</strong></td>
<td class='tablerow'>
<select name='category[showchilditems]' id='showchilditems' style="width:60px">
<?php for($i=1;$i<21;$i++){ ?>
<option value='<?=$i?>' <?php if($i==$showchilditems){ ?>selected <?php } ?>><?=$i?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td class='tablerow'><strong>列表页每页显示的信息数</strong></td>
<td class='tablerow'>
<select name='category[maxperpage]' id='maxperpage' style="width:60px">
<?php for($i=5;$i<101;$i++){ ?>
<option value='<?=$i?>' <?php if($i==$maxperpage){ ?>selected <?php } ?>><?=$i?></option>
<?php } ?>
</select>
</td>
</tr>
<tr>
<td class='tablerow'><strong>此栏目下的信息列表的排序方式</strong></td>
<td class='tablerow'>
<select name='category[itemordertype]' id='itemordertype' style="width:120px">
<option value='1' <?php if($itemordertype==1){ ?>selected <?php } ?>>信息ID(降序)</option>
<option value='2' <?php if($itemordertype==2){ ?>selected <?php } ?>>信息ID(升序)</option>
<option value='3' <?php if($itemordertype==3){ ?>selected <?php } ?>>更新时间(降序)</option>
<option value='4' <?php if($itemordertype==4){ ?>selected <?php } ?>>更新时间(升序)</option>
<option value='5' <?php if($itemordertype==5){ ?>selected <?php } ?>>点击次数(降序)</option>
<option value='6' <?php if($itemordertype==6){ ?>selected <?php } ?>>点击次数(升序)</option>
</select>
</td>
</tr>
<tr>
<td class='tablerow'><strong>此栏目下的信息打开方式</strong></td>
<td class='tablerow'>
<input type='radio' name='category[itemtarget]' value='1' <?php if($itemtarget==1){ ?>checked <?php } ?>> 在新窗口打开
<input type='radio' name='category[itemtarget]' value='0' <?php if($itemtarget==0){ ?>checked <?php } ?>> 在原窗口打开
</td>
</tr>
</tbody>
<tbody id='Tabs' style='display:none'>
<th colspan=2>权限设置</th>
<tr>
<td width='30%' class='tablerow'><strong>栏目权限:</strong><br><font color='red'>栏目权限为继承关系,当栏目设为“认证栏目”时,其下的栏目设为“开放栏目”也无效。相反,如果栏目设为“开放栏目”,其下的栏目可以自由设置权限。</font></td>
<td class='tablerow'>
<table>
<tr><td width='80' valign='top'><input type='radio' name='category[catpurview]' value='0' <?php if(!$catpurview){ ?>checked <?php } ?>>开放栏目</td>
<td>任何人(包括游客)可以浏览此栏目下的信息。可以在栏目设置中再指定具体的权限。</td></tr>
<tr><td width='80' valign='top'><input type='radio' name='category[catpurview]' value='1' <?php if($catpurview){ ?>checked <?php } ?>>认证栏目</td>
<td>游客不能浏览,并在下面指定允许浏览的会员组。如果栏目设置为认证栏目,则此栏目的“生成HTML”选项只能设为“不生成HTML”。</td></tr>
</table>
</td>
</tr>
<tr>
<td class='tablerow'><strong>允许浏览此栏目的用户组</strong><br>如果栏目权限设置为“认证栏目”,请在此设置允许浏览此栏目的会员组</td>
<td class='tablerow'>
<?=$arrgroupid_browse?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>允许查看此栏目信息的用户组</strong><br>如果栏目权限设置为“认证栏目”,请在此设置允许浏览此栏目的会员组</td>
<td class='tablerow'>
<?=$arrgroupid_view?>
</td>
</tr>
<tr>
<td class='tablerow'><strong>允许在此栏目发表信息的用户组</strong></td>
<td class='tablerow'>
<?=$arrgroupid_add?>
</td>
</tr>
</tbody>
<tbody id='Tabs' style='display:none'>
<th colspan=2>收费设置</th>
<tr>
<td width='300' class='tablerow'><strong>积分奖励</strong><br>会员在此栏目发表信息时可以得到的积分</td>
<td class='tablerow'>会员在此栏目每发表一条信息,可以得到 <input name='category[creditget]' type='text' value='<?=$creditget?>' size='4' maxlength='4' style='text-align:center'> 分积分</td>
</tr>
<tr>
<td width='300' class='tablerow'><strong>默认收费点数</strong><br>会员在此栏目下添加信息时,该信息默认的收费点券数</td>
<td class='tablerow'><input name='category[defaultpoint]' type='text' value='<?=$defaultpoint?>' size='4' maxlength='4' style='text-align:center'> 点</td>
</tr>
<tr>
<td width='300' class='tablerow'><strong>默认重复收费:</strong><br>会员在此栏目下添加信息时,该信息默认的重复收费方式</td>
<td class='tablerow'>
<input name='category[defaultchargetype]' type='radio' value='0' <?php if(!$defaultchargetype){ ?>checked <?php } ?>>不重复收费<br>
<input name='category[defaultchargetype]' type='radio' value='1' <?php if($defaultchargetype){ ?>checked <?php } ?>>每阅读一次就重复收费一次(建议不要使用)</td>
</tr>
</tbody>
</table>
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><input type="submit" name="Submit" value="保存设置"></td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -