📄 label_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 Label_Main
KSCls.Execute()
Set KSCls = Nothing
Class Label_Main
Private KSCMS
Private LabelSql, LabelRS, FolderID, LabelID, ChannelID, Channel, Action
Private i, totalPut, CurrentPage, LabelType
Private KeyWord, SearchType, StartDate, EndDate
'搜索参数集合
Private 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 = KSCMS.G("KeyWord")
SearchType = KSCMS.G("SearchType")
StartDate = KSCMS.G("StartDate")
EndDate = KSCMS.G("EndDate")
SearchParam = "KeyWord=" & KeyWord & "&SearchType=" & SearchType & "&StartDate=" & StartDate & "&EndDate=" & EndDate
LabelType = KSCMS.G("LabelType")
If LabelType = "" Then LabelType = 0
If LabelType = 0 Then
If Not KSCMS.ReturnPowerResult(0, "KMTL10001") Then '系统函数标签的权限检查
Call KSCMS.ReturnErr(1, "")
Response.End
End If
ElseIf LabelType = 1 Then
If Not KSCMS.ReturnPowerResult(0, "KMTL10002") Then '自由标签的权限检查
Call KSCMS.ReturnErr(1, "")
Response.End
End If
End If
Action = KSCMS.G("Action")
Select Case Action
Case "SetPasteParam"
Call SetPasteParam()
Case "PasteSave"
Call LabelPasteSave()
Case Else
Call LabelMainList()
End Select
End Sub
Sub LabelMainList()
If Not IsEmpty(KSCMS.G("page")) And KSCMS.G("page") <> "" Then
CurrentPage = CInt(KSCMS.G("page"))
Else
CurrentPage = 1
End If
Action = KSCMS.G("Action")
FolderID = KSCMS.G("FolderID")
If FolderID = "" Then FolderID = "0"
Dim UPFolderRS, ParentID
Set UPFolderRS = Conn.Execute("select * from KS_LabelFolder where ID ='" & FolderID & "'")
If Not UPFolderRS.EOF Then
ParentID = UPFolderRS("ParentID")
End If
UPFolderRS.Close
Set UPFolderRS = Nothing
Response.Write "<html>"
Response.Write "<head>"
Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">"
Response.Write "<title>标签列表</title>"
Response.Write "</head>"
Response.Write "<link href=""../Inc/Admin_Style.CSS"" rel=""stylesheet"" type=""text/css"">"
Response.Write "<script language=""JavaScript"">" & vbCrLf
Response.Write "var FolderID='" & FolderID & "'; //目录ID" & vbCrLf
Response.Write "var ParentID='" & ParentID & "'; //父栏目ID" & vbCrLf
Response.Write "var Page='" & CurrentPage & "'; //当前页码" & vbCrLf
Response.Write "var KeyWord='" & KeyWord & "'; //关键字" & vbCrLf
Response.Write "var SearchParam='" & SearchParam & "'; //搜索参数集合" & vbCrLf
Response.Write "var LabelType=" & LabelType & ";" & 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/LabelFunction.JS""></script>"
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=""button1"" title=""添加目录"" type=""button"" value=""添加目录"" onClick=""AddFolder();"" >"
Response.Write " <input class=""buttonstyle"" name=""button2"" title=""编辑目录"" type=""button"" value=""编辑目录"" onClick=""Edit('Folder');"" >"
Response.Write " <input class=""buttonstyle"" name=""button3"" title=""删除目录"" type=""button"" value=""删除目录"" onClick=""Delete('Folder')"">"
Response.Write " <input class=""buttonstyle"" name=""Submit"" type=""button"" title=""搜索小助理"" value=""搜索助理"" onClick=""parent.frames['LeftFrame'].initializeSearch("
If LabelType = 0 Then Response.Write ("'SysLabel'") Else Response.Write ("'FreeLabel'")
Response.Write ");"">"
Response.Write " <input class=""buttonstyle"" "
If FolderID = "0" Then Response.Write ("Disabled=Ture")
Response.Write "name=""button4"" title=""返回到上一级栏目"" type=""button"" value=""回上一级"" onClick=""ChangeUp();"" >"
Else
If LabelType = 0 Then
Response.Write ("<img src='../Images/home.gif' align='absmiddle'><span style='cursor:hand' onclick=""SendFrameInfo('Label_Main.asp?LabelType=0','Template_Left.asp','../Split.asp?ButtonSymbol=FunctionLabel&OpStr=标签管理 >> <font color=red>系统函数标签</font>')"">系统标签首页</span>")
Else
Response.Write ("<img src='../Images/home.gif' align='absmiddle'><span style='cursor:hand' onclick=""SendFrameInfo('Label_Main.asp?LabelType=1','Template_Left.asp','../Split.asp?ButtonSymbol=FunctionLabel&OpStr=标签管理 >> <font color=red>自由标签</font>')"">自由标签首页</span>")
End If
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> 的标签")
Case 2
Response.Write ("内容中含有 <font color=red>" & KeyWord & "</font> 的标签")
End Select
End If
Response.Write " </td>"
Response.Write " </tr>"
Response.Write "</table>"
Response.Write "<div style="" height:98%; overflow: auto; width:100%"" align=""center"">"
Response.Write " <table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
Response.Write " <tr>"
Response.Write " <td height=""6""></td>"
Response.Write " </tr>"
Dim FolderSql, Param
Param = " Where LabelType=" & LabelType
If KeyWord <> "" Then
FolderSql = "SELECT ID,FolderName,Description,OrderID,OrderID FROM [KS_LabelFolder] where 1=0"
Select Case SearchType
Case 0
Param = Param & " AND LabelName like '%" & KeyWord & "%'"
Case 1
Param = Param & " AND Description like '%" & KeyWord & "%'"
Case 2
Param = Param & " AND LabelContent like '%" & KeyWord & "%'"
End Select
If StartDate <> "" And EndDate <> "" Then
If CInt(Application("DataBaseType")) = 1 Then 'Sql
Param = Param & " And (AddDate>= '" & StartDate & "' And AddDate<= '" & DateAdd("d", 1, EndDate) & "')"
Else 'Access
Param = Param & " And (AddDate>=#" & StartDate & "# And AddDate<=#" & DateAdd("d", 1, EndDate) & "#)"
End If
End If
Else
FolderSql = "SELECT ID,FolderName,Description,OrderID,OrderID FROM [KS_LabelFolder] where FolderType=" & LabelType & " And ParentID='" & FolderID & "'"
Param = Param & " AND FolderID='" & FolderID & "'"
End If
Param = Param & " ORDER BY OrderID "
Set LabelRS = Server.CreateObject("ADODB.recordset")
LabelRS.Open FolderSql & " UNION Select ID,LabelName,Description,LabelFlag,OrderID from [KS_Label] " & Param, Conn, 1, 1
If LabelRS.EOF And LabelRS.BOF Then
Else
totalPut = LabelRS.RecordCount
If CurrentPage < 1 Then
CurrentPage = 1
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -