📄 admin_about.asp
字号:
<!--#include file="mdb.asp"-->
<%Admin="System"%>
<!--#include file="check.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/format.asp"-->
<html>
<head>
<title>Hxcms管理系统——频道管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="inc/admin.css" type=text/css rel=stylesheet>
</head>
<body>
<%
'****************************************************
' Hxcms Ver7.5 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('您尚未登陆或登陆超时,请重新登陆!!');this.top.location.href='admin.asp';</script>")
response.end
End IF
if request.Form("action")="add" then
l_id = Request.Form("meau")
title = Request.Form("title")
precis = Request.Form("precis")
content = Request.Form("content")
PaginationType = Request.Form("PaginationType")
MaxCharPerPage = Request.Form("MaxCharPerPage")
dim f_id,tem_fid,level
IF l_id<>"一级频道" Then '得到类别最高级数,以及主ID
tem_fid=split(l_id,",")
level=ubound(tem_fid)
f_id=tem_fid(level)
mainid=tem_fid(0)
Else
level=0
f_id=0
mainid=0
End IF
set rs=server.createObject("adodb.recordset")
sql="select * from Channel"
rs.open sql,conn,1,3
rs.addnew
IF title="" then
Response.Write("<script language=javascript>alert('你必须填写频道的标题!');history.back(1);</script>")
response.end
Else
rs("title")=title
End IF
IF precis="" then
Response.Write("<script language=javascript>alert('你必须填写频道的摘要!');history.back(1);</script>")
response.end
Else
rs("precis")=precis
End IF
IF content="" then
Response.Write("<script language=javascript>alert('你必须填写频道的内容!');history.back(1);</script>")
response.end
Else
rs("content")=content
End IF
rs("addtime")=now()
rs("PaginationType") = PaginationType
rs("MaxCharPerPage") = MaxCharPerPage
IF l_id<>"一级频道" Then
rs("sortid")=cstr(l_id)&","&rs("id")
rs("series")=level+1
Else
rs("sortid")=rs("id")
rs("series")=level
End IF
rs("f_id")=f_id
IF mainid=0 Then
mainid=rs("id")
Else
rs("mainid")=mainid
End IF
rs.update
rs.close
set rs=nothing
response.redirect "admin_about.asp?action=cat"
End IF
IF request.Form("action")="edit" then
l_id = Request.Form("meau")
title = Request.Form("title")
precis = Request.Form("precis")
content = Request.Form("content")
PaginationType = Request.Form("PaginationType")
MaxCharPerPage = Request.Form("MaxCharPerPage")
IF l_id<>"一级频道" Then
tem_fid=split(l_id,",")
level=ubound(tem_fid)
f_id=tem_fid(level)
mainid=tem_fid(0)
Else
level=0
f_id=0
mainid=0
End IF
set rs=server.createObject("adodb.recordset")
sql="select * from Channel where id="&cint(request.Form("id"))
rs.open sql,conn,1,3
IF title="" then
Response.Write("<script language=javascript>alert('你必须填写频道的标题!');history.back(1);</script>")
response.end
Else
rs("title")=title
End IF
IF precis="" then
Response.Write("<script language=javascript>alert('你必须填写频道的摘要!');history.back(1);</script>")
response.end
Else
rs("precis")=precis
End IF
IF content="" then
Response.Write("<script language=javascript>alert('你必须填写频道的内容!');history.back(1);</script>")
response.end
Else
rs("content")=content
End IF
rs("PaginationType") = PaginationType
rs("MaxCharPerPage") = MaxCharPerPage
IF l_id<>"一级频道" Then
rs("sortid")=cstr(l_id)&","&rs("id")
rs("series")=level+1
Else
rs("sortid")=rs("id")
rs("series")=level
End IF
rs("f_id")=f_id
IF mainid=0 Then
mainid=rs("id")
Else
rs("mainid")=mainid
End IF
rs.update
rs.close
set rs=nothing
response.redirect "admin_about.asp?action=cat"
End IF
IF request.form("operation")="DEL" then
num=request.form("ID").Count
for i=1 to num
conn.execute("delete from Channel where ID="&request.form("ID")(i))
next
End IF
IF request.QueryString("action")="cat" then
Set rs=server.CreateObject("Adodb.Recordset")
sql="select * from Channel order by sortid"
rs.open sql,conn,1,1
IF rs.eof Then%>
<tr align="center">
<td class=Hxcmsds align="center">暂时没有频道内容!</td>
</tr>
<%
Else
%>
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss><td colspan="5">频道管理</td></tr>
<tr class=Hxcmsqs align="center">
<td width="6%">ID</td>
<td width="7%">选中</td>
<td width="44%">频道名称</td>
<td width="8%">编辑频道</td>
<td width="35%">频道连接</td>
</tr>
<form name=form method=post action="">
<script language="javascript">
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
function Isvalidity(val,name){
if (val.value!='' && (isNaN(val.value) || val.value<=0))
{alert(name+"应填有效数字!");
val.value="";
val.focus();}
}
</script>
<%
do while not(rs.eof)
%>
<tr class=Hxcmsds>
<td align="center"><%=rs("id")%></td>
<td align="center"><input type=checkbox Name=ID value="<%=rs("id")%>"></td>
<td>
<%
for k=1 to rs("series")
response.write " "
next
%> ├ <%IF rs("series") mod 2<>0 Then%><font color="red"><%=rs("title")%></font><%Else%><%=rs("title")%><%End IF%>
</td>
<td align="center"><a href="admin_about.asp?action=edit&editeId=<%=rs("id")%>">编辑</a></td>
<td> <input name="textfield" type="text" value="about.asp?id=<%=rs("id")%>" onMouseOver="select();"></td>
</tr>
<%
rs.movenext
loop
%>
<tr class=Hxcmsqs><td colspan="5">
<table width="100%" align="center">
<input type=hidden value=DEL name=operation>
<td><input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="ON">选中所有</td>
<td><input type=submit value=删除选中 onClick="return confirm('确定删除吗?');" class="button"></td>
</tr>
</table></td>
</tr>
</form>
</table>
<%
End IF
rs.close
set rs = nothing
%>
<%
End IF
if request.QueryString("action")="add" then%>
<form name="addnews" method="post" action="">
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss><td colspan="5">频道添加</td></tr>
<tr class=Hxcmsds>
<td>频道名称:<input name=title type="text" size="30"> **</td>
</tr>
<tr class=Hxcmsds>
<td height="25">上级频道类别:
<select name="meau" id="meau">
<option value="一级频道" style="color:#663366;">→新增一级频道←</option>
<%
set ARs=Server.CreateObject("Adodb.recordset")
sql="select * from Channel order by sortid"
ARs.open sql,conn,1,1
do while not(ARs.eof)
series=ARs("series")
%>
<option value="<%=ARs("sortid")%>" <%IF series mod 2<>0 Then%> style="color:#ff0000;" <%End IF%>>
<%
for i=1 to ARs("series")
response.write " "
next
response.write "├ "&ARs("title")
%>
</option>
<%
ARs.movenext
loop
ARs.close
set ARs=nothing
%>
</select></td>
</tr>
<tr class=Hxcmsds>
<td>频道摘要:**</td>
</tr>
<tr class=Hxcmsds>
<td>
<textarea name="precis" cols="75" rows="5" id="precis"></textarea>
</td>
</tr>
<tr class=Hxcmsds>
<td>频道内容:**</td>
</tr>
<tr class=Hxcmsds>
<td>
<INPUT type='hidden' name='content'>
<IFRAME ID='eWebEditor1' src='eWebEditor/ewebeditor.htm?id=content&savepathfilename=d_savepathfilename' frameborder='0' scrolling='no' width='550' height='350'></IFRAME>
</td>
</tr>
<tr>
<td class=Hxcmsds>
分页方式:<input name="PaginationType" type="radio" value="0" checked> 不分页 <input name="PaginationType" type="radio" value="1" > 自动分页 <input name="PaginationType" type="radio" value="2"> 手动分页 注意:手动方式要在分页的地方输入: [NextPage] <BR> 自动分页每页字数:<input type="text" name="MaxCharPerPage" size="6" value="10000"> 字。 **应添整数数字
</td></tr>
<tr class=Hxcmsqs>
<td height="40" align="center">
<input type="submit" name="Submit" value="确定新增" class="button">
<input type="reset" name="Reset" value="清空重写" class="button">
<input type="hidden" name="action" value="add">
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<%end if
if request.QueryString("action")="edit" then
Dim ChannelId
IF Request.QueryString("editeId")<>"" Then
ChannelId=Request.QueryString("editeId")
IF isNumeric(ChannelId)<>True Then
Response.Write "<script language=javascript>alert('参数非法!');javascript:history.back();</script>"
Response.End
End IF
set eRs=Server.CreateObject("Adodb.Recordset")
sql="select * from Channel where id="&ChannelId
eRs.open sql,conn,1,1
IF eRs.eof Then
Response.Write "<script language=javascript>alert('未找到该记录!');javascript:history.back();</script>"
Response.End
End IF
Else
Response.Write "<script language=javascript>alert('未找到该记录!');javascript:history.back();</script>"
Response.End
End IF
%>
<form method="post" action="">
<table align="center" width="98%" align="center" border="1" cellspacing="0" cellpadding="4" class=Hxcmsbk style="border-collapse: collapse">
<tr class=Hxcmsss><td colspan="5">频道编辑</td></tr>
<tr class=Hxcmsqs>
<td>频道名称:<input name=title type="text" value="<%=eRs("title")%>" size="30"> **</td>
</tr>
<tr class=Hxcmsqs>
<td>上级频道:<select name="meau" id="meau">
<option value="一级频道" style="color:#663366;">--一级频道--</option>
<%
set ARs=Server.CreateObject("Adodb.recordset")
sql="select * from Channel where id<>"&ChannelID&" order by sortid"
ARs.open sql,conn,1,1
do while not(ARs.eof)
series=ARs("series")
%>
<option value="<%=ARs("sortid")%>" <%IF series mod 2<>0 Then Response.Write "style=""color:#ff0000;"""%><%IF eRs("f_id")=Cint(ARs("id")) Then response.write "selected" %>>
<%
for i=1 to ARs("series")
response.write " "
next
response.write "├ "&ARs("title")
%>
</option>
<%
ARs.movenext
loop
ARs.close
set ARs=nothing
%>
</select></td>
</tr>
<tr class=Hxcmsqs>
<td>频道摘要:**</td>
</tr>
<tr class=Hxcmsqs>
<td>
<textarea name="precis" cols="75" rows="5" id="precis"><%=eRs("precis")%></textarea>
</td>
</tr>
<tr class=Hxcmsqs>
<td>频道内容:**</td>
</tr>
<tr class=Hxcmsqs>
<td>
<INPUT type='hidden' name='content' value="<%=Server.HtmlEncode(eRs("content"))%>">
<IFRAME ID='eWebEditor1' src='eWebEditor/ewebeditor.htm?id=content&savepathfilename=d_savepathfilename' frameborder='0' scrolling='no' width='550' height='350'></IFRAME>
</td>
</tr>
<tr>
<td class=Hxcmsds>
分页方式:<input name="PaginationType" type="radio" value="0" <%if eRs("PaginationType")="0" then response.write "checked" end if%>> 不分页 <input name="PaginationType" type="radio" value="1" <%if eRs("PaginationType")="1" then response.write "checked" end if%>> 自动分页 <input name="PaginationType" type="radio" value="2" <%if eRs("PaginationType")="2" then response.write "checked" end if%>> 手动分页 注意:手动方式要在分页的地方输入: [NextPage] <BR> 自动分页每页字数:<input type="text" name="MaxCharPerPage" size="6" value="<%=eRs("MaxCharPerPage")%>"> 字。 ***应添整数数字
</td></tr>
<tr class=Hxcmsqs>
<td>
<input name="Submit" type="submit" class="button" id="Submit" value="确定修改">
<input name="Reset" type="reset" class="button" id="Reset" value="清空重写">[<a href="admin_art.asp">返回</a>]
<input type="hidden" name="id" value="<%=eRs("id")%>">
<input type="hidden" name="action" value="edit">
</td>
</tr>
</table>
<%end if
'****************************************************
' Hxcms Ver7.5 Power by Hx66.net
' Web: http://www.Hx66.net,http://www.Hx66.net/home
' Copyright (C) 2006 Hx66.net All Rights Reserved.
'****************************************************
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -