Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, November 13, 2026

Diff for Metafox/db.inc.php between version 1.20 and 1.21

version 1.20, 2006/06/10 08:48:18 version 1.21, 2006/07/08 19:34:00
Line 24 
Line 24 
  *   whole august/2002, 30/11/2002, 15/1/2003   *   whole august/2002, 30/11/2002, 15/1/2003
  */   */
   
 require_once 'config/loader.inc.php';  require_once 'cfgldr.inc.php';
 Platon::redirect_test(basename(__FILE__), $ezin_cfg['url']);  
 require_once 'functions.inc.php';  require_once 'functions.inc.php';
 require_once 'db-core/db-core.inc.php';  require_once 'db-core/db-core.inc.php';
   
Line 1343  function ezin_save_email($section_id, $e
Line 1342  function ezin_save_email($section_id, $e
  * CACHE RELATED FUNCTIONS   * CACHE RELATED FUNCTIONS
  */   */
   
   function ezin_get_config() /* {{{ */
   {
           global $ezin_sys;
           global $ezin_db_handle;
   
           // Cache retrieval
           $query = sprintf('SELECT * FROM %s WHERE id = "config"',
                           $ezin_sys['db']['tables']['cache']);
           $result = @mysql_query($query, $ezin_db_handle)
                   or ezin_db_error('ezin_get_config() [1]');
           $row = @mysql_fetch_array($result, MYSQL_ASSOC);
           @mysql_free_result($result);
           if (isset($row['content'])) {
                   $array = unserialize($row['content']);
                   if (is_array($array) && count($array) > 0) {
                           return $array;
                   }
           }
   
           // Config retrieval and parsing
           $query = sprintf('SELECT a_key, type, value FROM %s',
                           $ezin_sys['db']['tables']['config_data']);
           $result = @mysql_query($query, $ezin_db_handle)
                   or ezin_db_error('ezin_get_config() [2]');
           $array = array();
           while ($row = @mysql_fetch_array($result, MYSQL_ASSOC)) {
                   if (isset($row['type']) && $row['type'] == 1) {
                           $array[$row['a_key']] = ezin_eval($row['value']);
                   } else {
                           $array[$row['a_key']] = $row['value'];
                   }
           }
           @mysql_free_result($result);
   
           if (! is_array($array) || count($array) <= 0) {
                   ezin_db_error('configuration not initialized');
           }
   
           // Config storage
           $query = sprintf('INSERT INTO %s (id, timestamp, content)'
                           .' VALUES ("config", UNIX_TIMESTAMP(SYSDATE()), "%s")',
                           $ezin_sys['db']['tables']['cache'], addslashes(serialize($array)));
           @mysql_query($query, $ezin_db_handle)
                   or ezin_db_error('ezin_get_config() [3]');
   
           return $array;
   } /* }}} */
   
 function ezin_cache_save($cache_id = 0, $content = '', $var_var = 0) /* {{{ */  function ezin_cache_save($cache_id = 0, $content = '', $var_var = 0) /* {{{ */
 {  {
         global $ezin_sys;          global $ezin_sys;

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top