www.gusucode.com > CC校友录贴吧 CCBar源码程序asp编程 > inc/inc_class_def.asp
<% 'Option Explicit Const GBL_DIVIDER = "|||" Const GBL_LINK_DIVIDER = "" '==0x1f Const CONST_DIVIDER = "" '== 0x1f Const CONST_DIVIDER2 = "" '== 0x1e Const CONST_DB_TYPE = 0 '== db type 0--access 1--sqlserver 2--localhost sqlserver Const CONST_WEB_VER = "CC城市校友录 V0608" Const CONST_TITLE_CHAR = "" '== for trans control at 04/07/01 Const CONST_TRANS_CTL = 1 ' 0 -- db 1 -- application Const CONST_TRANS_SHOW = 1 ' 0 -- db 1 -- single text at GBL_strDefMenu Dim GBL_strDefTrans,GBL_strDefMenu GBL_strDefTrans = "" GBL_strDefMenu = "" '== Error Const Const E_USER_PUB = 2001 Const E_ADMIN_PUB = 2002 Const E_SYS_PUB = 2003 Const E_DB_PUB = 2004 Dim GBL_strAdminAccount Dim GBL_strSiteName,GBL_strClassName Dim GBL_strStyleCss,GBL_strWebSiteURL,GBL_strHomeURL,GBL_strCookieURL Dim GBL_strSetupStatus Dim GBL_strUserRealName,GBL_intUserId,GBL_strUserAccount,GBL_strNowTrans Dim GBL_intRefreshTime Dim GBL_intTitleStyle,GBL_strStyle,GBL_PageExeTime Dim GBL_strImgPath,GBL_strImgLocal,GBL_strCartoonFacePath Dim GBL_strImgColumn,GBL_strImgIco,GBL_strBoardFace Dim GBL_intMaxPerAddress Dim GBL_intHomeViewCount,GBL_strHomeViewBegin,GBL_intHomeLastViewCount,GBL_intHomeTodayViewCount Dim strTmp,arrTmp Dim GBL_intDBNum '== Diff website application and session objects '== 首次安装应修改此值并保持和setup/config.asp中的此值一致 GBL_strCookieURL = "schoolfellow 1.0" '== Global parameters status GBL_strSetupStatus = "N" '== administrator account GBL_strAdminAccount = "admin" '== The web begin view count and timer GBL_intHomeViewCount = 1 GBL_strHomeViewBegin = Now() GBL_PageExeTime = Timer '== 网页开始执行时间点 'Application(GBL_strCookieURL & "APP_ConfigLoaded") = "" '== Check the web all global parameters is loaded If Application(GBL_strCookieURL & "APP_ConfigLoaded") = "" Or IsNull(Application(GBL_strCookieURL & "APP_ConfigLoaded")) Then Response.Redirect "./setup/config.asp" End If '== Get now login user info GBL_strUserRealName = Trim(Session(GBL_strCookieURL & "SEN_strUserRealName")) GBL_intUserId = Trim(Session(GBL_strCookieURL & "SEN_UserId")) 'If Not IsNumeric(GBL_intUserId) Then ' GBL_intUserId = -1 'Else ' GBL_intUserId = Cint(GBL_intUserId) 'End If GBL_strUserAccount = Trim(Session(GBL_strCookieURL & "SEN_strUserAccount")) GBL_strUserInfo = Trim(Session(GBL_strCookieURL & "SEN_strUserInfo")) If Trim(Session(GBL_strCookieURL & "SEN_strUserAuthen")) <> "" Then GBL_strUserAuthen = Cint(Trim(Session(GBL_strCookieURL & "SEN_strUserAuthen"))) End If GBL_strUserAccess = Session(GBL_strCookieURL & "SEN_strUserAccess") '== Other web parameters GBL_intRefreshTime = 5 '== refresh time after succ GBL_intTitleStyle = 3 '== IE's Title style GBL_strHomeURL = "../" '== the web root-path GBL_intDBNum = 0 '== access db number '== the web style define strTmp = Application(GBL_strCookieURL & "APP_strStyle") GBL_strStyle = "3" '== the parameter for forum DEF_arrForumCate = Array("深圳理想","似水年华","休闲娱乐","站务区") DEF_intForumCate = Ubound(DEF_arrForumCate,1) '== Now public images path define GBL_strBoardFace = "board/smileface/" GBL_strImgAlbum = "album/upAlbum/" GBL_strImgLocal = "images/" GBL_strImgForum = "images/forum/" GBL_strCartoonFacePath = "images/cartoonface/" GBL_strUserUpFace = "user/uploadFace/" '== Now style images path define GBL_strImgPath = "style/" & GBL_strStyle & "/images/" GBL_strImgColumn = "style/" & GBL_strStyle & "/images/Column/" GBL_strImgIco = "style/" & GBL_strStyle & "/images/Ico/" '== Image width and heigh rule GBL_intImgWidth2 = 570 '== Admin show number per page GBL_intMaxPerAdmin = 10 '============================ '== CSS GLOBAL DEFINE == '============================ Dim GBL_cssIptBtn,GBL_cssIptSelect,GBL_cssIptCheckBox GBL_cssIptBtn = "IPTBTN" GBL_cssIptSelect = "FMSEL1" GBL_cssIptCheckBox = "" GBL_cssIptText = "" GBL_cssIptTextrea = "" GBL_cssIptRadioBox = "" GBL_cssFormTable = "CSS_TB3" GBL_cssFormTr = "CSS_TR2" GBL_cssFormTdOne = "CSS_TD_RIGHT2" GBL_cssFormTdTwo = "CSS_TD_LEFT1" GBL_cssFormTitleTr = "CSS_TR2" GBL_cssFormTitleTd = "CSS_HEAD_LEFT2" GBL_cssFormTitleFont = "" GBL_cssFormSubTr = "CSS_TR2" GBL_cssFormSubTd = "CSS_SUB_CENTER2" GBL_cssFormSubFont = "" GBL_cssFormAddTr = "" GBL_cssFormAddTd = "" GBL_cssFormAddFont = "" GBL_cssListTable = "CSS_TB3" GBL_cssListTable2 = "CSS_TB4" GBL_cssListTr1 = "CSS_TR1" GBL_cssListTr2 = "CSS_TR2" GBL_cssListTd1 = "CSS_TD_CENTER1" GBL_cssListTd2 = "CSS_TD_CENTER2" GBL_cssListTitleTr = "CSS_TD_CENTER1" GBL_cssListTitleTd = "CSS_HEAD_CENTER2" GBL_cssListTitleTd2 = "CSS_SUB_CENTER2" GBL_cssListTitleFont = "" GBL_cssListSubTr = "" GBL_cssListSubTd = "" GBL_cssListSubFont = "" GBL_cssListAddTr = "" GBL_cssListAddTd = "" GBL_cssListAddFont = "" GBL_cssColumnTable = "CSS_TB3" GBL_cssColumnTr = "CSS_TR3" GBL_cssColumnTd1 = "CSS_TD_RIGHT3" GBL_cssColumnTd2 = "CSS_TD_LEFT3" GBL_cssColumnTitleTr = "" GBL_cssColumnTitleTd = "" GBL_cssColumnTitleFont = "" GBL_cssColumnSubTr = "CSS_TR3" GBL_cssColumnSubTd = "CSS_TD_CENTER3" GBL_cssColumnSubFont = "" GBL_cssAlbumPerTable = "CSS_PHOTOLIST_TB" GBL_cssAlbumPerTr = "CSS_TR3" GBL_cssAlbumPerTd = "CSS_TD_CENTER3" GBL_cssAlbumListTable = "CSS_TB3" GBL_cssAlbumListTr = "CSS_TR3" GBL_cssAlbumListTd = "CSS_TD_LEFT3" GBL_cssBoardTd2 = "CSS_TD_LEFT1" GBL_cssBoardTd1 = "CSS_TD_LEFT3" GBL_cssBoardTitle = "CSS_HEAD_LEFT1" GBL_cssIptBtn = "" GBL_cssIptText = "" GBL_cssSelect = "" GBL_cssTextrea = "" GBL_cssChkBox = "CSS_IPT_CHKBOX" GBL_cssRadio = "CSS_IPT_RADIO" GBL_cssTitleFont = "CSS_FONT1" '=============================== '== EVERY COLUMN DEFINE == '=============================== GBL_intBirthSpeed = 10 '== birth clew up speed '== Bulletin set parameters strTmp = Application(GBL_strCookieURL & "APP_strBulletinSet") GBL_strBulletinScrollDelay = GetConfig(strTmp,"ScrollDelay") GBL_strBulletinDirection = GetConfig(strTmp,"Direction") GBL_strBulletinScrollAmount = GetConfig(strTmp,"ScrollAmount") '== Web_info parameters get strTmp = Application(GBL_strCookieURL & "APP_strWebInfo") GBL_strSiteName = GetConfig(strTmp,"SiteName") GBL_strSiteHome = GetConfig(strTmp,"SiteHome") GBL_strSiteURL = GetConfig(strTmp,"SiteURL") GBL_strSiteIntro = GetConfig(strTmp,"SiteIntro") '== Class_info parameters get strTmp = Application(GBL_strCookieURL & "APP_strClassInfo") GBL_strEntranceTime = GetConfig(strTmp,"EntranceTime") GBL_strCreator = GetConfig(strTmp,"ClassCreator") GBL_strClassName = GetConfig(strTmp,"ClassName") GBL_strAdminEmail = GetConfig(strTmp,"AdminEmail") '== Board set parameters strTmp = Application(GBL_strCookieURL & "APP_strBoardSet") GBL_strBoardStyle = GetConfig(strTmp,"BoardStyle") If Trim(GetConfig(strTmp,"BoardPerPage")) <> "" Then GBL_intMaxPerBoard = Cint(GetConfig(strTmp,"BoardPerPage")) GBL_intNumTopBoard = Cint(GetConfig(strTmp,"TopBoard")) End If '== Album set parameters strTmp = Application(GBL_strCookieURL & "APP_strAlbumSet") If Trim(GetConfig(strTmp,"AlbumPerPage")) <> "" Then GBL_intMaxPerAlbum = Cint(GetConfig(strTmp,"AlbumPerPage")) GBL_intNumTopAlbum = Cint(GetConfig(strTmp,"TopAlbum")) GBL_intAlbumNum = Cint(GetConfig(strTmp,"AlbumMax")) GBL_intPhotoMaxSize = Cint(GetConfig(strTmp,"PhotoMaxSize")) End If GBL_strPhotoType = GetConfig(strTmp,"PhotoType") '== Address set parameters strTmp = Application(GBL_strCookieURL & "APP_strAddressSet") GBL_intMaxPerAddress = 10 GBL_intAddressDownAuthen =10 '== User set parameters strTmp = Application(GBL_strCookieURL & "APP_strUserSet") If Trim(GetConfig(strTmp,"UserRegMode")) <> "" Then GBL_intUserRegMode = Cint(GetConfig(strTmp,"UserRegMode")) GBL_intUserRegQuesNum = Cint(GetConfig(strTmp,"UserRegQuesNum")) End If '== Sms set parameters strTmp = Application(GBL_strCookieURL & "APP_strSmsSet") GBL_strSmsSound = GetConfig(strTmp,"SmsSound") GBL_intMaxPerSms = 10 GBL_intSmsMaxSize =10 GBL_intSmsMaxNum =10 '== Small column set strTmp = Application(GBL_strCookieURL & "APP_strSmallColumn") If Trim(strTmp) = "" Then GBL_intHPoll = 0 GBL_intHLink = 1 GBL_intHPer = 0 GBL_intHFunc = 0 GBL_intHBirth = 0 GBL_intHOnline = 1 GBL_intPoll = 1 GBL_intLink = 1 GBL_intPer = 0 GBL_intFunc = 0 GBL_intBirth = 1 GBL_intOnline = 1 Else GBL_intHPoll = GetConfig(strTmp,"HomePoll") GBL_intHLink = GetConfig(strTmp,"HomeLink") GBL_intHPer = GetConfig(strTmp,"HomePer") GBL_intHFunc = GetConfig(strTmp,"HomeFunc") GBL_intHBirth = GetConfig(strTmp,"HomeBirth") GBL_intHOnline = GetConfig(strTmp,"HomeOnline") GBL_intPoll = GetConfig(strTmp,"OtherPoll") GBL_intLink = GetConfig(strTmp,"OtherLink") GBL_intPer = GetConfig(strTmp,"OtherPer") GBL_intFunc = GetConfig(strTmp,"OtherFunc") GBL_intBirth = GetConfig(strTmp,"OtherBirth") GBL_intOnline = GetConfig(strTmp,"OtherOnline") End If '== CLASS_CONFIG.CONFIG_USER_SET Format: GBL_strCartoonMale = "c1004" GBL_strCartoonFeMale = "c1002" '== CLASS_CONFIG.CONFIG_ALBUM_SET Format: GBL_strAlbumListWidth = 120 GBL_strAlbumListHeight = 80 GBL_strAlbumPerWidth = 360 GBL_strAlbumPerHeight = 290 GBL_strAlbumTopWidth = 120 GBL_strAlbumTopHeight = 80 '== CLASS_CONFIG.CONFIG_USER_SET Format: GBL_strUserFaceWidth = 130 GBL_strUserFaceHeight = 90 '========================================================= '== level set GBL_intLoginLevel = 2 GBL_intBoardLevel = 5 GBL_intAlbumLevel = 15 GBL_intReviewLevel = 5 GBL_intTopicsLevel = 15 GBL_intReplyLevel = 5 '========================================================= '== 风格设置变量 Dim GBL_SiteHeadString,GBL_SiteBottomString,GBL_DefineImage,GBL_TableHeadString,GBL_TableBottomString,GBL_ShowBottomSure,GBL_TempletID,GBL_TempletFlag Const DEF_WEB_DarkColor = "#cccccc" Const DEF_WEB_LightDarkColor = "#666699" Const DEF_WEB_Color = "#e0e0e0" Const DEF_WEB_LightColor = "eeeeee" Const DEF_WEB_LightestColor = "#f7f7f7" Const DEF_WEB_TableHeadColor = "#EEEEF3" Dim DEF_WEB_DisplayTopicLength,DEF_WEB_ScreenWidth,DEF_WEB_LeftWidth DEF_WEB_LeftWidth = "160" '== 左部table宽度 DEF_WEB_ScreenWidth = "570" Const DEF_WEB_LeftTDWidth = "150" Dim DEF_StyleString,DEF_StyleStringNum DEF_StyleString = Array("经典蓝色","第三元素","生命绿色","书香飘逸","城市边缘","苹果树下","网游天使","oAnetS","V2005") DEF_StyleStringNum = Ubound(DEF_StyleString) Const DEF_MaxTextLength = 16384 '== 最大文本长度 Dim DEF_MaxListNum DEF_MaxListNum = 24 Const DEF_DefaultStyle = 4 '== 缺省风格 Dim GBL_PageStyle '== 当前风格 '== subject Dim DEF_FormSubject(40) 'DEF_FormSubject(13) = Array("2005届毕业专辑","创业谈","职场社交","成功哲学") 'DEF_FormSubject(7) = Array("自助美食") 'DEF_FormSubject(6) = Array("深圳安全指南","法律咨询") 'DEF_FormSubject(16) = Array("TVB") 'DEF_FormSubject(11) = Array("友情岁月") 'DEF_FormSubject(9) = Array("生活爱情","经济视野","事业规划","强国贴吧") '== bad words check Const CTL_BAD_WORDS = True GBL_strBadWords = "操你|||我靠|||吗的|||妈的|||我日|||日你|||日他|||操他|||肏你妈|||fuck" '== acess Const CTL_USER_ACCESS = True '== show db num Const CTL_DB_NUM = True '== control db debug Const CTL_DB_DEBUG = false %> <!-- #include file ="./inc_style.asp" -->