includes/common.php
changeset 711 f70d764aab33
parent 702 15cd41fd8a05
child 719 f82da241eaf8
equal deleted inserted replaced
710:1fbce408813c 711:f70d764aab33
   168 
   168 
   169 // Timezone offset
   169 // Timezone offset
   170 global $timezone;
   170 global $timezone;
   171 $timezone = 0;
   171 $timezone = 0;
   172 
   172 
       
   173 // DST settings
       
   174 global $dst_params;
       
   175 $dst_params = array(0, 0, 0, 0, 60);
       
   176 
   173 // Divert to CLI loader if running from CLI
   177 // Divert to CLI loader if running from CLI
   174 if ( isset($argc) && isset($argv) )
   178 if ( isset($argc) && isset($argv) )
   175 {
   179 {
   176   if ( is_int($argc) && is_array($argv) && !isset($_SERVER['REQUEST_URI']) )
   180   if ( is_int($argc) && is_array($argv) && !isset($_SERVER['REQUEST_URI']) )
   177   {
   181   {
   388   profiler_log('Checked for preloader');
   392   profiler_log('Checked for preloader');
   389   
   393   
   390   // One quick security check...
   394   // One quick security check...
   391   if ( !is_valid_ip($_SERVER['REMOTE_ADDR']) )
   395   if ( !is_valid_ip($_SERVER['REMOTE_ADDR']) )
   392   {
   396   {
   393     die('SECURITY: spoofed IP address');
   397     die('SECURITY: spoofed IP address: ' . htmlspecialchars($_SERVER['REMOTE_ADDR']));
   394   }
   398   }
   395 
   399 
   396   // All checks passed! Start the main components up.  
   400   // All checks passed! Start the main components up.  
   397   $session->start();
   401   $session->start();
   398   
   402