📄 admin_bulletin.asp
字号:
<%
'===================================================================
'= ASP FILENAME : /admin/admin_bulletin.asp
'= CREATED TIME : Feb,08,2004
'= LAST MODIFIED: Feb,08,2004
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : class bulletin manage
'= Change Log:
'===================================================================
%>
<!-- #include file = "../inc/inc_class_def.asp" -->
<!-- #include file = "../inc/inc_db_func.asp" -->
<!-- #include file = "../class/class_db.asp" -->
<!-- #include file = "../inc/inc_pub_func.asp" -->
<!-- #include file = "../inc/inc_char_func.asp" -->
<!-- #include file = "../inc/inc_data_check.asp" -->
<!-- #include file = "../inc/inc_ubb.asp" -->
<!-- #include file = "../class/class_html_form.asp" -->
<!-- #include file = "../class/class_html_table.asp" -->
<!-- #include file = "../main_func.asp" -->
<!-- #include file = "./admin_func.asp" -->
<!-- #include file = "../js/comm_func.js" -->
<!-- #include file = "../js/ubbcode.js" -->
<%
Const CONST_PAGE_FILE = "admin/admin_bulletin.asp"
GBL_strHomeURL = "../"
Call AdminCheckExec()
Dim clsPubDB
Set clsPubDB = New classDBOprt
Call SiteHead("网站通告")
Call CheckPostExist("FormBulletinAdmin,FormSaveBulletinAdmin")
Call ExeSysAdminQst()
Set clsPubDB = Nothing
%>
<%
'=============== FUNCTION BODY BEGIN ===============================
'===================================================================
'= Function : FormBulletinAdmin()
'= Time : Created At Nov,06,2003
'= Input : None
'= Output : None
'= Called by : SwitchExeFunction()
'= Calls : None
'= Table : QUERY CLASS_BULLETIN,CLASS_CONFIG.CONFIG_BULLETIN_SET
'= Description : Set the web bulletin content and parameters
'===================================================================
Sub FormBulletinAdmin()
Dim strBulletinContent,strBulletinCfg
Dim arrTmp
Dim strHtmlCode
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_BULLETIN"
clsPubDB.SQLType = "SELECT"
clsPubDB.AddField "BULLETIN_CONTENT",""
clsPubDB.Where = "BULLETIN_PRIORITY='2'"
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"site bulletin get"&clsPubDB.returnsql,"ES_ERR")
If clsPubDB.intRSNum = 0 Then
strBulletinContent = ""
Else
strBulletinContent = FilterHtml(clsPubDB.objPubRS("BULLETIN_CONTENT"))
End If
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_CONFIG"
clsPubDB.SQLType = "SELECT"
clsPubDB.AddField "CONFIG_BULLETIN_SET",""
clsPubDB.Where = "CONFIG_PRIORITY='2'"
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"site bullentin admin","ES_ERR")
If clsPubDB.intRSNum = 0 Then
Call LostConfigExec()
Else
strBulletinCfg = Trim(clsPubDB.objPubRS("CONFIG_BULLETIN_SET"))
Set clsForm = New classForm
'== Set form parameters
clsForm.Action = GBL_strHomeURL & "admin/admin_bulletin.asp?action=FormSaveBulletinAdmin"
clsForm.Id = "frmBulletinAdmin"
clsForm.Name = "frmBulletinAdmin"
clsForm.OnSubmit = "return CheckFormBulletinAdmin()"
clsForm.ColumnScale = "20%"
clsForm.MakeForm()
clsForm.MakeTable "0","3","1","center","98%",GBL_cssFormTable
clsForm.AddTr GBL_cssFormTitleTr
clsForm.AddTitle "网站通告设置",GBL_cssFormTitleTd
strTmp = GetConfig(strBulletinCfg,"ScrollAmount")
clsForm.AddTr GBL_cssFormTr
clsForm.AddTd "*显示速度",GBL_cssFormTdOne,GBL_cssFormTdTwo
clsForm.AddSelect "selScrollAmount",""
clsForm.AddOption "1","慢",strTmp
clsForm.AddOption "2","较慢",strTmp
clsForm.AddOption "3","一般",strTmp
clsForm.AddOption "5","较快",strTmp
clsForm.AddOption "10","快",strTmp
strTmp = GetConfig(strBulletinCfg,"ScrollDelay")
clsForm.AddTr GBL_cssFormTr
clsForm.AddTd "*延迟速度",GBL_cssFormTdOne,GBL_cssFormTdTwo
clsForm.AddSelect "selScrollDelay",""
clsForm.AddOption "100","慢",strTmp
clsForm.AddOption "80","较慢",strTmp
clsForm.AddOption "60","一般",strTmp
clsForm.AddOption "40","较快",strTmp
clsForm.AddOption "20","快",strTmp
strTmp = GetConfig(strBulletinCfg,"Direction")
clsForm.AddTr GBL_cssFormTr
clsForm.AddTd "*滚动方向",GBL_cssFormTdOne,GBL_cssFormTdTwo
clsForm.AddSelect "selDirection",""
clsForm.AddOption "up","向上",strTmp
clsForm.AddOption "down","向下",strTmp
clsForm.AddTr GBL_cssFormTr
clsForm.AddTd "UBB代码",GBL_cssFormTdOne,GBL_cssFormTdTwo
clsForm.AddLine GetUbb()
clsForm.AddTr GBL_cssFormTr
clsForm.AddTd "*宣言内容",GBL_cssFormTdOne,GBL_cssFormTdTwo
clsForm.AddTextrea "txtContent id=txtContent onkeydown=ctlent()","45","9"
clsForm.AddValue strBulletinContent
clsForm.AddTr GBL_cssFormSubTr
clsForm.AddSubTd GBL_cssFormSubTd
clsForm.AddSub "subFormBulletinAdmin","提 交","submit"
clsForm.AddSub "rstFormBulletinAdmin","重 写","reset"
clsForm.OutPutForm()
Set clsForm = Nothing
End If
End Sub
'================== End of Function FormBulletinAdmin() ============
'===================================================================
'= Sub : FormSaveBulletinAdmin()
'= Time : Created At Nov,06,2003
'= Input : None
'= Output : None
'= Called by : SwitchExeFunction()
'= Calls : None
'= Table : UPATE CLASS_BULLETIN
'= Description : Set the web bulletin content and parameters
'===================================================================
Sub FormSaveBulletinAdmin()
Dim intErrId
Dim strAddInfo
Dim strDirection,strScrollDelay,strContext,strScrollAmount
Dim strBulletinSet
intErrId = 0
'== Check direction of bulletion
strDirection = Trim(Request.Form("selDirection"))
strAddInfo = "网站通告滚动方向"
intErrId = DataCheck("DT_ENUM",strDirection,strAddInfo,"up,down")
Call ResultExecute(intErrId,strAddInfo,"ES_ERR")
'== Check scrollamount of bulletion
strScrollAmount = Trim(Request.Form("selScrollAmount"))
strAddInfo = "网站通告显示速度"
intErrId = DataCheck("DT_ENUM",strScrollAmount,strAddInfo,"1,2,3,5,10")
Call ResultExecute(intErrId,strScrollAmount,"ES_ERR")
'== Check scrolldelay of bulletion
strScrollDelay = Trim(Request.Form("selScrollDelay"))
strAddInfo = "网站通告延迟速度"
intErrId = DataCheck("DT_ENUM",strScrollDelay,strAddInfo,"20,40,60,80,100")
Call ResultExecute(intErrId,strAddInfo,"ES_ERR")
'== Check content of bulletion
strContent = Trim(Request.Form("txtContent"))
strAddInfo = "网站通告内容"
intErrId = DataCheck("DT_FIX_LENGTH",strContent,strAddInfo,"5|DTC_LESS_MORE_LEN|500|")
Call ResultExecute(intErrId,strAddInfo,"ES_ERR")
strBulletinSet = "ScrollDelay=" & strScrollDelay & "|||Direction=" & strDirection & "|||ScrollAmount=" & strScrollAmount
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_CONFIG"
clsPubDB.SQLType = "UPDATE"
clsPubDB.Where = "CONFIG_PRIORITY='2'"
clsPubDB.AddField "CONFIG_BULLETIN_SET",strBulletinSet
clsPubDB.SQLExecute()
Call ResultExecute(clsPubDB.intErrNum,"","ES_ERR")
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_BULLETIN"
clsPubDB.SQLType = "UPDATE"
clsPubDB.Where = "BULLETIN_PRIORITY='2'"
clsPubDB.AddField "BULLETIN_CONTENT",htmlencode2(strContent)
clsPubDB.SQLExecute()
Call ResultExecute(clsPubDB.intErrNum,"","ES_ERR")
Call ResultExecute(391,"网站通告设置" & GBL_DIVIDER & "FormBulletinAdmin","ES_SUCC")
End Sub
'================= End Of Sub FormSaveBulletinAdmin() ==============
'=============== FUNCTION BODY END =================================
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -