 </cftry>
 
 
-<!--- 
-Redirtect to entry --->
+<!--- Redirect to entry --->
 <cfif cgi.request_method EQ "POST" and error.message EQ "">
 	<cflocation url="#request.self#?action=#url.action#" addtoken="no">
 </cfif>
 
-<!--- 
-Error Output --->
+<!--- Error Output --->
 <cfset printError(error)>
-<!--- 
-Create Datasource --->
+<!--- Create Datasource --->
+
+<cfscript>
+	if (!proxy.keyExists("enabled"))
+		proxy.enabled = false;
+</cfscript>
 
 <cfoutput>
 <script>

	secValue="yes">


<!--- 
Defaults --->
<cfparam name="url.action2" default="list">
<cfparam name="form.mainAction" default="none">
<cfparam name="form.subAction" default="none">

<cftry>
	<cfswitch expression="#form.mainAction#">
	<!--- UPDATE --->
		<cfcase value="#stText.proxy.enable#">
			
			<cfadmin 
				action="updateProxy"
				type="#request.adminType#"
				password="#session["password"&request.adminType]#"
				
				proxyEnabled="true"
				proxyServer="#proxy.server#"
				proxyPort="#proxy.port#"
				proxyUsername="#proxy.username#"
				proxyPassword="#proxy.password#"
				>
		
		</cfcase>
		<cfcase value="#stText.proxy.disable#">
			
			<cfadmin 
				action="updateProxy"
				type="#request.adminType#"
				password="#session["password"&request.adminType]#"
				
				proxyEnabled="false"
				proxyServer=""
				proxyPort="80"
				proxyUsername=""
				proxyPassword=""
				>
		
		</cfcase>
		<cfcase value="#stText.Buttons.Update#">
			
			<cfadmin 
				action="updateProxy"
				type="#request.adminType#"
				password="#session["password"&request.adminType]#"
				
				proxyEnabled="#proxy.enabled#"
				proxyServer="#form.server#"
				proxyPort="#form.port#"
				proxyUsername="#form.username#"
				proxyPassword="#form.password#"
				>
		
		</cfcase>
		<cfcase value="#stText.Buttons.Delete#">
			
			<cfadmin 
				action="removeProxy"
				type="#request.adminType#"
				password="#session["password"&request.adminType]#"
				>
		
		</cfcase>
	</cfswitch>
	<cfcatch>
	
		<cfset error.message=cfcatch.message>
		<cfset error.detail=cfcatch.Detail>
		<cfset error.cfcatch=cfcatch>

<cfset error.message="">
<cfset error.detail="">

<cfadmin
	action="getProxy"
	type="#request.adminType#"
	password="#session["password"&request.adminType]#"
	returnVariable="proxy">

<cfadmin
	action="securityManager"
	type="#request.adminType#"
	password="#session["password"&request.adminType]#"
