📄 help_channel.asp
字号:
<%
'*************************************************************
'名称:Help_Channel
'
'中文含义:帮助目录信息管理
'
'描述:
' 该文件包含所有的帮助目录信息管理函数
'*************************************************************
'
'函数定义列表:
'
'函数定义 描述
'---------------------------------------------------------------------------------------
'Function TotalCount() 得到帮助目录总记录数
'
'Function AddChannel() 添加帮助目录
'
'Function ModifyChannel() 修改帮助目录
'
'Function DeleteChannel(ChannelID) 删除单个帮助目录
'
'Function GetChannelList(classid) 获取帮助目录列表
'
'Function GetChannelInfo() 获取帮助目录详细资料
''
'---------------------------------------------------------------------------------------
'*****************************************************************
'功能:得到帮助目录总记录数
'返回值:无
'*****************************************************************
Function TotalCount()
Dim SQLstr,rs
SQLstr = "SELECT * FROM PUB_HelpChannel where IsActive=1"
Set rs = Server.CreateObject("Adodb.Recordset")
rs.open SQLstr,conn,1,1
If rs.EOF then
TotalCount=0
Else
rs.MoveFirst
TotalCount = rs.RecordCount
End If
rs.close
Set rs = Nothing
End Function
'*****************************************************************
'功能:添加帮助目录信息
'返回值:无
'*****************************************************************
Function AddChannel()
Dim Rs,SQLstr
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open "PUB_HelpChannel",conn,1,3
dim ChannelID,ChannelName,Prevref,ThreadPos,PageID,Description,IsActive
ChannelID=AutoGetNo("PUB_HelpChannel")
ChannelName=Request("ChannelName")
Prevref=Request("Prevref")
ThreadPos = 1
SQLstr = "SELECT ThreadPos FROM Pub_HelpChannel WHERE PrevRef=" & prevref & " and IsActive=1 order by ThreadPos desc"
Set Rs = Conn.Execute(SQLstr)
If Not rs.EOF Then
ThreadPos = Rs("ThreadPos") + 1
End If
Rs.Close
set Rs=Nothing
PageID=Request("PageID")
Description=Request("Description")
IsActive=1
if Request("ISACTIVE")<>"" then
IsActive=0
end If
If ChannelID<>"" Then
conn.Execute "INSERT INTO PUB_HelpChannel VALUES(" & ChannelID & ",'" & ChannelName & "'," & Prevref & "," & ThreadPos &_
"," & PageID & ",'" & Description & "'," & IsActive & ")"
End If
End Function
'***********************************************************************
'功能:修改帮助目录信息
'返回值:
'***********************************************************************
Function ModifyChannel()
dim ChannelID,ChannelName,Prevref,ThreadPos,PageID,Description,IsActive
ChannelID=Request("ChannelID")
ChannelName=Request("ChannelName")
PageID=Request("PageID")
Description=Request("Description")
IsActive=1
if Request("ISACTIVE")<>"" then
IsActive=0
end If
If ChannelID<>"" Then
Application.Lock
conn.Execute "UPDATE PUB_HelpChannel SET ChannelName='" & ChannelName & "',PageID=" & PageID & ",Description='" & Description &_
"',ISACTIVE=" & IsActive & " WHERE ChannelID=" & ChannelID
Application.UnLock
End If
End Function
'**********************************************************************
'功能:删除单个帮助目录信息
'参数:
' ChannelID;Integer;帮助目录唯一代码
'**********************************************************************
Function DeleteChannel(ChannelID)
Dim SQLstr,RsData,Rs
SQLstr="select prevref,threadpos from Pub_HelpChannel where channelid=" & channelid
Set RsData=conn.Execute(SQLstr)
Prevref=rsdata("prevref")
ThreadPos=rsdata("threadpos")
RsData.close
Set RsData=Nothing
SQLstr="select channelid,threadpos from Pub_HelpChannel where prevref=" & prevref & " and threadpos>" & threadpos & " order by threadpos"
set Rs=conn.execute(sqlstr)
do while not rs.EOF
sqlstr="update Pub_HelpChannel set threadpos=" & rs("threadpos")-1 & " where channelid=" & rs("channelid")
Application.Lock
conn.execute(sqlstr)
Application.UnLock
rs.movenext
loop
Rs.close
Set Rs=Nothing
SQLstr="DELETE PUB_HelpChannel WHERE ChannelID=" & ChannelID
Application.Lock
conn.execute(Sqlstr)
Application.unLock
End Function
'**********************************************************************
'功能:列出帮助目录信息
'返回值:无
'**********************************************************************
Function GetChannelList()
Dim rstChannelList,SearchCondition
SearchCondition="SELECT * FROM PUB_HelpChannel "
Set rstChannelList=Server.CreateObject("adodb.recordset")
With rstChannelList
.ActiveConnection =conn
SearchCondition=SearchCondition & " ORDER BY ChannelID"
.Source = SearchCondition
.CursorType =3
.Open
End With
Set GetChannelList=rstChannelList
End Function
'***********************************************************************
'功能:获取某帮助目录的详细信息
'返回值:
'***********************************************************************
Function GetChannelInfo()
Dim cnnGetChannelInfo,Sql,ChannelID
ChannelID=Request("rowid")
Sql = "SELECT * FROM PUB_HelpChannel WHERE ChannelID=" & ChannelID
Set cnnGetChannelInfo = conn.Execute(Sql)
Set GetChannelInfo=cnnGetChannelInfo
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -