-
-
Notifications
You must be signed in to change notification settings - Fork 179
/
server.output.cfm
executable file
·197 lines (170 loc) · 5.99 KB
/
server.output.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<cfset error.message="">
<cfset error.detail="">
<cfadmin
action="getOutputSetting"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="setting">
<cfadmin
action="securityManager"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
returnVariable="hasAccess"
secType="setting"
secValue="yes">
<!---
Defaults --->
<cfparam name="url.action2" default="list">
<cfparam name="form.mainAction" default="none">
<cfparam name="form.subAction" default="none">
<cfif hasAccess>
<cftry>
<cfswitch expression="#form.mainAction#">
<!--- UPDATE --->
<cfcase value="#stText.Buttons.Update#">
<cfadmin
action="updateOutputSetting"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
cfmlWriter="#form.cfmlWriter#"
suppressContent="#isDefined('form.suppressContent') and form.suppressContent#"
allowCompression="#isDefined('form.allowCompression') and form.allowCompression#"
bufferOutput="#isDefined('form.bufferOutput') and form.bufferOutput#"
contentLength=""
remoteClients="#request.getRemoteClients()#">
</cfcase>
<!--- reset to server setting --->
<cfcase value="#stText.Buttons.resetServerAdmin#">
<cfadmin
action="updateOutputSetting"
type="#request.adminType#"
password="#session["password"&request.adminType]#"
cfmlWriter=""
suppressContent=""
showVersion=""
allowCompression=""
bufferOutput=""
contentLength=""
remoteClients="#request.getRemoteClients()#">
</cfcase>
</cfswitch>
<cfcatch>
<cfset error.message=cfcatch.message>
<cfset error.detail=cfcatch.Detail>
<cfset error.cfcatch=cfcatch>
</cfcatch>
</cftry>
</cfif>
<!--- Error Output --->
<cfset printError(error)>
<!--- Redirtect to entry --->
<cfif cgi.request_method EQ "POST" and error.message EQ "">
<cflocation url="#request.self#?action=#url.action#" addtoken="no">
</cfif>
<cfif not hasAccess>
<cfset noAccess(stText.setting.noAccess)>
</cfif>
<cfoutput>
<div class="pageintro">
#stText.setting[request.adminType]#
</div>
<cfformClassic onerror="customError" action="#request.self#?action=#url.action#" method="post">
<table class="maintbl">
<tbody>
<!--- Suppress Whitespace --->
<tr>
<th scope="row">#stText.setting.whitespace#</th>
<td>
<cfset desc={
'regular':stText.setting.cfmlWriterReg,
'white-space':stText.setting.cfmlWriterWS,
'white-space-pref':stText.setting.cfmlWriterWSPref
}>
<cfif hasAccess>
<cfloop list="regular,white-space,white-space-pref" index="k">
<input type="radio" class="checkbox" name="cfmlWriter" value="#k#" <cfif setting.cfmlWriter EQ k>checked="checked"</cfif>>
<div class="comment">#desc[k]#</div><br>
</cfloop>
<cfelse>
<b>#desc[setting.cfmlWriter]#
<input type="hidden" name="cfmlWriter" value="#setting.cfmlWriter#">
</cfif>
</td>
</tr>
<!--- Allow Compression --->
<tr>
<th scope="row">#stText.setting.AllowCompression#</th>
<td>
<cfif hasAccess>
<input type="checkbox" name="AllowCompression" class="checkbox" value="true" <cfif setting.AllowCompression>checked="checked"</cfif>>
<cfelse>
<b>#iif(setting.AllowCompression,de('Yes'),de('No'))#</b>
<!---<input type="hidden" name="AllowCompression" value="#setting.AllowCompression#">--->
</cfif>
<div class="comment">#stText.setting.AllowCompressionDescription#</div>
<cfsavecontent variable="codeSample">
this.compression = #setting.AllowCompression#;
</cfsavecontent>
<cfset renderCodingTip( codeSample )>
</td>
</tr>
<!--- Suppress Content when CFC Remoting --->
<tr>
<th scope="row">#stText.setting.suppressContent#</th>
<td>
<cfif hasAccess>
<input type="checkbox" name="suppressContent" class="checkbox" value="true" <cfif setting.suppressContent>checked="checked"</cfif>>
<cfelse>
<b>#iif(setting.suppressContent,de('Yes'),de('No'))#</b>
<!---<input type="hidden" name="suppressContent" value="#setting.suppressContent#">--->
</cfif>
<div class="comment">#stText.setting.suppressContentDescription#</div>
<cfsavecontent variable="codeSample">
this.suppressRemoteComponentContent = #setting.suppressContent#;
</cfsavecontent>
<cfset renderCodingTip( codeSample )>
</td>
</tr>
<!---
</tbody>
</table>
<h3>#stText.general.dialect.cfml#</h3>
<div class="itemintro">#stText.general.dialect.cfmlDesc#</div>
<table class="maintbl">
<tbody>
--->
<!--- Buffer Output --->
<tr>
<th scope="row">#stText.setting.bufferOutput#</th>
<td>
<cfif hasAccess>
<input type="checkbox" name="bufferOutput" class="checkbox" value="true" <cfif setting.bufferOutput>checked="checked"</cfif>>
<cfelse>
<b>#iif(setting.bufferOutput,de('Yes'),de('No'))#</b>
<!---<input type="hidden" name="suppressContent" value="#setting.suppressContent#">--->
</cfif>
<div class="comment">#stText.setting.bufferOutputDescription#</div>
<cfsavecontent variable="codeSample">
this.bufferOutput = #setting.bufferOutput#;
</cfsavecontent>
<cfset renderCodingTip( codeSample )>
</td>
</tr>
<cfif hasAccess>
<cfmodule template="remoteclients.cfm" colspan="2">
</cfif>
</tbody>
<cfif hasAccess>
<tfoot>
<tr>
<td colspan="2">
<input class="bl button submit" type="submit" name="mainAction" value="#stText.Buttons.Update#">
<input class="<cfif request.adminType EQ "web">bm<cfelse>br</cfif> button reset" type="reset" name="cancel" value="#stText.Buttons.Cancel#">
<cfif request.adminType EQ "web"><input class="br button submit" type="submit" name="mainAction" value="#stText.Buttons.resetServerAdmin#"></cfif>
</td>
</tr>
</tfoot>
</cfif>
</table>
</cfformClassic>
</cfoutput>