1
+ < cfcomponent output = " false" >
2
+ <!--- site settings --->
3
+ < cfset this .name = " Defacto2" >
4
+ < cfset this .clientManagement = true >
5
+ < cfset this .clientStorage = " registry" >
6
+ < cfset this .loginStorage = " session" >
7
+ < cfset this .sessionManagement = true >
8
+ < cfset this .setClientCookies = true >
9
+ < cfset this .setDomainCookies = false >
10
+ < cfset this .scriptProtect = false >
11
+ < cfset this .siteOffline = false >
12
+ < cfset this .siteCFerrors = true >
13
+ < cfset this .siteTimeOutsNull = false >
14
+ < cfset this .siteDBType = " mysql5" >
15
+ < cfset this .siteDebug = false >
16
+ <!--- site timeouts --->
17
+ < cfset this .applicationTimeout = createTimeSpan (14 ,0 ,0 ,0 )>
18
+ < cfset this .sessionTimeout = createTimeSpan (1 ,0 ,0 ,0 )>
19
+ <!--- site error templates --->
20
+ < cfif this .siteCFerrors IS FALSE >
21
+ < cferror type = " validation" template = " site-errorvalidation.cfm" >
22
+ < cferror type = " exception" template = " site-errorexception.cfm" >
23
+ < cferror type = " request" template = " site-errorrequest.cfm" >
24
+ < / cfif >
25
+
26
+ < cffunction name = " onApplicationStart" returnType = " boolean" output = " false" >
27
+ < cfif this .siteOffline IS TRUE AND LEFT (CGI .REMOTE_HOST ,7 ) NEQ " 192.168" >
28
+ < div style = " text-align:center; padding:50px; color:#FF0000; font-family:Arial, Helvetica, sans-serif; font-size:16px;" >
29
+ Sorry the site is currently down for upgrades , please come back in a few hours
30
+ < / div >
31
+ < cfabort >
32
+ < / cfif >
33
+ <!--- database name sources --->
34
+ < cfset application .siteDBType = this .siteDBType >
35
+ < cfif this .siteDBType eq " mysql5" >
36
+ < cfset application .dataSource = " defacto2net" >
37
+ < cfset application .portalSource = " defacto2net" >
38
+ < cfset application .docSource = " defacto2net" >
39
+ < cfset application .crackSource = " defacto2net" >
40
+ < cfset application .magSource = " defacto2net" >
41
+ < cfset application .groupSource = " defacto2net" >
42
+ < cfset application .newsSource = " defacto2net" >
43
+ < cfset application .newsComments = " defacto2net" >
44
+ < cfset application .poll = " defacto2net" >
45
+ < / cfif >
46
+
47
+ <!--- cache timeouts --->
48
+ < cfif this .siteTimeOutsNull IS TRUE >
49
+ < cfset application .cracktroTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
50
+ < cfset application .docTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
51
+ < cfset application .groupsTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
52
+ < cfset application .magazinesTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
53
+ < cfset application .newsTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
54
+ < cfset application .pollsTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
55
+ < cfset application .portalTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
56
+ < cfset application .standardTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
57
+ < cfset application .dailyTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
58
+ < cfelse >
59
+ < cfset application .cracktroTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
60
+ < cfset application .docTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
61
+ < cfset application .groupsTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
62
+ < cfset application .magazinesTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
63
+ < cfset application .newsTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
64
+ < cfset application .pollsTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
65
+ < cfset application .portalTimeOut = createTimeSpan (0 ,0 ,0 ,0 )>
66
+ < cfset application .standardTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
67
+ < cfset application .dailyTimeOut = createTimeSpan (0 ,0 ,30 ,0 )>
68
+ < / cfif >
69
+ <!--- days for a file to be considered new --->
70
+ < cfset application .daysNew = 31 >
71
+ <!--- encryption keys --->
72
+ < cfset application .urlEncryptionKey = " REMOVED" >
73
+ <!--- download paths and mirros --->
74
+ < cfset application .SceneORG = " http://www.scene.org/file.php?file=/demos/groups/defacto2/artpacks/" >
75
+ < cfset application .SceneORGRoot = " http://www.scene.org/dir.php?dir=/demos/groups/defacto2/" >
76
+ < cfset application .SceneORGEndVar = " #urlEncodedFormat (' &fileinfo' ) #" >
77
+ < cfset application .MagazinesPNG = " includes/magazines/png.versions/" >
78
+ < cfset application .nfoRootDir = " c:\websites\urk7tb\NFOOriginals" >
79
+ < cfset application .nfoRootWebPath = " /NFOOriginals/" >
80
+ <!--- daily user count --->
81
+ <!--- <cfif not IsDefined("application.usersonline") or IsArray(application.usersonline) is false>
82
+ <cflock scope="application" type="exclusive" timeout="5">
83
+ <cfset application.usersonline=ArrayNew(1)>
84
+ <cfset application.usersonline[1]=StructNew()>
85
+ <cfset application.usersonline[1].date=DateFormat(Now(),'ddmmmyyyy')>
86
+ <cfset application.usersonline[1].people=0>
87
+ <cfset application.usersonline[1].robots=0>
88
+ </cflock>
89
+ </cfif> --->
90
+ < cfreturn true >
91
+ < / cffunction >
92
+
93
+ < cffunction name = " onApplicationEnd" returnType = " void" output = " false" >
94
+ < cfargument name = " applicationScope" required = " true" >
95
+ < / cffunction >
96
+
97
+ < cffunction name = " onRequestStart" returnType = " boolean" output = " false" >
98
+ < cfargument name = " thePage" type = " string" required = " true" >
99
+ < cfreturn true >
100
+ < / cffunction >
101
+
102
+ < cffunction name = " onRequestEnd" returnType = " void" output = " false" >
103
+ < cfargument name = " thePage" type = " string" required = " true" >
104
+ < / cffunction >
105
+
106
+ < cffunction name = " onSessionStart" returnType = " void" output = " false" >
107
+ <!--- <cfset var tmp="application.Date#DateFormat(Now(),'ddmmmyyyy')#">
108
+ <cfset var cal="">
109
+ <cfset var arrlen=ArrayLen(application.usersonline)> --->
110
+ <!--- create unique user id and time on --->
111
+ < cfset Session .started = now ()>
112
+ < cfset Session .id = CreateUUID ()>
113
+ <!--- add user's visit to daily total --->
114
+ <!--- <cfloop from="1" to="#arrlen#" index="i">
115
+ <cfif application.usersonline[i].date eq DateFormat(Now(),'ddmmmyyyy')>
116
+ <cfset tmp = i><cfbreak>
117
+ </cfif>
118
+ </cfloop>
119
+ <cfif tmp neq "">
120
+ <cfif ReFindNoCase('(robot|crawl|bot)', CGI.HTTP_USER_AGENT) gt 0>
121
+ <cfset application.usersonline[tmp].robots=IncrementValue(application.usersonline[tmp].robots)>
122
+ <cfelse>
123
+ <cfset application.usersonline[tmp].people=IncrementValue(application.usersonline[tmp].people)>
124
+ </cfif>
125
+ <cfelse>
126
+ <cfset arrlen=arrlen+1>
127
+ <cfset application.usersonline[arrlen].date=DateFormat(Now(),'ddmmmyyyy')>
128
+ <cfif ReFindNoCase('(robot|crawl|bot)', CGI.HTTP_USER_AGENT) gt 0>
129
+ <cfset application.usersonline[arrlen].people=0>
130
+ <cfset application.usersonline[arrlen].robots=1>
131
+ <cfelse>
132
+ <cfset application.usersonline[arrlen].people=1>
133
+ <cfset application.usersonline[arrlen].robots=0>
134
+ </cfif>
135
+ </cfif> --->
136
+ < / cffunction >
137
+
138
+ < cffunction name = " onSessionEnd" returnType = " void" output = " false" >
139
+ < cfargument name = " sessionScope" type = " struct" required = " true" >
140
+ < cfargument name = " appScope" type = " struct" required = " false" >
141
+ < / cffunction >
142
+ < / cfcomponent >
0 commit comments