/*Copy all incoming FORM and URL variables to ATTRIBUTES scope.*/ /*If a variable exists with the same name in both FORM and URL */ /*scope then the core file will throw an error and abort*/ if (NOT IsDefined("attributes")){ attributes = structNew(); } StructAppend(attributes, url, "no"); StructAppend(attributes, form, "no"); //if server.oPowerToolsApp does not exist, or reinitializing (reinit=1) if(not structkeyexists(server,"oPowerToolsApp") OR isDefined("attributes.reinit")) { //ESTABLISH PATHS FOR XML SETTINGS DOCUMENT variables.xmlPath = replacenocase(getCurrentTemplatePath(),"Application.cfm","settings.xml"); //INITIALIZE SETTINGS server.oPowerToolsApp = createobject("component","cfcpowertools.components.core.managedcode.settings"); server.oPowerToolsApp.init(xmlPath=variables.xmlPath); //DELETE WORKING SESSION structdelete(session,"Working"); structdelete(application,"UDFLib"); } //ESTABLISH WORKING INSTANCE VARIABLES if(not structkeyexists(session,"Working")){ session.Working = createobject("component","cfcpowertools.components.working"); } //CHECK CONTEXT PATH request.root = rereplace(getDirectoryFromPath(replaceNoCase(getCurrentTemplatePath(), expandPath('/'), "/")), "/$", "");//"#trim(cgi.CONTEXT_PATH)#/cfcPowerTools"; request.applicationName = "cfcPowerTools"; request.version = "7 (beta) #server.oPowerToolsApp.getLicenseType()#"; request.ynDebug = 0; //UDF LIBRARY if(not structkeyexists(application,"UDFLib")){ application.UDFLib = CreateObject( "component", "cfcPowerTools.components.utils.functions"); }