home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Administrator / logging / updatelogging.cfm (.txt) < prev    next >
Encoding:
ColdFusion Encrypted Template  |  1999-04-12  |  3.5 KB  |  85 lines

  1. <META NAME="Author" CONTENT="Copyright 1996 Allaire Corp. All rights reserved.">
  2. <META NAME="Version" CONTENT="$Revision: 26 $ $Modtime: 9/14/98 5:16p $">
  3.  
  4. <!------------------------------------------------------------------------------
  5.     Validate the logging threshold value.
  6. -------------------------------------------------------------------------------->
  7. <CFIF NOT ParameterExists( FORM.SlowPageCheckbox )>
  8.     <!---- If the "Enable Slow Page Logging" checkbox is not checked, just discard the setting of the "Slow Page Threshold" by setting it to 0. --->
  9.     <CFSET FORM.SlowPageThreshold = 0>
  10. <CFELSEIF isNumeric(FORM.SlowPageThreshold) IS "NO" OR FORM.SlowPageThreshold LT 0>
  11.     <!--- Make sure it's a positive number --->
  12.     <CFSET Error_Message = "You have enabled slow pages logging but the threshold value
  13.                             you entered is not a valid positive number.">
  14.     <CFINCLUDE TEMPLATE="../include/errormessage.cfm">
  15.     <CFABORT>
  16. </CFIF>
  17.  
  18.  
  19. <CFIF ParameterExists(FORM.LogMessages) IS NOT "Yes">
  20.     <CFSET LogMessages = 0>
  21. </CFIF>
  22.  
  23. <CFIF ParameterExists(UpdateGenLogInfo)>
  24.     <!----------------------------------------------------------------------------
  25.         Update the general Logging information.
  26.     ------------------------------------------------------------------------------>
  27.     <CFNewInternalRegistry ACTION=SET 
  28.         BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Logging" 
  29.         Type="STRING" 
  30.         ENTRY="AdminEMail" 
  31.         VALUE="#FORM.AdminEmail#">
  32.         
  33.     <CFNewInternalRegistry ACTION=SET 
  34.         BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Logging" 
  35.         Type="STRING" 
  36.         ENTRY="LogFilePath" 
  37.         VALUE="#FORM.LogFilePath#">
  38.         
  39.     <CFNewInternalRegistry ACTION=SET 
  40.         BRANCH="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Logging" 
  41.         Type="STRING" 
  42.         ENTRY="SlowPageThreshold" 
  43.         VALUE="#FORM.SlowPageThreshold#">
  44.         
  45.     <CFIF ParameterExists( FORM.UseSysLogCheckbox )>
  46.         <CFNewInternalRegistry ACTION=SET
  47.             Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Logging" 
  48.             Entry="UseSysLog" 
  49.             Type="STRING" 
  50.             Value="1">
  51.     <CFELSE>
  52.         <CFNewInternalRegistry ACTION=SET
  53.             Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Logging" 
  54.             Entry="UseSysLog" 
  55.             Type="STRING" 
  56.             Value="0">
  57.     </CFIF>
  58.  
  59.     <!---- Tell the engine to refresh from the registry ---->
  60.     <CFSET bSuccess = cfusion_settings_refresh()>
  61.  
  62.     <CFLOCATION URL="index.cfm">
  63.     
  64. <CFELSEIF ParameterExists(Browse)>
  65.     <!----------------------------------------------------------------------------
  66.         Store necessary data and invoke the directory browsing module if the
  67.         BROWSE button was pressed.
  68.     ------------------------------------------------------------------------------>
  69.     <CFSET Client.AdminEmail         = #FORM.AdminEmail#>
  70.     <CFSET Client.LogFilePath        = #FORM.LogFilePath#>
  71.     <CFSET Client.SlowPageThreshold = #FORM.SlowPageThreshold#>
  72.     <CFIF ParameterExists( FORM.UseSysLogCheckbox) >
  73.         <CFSET Client.bUseSysyLog    = 1>
  74.     <CFELSE>
  75.         <CFSET Client.bUseSysLog    = 0>
  76.     </CFIF>
  77.  
  78.     <!---Redirect to the Browse module ---->
  79.     <CFSET ReturnURL = "../logging/index.cfm?JustBrowsed=Yes">
  80.     <CFLOCATION URL="../filedialog/index.cfm?DialogStyle=SelectDirectory&URLtarget=AdminSettings&ReturnURL=#URLEncodedFormat(ReturnURL)#&DefaultPath=#URLEncodedFormat(FORM.LogFilePath)#">
  81.  
  82. <CFELSEIF ParameterExists(Cancel)>
  83.     <CFLOCATION URL="index.cfm">
  84. </CFIF>
  85.