📄 admin_special.asp
字号:
<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称:四博CMS网站管理系统 2008 sp3
' 当前版本:dincoo.com
' 文件名称:admin_special.asp
' 更新日期:2006-12-20
' 官方网站:新云网络(www.newasp.net www.newasp.net) QQ:94022511
'=====================================================================
' Copyright 2003-2007 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
Dim Action,Flag,i,strOption
If Request("ChannelID") = 0 Or Request("ChannelID") = "" Then
ErrMsg = "<li>Sorry!错误的系统参数,请选择正确的连接方式。</li>"
Response.Redirect("showerr.asp?action=error&message=" & Server.URLEncode(ErrMsg) & "")
Response.End
Else
ChannelID = CInt(Request("ChannelID"))
End If
%>
<script language="javascript">
function formatbt()
{
var arr = showModalDialog("include/btformat.htm?",null, "dialogWidth:250pt;dialogHeight:166pt;toolbar=no;location=no;directories=no;status=no;menubar=NO;scrollbars=no;resizable=no;help=0; status:0");
if (arr != null){
document.myform.Topicformat.value=arr;
myt.innerHTML="<span style='background-color: #FFFFff;font-size:12px' "+arr+">设置标题样式 ABCdef</span>";
}
}
function Cancelform()
{
document.myform.Topicformat.value='';
myt.innerHTML="<span style='background-color: #FFFFff;font-size:12px'>设置标题样式 ABCdef</span>";
}
//-->
</script>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
<th><%=sChannelName%>专题栏目管理</th>
</tr>
<tr>
<td class=tablerow1><strong>管理操作:</strong> <a href='?ChannelID=<%=ChannelID%>'>管理首页</a> |
<a href='?action=add&ChannelID=<%=ChannelID%>'>添加专题栏目</a> | <a href='?action=orders&ChannelID=<%=ChannelID%>'>专题栏目排序</a></td>
</tr>
</table>
<br>
<%
Flag = "Special" & ChannelID
Action = LCase(Request("action"))
If Not ChkAdmin(Flag) Then
Server.Transfer("showerr.asp")
Response.End
End If
Select Case Trim(Action)
Case "save"
Call SaveSpecial
Case "modify"
Call ModifySpecial
Case "edit"
Call EditSpecial
Case "add"
Call AddSpecial
Case "del"
Call DelSpecial
Case "orders"
Call SpecialOrder
Case "saveorder"
Call SpecialRenewOrder
Case Else
Call MainPage
End Select
If FoundErr = True Then
ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
CloseConn
Private Sub MainPage()
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
<th>专题名称</th>
<th>连接目标</th>
<th>连接类型</th>
<th>修改专题栏目</th>
<th>删除专题栏目</th>
</tr>
<%
Set Rs = Newasp.Execute("Select SpecialID,ChannelID,SpecialName,Topicformat,Reopen,ChangeLink,SpecialUrl From NC_Special where ChannelID = "& ChannelID &" order by orders,SpecialID")
If Rs.BOF And Rs.EOF Then
Response.Write "<tr><td align=center colspan=5 class=TableRow2>还没有添加任何专题</td></tr>"
Else
Do While Not Rs.EOF
Response.Write "<tr align=center>"
Response.Write " <td class=tablerow1>"
Response.Write "<A href=?action=edit&ChannelID="
Response.Write Rs("ChannelID")
Response.Write "&SpecialID="
Response.Write Rs("SpecialID")
Response.Write "><span "
Response.Write Rs("Topicformat")
Response.Write ">"
Response.Write Rs("SpecialName")
Response.Write "</span></A>"
Response.Write " </td>"
Response.Write " <td class=tablerow1>"
If Rs("Reopen") <> 0 Then
Response.Write "<font color=red>新窗口打开</font>"
Else
Response.Write "<font color=blue>本窗口打开</font>"
End If
Response.Write " </td>"
Response.Write " <td class=tablerow1>"
If Rs("ChangeLink") <> 0 Then
Response.Write "<font color=red>转向连接</font>"
Else
Response.Write "<font color=blue>内部连接</font>"
End If
Response.Write " </td>"
Response.Write " <td class=tablerow1>"
Response.Write "<A href=?action=edit&ChannelID="
Response.Write Rs("ChannelID")
Response.Write "&SpecialID="
Response.Write Rs("SpecialID")
Response.Write ">编 辑 专 题</A>"
Response.Write " </td>"
Response.Write " <td class=tablerow1>"
Response.Write "<A href=?action=del&ChannelID="
Response.Write Rs("ChannelID")
Response.Write "&SpecialID="
Response.Write Rs("SpecialID")
Response.Write " onclick=""{if(confirm('此操作将删除此专题\n您确定要删除吗?')){return true;}return false;}"">删 除 专 题</A>"
Response.Write " </td>"
Response.Write "</tr>"
Rs.movenext
Loop
Rs.Close:Set Rs = Nothing
End If
%>
</table>
<%
End Sub
Private Sub AddSpecial()
Dim NewSpecialID
SQL = "select Max(SpecialID) from NC_Special"
Set Rs = Newasp.Execute(SQL)
If Rs.bof And Rs.EOF Then
NewSpecialID = 1
Else
NewSpecialID = Rs(0) + 1
End If
If IsNull(NewSpecialID) Then NewSpecialID = 1
Rs.Close:Set Rs = Nothing
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
<th colspan=2>添加<%=sModuleName%>专题栏目</th>
</tr>
<form name=myform method=post action=?action=save>
<input type=hidden name=ChannelID value='<%=ChannelID%>'>
<input type=hidden name=SpecialID value='<%=NewSpecialID%>'>
<tr>
<td width="20%" class=tablerow1><strong>专题栏目名称:</strong></td>
<td width="80%" class=tablerow1><input type=text name=SpecialName size=20 value=''>
样式:<input type="hidden" name="Topicformat" size="1" value="">
<span style="background-color: #fFfFff" id="myt" onclick="javascript:formatbt(this);" style='cursor:hand; font-size:11pt' >设置标题样式 ABCdef</span>
<input type=checkbox name=cancel value='' onclick="Cancelform()"> 取消格式</td>
</tr>
<tr>
<td class=tablerow2><strong>专题栏目说明:</strong></td>
<td class=tablerow2><input type=text name=Readme size=50 id=Readme value=''></td>
</tr>
<tr>
<td class=tablerow1><strong>专题所在目录:</strong></td>
<td class=tablerow1><input type=text name=SpecialDir size=20 value=''></td>
</tr>
<tr>
<td class=tablerow2><strong>是否新窗口打开:</strong></td>
<td class=tablerow2><input type=radio name=Reopen value='0' checked> 否
<input type=radio name=Reopen value='1'> 是 </td>
</tr>
<tr>
<td class=tablerow1><strong>是否转向连接:</strong></td>
<td class=tablerow1><input type=radio name=ChangeLink value='0' checked onClick="ChangeSetting.style.display='none';"> 否
<input type=radio name=ChangeLink value='1' onClick="ChangeSetting.style.display='';"> 是 </td>
</tr>
<tr id=ChangeSetting style="display:none">
<td class=tablerow2><strong>转向连接URL:</strong></td>
<td class=tablerow2><input type=text name=SpecialUrl size=50 value='http://'></td>
</tr>
<tr align=center>
<td class=tablerow2></td>
<td class=tablerow2><input type="button" onclick="javascript:history.go(-1)" value="返回上一页" name="B1" class=Button>
<input type="submit" value="添加专题" name="B2" class=Button></td>
</tr>
</form>
</table>
<%
End Sub
Private Sub EditSpecial()
Set Rs = Newasp.Execute("Select SpecialID,SpecialName,Topicformat,Readme,Reopen,SpecialDir,ChangeLink,SpecialUrl From NC_Special where ChannelID = "& ChannelID &" And SpecialID = " & Request("SpecialID"))
If Rs.BOF And Rs.EOF Then
Response.Write "参数错误!"
Exit Sub
End If
%>
<table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>
<tr>
<th colspan=2>修改<%=sModuleName%>专题栏目</th>
</tr>
<form name=myform method=post action=?action=modify>
<input type=hidden name=ChannelID value='<%=ChannelID%>'>
<input type=hidden name=SpecialID value='<%=Rs("SpecialID")%>'>
<tr>
<td width="20%" class=tablerow1><strong>专题栏目名称:</strong></td>
<td width="80%" class=tablerow1><input type=text name=SpecialName size=20 value='<%=Rs("SpecialName")%>'>
样式:<input type="hidden" name="Topicformat" size="1" value="<%=Server.HTMLEncode(Rs("Topicformat"))%>">
<span style="background-color: #fFfFff" id="myt" onclick="javascript:formatbt(this);" style='cursor:hand; font-size:11pt' ><span <%=Rs("Topicformat")%>>设置标题样式 ABCdef</span></span>
<input type=checkbox name=cancel value='' onclick="Cancelform()"> 取消格式</td>
</tr>
<tr>
<td class=tablerow2><strong>专题栏目说明:</strong></td>
<td class=tablerow2><input type=text name=Readme size=50 value='<%=Rs("Readme")%>'></td>
</tr>
<tr>
<td class=tablerow1><strong>专题所在目录:</strong></td>
<td class=tablerow1><input type=text name=SpecialDir size=20 value='<%=Rs("SpecialDir")%>'></td>
</tr>
<tr>
<td class=tablerow2><strong>是否新窗口打开:</strong></td>
<td class=tablerow2><input type=radio name=Reopen value='0'<%If Rs("Reopen") = 0 Then Response.Write (" checked")%>> 否
<input type=radio name=Reopen value='1'<%If Rs("Reopen") = 1 Then Response.Write (" checked")%>> 是 </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -