[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 init_db_config_read.php

Zen Cart 源代码 init_db_config_read.php




下载文件

文件名: init_db_config_read.php
文件类型: PHP文件
文件大小: 1.62 KiB
MD5: ced4d770b50c516baffc013113de54f3

init_db_config_read.php - 关闭高亮
  1. <?php
  2. /**
  3.  * read the configuration settings from the db
  4.  *
  5.  * see {@link  http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
  6.  *
  7.  * @package initSystem
  8.  * @copyright Copyright 2003-2013 Zen Cart Development Team
  9.  * @copyright Portions Copyright 2003 osCommerce
  10.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  11.  * @version GIT: $Id: Author: DrByte  Wed Mar 20 16:50:39 2013 -0400 Modified in v1.5.2 $
  12.  */
  13. if (!defined('IS_ADMIN_FLAG')) {
  14.   die('Illegal Access');
  15. }
  16.  
  17. $use_cache = (isset($_GET['nocache']) ? false : true ) ;
  18. $configuration = $db->Execute('select configuration_key as cfgkey, configuration_value as cfgvalue
  19.                                 from ' . TABLE_CONFIGURATION, '', $use_cache, 150);
  20. while (!$configuration->EOF) {
  21.   /**
  22.  * dynamic define based on info read from DB
  23.  */
  24.   define(strtoupper($configuration->fields['cfgkey']), $configuration->fields['cfgvalue']);
  25.   $configuration->MoveNext();
  26. }
  27. $configuration = $db->Execute('select configuration_key as cfgkey, configuration_value as cfgvalue
  28.                               from ' . TABLE_PRODUCT_TYPE_LAYOUT, '', $use_cache, 150);
  29.  
  30. while (!$configuration->EOF) {
  31.   /**
  32.  * dynamic define based on info read from DB
  33.  * @ignore
  34.  */
  35.   define(strtoupper($configuration->fields['cfgkey']), $configuration->fields['cfgvalue']);
  36.   $configuration->movenext();
  37. }
  38. if (file_exists(DIR_WS_CLASSES . 'db/' . DB_TYPE . '/define_queries.php')) {
  39.   /**
  40.  * Load the database dependant query defines
  41.  */
  42.   include(DIR_WS_CLASSES . 'db/' . DB_TYPE . '/define_queries.php');
  43. }
  44.