<%
' 顯示調(diào)用錯(cuò)誤提示
Sub ShowErr(str)
Call DBConnEnd()
Response.Write "調(diào)用錯(cuò)誤:" & str
Response.End
End Sub
' 初始化輸入?yún)?shù)
Sub InitPara()
' 取全屏標(biāo)志
sFullScreen = Trim(Request.QueryString("fullscreen"))
' 取對(duì)應(yīng)的內(nèi)容ID
sContentID = Trim(Request.QueryString("id"))
If sContentID = "" Then ShowErr "請(qǐng)傳入調(diào)用參數(shù)ID,即隱藏的內(nèi)容表單項(xiàng)ID!"
' 取樣式初始值
sStyleName = Trim(Request.QueryString("style"))
If sStyleName = "" Then sStyleName = "standard"
sSql = "select * from ewebeditor_style where s_name='" & sStyleName & "'"
oRs.Open sSql, oConn, 0, 1
If Not oRs.Eof Then
sStyleID = oRs("S_ID")
sStyleName = oRs("S_Name")
sStyleDir = oRs("S_Dir")
sStyleEditorHeader = oRs("S_EditorHeader")
sStyleBody = oRs("S_Body")
nStateFlag = oRs("S_StateFlag")
sDetectFromWord = oRs("S_DetectFromWord")
Else
ShowErr "無效的樣式Style參數(shù)傳入,如果要使用默認(rèn)值,請(qǐng)留空!"
End If
oRs.Close
' 取版本號(hào)及發(fā)布日期
sSql = "select sys_version,sys_releasedate from ewebeditor_system"
oRs.Open sSql, oConn, 0, 1
sVersion = oRs(0)
sReleaseDate = oRs(1)
oRs.Close
End Sub
' 初始化按鈕數(shù)組
Sub InitButtonArray()
Dim i
sSql = "select * from ewebeditor_button order by b_order asc"
oRs.Open sSql, oConn, 0, 1
i = 0
Do While Not oRs.Eof
i = i + 1
Redim Preserve aButtonCode(i)
Redim Preserve aButtonHTML(i)
aButtonCode(i) = oRs("B_Code")
Select Case oRs("B_Type")
Case 0
aButtonHTML(i) = ""
Case 1
aButtonHTML(i) = ""
Case 2
aButtonHTML(i) = "
" & oRs("B_HTML") & "
"
End Select
oRs.MoveNext
Loop
oRs.Close
End Sub
' 由按鈕代碼得到按鈕的最終輸出
Function Code2HTML(s_Code)
Dim i
Code2HTML = ""
For i = 1 To UBound(aButtonCode)
If UCase(aButtonCode(i)) = UCase(s_Code) Then
Code2HTML = aButtonHTML(i)
Exit Function
End If
Next
End Function
' 初始化工具欄
Sub InitToolBar()
Dim aButton, n
sSql = "select t_button from ewebeditor_toolbar where s_id=" & sStyleID & " order by t_order asc"
oRs.Open sSql, oConn, 0, 1
If Not oRs.Eof Then
sToolBar = "
"
Do While Not oRs.Eof
sToolBar = sToolBar & "
"
aButton = Split(oRs("T_Button"), "|")
For n = 0 To UBound(aButton)
If sFullScreen = "1" And UCase(aButton(n)) = "MAXIMIZE" Then
aButton(n) = "Minimize"
End If
sToolBar = sToolBar & Code2HTML(aButton(n))
Next
sToolBar = sToolBar & "
"
oRs.MoveNext
Loop
sToolBar = sToolBar & "
"
Else
ShowErr "對(duì)應(yīng)樣式?jīng)]有設(shè)置工具欄!"
End If
oRs.Close
End Sub
%>