| 1 | <cfsetting enablecfoutputonly=true showdebugoutput=false> |
|---|
| 2 | <!--- |
|---|
| 3 | Name : Application.cfm |
|---|
| 4 | Author : Raymond Camden |
|---|
| 5 | Created : September 2, 2004 |
|---|
| 6 | Last Updated : August 3, 2007 |
|---|
| 7 | History : change application.cfc to soundings.cfc |
|---|
| 8 | : Stupid IE. If you hit ENTER instead of clicking the button, it wouldn't send the value. (rkc 3/1/06) |
|---|
| 9 | : work w/o mapping (rkc 3/10/06) |
|---|
| 10 | : user changes (rkc 8/3/07) |
|---|
| 11 | Purpose : |
|---|
| 12 | ---> |
|---|
| 13 | |
|---|
| 14 | <cfapplication name="soundings" sessionManagement=true loginstorage="session"> |
|---|
| 15 | |
|---|
| 16 | <cfif not isDefined("application.init") or isDefined("url.reinit")> |
|---|
| 17 | |
|---|
| 18 | <!--- Get main settings ---> |
|---|
| 19 | <cfset application.soundings = createObject("component","cfcs.soundings")> |
|---|
| 20 | <cfset application.settings = application.soundings.getSettings()> |
|---|
| 21 | <cfset application.survey = createObject("component","cfcs.survey").init(application.settings.dsn,application.settings.dbtype,application.settings.tableprefix)> |
|---|
| 22 | <cfset application.question = createObject("component","cfcs.question").init(application.settings.dsn,application.settings.dbtype,application.settings.tableprefix)> |
|---|
| 23 | <cfset application.questionType = createObject("component","cfcs.questiontype").init(application.settings.dsn,application.settings.dbtype,application.settings.tableprefix)> |
|---|
| 24 | <cfset application.user = createObject("component","cfcs.user").init(application.settings.dsn,application.settings.dbtype,application.settings.tableprefix)> |
|---|
| 25 | <cfset application.utils = createObject("component","cfcs.utils")> |
|---|
| 26 | <cfset application.toxml = createObject("component","cfcs.toxml")> |
|---|
| 27 | |
|---|
| 28 | <cfset session.surveys = structNew()> |
|---|
| 29 | <cfset application.init = true> |
|---|
| 30 | |
|---|
| 31 | </cfif> |
|---|
| 32 | |
|---|
| 33 | <!--- include UDFs ---> |
|---|
| 34 | <cfinclude template="includes/udf.cfm"> |
|---|
| 35 | |
|---|
| 36 | <cfif isDefined("url.logout")> |
|---|
| 37 | <cflogout> |
|---|
| 38 | </cfif> |
|---|
| 39 | |
|---|
| 40 | <!--- handle security ---> |
|---|
| 41 | <cflogin> |
|---|
| 42 | |
|---|
| 43 | <!--- are we trying to logon? ---> |
|---|
| 44 | <cfif isDefined("form.username") and isDefined("form.password")> |
|---|
| 45 | <cfif application.user.authenticate(form.username,form.password)> |
|---|
| 46 | <!--- good logon, grab their groups ---> |
|---|
| 47 | <cfloginuser name="#form.username#" password="#form.password#" roles="surveyadmin"> |
|---|
| 48 | </cfif> |
|---|
| 49 | </cfif> |
|---|
| 50 | |
|---|
| 51 | </cflogin> |
|---|
| 52 | |
|---|
| 53 | <cfsetting enablecfoutputonly=false> |
|---|