📄 special_main.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Option Explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New Special_Main
KSCls.Execute()
Set KSCls = Nothing
Class Special_Main
Private KSCMS
Private SpecialID, i, totalPut, CurrentPage, SqlStr, SpecialRS
Private FolderSql, FolderRS, ArticleTid, SpecialName
Private CreateDate, TempStr
Private FolderID
Private KeyWord, SearchType, StartDate, EndDate
'搜索参数集合
Dim SearchParam
Private MaxPerPage
Private Row
Private Sub Class_Initialize()
MaxPerPage = 96
Row = 8 '每行显示数
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Public Sub Execute()
'收集搜索参数
KeyWord = Request("KeyWord")
SearchType = Request("SearchType")
StartDate = Request("StartDate")
EndDate = Request("EndDate")
SearchParam = "KeyWord=" & KeyWord & "&SearchType=" & SearchType & "&StartDate=" & StartDate & "&EndDate=" & EndDate
FolderID = Request.QueryString("FolderID")
If FolderID = "" Then FolderID = "0"
SpecialID = Trim(Request.QueryString("SpecialID"))
If SpecialID = "" Then SpecialID = "0"
If Not IsEmpty(Request("page")) Then
CurrentPage = CInt(Request("page"))
Else
CurrentPage = 1
End If
Response.Write "<html>"
Response.Write "<head>"
Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; chaRSet=gb2312"">"
Response.Write "<title>专题中心</title>"
Response.Write "<link href=""../Inc/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
Response.Write "<script language=""JavaScript"">" & vbCrLf
Response.Write "var Page='" & CurrentPage & "'; //当前页码" & vbCrLf
Response.Write "var FolderID='" & FolderID & "'; //频道ID" & vbCrLf
Response.Write "var SpecialID='" & SpecialID & "'; //专题ID" & vbCrLf
Response.Write "var KeyWord='" & KeyWord & "'; //搜索关键字" & vbCrLf
Response.Write "var SearchParam='" & SearchParam & "'; //搜索参数集合" & vbCrLf
Response.Write "</script>" & vbCrLf
Response.Write "<script language=""JavaScript"" src=""../JS/Common.js""></script>"
Response.Write "<script language=""JavaScript"" src=""../JS/ContextMenu.js""></script>"
Response.Write "<script language=""JavaScript"" src=""../JS/SelectElement.js""></script>"
Response.Write "<script language=""JavaScript"" src=""../Common/SpecialFunction.JS""></script>"
Response.Write "</head>"
Response.Write "<body scroll=no topmargin=""0"" leftmargin=""0"" OnClick=""SelectElement();"" onkeydown=""GetKeyDown();"" onselectstart=""return false;"">"
Response.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" class=""sortbutton"">"
Response.Write " <tr>"
Response.Write " <td height=""23"" align=""left"">"
If KeyWord = "" Then
Response.Write " <input class=""buttonstyle"" name=""CreateFolder"" "
If SpecialID <> "0" Then Response.Write (" Disabled=true")
Response.Write " title=""添加专题"" type=""button"" value=""添加专题"" onClick=""CreateFolder();"" >"
Response.Write " <input class=""buttonstyle"" name=""EditFolder"" "
If SpecialID <> "0" Then Response.Write (" Disabled=true")
Response.Write " title=""编辑专题"" type=""button"" value=""编辑专题"" onClick=""Edit('');"" >"
Response.Write " <input class=""buttonstyle"" name=""channeldel"" "
If SpecialID <> "0" Then Response.Write (" Disabled=true")
Response.Write " title=""删除专题"" type=""button"" value=""删除专题"" onClick=""Delete('')"">"
Response.Write " <input class=""buttonstyle"" name=""SearchButton"" type=""button"" value=""搜索助理"" title=""搜索小助理"" onClick=""parent.frames['LeftFrame'].initializeSearch('Special')"">"
Response.Write " <input class=""buttonstyle"" name=""channeldel"" "
If SpecialID = "0" Then Response.Write (" Disabled=true")
Response.Write " title=""返回上一级"" type=""button"" value=""回上一级"" onClick=""ChangeUp();"">"
Else
Response.Write ("<img src='../Images/home.gif' align='absmiddle'><span style='cursor:hand' onclick=""SendFrameInfo('Special_Main.asp','Special_Left.asp','../Split.asp?ButtonSymbol=Disabled&OpStr=专题管理 >> <font color=red>管理首页</font>')"">专题首页</span>")
Response.Write (">>> 搜索结果: ")
If StartDate <> "" And EndDate <> "" Then
Response.Write ("专题更新日期在 <font color=red>" & StartDate & "</font> 至 <font color=red> " & EndDate & "</font> ")
End If
Select Case SearchType
Case 0
Response.Write ("名称含有 <font color=red>" & KeyWord & "</font> 的专题")
Case 1
Response.Write ("简要说明中含有 <font color=red>" & KeyWord & "</font> 的专题")
End Select
End If
Response.Write " </td>"
Response.Write " </tr>"
Response.Write "</table>"
Response.Write "<table width=""100%"" height=""25"" border=""0"" cellpadding=""0"" cellspacing=""1"">"
Response.Write " <tr>"
Response.Write " <td height=""6"" ></td>"
Response.Write " </tr>"
If KeyWord <> "" Then
Dim Param
Param = " Where 1=1"
Select Case SearchType
Case 0
Param = Param & " And SpecialName like '%" & KeyWord & "%'"
Case 1
Param = Param & " And SpecialNote like '%" & KeyWord & "%'"
End Select
If StartDate <> "" And EndDate <> "" Then
If CInt(Application("DataBaseType")) = 1 Then 'Sql
Param = Param & " And (SpecialAddDate>= '" & StartDate & "' And SpecialAddDate<= '" & DateAdd("d", 1, EndDate) & "')"
Else 'Access
Param = Param & " And (SpecialAddDate>=#" & StartDate & "# And SpecialAddDate<=#" & DateAdd("d", 1, EndDate) & "#)"
End If
End If
Param = Param & " Order BY SpecialAddDate desc"
SqlStr = "Select ID,FolderID,SpecialName,Creater,SpecialAddDate,SpecialNote from KS_Special " & Param
Else
If SpecialID = "0" Then
SqlStr = "Select ID,FolderID,SpecialName,Creater,SpecialAddDate,SpecialNote from KS_Special Where FolderID='" & FolderID & "' Order BY SpecialAddDate desc"
Else
SqlStr = "Select NewsID,Tid,Title,ArticleInput,AddDate,PicNews,Verific From KS_Article Where Specialid='" & SpecialID & "' AND DelTF<>1 Order BY AddDate Desc"
End If
End If
Set SpecialRS = Server.CreateObject("AdoDb.RecordSet")
SpecialRS.Open SqlStr, Conn, 1, 1
If SpecialRS.EOF And SpecialRS.BOF Then
Else
totalPut = SpecialRS.RecordCount
If CurrentPage < 1 Then
CurrentPage = 1
End If
If (CurrentPage - 1) * MaxPerPage > totalPut Then
If (totalPut Mod MaxPerPage) = 0 Then
CurrentPage = totalPut \ MaxPerPage
Else
CurrentPage = totalPut \ MaxPerPage + 1
End If
End If
If CurrentPage = 1 Then
Call showContent
Else
If (CurrentPage - 1) * MaxPerPage < totalPut Then
SpecialRS.Move (CurrentPage - 1) * MaxPerPage
Call showContent
Else
CurrentPage = 1
Call showContent
End If
End If
End If
Response.Write "</table>"
Response.Write "</body>"
Response.Write "</html>"
End Sub
Sub showContent()
Do While Not SpecialRS.EOF
Response.Write "<tr>"
Response.Write "<td><table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
Response.Write " <tr>"
Dim T, TitleStr, VerificStr, ShortName
For T = 1 To Row
If Not SpecialRS.EOF Then
If SpecialID = "0" Or KeyWord <> "" Then
SpecialName = SpecialRS("SpecialName")
ShortName = KSCMS.ListTitle(SpecialName, 24)
TitleStr = " TITLE='名 称:" & SpecialName & " 日 期:" & SpecialRS("SpecialAddDate") & " 创 建:" & SpecialRS("Creater") & "'"
Else
SpecialName = SpecialRS("Title")
ShortName = KSCMS.ListTitle(SpecialName, 24)
If SpecialRS("Verific") = 1 Then
VerificStr = "已审核"
Else
VerificStr = "未审核"
End If
TitleStr = " TITLE='名 称:" & SpecialName & " 日 期:" & SpecialRS("AddDate") & " 审 核:" & VerificStr & " 录 入:" & SpecialRS("ArticleInput") & "'"
End If
Response.Write ("<td width=""" & CInt(100 / Row) & "%"" Style=""cursor:default"" align=""center""" & TitleStr & ">")
If SpecialID = "0" Or KeyWord <> "" Then
Response.Write ("<span onmousedown=""mousedown(this);"" style=""POSITION:relative;"" SpecialID=""" & SpecialRS("ID") & """ SpecialName=""" & SpecialName & """ OnDblClick=""OpenTheFolder(this.SpecialID,this.SpecialName)"">")
Else
Response.Write ("<span onmousedown=""mousedown(this);"" style=""POSITION:relative;"" ArticleID=""" & SpecialRS("NewsID") & """>")
End If
If SpecialID = "0" Or KeyWord <> "" Then
Response.Write ("<img src=""../Images/Folder/Special.gif""> ")
ElseIf CInt(SpecialRS("PicNews")) = 1 Then
Response.Write ("<img src=../Images/Folder/ThePicNews" & SpecialRS("Verific") & ".gif border=0 align=absmiddle>")
Else
Response.Write ("<img src=../Images/Folder/TheWordNews" & SpecialRS("Verific") & ".gif border=0 align=absmiddle>")
End If
Response.Write ("<div style=""display:block;height:16;width:80;cursor:default"">" & ShortName & "</div>")
Response.Write ("</span>")
Response.Write ("</td>")
i = i + 1
If SpecialRS.EOF Or i >= MaxPerPage Then Exit For
SpecialRS.MoveNext
Else
Exit For
End If
Next
'不到7个单元格,则进行补空
Do While T <= Row
Response.Write ("<td width=70> </td>")
T = T + 1
Loop
Response.Write " </tr>"
Response.Write " <tr><td colspan=" & Row & " height=10></td></tr>"
Response.Write " </table></td>"
Response.Write " </tr>"
If i >= MaxPerPage Then Exit Do
If SpecialRS.EOF Then Exit Do
Loop
SpecialRS.Close
Response.Write " <tr>"
Response.Write " <td align=""right"">"
Call KSCMS.ShowPageParamter(totalPut, MaxPerPage, "Special_Main.asp", True, "个", CurrentPage, "SpecialID=" & SpecialID)
Response.Write "</td>"
Response.Write " </tr>"
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -