📄 admin_software00.asp
字号:
SiteRs.Update
SiteRs.Close
End If
Next
Set SiteRs = Nothing
End If
Set Rs = Nothing
'//////生成HTML//////
NC_Admin.Succeed_Msg ("<li>添加" & Request.Form("softname") & "成功!</li>")
Response.Write "<meta http-equiv=""refresh"" content=""2;url='" & Request.ServerVariables("HTTP_REFERER") & "'"">" & vbCrLf
End If
End Sub
Private Sub savemodify()
Call checksave
Dim ChangedStr
If CInt(Newasp.Setting(44)) = 1 Then
ChangedStr = Newasp.mainset(43)
ChangedStr = Replace(ChangedStr, "{$Now}", Now())
ChangedStr = "[br][align=right]" & ChangedStr & "[/align]"
End If
If Founderr = False Then
SQL = "select * from NC_SoftInfo where softid=" & Request("softid")
Rs.Open SQL, Conn, 1, 3
Rs("softname") = Request.Form("softname")
Rs("SoftVer") = Request.Form("SoftVer")
Rs("rootid") = strSortid(0)
Rs("sortid") = strSortid(1)
Rs("SortName") = strSortid(2)
Rs("content") = TxtContent & ChangedStr
Rs("Language") = Request.Form("Language")
Rs("SoftType") = Request.Form("SoftType")
Rs("isCommend") = Request.Form("isCommend")
Rs("RunSystem") = Request.Form("RunSystem")
Rs("impower") = Request.Form("impower")
If Trim(Request.Form("SizeUnit")) = "MB" Then
Rs("SoftSize") = CLng(Request.Form("SoftSize") * 1024)
Else
Rs("SoftSize") = CLng(Request.Form("SoftSize"))
End If
Rs("Grades") = Request.Form("Grades")
Rs("Decode") = Request.Form("Decode")
Rs("isMember") = Request.Form("isMember")
Rs("Homepage") = Request.Form("Homepage")
Rs("Contact") = Request.Form("Contact")
Rs("PreviewImg") = Request.Form("PreviewImg")
Rs("Softimg") = Request.Form("Softimg")
Rs("MoneyNum") = Request.Form("MoneyNum")
Rs("isTop") = Request.Form("isTop")
Rs("isUpdate") = 1
Rs("isLock") = 0
Rs("Errcode") = 0
If Trim(Request.Form("updateTime")) = "yes" Then
Rs("SoftTime") = Newasp.NowTime
End If
Rs.Update
pubSoftID = Rs("softid")
Rs.Close
SQL = "update NC_softSort set isUpdate=1 where depth<>0 and sortid=" & strSortid(1)
Newasp.Execute SQL
SQL = "update NC_softSort set isUpdate=1 where depth=0 and rootid=" & strSortid(0)
Newasp.Execute SQL
'//////修改下载连接//////
If Request.Form("totalPut") <> "" And Request.Form("SoftID") <> "" Then
For i = 1 To Request.Form("totalPut")
If Request("StrDownSite" & i & "") <> "" Then
SQL = "select * from NC_softsite where ID=" & Request("ID" & i & "")
SiteRs.Open SQL, Conn, 1, 3
SiteRs("SiteName") = Request.Form("StRsiteName" & i & "")
SiteRs("DownSite") = Request.Form("StrDownSite" & i & "")
SiteRs("sortid") = strSortid(1)
SiteRs("serverid") = Request.Form("server" & i & "")
SiteRs.Update
SiteRs.Close
End If
Next
End If
'//////添加下载连接地址//////
If Request.Form("no") <> "" And Request.Form("SoftID") <> "" Then
For i = 1 To Request("no")
If Request("DownSite" & i & "") <> "" Then
SQL = "select * from NC_softsite where (ID is null)"
SiteRs.Open SQL, Conn, 1, 3
SiteRs.addnew
SiteRs("SiteName") = Request.Form("SiteName" & i & "")
SiteRs("DownSite") = Request.Form("DownSite" & i & "")
SiteRs("softid") = Request.Form("softid")
SiteRs("sortid") = strSortid(1)
SiteRs("serverid") = Request.Form("serverid" & i & "")
SiteRs.Update
SiteRs.Close
End If
Next
End If
'//////生成HTML//////
NC_Admin.Succeed_Msg ("<li>修改" & Request.Form("softname") & "成功!</li>")
Set Rs = Nothing
Response.Write "<meta http-equiv=""refresh"" content=""2;url='admin_software.asp'"">" & vbCrLf
End If
End Sub
Private Sub batdel()
Newasp.Execute ("delete from NC_SoftInfo where softid in (" & selSoftid & ")")
Newasp.Execute ("delete from NC_SoftSite where softid in (" & selSoftid & ")")
Newasp.Execute ("delete from NC_SoftEssay where softid in (" & selSoftid & ")")
Response.Write ("批量删除操作成功!")
End Sub
Private Sub batdele()
Newasp.Execute ("update NC_SoftInfo set isLock=1,isUpdate=1 where softid in (" & selSoftid & ")")
Response.Write ("你选择的文件已成功放入回收站!")
End Sub
Private Sub batmove()
Dim selSort
selSort = Split(Trim(Request.Form("sortid")), ",")
If Len(Request.Form("sortid")) <> 0 Then
Newasp.Execute ("update NC_SoftInfo set rootid='" & selSort(0) & "',sortid='" & selSort(1) & "',SortName='" & selSort(2) & "',isUpdate=1 where softid in (" & selSoftid & ")")
Response.Write ("批量移动操作成功,请重新生成移动的HTML文件!")
Else
Response.Write ("不能移动到一级分类,请选择正确的分类!")
End If
End Sub
Private Sub isCommend()
Newasp.Execute ("update [NC_SoftInfo] set isCommend=1 where softid in (" & selSoftid & ")")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
Private Sub noCommend()
Newasp.Execute ("update [NC_SoftInfo] set isCommend=0 where softid in (" & selSoftid & ")")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
Private Sub upindate()
Newasp.Execute ("update [NC_SoftInfo] set SoftTime=" & Newasp.SqlString & " where softid in (" & selSoftid & ")")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
Private Sub isTop()
Newasp.Execute ("update NC_SoftInfo set isTop=1 where softid in (" & selSoftid & ")")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
Private Sub noTop()
Newasp.Execute ("update NC_SoftInfo set isTop=0 where softid in (" & selSoftid & ")")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
Private Sub showpage()
If pagination = 0 Then
If totalnumber Mod maxperpage = 0 Then
n = totalnumber \ maxperpage
Else
n = totalnumber \ maxperpage + 1
End If
Response.Write "<table cellspacing=1 width='100%' border=0><form method=Post action=?clasid=" & Request("clasid") & "><tr><td align=center> " & vbCrLf
Response.Write "<font color='red'>" & strSortName & "</font> "
If CurrentPage < 2 Then
Response.Write "共有软件 <font COLOR=#FF0000><strong>" & totalnumber & "</strong></font> 个 首 页 上一页 "
Else
Response.Write "共有软件 <font COLOR=#FF0000><strong>" & totalnumber & "</strong></font> 个 <a href=?idd=1&page=1&clasid=" & Request("calsid") & ">首 页</a> "
Response.Write "<a href=?idd=1&page=" & CurrentPage - 1 & "&clasid=" & Request("clasid") & ">上一页</a> "
End If
If n - CurrentPage < 1 Then
Response.Write "下一页 尾 页" & vbCrLf
Else
Response.Write "<a href=?idd=1&page=" & (CurrentPage + 1) & "&clasid=" & Request("clasid") & ">下一页</a>"
Response.Write " <a href=?idd=1&page=" & n & "&clasid=" & Request("clasid") & ">尾 页</a>" & vbCrLf
End If
Response.Write " 页次:<strong><font color=red>" & CurrentPage & "</font>/" & n & "</strong>页 "
Response.Write " 转到:"
If GotoPageType = 1 Then
Response.Write " <select name='page' size='1' style=""font-size: 9pt"" onChange='javascript:submit()'>" & vbCrLf
For ii = 1 To n
Response.Write "<option value='" & ii & "' "
If CurrentPage = CInt(ii) Then
Response.Write "selected "
End If
Response.Write ">第" & ii & "页</option>"
Next
Response.Write "</select> " & vbCrLf
Else
Response.Write "<input name=page size=3> <input type=submit name=Submit value='GO→'>"
End If
Response.Write "</td></tr></FORM></table>" & vbCrLf
Else
n = CurrentPage
If n < maxpagecount Then
n = maxpagecount
End If
Response.Write "<table width=""100%"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""2"">"
Response.Write " <tr><form method=""POST"" action='?clasid=" & Request("clasid") & "'>"
Response.Write " <td align=""center""><font color='red'>" & strSortName & "</font> 共有软件 <font COLOR=#FF0000><strong>"
Response.Write totalnumber
Response.Write "</strong></font> 个 <a href=?idd=1&page=1&clasid=" & Request("clasid") & " title=返回第一页><font face=""Webdings"">97</font></a> "
For ii = pagestart To pageend
If ii = 0 Then ii = 1
If ii = CurrentPage Then
Response.Write "<font color='red'><strong>" & ii & "</strong></font> "
Else
Response.Write "<a href=?idd=1&page=" & ii & "&clasid=" & Request("clasid") & " title=第" & ii & "页><strong>" & ii & "</strong></a> "
End If
Next
Response.Write "<a href=?idd=1&page="
Response.Write maxpagecount
Response.Write "&clasid=" & Request("clasid") & " title=尾页><font face=""Webdings"">8:</font></a> 页次:<strong><font color=red>"
Response.Write CurrentPage
Response.Write "</font>/"
Response.Write maxpagecount
Response.Write "</strong>页 转到:"
If GotoPageType = 1 Then
Response.Write " <select name='page' size='1' style=""font-size: 9pt"" onChange='javascript:submit()'>" & vbCrLf
For ii = 1 To n
Response.Write "<option value='" & ii & "' "
If CurrentPage = CInt(ii) Then
Response.Write "selected "
End If
Response.Write ">第" & ii & "页</option>"
Next
Response.Write "</select> " & vbCrLf
Else
Response.Write "<input name=page size=3> <input type=submit name=Submit value='GO'>"
End If
Response.Write " </td></form></tr></table>" & vbCrLf
End If
End Sub
Private Function SortingJumpMenu()
Dim CacheJumpMenu
Dim SQL
Dim Rs1
Dim i
Newasp.Name = "SortingJumpMenu"
If Newasp.ObjIsEmpty() Then
CacheJumpMenu = "<select onchange=""if(this.options[this.selectedIndex].value!=''){location=this.options[this.selectedIndex].value;}"">" & vbCrLf
CacheJumpMenu = CacheJumpMenu & "<option value=admin_software.asp>≡全部软件列表≡</option>" & vbCrLf
Set Rs1 = CreateObject("Adodb.recordset")
SQL = "select * from NC_SoftSort order by rootid,orders"
Rs1.Open SQL, Conn, 1, 1
Newasp.SqlQueryNum = Newasp.SqlQueryNum + 1
Do While Not Rs1.EOF
CacheJumpMenu = CacheJumpMenu & "<option value=""admin_software.asp?clasid=" & Rs1("sortid") & """ {SortID=" & Rs1("sortid") & "}"
If Trim(Request("clasid")) <> "" Then
If CLng(Request("clasid")) = Rs1("sortid") Then CacheJumpMenu = CacheJumpMenu & " selected"
End If
CacheJumpMenu = CacheJumpMenu & ">"
If Rs1("depth") = 1 Then CacheJumpMenu = CacheJumpMenu & " ├ "
If Rs1("depth") > 1 Then
For i = 2 To Rs1("depth")
CacheJumpMenu = CacheJumpMenu & " "
Next
CacheJumpMenu = CacheJumpMenu & " ├ "
End If
CacheJumpMenu = CacheJumpMenu & Rs1("SortName") & "</option>" & vbCrLf
Rs1.movenext
Loop
Rs1.Close
Set Rs1 = Nothing
CacheJumpMenu = CacheJumpMenu & "</select>"
Newasp.Value = CacheJumpMenu
End If
SortingJumpMenu = Newasp.Value
End Function
Private Function SelDownServer(intServerid, snid)
Dim Rs_site
Response.Write " <select name=""" & snid & """ size=""1"">"
Response.Write "<option value=""0"""
If intServerid = 0 Then Response.Write " selected"
Response.Write ">↓请选择下载服务器↓</option>"
Set Rs_site = CreateObject("adodb.recordset")
SQL = "select serverid,ServerName,depth,rootid from NC_ServerSite where depth=0"
Rs_site.Open SQL, Conn, 1, 1
Do While Not Rs_site.EOF
Response.Write "<option value=""" & Rs_site("rootid") & """"
If intServerid = Rs_site("rootid") Then Response.Write " selected"
Response.Write ">" & Rs_site(1) & "</option>"
Rs_site.movenext
Loop
Rs_site.Close
Set Rs_site = Nothing
Response.Write "</select>"
End Function
Private Sub delsite()
Newasp.Execute ("delete from NC_softsite where ID=" & Request("ID") & "")
Response.redirect (Request.ServerVariables("HTTP_REFERER"))
Response.Write
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -