home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Examples / email / Application.cfm < prev    next >
Encoding:
Text File  |  1999-04-12  |  1.5 KB  |  51 lines

  1. <!--- application file, exampleapp\email --->
  2. <!--- this file restricts the use of the email directory to the 127.0.0.1 or localhost address --->
  3.  
  4. <CFAPPLICATION NAME="crazycab" SESSIONMANAGEMENT="Yes" SETCLIENTCOOKIES="Yes" SESSIONTIMEOUT="#CreateTimeSpan(0,1,30,0)#">
  5.  
  6. <!--- specify location, interval, and switch for redirection (defaults to 1)--->
  7. <!--- if redirection not desired, set switch to 0 --->
  8. <CFPARAM name="variables.new_location" default="http://www.allaire.com/cfdocs/index.htm">
  9. <CFPARAM name="variables.new_interval" default="10">
  10. <CFPARAM name="variables.redirect_switch" default="1">
  11.  
  12. <!--- restrict IP here --->
  13. <CFIF cgi.REMOTE_ADDR NEQ "127.0.0.1">
  14.  
  15.  
  16. <CFINCLUDE template="_header.cfm">
  17.  
  18. <CFIF redirect_switch eq 1>
  19.     <CFOUTPUT>
  20.         <CFHTMLHEAD text="<META Http-equiv='Refresh' Content='#new_interval#; url=#new_location#'>">        
  21.     </CFOUTPUT>
  22. </CFIF>
  23.  
  24.  
  25. <h3>
  26. <P>Please view your copy of ColdFusion locally<BR>
  27.      to use the CrazyCab Application.
  28.  
  29. <CFIF redirect_switch eq 1>
  30.     <CFOUTPUT>
  31.     <P>Be patient; you will be redirected to <BR>
  32.     #new_location# in #new_interval# seconds.
  33.     </CFOUTPUT>
  34. </CFIF>
  35. </h3>
  36.  
  37. <CFINCLUDE template="_footer.cfm">
  38.  
  39.  
  40. <CFABORT>
  41. </CFIF>
  42.  
  43.  
  44. <!--- Make sure we're logged in correctly --->
  45. <CFIF GetFileFromPath(GetTemplatePath()) NEQ "login.cfm" AND GetFileFromPath(GetTemplatePath()) NEQ "auth.cfm">
  46.     <CFIF NOT IsDefined("Session.POPserver")>
  47.         <CFLOCATION URL="login.cfm" ADDTOKEN="NO">
  48.     <CFELSEIF Session.POPserver IS "">
  49.         <CFLOCATION URL="login.cfm" ADDTOKEN="NO">
  50.     </CFIF>
  51. </CFIF>