📄 admin_channel.asp
字号:
<!--#include file="admin_conn.asp"-->
<!--#include file="../include/admin_setting.asp"-->
<!--#include file="admin_function.asp"-->
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1 Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com www.maosin.net
' QQ:57861417
'电子邮箱:maosin@163.com maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
Call admin_top()
Call navMenu()
Select Case Request.QueryString("action")
Case "maosin_appchannel"
Call addchannel()
Case "maosin_appsava"
Call addsava()
Case "maosin_mdfchannel"
Call modifychannel()
Case "maosin_mdfsava"
Call modifysava()
case "maosin_del"
Call deletechannel()
Case LCase("accessories")
if getPopedom("channelAdmin")=false then
popedomMsg
else
Call accessories("../upfile/channel/")
end if
Case Lcase("delfile")
if getPopedom("channelAdmin")=false then
popedomMsg
else
Call deletefile("../upfile/channel/")
end if
Case else
Call adminchannel()
End Select
Call admin_foot()
Sub navMenu()%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="text table_border mainTable">
<tr><td colspan="2" class="td_titleT">频道管理</td></tr>
<tr><td width="95" height="30" class="td_bgcolor">管理快捷导航:</td><td class="td_bgcolor"><a href="admin_channel.asp">频道管理</a> | <a href="admin_channel.asp?action=maosin_appchannel">添加频道</a> | <a href="admin_channel.asp?action=accessories">频道附件管理</a></td></tr>
</table>
<%
table(5)
End Sub
Sub adminchannel()
if getPopedom("channelAdmin")=false then
popedomMsg
exit sub
end if
%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="text table_border mainTable">
<tr>
<td height="24" colspan="5" valign="middle" class="td_titleT">频道管理</td>
</tr>
<tr class="td_topT" valign="middle" align="center">
<td width="40" height="22">ID</td>
<td width="*">频道标题</td>
<td width="*">频道地址</td>
<td width="150">添加时间</td>
<td width="120">频道操作</td>
</tr>
<%
dim sql,rs,nextpage,lineNo,strTemp,urlStr
sql="select * from ms_channel where rootid=0"
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open sql,connstr,1,1
if not rs.bof and not rs.eof then
nextpage=pagetitle(rs,10,"admin_channel.asp?","个频道分类")
lineNo=1
do while Not rs.Eof And lineNo<=rs.PageSize
if rs("rootid")=0 and rs("sflag")=1 then
strTemp="<font color=""#00648A""><b>"&rs("channel_title")&"</b></font> <font color=""#00648A"">[根目录]</font>"
urlStr="channel.asp?id="&rs("id")
else
strTemp="<font color=""#ff4400""><b>"&rs("channel_title")&"</b></font> <font color=""#00648A"">[分类]</font>"
urlStr="channel.asp?rootid="&rs("id")
end if
if rs("rootid")=0 and rs("sflag")=0 then%>
<tr class="td_bgcolor" align="center" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<td height="18" valign="middle"><%=rs("id")%></td>
<td valign="middle" align="left"><%=strTemp%></td>
<td valign="middle"><input name="textfield3" type="text" style="width:100%" size="16" value="<%=urlStr%>"></td>
<td valign="middle"><%=rs("channel_date")%></td>
<td align="center" valign="middle">
<a href="admin_channel.asp?action=maosin_mdfchannel&isclass=2&id=<%=rs("id")%>">编辑</a>
<a onClick="{if(confirm('您确定要删除此项目吗?')){window.location.href='admin_channel.asp?action=maosin_del&id=<%=rs("id")%>';}return false;}">删除</a>
<a href="../<%=urlStr%>" target="_blank">查看</a></td>
</tr>
<% set crs=conn.execute("select * from ms_channel where rootid="&rs("id"))
do while not crs.eof
urlstr="../channel.asp?rootid="&crs("rootid")&"&id="&crs("id")%>
<tr class="td_bgcolor" align="center" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<td height="18" valign="middle"><%=crs("id")%></td>
<td valign="middle" align="left"><font color="#333333"> ├ <%=crs("channel_title")%></font></td>
<td valign="middle"><input name="textfield3" type="text" style="width:100%" size="16" value="channel.asp?rootid=<%=crs("rootid")%>&id=<%=crs("id")%>"></td>
<td valign="middle"><%=crs("channel_date")%></td>
<td align="center" valign="middle">
<a href="admin_channel.asp?action=maosin_mdfchannel&isclass=1&id=<%=crs("id")%>">编辑</a>
<a onClick="{if(confirm('您确定要删除此项目吗?')){window.location.href='admin_channel.asp?action=maosin_del&id=<%=crs("id")%>';}return false;}">删除</a>
<a href="<%=urlstr%>" target="_blank">查看</a></td>
</tr>
<%crs.movenext
loop
crs.close
set crs=nothing
else
%>
<tr class="td_bgcolor" align="center" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)">
<td height="18" valign="middle"><%=rs("id")%></td>
<td valign="middle" align="left"><%=strTemp%></td>
<td valign="middle"><input name="textfield3" type="text" style="width:100%" size="16" value="<%=urlStr%>"></td>
<td valign="middle"><%=rs("channel_date")%></td>
<td align="center" valign="middle">
<a href="admin_channel.asp?action=maosin_mdfchannel&isclass=1&id=<%=rs("id")%>">编辑</a>
<a onClick="{if(confirm('您确定要删除此项目吗?')){window.location.href='admin_channel.asp?action=maosin_del&id=<%=rs("id")%>';}return false;}">删除</a>
<a href="../<%=urlStr%>" target="_blank">查看</a></td>
</tr>
<%
end if
lineNo=lineNo+1
rs.MoveNext
loop%>
<tr><td colspan="5" class="td_titleB">
<%response.write(nextpage)%>
</td></tr>
<%end if%>
</table>
<%rs.close
set rs=nothing
End Sub
Sub addchannel()
if getPopedom("channelAdmin")=false then
popedomMsg
exit sub
end if
dim editpath:editpath="../editor/"
%>
<script language="javascript">
function checksubmit(){
submits();
if(document.form.title.value==""){
alert("频道名称不能为空");
document.form.title.focus();
return false;}
if(!document.form.isclass.checked){
if(document.form.content.value==""){
alert("频道内容不能为空");
IframeID.document.body.focus();
return false;}
}
return true;}
var editorpath="../editor/";
function IsClass(objValue){
var Value=objValue.checked;
if (Value){
ctitle.innerText="频道分类";
showcontent.style.display="none";
}else{
ctitle.innerText="频道名称";
showcontent.style.display="block";
}
}
</Script>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
<form name="form" onsubmit="return checksubmit()" action="?action=maosin_appsava" method="post">
<tr align="left" valign="middle">
<td height="24" colspan="3" class="td_titleT">增加频道</td>
</tr>
<tr class="td_bgcolor">
<td height="25" width="80" valign="middle" align="right"><span id="ctitle">频道名称</span>:</td>
<td colspan="2" valign="middle"><input name="title" type="text" size="30">
<select name="titlecolor" onChange="titlecolor.value=this.value;">
<option value="#000000">选择颜色</option>
<%
colorStr=split(colorRS,",")
for i=0 to ubound(colorStr)
Response.Write ("<option style=""background-color:"& colorStr(i) &";color: "& colorStr(i) &""" value="""&colorStr(i)&""">"&colorStr(i)&"</option>")
next
%>
</select> <input type="checkbox" value="true" name="isclass" id="isclass" onClick="IsClass(this)"><label for="isclass">作为分类</label>
</td>
</tr>
<tbody id="showcontent">
<tr class="td_bgcolor">
<td height="25" valign="middle" align="right">所属分类:</td>
<td valign="middle">
<select name="rootid">
<option value="0">[根目录]</option>
<%dim rs
set rs=conn.execute("select id,channel_title from ms_channel where rootid=0 and sflag=0")
do while not rs.eof
response.write("<option value="""&rs("id")&""">"&rs("channel_title")&"</option>")
rs.MoveNext
loop
rs.close
set rs=nothing
%>
</select>
</td>
</tr>
<tr class="td_bgcolor">
<td height="25" valign="middle" align="right">上传图片:</td>
<td colspan="2" valign="middle">
<iframe src="myup.asp?cat=channel&uptype=pic&content=oblog_Composition" scrolling="no" frameborder="0" height="25" marginheight="0" marginwidth="0" width="100%"></iframe>
</td>
</tr>
<tr class="td_bgcolor">
<td height="225" valign="top" align="right">频道内容:</td>
<td colspan="2" valign="top"> <input type="hidden" name="content" id="edit"><!--#include file="../editor/edit.asp"--></td>
</tr>
</tbody>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -