⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_flash.asp

📁 这是一套基于WEB的网站管理系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="setup.asp"-->
<!--#include file="check.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称:新云网站管理系统
' 当前版本:NewCloud Site Management System Version 2.0.0
' 文件名称:admin_flash.asp
' 更新日期:2004-12-20
' 官方网站:新云网络(www.newasp.net www.newasp.cn) QQ:94022511
'=====================================================================
' Copyright 2002-2005 newasp.net - All Rights Reserved.
' newasp is a trademark of newasp.net
'=====================================================================
Dim Action,isEdit,Flag,DefaultShowMode
Dim i,ClassID,RsObj,flashid,findword,keyword,strClass
Dim TextContent,FlashTop,FlashBest,ForbidEssay
Dim maxperpage,CurrentPage,totalnumber,TotalPageNum
Dim s_ClassName,ChildStr,FoundSQL,isAccept,selflashid
Dim FlashAccept,Auditing

ChannelID = Newasp.ChkNumeric(Request("ChannelID"))
If ChannelID = 0 Then ChannelID = 5
If ChannelID = 5 Then
	DefaultShowMode = 1		'-- 默认显示模式
Else
	DefaultShowMode = 2		'-- 默认显示模式
End If

Flag = sChannelDir & ChannelID
If Request("isAccept") <> "" Then
	isAccept = 1
Else
	isAccept = 0
End If
Action = LCase(Request("action"))
If Not ChkAdmin(Flag) Then
	Server.Transfer("showerr.asp")
	Response.End
End If

Select Case Trim(Action)
Case "save"
	Call SaveFlash
Case "modify"
	Call ModifyFlash
Case "add"
	isEdit = False
	Call FlashEdit(isEdit)
Case "edit"
	isEdit = True
	Call FlashEdit(isEdit)
Case "del"
	Call FlashDel
Case "view"
	Call FlashView
Case "setting"
	Call PageTop
	Call BatchSetting
Case "saveset"
	Call SaveSetting
Case "move"
	Call PageTop
	Call BatchMove
Case "savemove"
	Call SaveMove
Case "batdel"
	Call PageTop
	Call BatcDelete
Case "alldel"
	Call AllDelFlash
Case Else
	Call showmain
End Select
If FoundErr = True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
CloseConn
Private Sub PageTop()
	Response.Write "<table border=0 align=center cellpadding=3 cellspacing=1 class=TableBorder>"
	Response.Write "	<tr>"
	Response.Write "	  <th colspan=2>" & sModuleName & "管理选项</th>"
	Response.Write "	</tr>"
	Response.Write "	<tr><form method=Post name=myform action='admin_flash.asp' onSubmit='return JugeQuery(this);'>"
	Response.Write "<input type=hidden name=ChannelID value='" & ChannelID & "'>"
	Response.Write "<td class=TableRow1>搜索:"
	Response.Write "	  <input name=keyword type=text size=20>"
	Response.Write "	  条件:"
	Response.Write "	  <select name=queryopt>"
	Response.Write "		<option value='1' selected>" & sModuleName & "名称</option>"
	Response.Write "		<option value='2'>添 加 人</option>"
	Response.Write "		<option value='3'>不限条件</option>"
	Response.Write "	  </select> <input type=submit name=Submit value='开始查询' class=Button></td>"
	Response.Write "	  <td class=TableRow1>" & sModuleName & "导航:"
	Dim srtClassMenu
	Response.Write "<select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & vbCrLf
	Response.Write "<option value='admin_flash.asp?ChannelID=" & ChannelID & "'>≡全部" & sModuleName & "列表≡</option>" & vbCrLf
	srtClassMenu = Newasp.ClassJumpMenu(ChannelID)
	srtClassMenu = Replace(srtClassMenu, "{ClassID=" & Request("sortid") & "}", "selected")
	Response.Write srtClassMenu
	Response.Write "</select>"
	Response.Write "	  </td></form>"
	Response.Write "	</tr>"
	Response.Write "	<tr>"
	Response.Write "	  <td colspan=2 class=TableRow2><strong>操作选项:</strong> <a href='admin_flash.asp?ChannelID=" & ChannelID & "'>管理首页</a> | "
	Response.Write "	  <a href='admin_flash.asp?action=add&ChannelID=" & ChannelID & "'>添加" & sModuleName & "</a> | "
	Response.Write "	  <a href='admin_classify.asp?ChannelID=" & ChannelID & "&action=add'>添加" & sModuleName & "分类</a> | "
	Response.Write "	  <a href='admin_classify.asp?ChannelID=" & ChannelID & "'>" & sModuleName & "分类管理</a></td>"
	Response.Write "	</tr>"
	Response.Write "</table>"
	Response.Write "<br>"
End Sub
Private Sub showmain()
	If Not IsEmpty(Request("selflashid")) Then
		selflashid = Request("selflashid")
		Select Case Newasp.CheckStr(Request("act"))
		Case "批量删除":Call batdel
		Case "批量移动":Call batmove
		Case "更新时间":Call upindate
		Case "批量推荐":Call isCommend
		Case "取消推荐":Call noCommend
		Case "批量置顶":Call isTop
		Case "取消置顶":Call noTop
		Case "批量审核":Call BatAccept
		Case "取消审核":Call NotAccept
		Case "生成HTML":Call BatCreateHtml
		Case Else
			Response.Write "无效参数!"
		End Select
	End If
	Call PageTop
	Response.Write "<table  border=0 align=center cellpadding=3 cellspacing=1 class=TableBorder>"
	Response.Write "	<tr>"
	Response.Write "	  <th width='5%' nowrap>选择</th>"
	Response.Write "	  <th width='68%'>" & sModuleName & "名称</th>"
	Response.Write "	  <th width='9%' nowrap>管理操作</th>"
	Response.Write "	  <th width='9%' nowrap>录 入 者</th>"
	Response.Write "	  <th width='9%' nowrap>整理日期</th>"
	Response.Write "	</tr>"

	If Request("sortid") <> "" Then
		SQL = "select ClassID,ChannelID,ClassName,ChildStr from [NC_Classify] where ChannelID = " & ChannelID & " And ClassID=" & Request("sortid")
		Set Rs = Newasp.Execute(SQL)
		If Rs.bof And Rs.EOF Then
			Response.Write "Sorry!没有找到任何" & sModuleName & "分类。或者您选择了错误的系统参数!"
			Response.End
		Else
			s_ClassName = Rs("ClassName")
			ClassID = Rs("ClassID")
			ChildStr = Rs("ChildStr")
		End If
		Rs.Close
	Else
		s_ClassName = "全部" & sModuleName
	End If
	maxperpage = 20 '###每页显示数
	
	If Not IsNumeric(Request("page")) And Len(Request("page")) <> 0 Then
		Response.Write ("错误的系统参数!请输入整数")
		Response.End
	End If
	If Not IsEmpty(Request("page")) And Len(Request("page")) <> 0 Then
		CurrentPage = CInt(Request("page"))
	Else
		CurrentPage = 1
	End If
	If CInt(CurrentPage) = 0 Then CurrentPage = 1
	If Not IsNull(Request("keyword")) And Request("keyword") <> "" Then
		keyword = Newasp.ChkQueryStr(Request("keyword"))
		If CInt(Request("queryopt")) = 1 Then
			findword = "A.title like '%" & keyword & "%'"
		ElseIf CInt(Request("queryopt")) = 2 Then
			findword = "A.username like '%" & keyword & "%'"
		Else
			findword = "A.title like '%" & keyword & "%' or A.username like '%" & keyword & "%'"
		End If
		FoundSQL = findword
		s_ClassName = "查询" & sModuleName
	Else
		If Request("sortid") <> "" Then
			FoundSQL = "A.isAccept <> "& isAccept & " And A.ClassID in (" & ChildStr & ")"
		Else
			FoundSQL = "A.isAccept <> " & isAccept
		End If
	End If
	TotalNumber = Newasp.Execute("Select Count(flashid) from NC_FlashList A where A.ChannelID = " & ChannelID & " And "& FoundSQL &"")(0)
	TotalPageNum = CInt(TotalNumber / maxperpage)  '得到总页数
	If TotalPageNum < TotalNumber / maxperpage Then TotalPageNum = TotalPageNum + 1
	If CurrentPage < 1 Then CurrentPage = 1
	If CurrentPage > TotalPageNum Then CurrentPage = TotalPageNum
	Set Rs = Server.CreateObject("ADODB.Recordset")
	SQL = "select A.*,C.ClassName from [NC_FlashList] A inner join [NC_Classify] C on A.ClassID=C.ClassID where A.ChannelID = " & ChannelID & " And "& FoundSQL &" order by A.isTop desc, A.addTime desc ,A.flashid desc"
	Rs.Open SQL, Conn, 1, 1
	Newasp.SqlQueryNum = Newasp.SqlQueryNum + 1
	If Rs.bof And Rs.EOF Then
		Response.Write "<tr><td align=center colspan=5 class=TableRow2>还没有找到任何" & sModuleName & "!</td></tr>"
	Else
		If TotalPageNum > 1 then Rs.Move (CurrentPage - 1) * maxperpage
		i = 0

	Response.Write "	<tr>"
	Response.Write "	  <td colspan=5 align=center class=TableRow2>"
	  Call showpage()
	Response.Write "</td>"
	Response.Write "	</tr>"
	Response.Write "	<form name=selform method=post action="""">"
	Response.Write "<input type=hidden name=ChannelID value='" & ChannelID & "'>"
	Response.Write "<input type=hidden name=action value=''>"
	Do While Not Rs.EOF And i < CInt(maxperpage)
		If Not Response.IsClientConnected Then Response.End
		If (i mod 2) = 0 Then
			strClass = "class=TableRow1"
		Else
			strClass = "class=TableRow2"
		End If
		Response.Write "	<tr>"
		Response.Write "	  <td align=center " & strClass & "><input type=checkbox name=selflashid value=" & Rs("flashid") & "></td>"
		Response.Write "	  <td " & strClass & ">"
		If Rs("isTop") <> 0 Then
			Response.Write "<img src=""images/istop.gif"" width=15 height=17 border=0 alt=置顶动画>"
		End If

		Response.Write "[<a href=?ChannelID=" & Rs("ChannelID") & "&sortid="
		Response.Write Rs("ClassID")
		Response.Write ">"
		Response.Write Rs("ClassName")
		Response.Write "</a>] "
		Response.Write "<a href=?action=view&ChannelID=" & Rs("ChannelID") & "&flashid="
		Response.Write Rs("flashid")
		Response.Write ">"
		Response.Write Newasp.ReadFontMode(Rs("title"),Rs("ColorMode"),Rs("FontMode"))
		Response.Write "</a>" 

		If Rs("isBest") <> 0 Then
			Response.Write "&nbsp;&nbsp;<font color=blue>荐</font>"
		End If
%>
	  </td>
	  <td align="center" nowrap <%=strClass%>><a href=?action=edit&ChannelID=<%=Rs("ChannelID")%>&flashid=<%=Rs("flashid")%>>编辑</a> | <a href=?action=del&ChannelID=<%=Rs("ChannelID")%>&flashid=<%=Rs("flashid")%> onclick="{if(confirm('动画删除后将不能恢复,您确定要删除该动画吗?')){return true;}return false;}">删除</a></td>
	  <td align="center" nowrap <%=strClass%>><%=Rs("UserName")%></td>
	  <td align="center" nowrap <%=strClass%>>
<%
		If Rs("addTime") >= Date Then
			Response.Write "<font color=red>"
			Response.Write Newasp.FormatDate(Rs("addTime"), 2)
			Response.Write "</font>"
		Else
			Response.Write Newasp.FormatDate(Rs("addTime"), 2)
		End If
%>
	  </td>
	</tr>
<%
		Rs.movenext
			i = i + 1
			If i >= maxperpage Then Exit Do
		Loop
	End If
	Rs.Close:Set Rs = Nothing
%>
	<tr>
	  <td colspan="5" class="TableRow1">
	  <input class=Button type="button" name="chkall" value="全选" onClick="CheckAll(this.form)"><input class=Button type="button" name="chksel" value="反选" onClick="ContraSel(this.form)">
	  管理选项:
	  <select name="act">
		<option value="0">请选择操作选项</option>
		<option value="批量删除">批量删除</option>
		<option value="批量置顶">批量置顶</option>
		<option value="取消置顶">取消置顶</option>
		<option value="批量推荐">批量推荐</option>
		<option value="取消推荐">取消推荐</option>
		<option value="更新时间">更新时间</option>
		<option value="生成HTML">生成HTML</option>
	  </select>
	  <input class=Button type="submit" name="Submit2" value="执行操作" onclick="return confirm('您确定执行该操作吗?');">
	  <input class=Button type="submit" name="Submit3" value="批量设置" onclick="document.selform.action.value='setting';">
	  <input class=Button type="submit" name="Submit4" value="批量移动" onclick="document.selform.action.value='move';">
	  <input class=Button type="submit" name="Submit4" value="批量删除" onclick="document.selform.action.value='batdel';"></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -