📄 publish.asp
字号:
<!--#include file="setup.asp"-->
<!--#include file="inc/Create_SoftwareCls.Asp"-->
<!--#include file="inc/NC_HtmlEditCls.Asp" -->
<link href="style.css" rel="stylesheet" type="text/css">
<%
Const allow = 1
Dim sortname
Dim strSortid
Dim GroupSet
Dim GroupName
Dim DownloadClass_Ads
Dim NowStats
Dim HtmlTitle
Dim Style_CSS
Dim HtmlTempStr
Dim TempTopStr
Dim TempFootStr
Dim isEdit
Dim Rs1
Dim Rs2
Dim Rs3
dim SQL3
Dim Rs4
Dim SQL4
Dim Rs5
Dim SQL5
Dim Rs6
Dim SQL6
Dim Rss1, SQLs1
Dim Rss2,SQLs2
Dim softTitle
Dim sortid
Dim rootid
Dim selSoftid
Dim SiteRs
Dim pubSoftID
Dim totalPut
Dim strSortName
Dim j
Dim TxtContent
Dim keyword
Dim findword
Dim ii
Dim datNowTime
Dim ParentID
Dim strParent
Dim Child
Dim depth
Dim maxperpage
Dim CurrentPage
Dim totalnumber
Dim TotalPageNum
Dim i
Dim n
Dim pagestart
Dim pageend
Dim maxpagecount
Dim ArraySoftid
Dim selSortid
Dim pagination
Dim GotoPageType
Dim SoftBody
Dim WhereSQL
DownsysClass.PublishSoft
pagination = 0
GotoPageType = 0
Set Rs = Server.CreateObject("adodb.recordset")
Set Rs1 = Server.CreateObject("adodb.recordset")
Set Rs2 = Server.CreateObject("adodb.recordset")
Set SiteRs = Server.CreateObject("adodb.recordset")
Select Case Trim(Request("action"))
Case "add"
isEdit = False
Call setclass(isEdit)
Case "edit"
isEdit = True
Call setclass(isEdit)
Case "save"
Call saveAdd
Case "modify"
Call savemodify
Case "delsite"
Call delsite
Case "hangye"
isEdit = False
Call hangyes
Case Else
Call SoftMain
End Select
If Founderr = True Then
NC_Admin.Error_Msg (ErrMsg)
End If
DownsysClass.PublishSoft
NothingObject
Private Sub SoftMain()
Dim srtSortingMenu
Dim bookmark
Dim srtSortingList
If Not IsEmpty(Request("selSoftid")) Then
ArraySoftid = Request("selSoftid")
ArraySoftid = Split(ArraySoftid, "||")
selSoftid = ArraySoftid(0)
selSortid = Request("selSoftid")
Select Case Request("action")
Case "del"
Call batdel
Case "dele"
Call batdele
Case "move"
Call batmove
Case "isCommend"
Call isCommend
Case "noCommend"
Call noCommend
Case "indate"
Call upindate
Case "CreateHtml"
Call BatCreateHtml
Case "istop"
Call isTop
Case "notop"
Call noTop
Case Else
Response.Write "无效参数!"
Response.Write
End Select
End If
Response.Write "<script language=""JavaScript"">" & vbCrLf
Response.Write "<!--//" & vbCrLf
Response.Write "function SelectAll() {" & vbCrLf
Response.Write Chr(9) & "for (var i=0;i<document.selform.selSoftid.length;i++) {" & vbCrLf
Response.Write Chr(9) & Chr(9) & "var e=document.selform.selSoftid[i];" & vbCrLf
Response.Write Chr(9) & Chr(9) & "e.checked=!e.checked;" & vbCrLf
Response.Write Chr(9) & "}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "//-->" & vbCrLf
Response.Write "</script>" & vbCrLf
Response.Write "<script language=""JavaScript"">" & vbCrLf
Response.Write "<!--//" & vbCrLf
Response.Write "function Juge(myform)" & vbCrLf
Response.Write "{" & vbCrLf
Response.Write "if (myform.keyword.value == """")" & vbCrLf
Response.Write Chr(9) & "{" & vbCrLf
Response.Write Chr(9) & Chr(9) & "alert(""请输入要查询的关键字!"");" & vbCrLf
Response.Write Chr(9) & Chr(9) & "myform.keyword.focus();" & vbCrLf
Response.Write Chr(9) & Chr(9) & "return (false);" & vbCrLf
Response.Write Chr(9) & "}" & vbCrLf
Response.Write "}" & vbCrLf
Response.Write "//-->" & vbCrLf
Response.Write "</script>" & vbCrLf
Response.Write "<table width=""750"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""1"" class=""tableBorder"">"
Response.Write " <tr>"
Response.Write " <th colspan=""5"">信息管理</th></tr>"
Response.Write " <tr><form method=Post name=""myform"" action=""publish.asp"" onSubmit=""return Juge(this)"">"
Response.Write " <td class=forumrow height=""22"" colspan=""5"">"
Response.Write "查询: <input align=""absmiddle"" name=""keyword"" type=""text"" id=""keyword"" size=""30""> 查询方法:"
Response.Write " <select size=""1"" name=""key"">"
Response.Write " <option value=""topic"">信息主题</option>"
Response.Write " <option value=""body"">信息说明</option>"
Response.Write " <option value="""">不限条件</option>"
Response.Write " </select>"
Response.Write " <input type=""submit"" name=""Submit"" align=""absmiddle"" value=""查 询..."" class=button>"
Response.Write " </td></tr></form>"
Response.Write " <tr>"
Response.Write " <th nowrap>选择</th><th width=""70%"">信息标题 "
srtSortingMenu = SortingJumpMenu
srtSortingMenu = Replace(srtSortingMenu, "{SortID=" & Request("clasid") & "}", "selected")
Response.Write srtSortingMenu
Response.Write "</th><th nowrap>修改信息</th><th nowrap>推 荐</th><th nowrap>整理时间</th></tr>"
If Request("clasid") <> "" Then
SQL = "select sortid,SortName,rootid,depth,ParentID,strParent,Child from [NC_SoftSort] where sortid = " & Request("clasid")
Rs.Open SQL, Conn, 1, 1
DownsysClass.SqlQueryNum = DownsysClass.SqlQueryNum + 1
If Rs.bof And Rs.EOF Then
Response.Write "Sorry!没有找到任何信息信息。或者您选择了错误的系统参数!"
Response.End
Else
strSortName = Rs("SortName")
sortid = Rs("sortid")
rootid = Rs("rootid")
depth = Rs("depth")
ParentID = Rs("ParentID")
strParent = Rs("strParent")
Child = Rs("Child")
End If
Rs.Close
Else
strSortName = "全部信息"
End If
keyword = Server.HTMLEncode(Request("keyword"))
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(keyword) And keyword <> "" Then
keyword = Replace(Replace(Replace(keyword, "'", "‘"), "<", "<"), ">", ">")
If Request("key") = "topic" Then
findword = "where softname like '%" & keyword & "%' and isLock=0"
ElseIf Request("key") = "body" Then
findword = "where content like '%" & keyword & "%' and isLock=0"
Else
findword = "where softname like '%" & keyword & "%' or content like '%" & keyword & "%' and isLock=0"
End If
WhereSQL = findword
Else
If Request("clasid") <> "" Then
If depth <> 0 Then
Dim Rss, AllSortID,ParentStr
Set Rss = DownsysClass.Execute("select * from NC_SoftSort where strParent like '%"& sortid &"%'")
If Rss.EOF And Rss.bof Then
AllSortID = sortid
Else
Do While Not Rss.EOF
ParentStr = Split(Rss("strParent"), ",")
For i = 0 To UBound(ParentStr)
If CLng(ParentStr(i)) = sortid Then
AllSortID = AllSortID & Rss("sortid") &","
Exit For
End If
Next
Rss.movenext
Loop
AllSortID = AllSortID & sortid
End If
Rss.Close
Set Rss = Nothing
WhereSQL = "where username like '%"&DownsysClass.memberName&"%' and isLock=0 and sortid in (" & AllSortID & ")"
Else
WhereSQL = "where username like '%"&DownsysClass.memberName&"%' and isLock=0 and rootid=" & rootid & ""
End If
Else
WhereSQL = "where username like '%"&DownsysClass.memberName&"%' and isLock=0"
End If
End If
TotalNumber = Conn.Execute("Select count(softid) from [NC_SoftPublish] "& WhereSQL &"")(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
SQL = "select * from NC_SoftPublish "& WhereSQL &" order by isTop desc,softTime desc,softid desc"
Rs.Open SQL, Conn, 1
DownsysClass.SqlQueryNum = DownsysClass.SqlQueryNum + 1
If Rs.bof And Rs.EOF Then
Response.Write "<tr><td colspan=5 class=forumrow>还没有找到任何信息!</td></tr>"
Else
If TotalPageNum > 1 then Rs.Move (CurrentPage - 1) * maxperpage
i = 0
j = (CurrentPage - 1) * maxperpage + 1
Response.Write " <tr>"
Response.Write " <td height=""22"" colspan=""5"" class=""forumRowHighlight"">"
Call showpage
Response.Write "</td>"
Response.Write Chr(9) & "</tr>"
Response.Write "<form name=""selform"" method=""post"" action="""">"
Do While Not Rs.EOF And i < CInt(maxperpage)
Response.Write " <tr>"
Response.Write " <td class=forumrow nowrap align=""center""><input type=""checkbox"" name=""selSoftid"" value="""
Response.Write Rs("softid")
Response.Write """ title='"
Response.Write j
Response.Write "'>"
Response.Write j
Response.Write "</td>"
Response.Write " <td height=""22"" class=""forumrow"">"
If Rs("istop") = 0 Or Rs("istop") = Empty Then
Response.Write "<IMG SRC=""images/folder.gif"" WIDTH=""16"" HEIGHT=""16"" BORDER=0 ALT=""开放的信息"">"
Else
Response.Write "<IMG SRC=""images/istop.gif"" WIDTH=""15"" HEIGHT=""17"" BORDER=0 ALT=""置顶的信息"">"
End If
Response.Write Chr(9) & " [<a href=?clasid="
Response.Write Rs("sortid")
Response.Write ">"
Response.Write Rs("SortName")
Response.Write "</a>] <a href='"
Response.Write "software.asp?id="
Response.Write Rs("softid")
Response.Write "' target=_blank>"
Response.Write Rs("softname")
Response.Write " "
Response.Write Rs("softver")
Response.Write "</a>"
If Rs("isMember") <> 0 Then Response.Write "<IMG SRC=""images/vip.gif"" WIDTH=""12"" HEIGHT=""11"" BORDER=0 ALT=""会员信息"">"
Response.Write Chr(9) & Chr(9) & " </td>"
Response.Write " <td class=forumrow align=""center""><a href=?action=edit&softid="
Response.Write Rs("softid")
Response.Write "&sortid="
Response.Write Rs("sortid")
Response.Write ">编 辑</a></td>"
Response.Write " <td class=forumrow align=""center"">"
Response.Write Chr(9) & " "
If Rs("isCommend") = 0 Then
Response.Write Chr(9) & " <IMG SRC=""images/folder.gif"" WIDTH='16' HEIGHT='16' BORDER=0 ALT='开放信息'>"
Response.Write Chr(9) & " "
Else
Response.Write Chr(9) & " <IMG SRC='images/jing.gif' BORDER=0 ALT='推荐信息'>"
Response.Write Chr(9) & " "
End If
Response.Write "</td>"
Response.Write " <td class=forumrow align=""center"" nowrap>"
If Rs("softTime") >= Date Then
Response.Write "<font color=""#FF3300"">"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -