Application.cfc <cfcomponent output="false"> <cfset this.name = "DPS_20190102" /> <cfset this.applicationTimeout = createTimeSpan( 0, 1, 0, 0 ) /> <cfset this.sessionManagement = true /> <cfset this.setClientCookies = false /> <cfset this.sessionTimeout = createTimeSpan( 0, 1, 0, 0 ) /> <cfset this.securejson=false> <cffunction name="onApplicationStart"> <cfset application.primary_software_error_contact = ""> <cfset application.secondary_software_error_contact = ""> <cfset application.planning_schema = "wdresplanlog"> <cfset application.standard_project_list = "Developer,Public works"> <cfset application.dry_utility_project = "Dry utility"> <cfset application.dry_utility_list = ListAppend( application.standard_project_list, application.dry_utility_project )> <cfinvoke component="universal.environment" method="Get" p_subdirectory = "from_dps" returnvariable="local.temp"> <CFSET application.datasource = local.temp.datasource> <cfset application.file_directory = local.temp.file_path> <cfset application.link = local.temp.link> <cfset application.level = local.temp.level> <cfSET application.scheduling_db_source="inspect_sched_dev"> <cfif local.temp.level eq "prod"> <cfSET application.scheduling_db_source="inspect_sched"> <cfelseif local.temp.level eq "qa"> <cfSET application.scheduling_db_source="inspect_sched_qa"> </cfif> <cfset application.awpr_cutoff_id = 20000> <cfset application.insp_to_be_ignored = "GPSUG,GPSFNL,GPSLOC,GPSRLN,QA-UG,QA-FNL"> <cfset application.partial_data_entry_status = "Partial Data Entry"> <cfset application.complete_data_entry_status = "Data Entry Complete"> <cfset application.easementStatusStruct = StructNew()> <cfset StructInsert( application.easementStatusStruct, "easement_cancel", "No longer required" )> <cfset StructInsert( application.easementStatusStruct, "easement_approve", "Approved" )> <cfset StructInsert( application.easementStatusStruct, "easement_recorded", "Document Recorded" )> <cfset StructInsert( application.easementStatusStruct, "old_style_easement", "Old Style" )> <cfset application.org_type_list = "Individual,Corporation,Partnership, Limitied Liability Company (LLC),Government,Other"> <cfset application.ibc_list = "I-A,I-B,II-A,III-A,V-A,IV H.T.,II-B,III-B,V-B"> <cfinvoke component="universal.security.security" method="GetKey" app_name="DPS" key_type="IMM" returnvariable="application.imm_token" /> <cfreturn /> </cffunction> <cffunction name="onSessionStart"> <cfset session.datasource = application.datasource> <cfset session.validate = createObject( "component", "universal.validate" )> <cfinvoke component="universal.environment" method="Get" returnvariable="session.environment"> <cfset session.dispatch_only = false> <cfinvoke component="universal.environment" method="Get" p_subdirectory = "dpr/HGL_Requests" returnvariable="local.temp"> <cfset session.hgl_results_path = local.temp.file_path> <cfset session.hgl_link_path = local.temp.link> <cfreturn /> </cffunction> <cffunction name="onRequestStart"> <!--- If xyz.com is not in the server name then something is a miss, so redirect to home page. ---> <cfif findnocase( "xyz.com", cgi.server_name ) eq 0> <cflocation url="/" addtoken="no"> </cfif> <cfsetting showdebugoutput="no"> <cfheader name="cache-control" value="no-cache, no-store, must-revalidate"> <cfheader name="pragma" value="no-cache"> <cfheader name="expires" value="#getHttpTimeString(now())#"> <cfinclude template="_functions.cfml"> <cfinclude template="_form_functions.cfml"> <cfinclude template="/universal/dps/GenerateDPSEmail.cfml"> <cfinvoke component="universal.security.security" method="secureRedirect" /> <cfif Not IsDefined("session.datasource")> <cfinvoke component="universal.environment" method="GetDatasource" returnvariable="session.datasource" /> </cfif> <cfif Not IsDefined("application.ReviewStruct")> <cfinvoke component="cfc._data_reader" method="PopulateReviewStruct" returnvariable="application.ReviewStruct" /> </cfif> <cfif Not IsDefined("session.validate")> <cfset session.validate = createObject( "component", "universal.validate" )> </cfif> <cfif Not IsDefined("session.sched")> <cfset session.sched = createObject("component", "universal.inspection-scheduling._imm_sched")> </cfif> <cfif Not IsDefined("session.is_internal_user") and IsDefined("session.mode" )> <cfset session.is_internal_user = ( session.mode eq "i" )> </cfif> <cfif Not IsDefined("session.display")> <cfset session.display = createObject( "component", "cfc._display" )> </cfif> <cfif Not IsDefined("session.dataReader")> <cfset session.dataReader = createObject( "component", "cfc._data_reader" )> </cfif> <cfif Not IsDefined("session.dataWriter") or true> <cfset session.dataWriter = createObject( "component", "cfc._data_writer" )> </cfif> <cfif Not IsDefined("session.planningReader")> <cfset session.planningReader = createObject( "component", "cfc._planning_reader" )> </cfif> <cfif Not IsDefined("session.planningWriter")> <cfset session.planningWriter = createObject( "component", "cfc._planning_writer" )> </cfif> <cfif Not IsDefined("session.access")> <cfset session.access = createObject( "component", "cfc._access_validator" )> </cfif> <cfif Not IsDefined("session.ExtData")> <cfset session.ExtData = createObject("component", "universal.dps._external_data")> </cfif> <cfif Not IsDefined("session.inspectionQuery")> <cfinvoke component="#session.ExtData#" method="GetInspectionQuery" returnvariable="session.inspectionQuery" /> </cfif> <cfif Not IsDefined("application.inspections_requiring_service_points" )> <cfinvoke component="#session.ExtData#" method="GetServicePointInspections" returnvariable="application.inspections_requiring_service_points" /> </cfif> <cfif Not IsDefined("session.inspection_results")> <cfset session.inspection_results = StructNew()> </cfif> <cfif Not IsDefined("session.ProjectHubUserType") and IsDefined("session.mode")> <cfset session.ProjectHubUserType = MapUserType( session.mode )> </cfif> <cfif Not IsDefined("session.ProjectListQuery") and IsDefined("session.mode") and session.mode neq "i" and IsDefined("session.master_login_list")> <cfinvoke component="#session.ExtData#" method="GetProjectsForCompany" companyList="#session.master_login_list#" returnvariable="session.ProjectListQuery" /> </cfif> <cfif Not IsDefined("application.status_lookup" )> <cfinvoke component="#session.ExtData#" method="GetInspectionStatusStruct" returnvariable="application.status_lookup" /> </cfif> <cfif Not IsDefined("session.feature_toggle_na_has_developer_contact") and IsDefined("session.environment")> <cfif session.environment.level eq "dev"> <cfset session.feature_toggle_na_has_developer_contact = true> <cfelse> <cfset session.feature_toggle_na_has_developer_contact = false> </cfif> </cfif> <cfset session.feature_toggle_na_has_developer_contact = false> <cfset session.feature_toggle_developer_from_list = true> <cfinvoke component="#session.DataReader#" method="GetDefaultDate" returnvariable="default_date" /> <cfsavecontent variable="complete_tab"> <img src="/universal/icons/check.gif" alt="Complete" /> </cfsavecontent> <cfset at_risk_ht = 400> <cfset at_risk_wd = 800> <cfset at_risk_cancel_title ="Project Status-May be Cancelled"> <cfset at_risk_expire_title ="Project Status-Expiring"> <cfset morning_label = "07:00 am-11:30 am"> <cfset afternoon_label = "12:00 pm-4:00 pm"> <cfset all_day_label = "07:00 am-4:00 pm"> <cfSET insp_phone = ""> <cfset poc_request = "Point of connection"> <cfset record_drawing_request = "Record drawing"> <cfset password_language = "Passwords must be at least 10 characters, include at least one number, a lowercase letter, an uppercase letter, and a special character."> <CFIF ( NOT IsDefined("session.IsLoggedIn") or NOT IsDefined("session.mode") or NOT IsDefined("session.login_id") ) AND FindNoCase("contact_administrator.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("popup_terms.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("login_terms.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("accept.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("account_locked.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("_login_form.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("login_as.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("forgot_password.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("index.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("index-alt.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("expired.cfml", CGI.SCRIPT_NAME) EQ 0> <CFLOCATION URL="expired.cfml" addtoken="no" > </CFIF> <cfif FindNoCase("login.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("contact_administrator.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("popup_terms.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("login_terms.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("accept.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("account_locked.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("_login_form", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("login_as.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("forgot_password.cfml", CGI.SCRIPT_NAME) EQ 0 and FindNoCase("index.cfml", CGI.SCRIPT_NAME) EQ 0 and IsDefined("session.IsLoggedIn") and IsDefined("session.mode") and session.mode neq "i" and ( Not IsDefined( "session.terms_accepted" ) or session.terms_accepted eq false )> <cflocation url="#application.link_path#/login_terms.cfml" addtoken="no"> </cfif> <cfset doing_zyx = true> <cfreturn> </cffunction> <cffunction name="onRequest"> <cfargument name="template" type="string" required="true" /> <cfinclude template="#arguments.template#" /> </cffunction> <cffunction name="onSessionEnd"> <cfargument name = "SessionScope" required="true"> <cfargument name = "AppScope" required="true"> <cfset StructClear(arguments.SessionScope)> </cffunction> <cffunction name="setPathing" output="no" returntype="void"> <cfif findnocase( 'mojave', server_name ) gt 0> <cfset application.link_path = replace( getdirectoryfrompath(getbasetemplatepath()), "/xyzwebdev", "" )> <cfset application.link_path = mid(application.link_path, 1, (len(application.link_path) -1 ))> <cfset application.etc_path = replace( application.link_path, "/engineering-resources/dps", "" )> <cfelse> <cfset application.link_path = "/engineering-resources/dps"> <cfset application.etc_path = ""> </cfif> <cfreturn> </cffunction> </cfcomponent>
... View more