admin_flash.asp

来自「小游戏网站演示www.4399.io 拥有4万条游戏数据」· ASP 代码 · 共 1,413 行 · 第 1/5 页

ASP
1,413
字号
		Rs("Related") = Newasp.ChkFormStr(Request.Form("Related"))
		Rs("Describe") = Newasp.ChkFormStr(Request.Form("Describe"))
		If UCase(Request.Form("SizeUnit")) = "MB" Then
			Rs("filesize") = CLng(Request.Form("filesize") * 1024)
		Else
			Rs("filesize") = CLng(Request.Form("filesize"))
		End If
		Rs("Author") = Trim(Request.Form("Author"))
		Rs("ComeFrom") = Trim(Request.Form("ComeFrom"))
		Rs("star") = Trim(Request.Form("star"))
		Rs("miniature") = Trim(Request.Form("miniature"))
		Rs("UserGroup") = Trim(Request.Form("UserGroup"))
		Rs("PointNum") = Trim(Request.Form("PointNum"))
		'Rs("UserName") = Trim(AdminName)
		If CInt(Request.Form("Update")) = 1 Then 
			Rs("addTime") = Now()
		Else
			Rs("addTime") = Formatime(Trim(Request.Form("addTime")))
		End If
		Rs("AllHits") = Newasp.CheckNumeric(Request.Form("AllHits"))
		Rs("showmode") = Newasp.ChkNumeric(Request.Form("showmode"))
		Rs("isTop") = FlashTop
		Rs("IsBest") = FlashBest
		Rs("downid") = Newasp.ChkNumeric(Request.Form("downid"))
		Rs("showurl") = Trim(Request.Form("showurl"))
		Rs("DownAddress") = Trim(Request.Form("DownAddress"))
		Rs("isUpdate") = 1
		Rs("isAccept") = FlashAccept
		Rs("ForbidEssay") = ForbidEssay
		Rs("AlphaIndex") = Newasp.ReadAlpha(Request.Form("title"))
	Rs.update
	flashid = Rs("flashid")
	If FlashAccept = 1 And Auditing = 0 Then
		AddUserPointNum Rs("username"),1
	End If
	If FlashAccept = 0 And Auditing = 1 Then
		AddUserPointNum Rs("username"),0
	End If
	Rs.Close:Set Rs = Nothing
	Call RemoveCache
	If CInt(Newasp.IsCreateHtml) <> 0 Then
		Dim url
		Response.Write "<IE:Download ID=CreationID STYLE=""behavior:url(#default#download)"" />" & vbCrLf
		url = "admin_makeflash.asp?ChannelID=" & ChannelID & "&flashid=" & flashid & "&showid=0"	
		Call ScriptCreation(url,flashid)
	End If
	Succeed("<li>恭喜您!修改" & sModuleName & "成功。</li><li><a href=?action=view&ChannelID=" & ChannelID & "&flashid=" & flashid & ">点击此处查看该" & sModuleName & "</a></li>")
End Sub

Private Sub FlashView()
	Call PageTop
	If Request("flashid") = "" Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>Sorry!您选择了错误的系统参数。</li>"
		Exit Sub
	End If
	SQL = "select * from NC_FlashList where ChannelID=" & ChannelID & " And flashid=" & Request("flashid")
	Set Rs = Newasp.Execute(SQL)
	If Rs.bof And Rs.EOF Then
		FoundErr = True
		ErrMsg = ErrMsg + "<li>Sorry!没有找到任何" & sModuleName & "。或者您选择了错误的系统参数!</li>"
		Exit Sub
	Else
%>
	<table border="0" align="center" cellpadding="3" cellspacing="1" class="TableBorder">
	<tr>
	  <th colspan="2">查看<%=sModuleName%></th>
	</tr>
	<tr>
	  <td align="center" class="TableRow2" colspan="2"><a href=?action=edit&ChannelID=<%=ChannelID%>&flashid=<%=Rs("flashid")%>><font size=4><%=Newasp.ReadFontMode(Rs("title"),Rs("ColorMode"),Rs("FontMode"))%></font></a></td>
	</tr>
	<tr>
	  <td class="TableRow1"><strong><%=sModuleName%>名称:</strong> <%=Rs("title")%></td>
	  <td class="TableRow1"><strong><%=sModuleName%>大小:</strong> <%=Rs("filesize")%> KB</td>
	</tr>
	<tr>
	  <td class="TableRow1"><strong><%=sModuleName%>作者:</strong> <%=Rs("Author")%></td>
	  <td class="TableRow1"><strong>作品来源:</strong> <%=ReadComeFrom(Rs("ComeFrom"))%></td>
	</tr>
	<tr>
	  <td class="TableRow1"><strong>更新时间:</strong> <%=Rs("addTime")%></td>
	  <td class="TableRow1"><strong><%=sModuleName%>星级:</strong> 
<%
Response.Write "<font color=red>"
For i = 1 to Rs("star")
	Response.Write "★"
Next
Response.Write "</font>"
%>
	  </td>
	</tr>
	<tr>
	  <td colspan="2" align="center" class="TableRow1">
<%
	Call PreviewMode(Rs("showurl"),Rs("showmode"))
%>
	  </td>
	</tr>
	<tr>
	  <td colspan="2" class="TableRow1"><strong><%=sModuleName%>简介:</strong><br><%=Replace(ubb.UbbCode(Rs("Introduce")), "[page_break]", "")%></td>
	</tr>
	<tr>
	  <td colspan="2" class="TableRow1">上一<%=sModuleName%>:<%=FrontFlash(Rs("flashid"))%>
	  <br>下一<%=sModuleName%>:<%=NextFlash(Rs("flashid"))%></td>
	</tr>
	<tr>
	  <td align="center" colspan="2" class="TableRow2"><input type="button" onclick="{if(confirm('您确定要删除吗?')){location.href='?action=del&ChannelID=<%=ChannelID%>&flashid=<%=Rs("flashid")%>';return true;}return false;}" value="删除<%=sModuleName%>" name="B2" class=Button>&nbsp;&nbsp;
	  <input type="button" onclick="javascript:history.go(-1)" value="返回上一页" name="B1" class=Button>&nbsp;&nbsp; 
	  <input type="button" name="Submit1" onclick="javascript:location.href='#'" value="返回顶部" class=button>&nbsp;&nbsp;
	  <input type="button" name="Submit1" onclick="javascript:location.href='?action=edit&ChannelID=<%=ChannelID%>&flashid=<%=Rs("flashid")%>'" value="编辑<%=sModuleName%>" class=button></td>
	</tr>
</table>
<%
	End If
	Rs.Close
	Set Rs = Nothing 
End Sub
Public Function ReadComeFrom(ByVal strContent)
	ReadComeFrom = ""
	If IsNull(strContent) Then Exit Function
	If Trim(strContent) = "" Then Exit Function
	strContent = " " & strContent & " "
	Dim re
	Set re = New RegExp
        re.IgnoreCase = True
        re.Global = True
	re.Pattern = "^((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]:+!]+([^<>""|'])+)"
	strContent = re.Replace(strContent,"<a target=""_blank"" href=$1>$1</a>")
	re.Pattern = "((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]:+!]+([^<>""])+)$([^\[|']*)"
	strContent = re.Replace(strContent,"<a target=""_blank"" href=$1>$1</a>")
	re.Pattern = "([^>=""])((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]:+!]+([^<>""|'])+)"
	strContent = re.Replace(strContent,"$1<a target=""_blank"" href=$2>$2</a>")
	re.Pattern = "([\s])((www|cn)[.](\w)+[.]{1,}(net|com|cn|org|cc)(((\/[\~]*|\\[\~]*)(\w)+)|[.](\w)+)*(((([?](\w)+){1}[=]*))*((\w)+){1}([\&](\w)+[\=](\w)+)*)*)"
	strContent = re.Replace(strContent,"<a target=""_blank"" href=""http://$2"">$2</a>")
	Set re = Nothing
	ReadComeFrom = Trim(strContent)
End Function

Private Sub PreviewMode(url,modeid)
	If Len(url) < 3 Then Exit Sub
	If Left(url,1) <> "/" And InStr(url,"://") = 0 Then
		url = "../" & Newasp.ChannelDir & url
	End If
	Select Case CInt(modeid)
	Case 1
		Response.Write "<object codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0"" height=""400"" width=""550"" classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"">"& vbCrLf
		Response.Write "	<param name=""movie"" value=""" & url & """>"& vbCrLf
		Response.Write "	<param name=""quality"" value=""high"">"& vbCrLf
		Response.Write "	<param name=""SCALE"" value=""exactfit"">"& vbCrLf
		Response.Write "	<embed src=""" & url & """ quality=""high"" pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=""550"" height=""400"">"& vbCrLf
		Response.Write "	</embed>"& vbCrLf
		Response.Write "</object>"& vbCrLf
	Case 2
		Response.Write "<img src=""" & url & """ border=""0"" onload=""return imgzoom(this,550)"">"
	Case 3
		Response.Write "<object classid=""CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"" class=""OBJECT"" id=""MediaPlayer"" width=""220"" height=""220"">"& vbCrLf
		Response.Write "	<param name= value=""-1"">"& vbCrLf
		Response.Write "	<param name=""CaptioningID"" value>"& vbCrLf
		Response.Write "	<param name=""ClickToPlay"" value=""-1"">"& vbCrLf
		Response.Write "	<param name=""Filename"" value=""" & url & """>"& vbCrLf
		Response.Write "	<embed src=""" & url & """  width= 220 height=""220"" type=""application/x-oleobject"" codebase=""http://activex.microFlash.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=0,1,1,1"" flename=""mp""></embed>"& vbCrLf
		Response.Write "</object>"& vbCrLf
	Case 4
		Response.Write "<object classid=""clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"" height=""288"" id=""video1"" width=""305"" VIEWASTEXT>"& vbCrLf
		Response.Write "	<param name=""_ExtentX"" value=""5503"">"& vbCrLf
		Response.Write "	<param name=""_ExtentY"" value=""1588"">"& vbCrLf
		Response.Write "	<param name=""AUTOSTART"" value=""-1"">"& vbCrLf
		Response.Write "	<param name=""SHUFFLE"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""PREFETCH"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""NOLABELS"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""SRC"" value=""" & url & """>"& vbCrLf
		Response.Write "	<param name=""CONTROLS"" value=""Imagewindow,StatusBar,ControlPanel"">"& vbCrLf
		Response.Write "	<param name=""CONSOLE"" value=""RAPLAYER"">"& vbCrLf
		Response.Write "	<param name=""LOOP"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""NUMLOOP"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""CENTER"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""MAINTAINASPECT"" value=""0"">"& vbCrLf
		Response.Write "	<param name=""BACKGROUNDCOLOR"" value=""#000000"">"& vbCrLf
		Response.Write "</object>"& vbCrLf
	Case 5
		Response.Write "<object classid=""clsid:166B1BCA-3F9C-11CF-8075-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"" width=""100%"" height=""100%"">"& vbCrLf
		Response.Write "	<param name=""src"" value=""" & url & """>"& vbCrLf
		Response.Write "	<param name=""swRemote"" value=""swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' "">"& vbCrLf
		Response.Write "	<param name=""swStretchStyle"" value=""fill"">"& vbCrLf
		Response.Write "	<PARAM name=""bgColor"" value=""#000000"">"& vbCrLf
		Response.Write "	<PARAM name=logo value=""false"">"& vbCrLf
		Response.Write "	<embed src=""" & url & """ bgColor=""#000000"" logo=""FALSE"" width=""550"" height=""400"" swRemote=""swSaveEnabled='false' swVolume='false' swRestart='false' swPausePlay='false' swFastForward='false' swContextMenu='false' "" swStretchStyle=""fill"" type=""application/x-director"" pluginspage=""http://www.macromedia.com/shockwave/download/""></embed>"& vbCrLf
		Response.Write "</object>"& vbCrLf
	

	End Select
End Sub

Private Function FrontFlash(flashid)
	Dim Rss, SQL
	SQL = "select Top 1 flashid,classid,title from NC_FlashList where ChannelID=" & ChannelID & " And isAccept <> 0 And flashid < " & flashid & " order by flashid desc"
	Set Rss = Newasp.Execute(SQL)
	If Rss.EOF And Rss.bof Then
		FrontFlash = "已经没有了"
	Else
		FrontFlash = "<a href=admin_flash.asp?action=view&ChannelID=" & ChannelID & "&flashid=" & Rss("flashid") & ">" & Rss("title") & "</a>"
	End If
	Rss.Close
	Set Rss = Nothing
End Function
Private Function NextFlash(flashid)
	Dim Rss, SQL
	SQL = "select Top 1 flashid,classid,title from NC_FlashList where ChannelID=" & ChannelID & " And isAccept <> 0 And flashid > " & flashid & " order by flashid asc"
	Set Rss = Newasp.Execute(SQL)
	If Rss.EOF And Rss.bof Then
		NextFlash = "已经没有了"
	Else
		NextFlash = "<a href=admin_flash.asp?action=view&ChannelID=" & ChannelID & "&flashid=" & Rss("flashid") & ">" & Rss("title") & "</a>"
	End If
	Rss.Close
	Set Rss = Nothing
End Function
Private Sub BatCreateHtml()
	Dim Allflashid,url
	Response.Write "<IE:Download ID=CreationID STYLE=""behavior:url(#default#download)"" />" & vbCrLf
	Response.Write "<ol>"
	Allflashid = Split(selflashid, ",")
	For i = 0 To UBound(Allflashid)
		flashid = CLng(Allflashid(i))
		url = "admin_makeflash.asp?ChannelID=" & ChannelID & "&flashid=" & flashid & "&showid=1"	
		Call ScriptCreation(url,flashid)
	Next
	Response.Write "</ol>"
	OutHintScript("开始生成HTML,共有" & i & "个HTML页面需要生成!")
End Sub
Private Function ClassUpdateCount(sortid,stype)
	Dim rscount,Parentstr
	On Error Resume Next
	Set rscount = Newasp.Execute("SELECT ClassID,Parentstr FROM [NC_Classify] WHERE ChannelID = " & ChannelID & " And ClassID=" & CLng(sortid))
	If Not (rscount.BOF And rscount.EOF) Then
		Parentstr = rscount("Parentstr") &","& rscount("ClassID")
		If CInt(stype) = 1 Then
			Newasp.Execute ("UPDATE [NC_Classify] SET ShowCount=ShowCount+1,isUpdate=1 WHERE ChannelID = "& ChannelID &" And ClassID in (" & Parentstr & ")")
		Else
			Newasp.Execute ("UPDATE [NC_Classify] SET ShowCount=ShowCount-1,isUpdate=1 WHERE ChannelID = "& ChannelID &" And ClassID in (" & Parentstr & ")")
		End If
	End If
	Set rscount = Nothing
End Function
Private Sub FlashDel()
	If Request("flashid") = "" Then
		ErrMsg = "<li>请选择正确的系统参数!</li>"
		Founderr = True
		Exit Sub
	End If
	On Error Resume Next
	Set Rs = Newasp.Execute("SELECT flashid,classid,username,HtmlFileDate FROM NC_FlashList WHERE ChannelID = "& ChannelID &" And flashid=" & Request("flashid"))
	If Not(Rs.BOF And Rs.EOF) Then
		ClassUpdateCount Rs("classid"),0
		AddUserPointNum Rs("username"),0
		DeleteHtmlFile Rs("classid"),Rs("flashid"),Rs("HtmlFileDate")
	End If
	Rs.Close:Set Rs = Nothing
	Conn.Execute("DELETE FROM NC_FlashList WHERE ChannelID = "& ChannelID &" And flashid=" & Request("flashid"))
	Conn.Execute ("DELETE FROM NC_Comment WHERE ChannelID = "& ChannelID &" And PostID=" & Request("flashid"))
	Call RemoveCache
	Response.redirect ("admin_flash.asp?ChannelID=" & ChannelID)
End Sub

Private Sub batdel()
	Set Rs = Newasp.Execute("SELECT flashid,classid,username,HtmlFileDate FROM NC_FlashList WHERE ChannelID = "& ChannelID &" And flashid in (" & selflashid & ")")
	Do While Not Rs.EOF
		ClassUpdateCount Rs("classid"),0
		AddUserPointNum Rs("username"),0
		DeleteHtmlFile Rs("classid"),Rs("flashid"),Rs("HtmlFileDate")
		Rs.movenext
	Loop
	Rs.Close:Set Rs = Nothing
	Conn.Execute ("DELETE FROM NC_FlashList WHERE ChannelID = "& ChannelID &" And flashid in (" & selflashid & ")")
	Conn.Execute ("DELETE FROM NC_Comment WHERE ChannelID = "& ChannelID &" And PostID in (" & selflashid & ")")
	Call RemoveCache
	Response.redirect (Request.ServerVariables("HTTP_REFERER"))
End Sub

Private Sub batmove()
	If Not IsNumeric(Request.Form("ClassID")) Then
		OutHintScript ("该一级分类已经有下属分类,请移动到其下属分类!")
		Exit Sub

⌨️ 快捷键说明

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