📄 admin_class.asp
字号:
Dim rsParentClass
Set rsParentClass=Cl.Execute("Select * From Cl_Class where ChannelID="&ChannelID&" and ClassID in (" & ParentPath & ") order by Depth")
do while not rsParentClass.eof
if rsParentClass("Depth")>0 Then
for i=1 to rsParentClass("Depth")
response.write " "
next
response.write "└"
end if
response.write " " & rsParentClass("ClassName") & "<br />"
rsParentClass.movenext
loop
set rsParentClass=Nothing
end if
%> <br /> <font color="#0000ff">提示:如果你想改变所属栏目,请<a href='<%=FileName%>&Action=Move&ClassID=<%=ClassID%>'>点此移动栏目</a></font></td>
</tr>
<%else%>
<!--
<tr class="tdbg">
<td width="150" align="right"><strong>所属栏目:</strong></td>
<td><Input type="hidden" name="ParentID" id="ParentID" value="<%=ParentID%>"><Input type="text" name="ParentIDv" id="ParentIDv" value="<%
'if ParentID>0 then
' Response.write ParentID & ":" & sParentName
'else
' Response.write "0:作为一级栏目"
'End if
%>" size=45 readonly Onclick="SelectClass('<%=ChannelID%>','ParentID')"> <Input type="button" Name="selectclassid" Onclick="SelectClass('<%=ChannelID%>','ParentID')" value="选择栏目">
</td>
</tr>-->
<tr class="tdbg">
<td width="150" align="right"><strong>所属栏目:</strong></td>
<td> <select name="ParentID">
<%=ShowClass_Option(ChannelID,ParentID,0,0)%>
</select> <font color="#ff0033">注意:不能指定为外部栏目</font></td>
</tr>
<%end if%>
<tr class="tdbg">
<td width="150" align="right"><strong>栏目名称:</strong></td>
<td><input name="ClassName" type="text" value="<%=sClassName%>" size="50" maxlength="20"> <font color="red">*</font>
<input name="ClassID" type="hidden" id="ClassID" value="<%=ClassID%>"></td>
</tr>
<tr class="tdbg">
<td width="150" align="right"><strong>外部栏目:</strong></td>
<td><input name="IsOuter" type="checkbox" id="IsOuter" value="1" OnClick="ChkIsOuter();" <%
if sIsOuter=1 then Response.write " Checked"
if Action="Modify" and sIsOuter=0 then Response.write " Disabled"
%>> 外部栏目</td>
</tr>
<tr class="tdbg" ID="OuterClass" style="DisPlay:none">
<td width="150" align="right"><strong>链接地址:</strong></td>
<td><input name="LinkUrl" type="text" id="LinkUrl" value="<%=sLinkUrl%>" size="50" maxlength="255">
<br /><font color="#0000ff">说明:如果想将栏目链接到外部地址,请输入完整的URL地址,否则请保持为空。</font></td>
</tr>
<!--==================================================================-->
<tr class="tdbg" id="NoOuterClass">
<td width="150" align="right"><strong>栏目参数:</strong></td>
<td>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="tdbg">
<td width="80" align="right"><strong>栏目目录:</strong></td>
<td><input name="ClassDir" type="text" value="<%=sClassDir%>" size="50" maxlength="20"> <font color="red">*</font><br /><font color="#ff0033">注意:只能是英文,不能带空格或“\”、“/”等符号,此项更改后,请重新生成此栏目所有内容。</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>栏目说明:</strong></td>
<td><textarea name="Readme" cols="42" rows="4" id="Readme"><%=sReadMe%></textarea><br /> <font color="#ff0033">注意:不支持HTML,不能有回车,说明可为留空。</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>推荐栏目:</strong></td>
<td>
<input name="IsElite" type="radio" value="Yes" <%if sIsElite=True then response.write " checked"%>> 是
<input type="radio" name="IsElite" value="No" <%if sIsElite=False then response.write " checked"%>> 否
<br /><font color="#0000ff">说明:推荐栏目将在首页及此栏目的父栏目上显示列表</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>导航显示:</strong></td>
<td>
<input name="ShowOnTop" type="radio" value="Yes" <%if sShowOnTop=True then response.write " checked"%>> 是
<input type="radio" name="ShowOnTop" value="No" <%if sShowOnTop=False then response.write " checked"%>> 否</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>栏目管理:</strong></td>
<td><input name="ClassMaster" type="text" id="ClassMaster" value="<%=sClassMaster%>" size="50" maxlength="180"><br /><font color="#ff0033">栏目管理员,拥有此栏目下的所有权限,多个请用“|”分隔,如:梅傲风|无刀|GDW尼奥。</font>
</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>浏览权限:</strong></td>
<td>
<input name="BrowsePurview" type="radio" value="0" <%if BrowsePurview=0 then response.write " checked"%> onclick="document.getElementById('VipUser').style.display='none';"> 开放栏目 <font color="#0000ff">说明:此栏目任何人都可浏览或下载,包括游客</font><br />
<input name="BrowsePurview" type="radio" value="1" <%if BrowsePurview=1 then response.write " checked"%> onclick="document.getElementById('VipUser').style.display='none';"> 限制栏目 <font color="#0000ff">说明:此栏目只有相应权限的用户能浏览或下载</font><br />
<input name="BrowsePurview" type="radio" value="2" <%if BrowsePurview=2 then response.write " checked"%> onclick="document.getElementById('VipUser').style.display='';"> 认证栏目 <font color="#0000ff">说明:此栏目只有认证会员或管理员能浏览或下载</font><br />
<input name="BrowsePurview" type="radio" value="3" <%if BrowsePurview=3 then response.write " checked"%> onclick="document.getElementById('VipUser').style.display='none';"> 禁用栏目 <font color="#0000ff">说明:此栏目任何人都不能浏览或下载</font>
</td>
</tr>
<tr class="tdbg" <%if BrowsePurview<>2 then%>style="display:none;"<%end if%> id="VipUser">
<td align="right"><strong>认证用户:</strong></td>
<td><textarea name="VipUser" cols="42" rows="4"><%
if Instr(sVipUser,"|")>0 then
sVipUser=Split(sVipUser,"|")
For i=0 to Ubound(sVipUser)
Response.write sVipUser(i)
if i< Ubound(sVipUser) then Response.write VbCrlf
Next
else
Response.write sVipUser
end if
%></textarea><br /> <font color="#ff0033">注意:每个认证用户用回车分开。</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>录入资料:</strong></td>
<td>
<input name="DisabledAdd" type="radio" value="0" <%if sDisabledAdd=0 then response.write " checked"%>> 允许
<input name="DisabledAdd" type="radio" value="1" <%if sDisabledAdd=1 then response.write " checked"%>> 禁止</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>资料审核:</strong></td>
<td>
<input name="AddIsChk" type="radio" value="Yes" <%if sAddIsChk=True then response.write " checked"%>> 审核
<input type="radio" name="AddIsChk" value="No" <%if sAddIsChk=False then response.write " checked"%>> 不审核
<br /><font color="#0000ff">说明:如果选择审核,那么用户添加资料后需要管理员审核后方在前台显示。</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>录入<%=Cl.Web_Setting(28)%>:</strong></td>
<td>在此栏目录入资料可得到:<input name="AddPoint" type="text" id="AddPoint" value="<%=sAddPoint%>" size="10" maxlength="8"> <%=Cl.Web_Setting(29)%><%=Cl.Web_Setting(28)%><br /><font color="#0000ff">说明:如果为0时,则不添加<%=Cl.Web_Setting(28)%>!</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>资料限制:</strong></td>
<td>在此栏目添加资料最大限制为: <input name="MaxLimit" type="text" id="MaxLimit" value="<%=sMaxLimit%>" size="10" maxlength="10"> 字节<br /><font color="#0000ff">说明:如果为0时,则不限制大小!</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>评论审核:</strong></td>
<td>
<input name="CommentIsChk" type="radio" value="Yes" <%if sCommentIsChk=True then response.write " checked"%>> 审核
<input type="radio" name="CommentIsChk" value="No" <%if sCommentIsChk=False then response.write " checked"%>> 不审核
<br /><font color="#0000ff">说明:如果选择审核,那么用户发表评论后需要管理员审核后方在前台显示。</font></td>
</tr>
<tr class="tdbg">
<td align="right"><strong>评论用户:</strong></td>
<td>
<input name="CommentGroup" type="hidden" id="CommentGroup" value="<%=sCommentGroup%>">
<input name="CommentGroupView" type="text" id="CommentGroupView" value="<%=Cl.GetUserGroupName(sCommentGroup)%>" size="50" onclick="SelectUserGroup('CommentGroup');" Readonly>
<br /><font color="#0000ff">说明:允许评论的用户组</font>
</td>
</tr>
<tr class="tdbg">
<td align="right"><strong>风格模板:</strong></td>
<td><select name="ProjectID" onChange="ChangeTemplate(<%=Cl.Channel.selectSingleNode("@moduleid").text%>,this.options[this.selectedIndex].value,2,'TemplateID','CssID');"><%=TemplateProjectOption%></select>
<select name="TemplateID"><option value="0" selected>默认模板</option></select>
<select name="CssID"><option value="0" selected>默认CSS</option></select></td>
</tr>
</table>
</td>
</tr>
<!--==================================================================-->
<tr class="tdbg">
<td height="40" colspan="2" align="center"><input name="Action" type="hidden" id="Action" value="<%=sAction%>">
<input name="Submit" type="submit" value=" <%=SubmitValue%> ">
<input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='<%=FileName%>'"></td>
</tr>
</table>
</form>
<script type="text/javascript" src="Inc/AjaxTemplate.js"></script>
<script language="JavaScript" type="text/JavaScript">
<%if sIsOuter=1 then%>
document.getElementById('OuterClass').style.display = '';
document.getElementById('NoOuterClass').style.display = 'none';
<%end if%>
<%if sProjectID>0 then%>
ChangeTemplate(<%=Cl.Channel.selectSingleNode("@moduleid").text%>,<%=sProjectID%>,2,'TemplateID','CssID');
CheckSel('ProjectID','<%=sProjectID%>');
CheckSel('TemplateID','<%=sTemplateID%>');
CheckSel('CssID','<%=sCssID%>');
<%end if%>
function ChkIsOuter()
{
if (document.getElementById('IsOuter').checked == true) {
document.getElementById('OuterClass').style.display = '';
document.getElementById('NoOuterClass').style.display = 'none';
}else{
document.getElementById('OuterClass').style.display = 'none';
document.getElementById('NoOuterClass').style.display = '';
}
}
function check()
{
if (document.form1.ClassName.value=="")
{
alert("栏目名称不能为空!");
document.form1.ClassName.focus();
return false;
}
}
</script>
<%
end sub
sub MoveClass()
dim ClassID,rsClass,i
ClassID=Cl.GetClng(request("ClassID"))
if ClassID=0 then Cl.ShowErr("<br /><li>参数不足!</li>")
sql="select * From Cl_Class where ChannelID="&ChannelID&" and ClassID=" & ClassID
set rsClass=server.CreateObject ("Adodb.recordset")
OpenConn : rsClass.open sql,Conn,1,3
if rsClass.bof and rsClass.eof then
rsClass.Close : Set rsClass = Nothing
Cl.ShowErr("<br /><li>找不到指定的栏目!</li>")
else
%>
<form name="form1" method="post" action="<%=FileName%>">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<tr class="title">
<td height="22" colspan="2" align="center"><strong>移 动 栏 目</strong></td>
</tr>
<tr class="tdbg">
<td width="200"><strong>栏目名称:</strong></td>
<td><%=rsClass("ClassName")%> <input name="ClassID" type="hidden" id="ClassID" value="<%=rsClass("ClassID")%>"></td>
</tr>
<tr class="tdbg">
<td width="200"><strong>当前所属栏目:</strong></td>
<td>
<%
if rsClass("ParentID")<=0 then
response.write "无(作为一级栏目)"
else
dim rsParent,sqlParent
sqlParent="Select * From Cl_Class where ChannelID="&ChannelID&" and ClassID in (" & rsClass("ParentPath") & ") order by Depth"
set rsParent=server.CreateObject("adodb.recordset")
OpenConn : rsParent.open sqlParent,Conn,1,1
do while not rsParent.eof
for i=1 to rsParent("Depth")
response.write " "
next
if rsParent("Depth")>0 then
response.write "└"
end if
response.write " " & rsParent("ClassName") & "<br />"
rsParent.movenext
loop
rsParent.close
set rsParent=Nothing
end if
%>
</td>
</tr>
<tr class="tdbg">
<td width="200"><strong>移动到:</strong><br />
不能指定为当前栏目的下属子栏目<br />
不能指定为外部栏目</td>
<td><select name="ParentID" size="2" style="height:300px;width:500px;"><%=ShowClass_Option(ChannelID,rsClass("ParentID"),0,0)%></select></td>
</tr>
<tr class="tdbg">
<td height="40" colspan="2" align="center"><input name="Action" type="hidden" id="Action" value="SaveMove">
<input name="Submit" type="submit" value=" 保存移动结果 " style="cursor:hand;">
<input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='<%=FileName%>'" style="cursor:hand;"></td></tr>
</table>
</form>
<%
end if
rsClass.close : set rsClass=Nothing
end sub
sub Order()
dim sqlClass,rsClass,iCount,j
sqlClass="select * From Cl_Class where ChannelID="&ChannelID&" and ParentID=0 order by RootID"
set rsClass=server.CreateObject("adodb.recordset")
OpenConn : rsClass.open sqlClass,Conn,1,1
iCount=rsClass.recordcount
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title">
<td height="22" colspan="4" align="center"><strong>一 级 栏 目 排 序</strong></td>
</tr>
<%
j=1
do while not rsClass.eof
%>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td width="200"> <%=rsClass("ClassName")%></td>
<%
if j>1 then
response.write "<form action='" & FileName & "&Action=UpOrder' method='post'><td width='150'>"
response.write "<select name=MoveNum size=1><option value=0>向上移动</option>"
for i=1 to j-1
response.write "<option value="&i&">"&i&"</option>"
next
response.write "</select>"
response.write "<input type=hidden name=ClassID value="&rsClass("ClassID")&">"
response.write "<input type=hidden name=cRootID value="&rsClass("RootID")&"> <input type=submit name=Submit value=修改>"
response.write "</td></form>"
else
response.write "<td width='150'> </td>"
end if
if iCount>j then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -