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

  1. <!--- Initialization/declarations --->
  2. <CFPARAM NAME="lDescription" DEFAULT="System Registry">
  3.  
  4. <!--- Make sure the main registry key exists --->
  5. <CFNewInternalRegistry ACTION=SET    ENTRY="Server" BRANCH ="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion" TYPE="KEY">
  6.  
  7. <CFIF Method IS "DisplayEntryForm">
  8.     <!--- Get the settings from ClientStores branch ---->
  9.  
  10.     <!----
  11.     <CFSET lDoPurge                    = "1">
  12.     <CFSET lDisableGlobals            = "0">
  13.     <CFSET lTimeout                    = "10">
  14.  
  15.     <CFNewInternalRegistry ACTION=GET VARIABLE="lTimeout"
  16.         ENTRY="Timeout"
  17.         TYPE="STRING"
  18.         BRANCH ="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\ClientStores\#Name#">
  19.         
  20.     <CFNewInternalRegistry ACTION=GET VARIABLE="lDoPurge"
  21.         ENTRY="DoPurge"
  22.         TYPE="STRING"
  23.         BRANCH ="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\ClientStores\#Name#">
  24.  
  25.     <CFNewInternalRegistry ACTION=GET VARIABLE="lDisableGlobals"
  26.         ENTRY="DisableGlobals"
  27.         TYPE="STRING"
  28.         BRANCH ="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\ClientStores\#Name#">
  29.     ---->
  30.  
  31. <!--- Get the current settings. --->
  32. <CFNewInternalRegistry ACTION=GET Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Clients" 
  33.     VARIABLE="ClientTimeout" 
  34.     Entry="Timeout" 
  35.     Type="STRING">
  36.         
  37. <CFNewInternalRegistry ACTION=SET Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion"  
  38.         Entry="Clients" 
  39.         Type="KEY">
  40.  
  41.  
  42. <!--- Display the values in the page --->
  43. <CFOUTPUT>
  44.  
  45. <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
  46.     <TR>
  47.         <TD>
  48.                 <FONT SIZE="#Evaluate(2 + FONTSIZE)#" FACE="#FONTFACE#"><B>Client Variables</B></FONT>
  49.                 <BR><BR>
  50.                 
  51.                 <!-- Client vairables timeout. -->
  52.                 <FONT SIZE="#FONTSIZE#" FACE="#FONTFACE#">
  53.                     <B>Purge data for clients that remain unvisited for </B> 
  54.                     <INPUT Name="ClientTimeout" Type="TEXT" Value="#ClientTimeout#" Size=3 MaxLength=10 onFocus="select()"> 
  55.                     <B>days</B>
  56.                     <BR>
  57.                     The ColdFusion executive will scan the client data 
  58.                     (stored via use of the CFAPPLICATION tag's CLIENTMANAGEMENT attribute) 
  59.                     periodically for entries that have not been accessed in a specified number of days. 
  60.                     All the associated client data will be removed.
  61.                 </FONT>
  62.                 <BR>
  63.                 <BR>
  64.         </TD>
  65.     </TR>
  66. </TABLE>
  67. </CFOUTPUT>
  68.  
  69. </CFIF>
  70.  
  71.  
  72. <!------------------------ UPDATE_DATASOURCE Method -------------------------
  73.     Processes the creation of a new backing store in the registry. This routine
  74.     is used both when creating a new or updating an old backing store. 
  75. ------------------------------------------------------------------------------>
  76.  
  77. <CFIF Method IS "UpdateBackingStore">
  78.  
  79.     <CFNewInternalRegistry ACTION=SET Branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Clients"  
  80.         Entry="Timeout" 
  81.         Type="STRING"
  82.         Value="#ClientTimeout#">
  83.  
  84.     <!---- Tell the engine to refresh from the registry ---->
  85.     <CFSET bSuccess = cfusion_settings_refresh()>
  86.  
  87. </CFIF>
  88.  
  89.  
  90. <!------------------------ VALIDATE_FORM_DATA Method -------------------------
  91.     Validates the form fields coming from a Create\Edit data source form.
  92.     Any validation errors are communicated to the calling module in :
  93.     
  94.     VFD_bErrorMessage    - The text of the validation error message.
  95. ------------------------------------------------------------------------------>
  96.  
  97. <CFIF Method IS "ValidateFormData">    
  98.     <CFSET VFD_bErrorMessage = "">
  99.  
  100.     <!--- Validation of form fields. --->
  101.     <CFIF isNumeric(ClientTimeout) IS "NO" OR ClientTimeout LT 0>
  102.         <CFSET VFD_bErrorMessage = "The client timeout must be set to zero or more days.">
  103.     </CFIF>
  104.     
  105. </CFIF>
  106.