?? inc_pub_func.asp
字號:
<%
'===================================================================
'= ASP FILENAME : /inc/pub_func.asp
'= CREATED TIME : AUG,6,2003
'= LAST MODIFIED: AUG,6,2003
'= VERSION INFO : CCASP Framework Ver 2.0.1 ALL RIGHTS RESERVED BY www.cclinux.com
'= DESCRIPTION : 通用主體函數庫
'= Change Log:
'===================================================================
%>
<!-- #include file="../inc/inc_debug.asp" -->
<%
'=============== FUNCTION BODY BEGIN ===============================
'===================================================================
'= Sub : SiteHead(strPageName)
'= Time : Created At 9,11,2003
'= Input :
'= Output :
'= Called by : All pages in this website
'= Calls :
'= Description : All page's <head>
'===================================================================
Sub SiteHead(strPageName)
Const CONST_PAGE_STYLE = ",,>> , <<,:: , ::,^-^,^-^,::::::,::::::"
Dim strPageStyle,intStyle
Dim strHtmlCode
'== Style of page's IE title
strPageStyle = split(CONST_PAGE_STYLE,",")
intTitleStyle = GBL_intTitleStyle
Response.Write strHtmlCode
strHtmlCode = ""
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="description" content="<% =GBL_strSiteName %>">
<meta name="keywords" content="校友網,校友活動,同學錄,校友錄,校友,學子,游子,<% =GBL_strClassName %>,<% =CONST_WEB_VER %>">
<title>
<%
=strPageStyle(intTitleStyle*2-2) & GBL_strSiteName & " -- " & strPageName & strPageStyle(intTitleStyle*2-1)
%>
</title>
<link rel="stylesheet" type="text/css" href="<% =GBL_strHomeUrl %>style/<% =GBL_strStyle %>/style.css" >
<style>
</style>
</head>
<%
Call HeadSpecialStyle(strPageName)
End Sub
'================ End of Sub SiteHead() ============================
'===================================================================
'= Sub : HeadSpecialStyle(strPageName)
'= Time : Created At 10,10,2003
'= Input :
'= Output :
'= Called by : All pages in this website
'= Calls :
'= Description : Some page's <head> special style
'===================================================================
Sub HeadSpecialStyle(strPageName)
%>
<!-- 提示窗口 層定義 -->
<div id='divClew' style='Z-INDEX: 2; VISIBILITY: hidden; WIDTH: 1px; POSITION: absolute; HEIGHT: 1px; '></div>
<%
End Sub
'================= End of Sub HeadSpecialStyle() ===================
'===================================================================
'= Sub : SiteBottom(strPageName)
'= Time : Created At 10,11,2003
'= Input :
'= Output :
'= Called by : All pages in this website
'= Calls :
'= Description : All page's bottom infomation(such as copyright)
'===================================================================
Sub SiteBottom(strPageName)
Dim strShowView
strShowView = "從" & FormatDateTime (GBL_strHomeViewBegin,1) & "起已有" & GBL_intHomeViewCount & "人次訪問過本頁"
If GBL_strUserAuthen = 1 Then
strShowView = strShowView & ",昨日:" & GBL_intHomeLastViewCount & ",今日:" & GBL_intHomeTodayViewCount
End If
%>
<center>
<br>
<a href="#" onClick="window.external.addFavorite('<%=GBL_strSiteHome%>','<%=GBL_strSiteName%>')" title="將<%=GBL_strSiteName%>添加到收藏夾">加入收藏</a> | 關于本站 |
<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('<%=GBL_strSiteHome%>');" title="將設置<%=GBL_strSiteName%>為瀏覽器首頁">設為首頁</a> | <a href="mailto:<%=GBL_strAdminEmail%>" title="給<%=GBL_strSiteName%>的管理員發郵件">與我聯系</a>
| <a href="<% =GBL_strHomeURL%>admin/index.asp" title="管理員專用">管理入口</a>
<br>
Copyright <font size=2>©</font> 2002-<%=year(date)%> <% =GBL_strClassName %> 版權所有
<a href="http://www.cclinux.com" target=_blank><% =CONST_WEB_VER %></font></a>
<%
'== 04/02
If CONST_PAGE_FILE = "/index1.asp" Then
Response.Write "<br>" & strShowView
End If
%>
<br>
<%
GBL_PageExeTime = FormatNumber(cCur(Timer - GBL_PageExeTime),3,True)
Response.Write " Server:" & GBL_PageExeTime*1000 & "Ms"
If CTL_DB_NUM Then
Response.Write " DB:" & GBL_intDBNum
End If
%>
<script language=javascript>
// end flag of web finished
EndFlag = 1;
</script>
</center>
<%
'== debug for db
Call ShowDBDebug(clsPubDB)
End Sub
'====================================================================
'= Sub : ShowFuncSwitch(strPageName)
'= Time : Created At 9,13,2003
'= Input :
'= Output :
'= Called by : PageMainStyle(strPageName),HomeMainStyle(strPageName)
'= Calls : None
'= Description : 根據不同的頁面請求來確定網頁欄目顯示和數據處理的分揀主函數
'====================================================================
Sub ShowFuncSwitch(strPageName,intFlag)
'== intFlag : 0-MainColumn 1-Title 2-SmallColumn 3-Obligate
Dim strFuncName
Dim arrTmp
Dim intTop,intBg,intBottom
Dim strTop,strBg,strBottom
Dim strMenu,strFunc
If strPageName = "/err.asp" Then
Call ShowFuncSingle("ShowErr")
Exit Sub
End If
If strPageName = "/succ.asp" Then
Call ShowFuncSingle("ShowSucc")
Exit Sub
End If
strFuncName = Trim(Request("action"))
'== web page trans
strFunc = strFuncName
If CONST_TRANS_SHOW = 0 Then
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_TRANS"
clsPubDB.SQLType = "SELECT"
clsPubDB.AddField "TRANS_FUNC_MENU",""
clsPubDB.Where = "TRANS_NAME='" & strFuncName & "' AND TRANS_TYPE=1 AND TRANS_STYLE='" & GBL_strStyle & "'"
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"show func","ES_ERR")
If clsPubDB.intRSNum = 0 Then
Call ResultExecute(10,"show func","ES_ERR")
Exit Sub
End If
strMenu = clsPubDB.objPubRS("TRANS_FUNC_MENU")
Else
strMenu = GBL_strDefMenu
End If
If strMenu <> "" Then
arrTmp = Split(strMenu,"|")
For i = LBound(arrTmp) To UBound(arrTmp)
Call ShowFuncOne(arrTmp(i))
Response.Write "<br>"
Next
End If
Call ShowFuncOne(strFunc)
End Sub
'================ End of Sub ShowFunctionSwitch() ===================
'====================================================================
'= Sub : ShowFuncOne(strFuncName)
'= Time : Created At 9,13,2003
'= Input : 發交易請求名(strPageName)
'= Output :
'= Called by :
'= Calls : None
'= Description : 根據不同的頁面請求來確定網頁欄目顯示和數據處理的分揀主函數
'= Up History : 2004/04/29 去掉本函數功能 提高速度
'====================================================================
Sub ShowFuncOne(strFuncName)
Execute strFuncName & "()"
End Sub
'============== End of Func ShowFuncOne(strFuncName) ===============
Sub ActionView(Action)
Execute Action & "()"
End Sub
'===================================================================
'= Function : ExecFuncSwitch(strPageName)
'= Time : Created At SEP,2,2003
'= Input : The page file name
'= Called by : All index.asp
'= Calls :
'= Description : Data execute(no display)
'===================================================================
Sub ExecFuncSwitch(strPageName)
Dim strGetPost
strGetPost = Trim(Request.QueryString("action"))
'== check page submit from .
If Not CheckPageSubmit Then
Call ResultExecute(E_USER_PUB,"禁止從站點外部提交數據","ES_ERR")
Exit Sub
End If
Execute strGetPost & "()"
End Sub
'============== End of Function BoardExeFunction() ==================
'====================================================================
'= Function : CheckPageSubmit()
'= Time : Created At Apr,18,2003
'= Input : None
'= Output : None
'= Called by :
'= Calls : Server Functions
'= Return : true or false
'= Description : 防止外部頁面數據提交
'====================================================================
Function CheckPageSubmit()
Dim strPrePage,strLocalSvr
strPrePage = Cstr(Request.ServerVariables("HTTP_REFERER"))
strLocalSvr = Cstr(Request.ServerVariables("SERVER_NAME"))
If Mid(strPrePage,8,Len(strLocalSvr)) <> strLocalSvr And strPrePage <> "" Then
CheckPageSubmit = FALSE
Else
CheckPageSubmit = TRUE
End If
End Function
'================== End of Func CheckPageSubmit() ===================
'===================================================================
'= Function : CheckPostExist(strInPost)
'= Time : Created At Apr,04,2004
'= Input : The page file name
'= Called by :
'= Calls :
'= Description : check the post is or not exist
'===================================================================
Sub CheckPostExist(strInPost)
Dim arrTmp,strGetPagePost
Dim i
strGetPagePost = Trim(Request.QueryString("action"))
If strGetPagePost = "" Then
Call ResultExecute(E_USER_PUB,"錯誤的頁面欄目請求:<br>NULL","ES_ERR")
Exit Sub
End If
arrTmp = Split(strInPost,",")
For i = LBound(arrTmp) To UBound(arrTmp)
If strGetPagePost = arrTmp(i) Then
Exit Sub
End If
Next
Call ResultExecute(E_USER_PUB,"錯誤的頁面欄目請求:<br>" & strGetPagePost,"ES_ERR")
End Sub
'============== End of Function CheckPostExist() ====================
'====================================================================
'= Sub : ExecOrShowSwitch(strPageName,strShowFunc,strShowDataFunc,strExecFunc)
'= Time : Created At SEP,2,2003
'= Input :
'= Called by : All main page
'= Calls :
'= Description : 用戶請求校驗與分揀
'===================================================================
Sub ActionFilter(strPageName,Action)
Dim strGetPost
Dim intGetAuthen,intGetType,intGetStatus,strGetDesc
Dim strTmp,strTmp1
strGetDesc = "該功能"
'== 更新在線用戶情況
Call GetNowOnline ()
'== Get transation request
strGetPost = Action
If strGetPost = "" Then
Call ResultExecute(10,"","ES_ERR")
Exit Sub
End If
'== check user access
If CTL_USER_ACCESS Then
If GBL_strUserAccess <> "" And IsNumeric(GBL_strUserAccess) Then
GBL_strUserAccess = Cint(GBL_strUserAccess)
If GBL_strUserAccess = 0 And Left(strGetPost,8) = "FormSave" Then
Call ResultExecute(E_USER_PUB,"對不起,您沒有提交權限","ES_ERR")
Exit Sub
End If
End If
End If
'== Get this trans code authen,status,type
If CONST_TRANS_CTL = 0 Then
clsPubDB.Clear()
clsPubDB.TableName = "CLASS_TRANS"
clsPubDB.SQLType = "SELECT"
clsPubDB.AddField "TRANS_STATUS,TRANS_AUTHEN,TRANS_TYPE,TRANS_DESC",""
clsPubDB.Where = "TRANS_CODE_TYPE='" & strTCodeType & "' AND TRANS_NAME='" & strGetPost & "' AND TRANS_STYLE='" & GBL_strStyle & "'"
clsPubDB.SQLRSExecute()
Call ResultExecute(clsPubDB.intErrNum,"get trans","ES_ERR")
If clsPubDB.intRSNum = 0 Then
Call ResultExecute(10,"Now Trans:" & strGetPost,"ES_ERR")
Exit Sub
End If
intGetAuthen = clsPubDB.objPubRS("TRANS_AUTHEN")
intGetStatus = clsPubDB.objPubRS("TRANS_STATUS")
intGetType = clsPubDB.objPubRS("TRANS_TYPE")
strGetDesc = clsPubDB.objPubRS("TRANS_DESC")
Else
strTmp = GetConfig(Application(GBL_strCookieURL & "APP_TRANS"),strGetPost)
If strTmp = "" Then
Call ResultExecute(E_USER_PUB,"錯誤的頁面欄目請求","ES_ERR")
Exit Sub
End If
'== divider 0x1e
strTmp1 = Split(strTmp,CONST_DIVIDER2)
intGetAuthen = Cint(strTmp1(0))
intGetStatus = Cint(strTmp1(1))
intGetType = Cint(strTmp1(2))
End If
'== Check this trans open status
If intGetStatus = 1 Then
Call ResultExecute(16,strGetDesc,"ES_ERR")
Exit Sub
End If
'== Check this trans auThen status
Call AuThenCheck(intGetAuthen)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -