admin_flash.asp
来自「小游戏网站演示www.4399.io 拥有4万条游戏数据」· ASP 代码 · 共 1,413 行 · 第 1/5 页
ASP
1,413 行
<td colspan="3" class="TableRow1"><iframe name="image" frameborder="0" width='100%' height="45" scrolling="no" src="upload.asp?ChannelID=<%=ChannelID%>&stype=image&m=flash&inst=content&s=0"></iframe></td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong><%=sModuleName%>简介:</strong></td>
<td colspan="3" class="TableRow1">
<%
Dim oEditor
Set oEditor = New Editor_Cls
oEditor.UserMode = 0
oEditor.setEditMode = Newasp.setAdminEditor(0)
oEditor.ChannelID = ChannelID
oEditor.Width = Newasp.setAdminEditor(2)
oEditor.Height = Newasp.setAdminEditor(3)
oEditor.BasePath = "../" & Newasp.setAdminEditor(4)
oEditor.ToolbarSet = Newasp.setAdminEditor(1)'Default,AdminMode,Simple,UserMode,Basic
If isEdit Then
oEditor.Value = Re_Replace(Rs("Introduce"), "[InstallDir_ChannelDir]", InstallDir_ChannelDir)
End If
oEditor.InstanceName = "content"
oEditor.Execute()
Set oEditor = Nothing
%></td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong><%=sModuleName%>描述:</strong></td>
<td colspan="3" class="TableRow1"><input name="Describe" type="text" id="Describe" size="80" value="<%If isEdit Then Response.Write Newasp.ChkNull(Rs("Describe"))%>"></td>
</tr>
<tr>
<td align="right" class="TableRow2"><b>更新时间:</b></td>
<td class="TableRow1"><input name="addTime" type="text" id="addTime" size="25" value="<%If isEdit Then Response.Write Rs("addTime"):Else Response.Write (Now())%>">
<font color=red>*</font><%If isEdit Then%>
<input name="Update" type="checkbox" value="1">
更新时间<%End If%></td>
<td align="right" class="TableRow2"><b>初始点击数:</b></td>
<td class="TableRow1"><input name="AllHits" type="text" id="AllHits" size="15" value="<%If isEdit Then Response.Write Rs("AllHits"):Else Response.Write 0%>">
<font color="red">*</font></td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong>其它选项:</strong></td>
<td colspan="3" class="TableRow1"><input name="isTop" type="checkbox" id="isTop" value="1"<%If isEdit Then:If Rs("isTop") <> 0 Then Response.Write (" checked")%>>
<%=sModuleName%>置顶
<input name="isBest" type="checkbox" id="isBest" value="1"<%If isEdit Then:If Rs("isBest") <> 0 Then Response.Write (" checked")%>>
<%=sModuleName%>推荐
<input name="ForbidEssay" type="checkbox" id="ForbidEssay" value="1"<%If isEdit Then:If Rs("ForbidEssay") <> 0 Then Response.Write (" checked")%>>
禁止发表评论
<input name="isAccept" type="checkbox" id="isAccept" value="1" checked>
立即发布(<font color=blue>否则审核后才能发布。</font>)
</td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong>显示模式:</strong></td>
<td colspan="3" class="TableRow1">
<%
Dim ShowModeArray
ShowModeArray = Array("不显示","FLASH","图片","Media","Real","DCR")
For i = 0 To UBound(ShowModeArray)
Response.Write "<input type=""radio"" name=""showmode"" value=""" & i & """ "
If isEdit Then
If i = Rs("showmode") Then Response.Write " checked"
Else
If i = DefaultShowMode Then Response.Write " checked"
End If
Response.Write ">" & Trim(ShowModeArray(i)) & " "
If i = 6 Then Response.Write "<br>"
Next
%>
</td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong>页面显示URL:</strong></td>
<td colspan="3" class="TableRow1"><input name="showurl" type="text" id="filePath" size="60" value="<%If isEdit Then Response.Write Newasp.ChkNull(Rs("showurl"))%>">
<input type='button' name='selectfile' value='从已上传文件中选择' onclick='SelectFile()' class=button></td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong>上传<%=sModuleName%>:</strong></td>
<td colspan="3" class="TableRow1"><iframe name="file" frameborder="0" width='100%' height="45" scrolling="no" src="upload.asp?ChannelID=<%=ChannelID%>&stype=file&m=flash&inst=content&s=1"></iframe></td>
</tr>
<tr>
<td align="right" class="TableRow2"><strong>下载服务器:</strong></td>
<td colspan="3" class="TableRow1"><%=SelDownServer(downid)%> <b>说明:</b><font color=blue>下载服务器路径 + 下载文件名称 = 完整下载地址</font></td>
</tr>
<tr>
<td align="right" nowrap class="TableRow2"><strong>下载地址:</strong></td>
<td colspan="3" class="TableRow1"><input name="DownAddress" type="text" id="DownAddress" size="80" value="<%If isEdit Then Response.Write Newasp.ChkNull(Rs("DownAddress"))%>"></td>
</tr>
<tr>
<td align="right" class="TableRow2"> </td>
<td colspan="3" align="center" class="TableRow1">
<input type="button" name="Submit2" onclick="CheckLength();" value="查看内容长度" class=Button>
<input type="button" name="Submit3" onclick="javascript:history.go(-1)" value="返回上一页" class=Button>
<input type="Submit" name="Submit1" value="保存<%=sModuleName%>" class=Button></td>
</tr></form>
</table></div>
<%
If isEdit Then
Rs.Close
Set Rs = Nothing
End If
End Sub
Private Function SelDownServer(intdownid)
Dim rsobj
If Not IsNumeric(intdownid) Then intdownid = 0
Response.Write " <select name=""downid"" size=""1"">"
Response.Write "<option value=""0"""
If intdownid = 0 Then Response.Write " selected"
Response.Write ">↓请选择下载服务器↓</option>"
SQL = "SELECT downid,DownloadName,depth,rootid FROM NC_DownServer WHERE depth=0 And ChannelID="& ChannelID
Set rsobj = Newasp.Execute(SQL)
Do While Not rsobj.EOF
Response.Write "<option value=""" & rsobj("rootid") & """"
If intdownid = rsobj("rootid") Then Response.Write " selected"
Response.Write ">" & rsobj(1) & "</option>"
rsobj.movenext
Loop
rsobj.Close
Set rsobj = Nothing
Response.Write "<option value=""0"">不使用下载服务器</option>"
Response.Write "</select>"
End Function
Private Sub CheckSave()
If Trim(Request.Form("title")) = "" Then
FoundErr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "名称不能为空!</li>"
End If
If Len(Request.Form("title")) => 200 Then
FoundErr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "名称不能超过200个字符!</li>"
End If
If Trim(Request.Form("ColorMode")) = "" Then
FoundErr = True
ErrMsg = ErrMsg + "<li>标题颜色参数错误!</li>"
End If
If Trim(Request.Form("FontMode")) = "" Then
FoundErr = True
ErrMsg = ErrMsg + "<li>标题字体参数错误!</li>"
End If
If Trim(Request.Form("PointNum")) = "" Then
FoundErr = True
ErrMsg = ErrMsg + "<li>下载" & sModuleName & "所需的点数不能为空!如果不想设置请输入零。</li>"
End If
If Not IsNumeric(Request.Form("star")) Then
FoundErr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "星级不能为空。</li>"
End If
If Not IsNumeric(Request.Form("UserGroup")) Then
FoundErr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "等级参数错误!</li>"
End If
If Not IsNumeric(Request.Form("ClassID")) Then
FoundErr = True
ErrMsg = ErrMsg + "<li>该一级分类已经有下属分类,不能添加" & sModuleName & "!</li>"
End If
If Newasp.ChkNumeric(Request.Form("ClassID")) = 0 Then
FoundErr = True
ErrMsg = ErrMsg + "<li>该分类是外部连接,不能添加" & sModuleName & "!</li>"
End If
TextContent = ""
For i = 1 To Request.Form("content").Count
TextContent = TextContent & Request.Form("content")(i)
Next
If Trim(TextContent) = "" Then
FoundErr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "内容不能为空!</li>"
End If
If Newasp.setAdminEditor(0) <> 0 Then
TextContent = Newasp.HTMLEncodes(TextContent)
End If
TextContent = Re_Replace(TextContent, InstallDir_ChannelDir, "[InstallDir_ChannelDir]")
If CInt(Request.Form("isTop")) = 1 Then
FlashTop = 1
Else
FlashTop = 0
End If
If CInt(Request.Form("isBest")) = 1 Then
FlashBest = 1
Else
FlashBest = 0
End If
If CInt(Request.Form("ForbidEssay")) = 1 Then
ForbidEssay = 1
Else
ForbidEssay = 0
End If
If CInt(Request("isAccept")) = 1 Then
FlashAccept = 1
Else
FlashAccept = 0
End If
If trim(Request.Form("filesize")) = "" Then
Founderr = True
ErrMsg = ErrMsg + "<li>" & sModuleName & "大小不能为空!</li>"
End If
End Sub
Private Sub SaveFlash()
CheckSave
If Founderr = True Then Exit Sub
Set Rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from NC_FlashList where (flashid is null)"
Rs.Open SQL,Conn,1,3
Rs.Addnew
Rs("ChannelID") = ChannelID
Rs("ClassID") = Trim(Request.Form("ClassID"))
Rs("SpecialID") = Newasp.ChkNumeric(Request.Form("SpecialID"))
Rs("title") = Newasp.ChkFormStr(Request.Form("title"))
Rs("subtitle") = Newasp.ChkFormStr(Request.Form("subtitle"))
Rs("ColorMode") = Trim(Request.Form("ColorMode"))
Rs("FontMode") = Trim(Request.Form("FontMode"))
Rs("Introduce") = TextContent
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") = Newasp.ChkNumeric(Request.Form("UserGroup"))
Rs("PointNum") = Newasp.ChkNumeric(Request.Form("PointNum"))
Rs("UserName") = Trim(AdminName)
Rs("addTime") = Formatime(Trim(Request.Form("addTime")))
Rs("HtmlFileDate") = Trim(Newasp.HtmlRndFileName)
Rs("AllHits") = Newasp.CheckNumeric(Request.Form("AllHits"))
Rs("DayHits") = Newasp.CheckNumeric(Request.Form("AllHits"))
Rs("WeekHits") = Newasp.CheckNumeric(Request.Form("AllHits"))
Rs("MonthHits") = Newasp.CheckNumeric(Request.Form("AllHits"))
Rs("HitsTime") = Now()
Rs("grade") = 0
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
Rs.Close
Rs.Open "select top 1 flashid from NC_FlashList where ChannelID=" & ChannelID & " order by flashid desc", Conn, 1, 1
flashid = Rs("flashid")
Rs.Close:Set Rs = Nothing
Call RemoveCache
ClassUpdateCount Request.Form("ClassID"),1
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)
SQL = "SELECT TOP 1 flashid FROM NC_FlashList WHERE ChannelID=" & ChannelID & " And isAccept <> 0 And flashid < " & flashid & " ORDER BY flashid DESC"
Set Rs = Newasp.Execute(SQL)
If Not (Rs.EOF And Rs.BOF) Then
url = "admin_makeflash.asp?ChannelID=" & ChannelID & "&flashid=" & Rs("flashid") & "&showid=0"
Call ScriptCreation(url,Rs("flashid"))
End If
Rs.Close
Set Rs = Nothing
End If
Succeed("<li>恭喜您!添加新的" & sModuleName & "成功。</li><li><a href=?action=view&ChannelID=" & ChannelID & "&flashid=" & flashid & ">点击此处查看该" & sModuleName & "</a></li>")
End Sub
Private Sub ModifyFlash()
CheckSave
If Founderr = True Then Exit Sub
Set Rs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from NC_FlashList where flashid=" & Request("flashid")
Rs.Open SQL,Conn,1,3
Auditing = Rs("isAccept")
Rs("ChannelID") = ChannelID
Rs("ClassID") = Trim(Request.Form("ClassID"))
Rs("SpecialID") = Newasp.ChkNumeric(Request.Form("SpecialID"))
Rs("title") = Newasp.ChkFormStr(Request.Form("title"))
Rs("subtitle") = Newasp.ChkFormStr(Request.Form("subtitle"))
Rs("ColorMode") = Trim(Request.Form("ColorMode"))
Rs("FontMode") = Trim(Request.Form("FontMode"))
Rs("Introduce") = TextContent
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?