[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_errors.php

Zen Cart 源代码 init_errors.php




下载文件

文件名: init_errors.php
文件类型: PHP文件
文件大小: 2.6 KiB
MD5: 6bda2ff7ada259979ba114c9fa5c7254

init_errors.php - 关闭高亮
  1. <?php
  2. /**
  3.  * @package admin
  4.  * @copyright Copyright 2003-2010 Zen Cart Development Team
  5.  * @copyright Portions Copyright 2003 osCommerce
  6.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  7.  * @version $Id: init_errors.php 17422 2010-08-31 08:42:09Z drbyte $
  8.  */
  9. if (!defined('IS_ADMIN_FLAG')) {
  10.   die('Illegal Access');
  11. }
  12. // check if a default currency is set
  13.   if (!defined('DEFAULT_CURRENCY')) {
  14.     $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');
  15.   }
  16.  
  17. // check if a default language is set
  18.   if (!defined('DEFAULT_LANGUAGE') || DEFAULT_LANGUAGE=='') {
  19.     $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');
  20.   }
  21.  
  22.   if (function_exists('ini_get') && ((bool)ini_get('file_uploads') == false) ) {
  23.     $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning');
  24.   }
  25.  
  26. // set demo message
  27.   if (zen_get_configuration_key_value('ADMIN_DEMO')=='1') {
  28.     if (zen_admin_demo()) {
  29.       $messageStack->add(ADMIN_DEMO_ACTIVE, 'warning');
  30.     } else {
  31.       $messageStack->add(ADMIN_DEMO_ACTIVE_EXCLUSION, 'warning');
  32.     }
  33.   }
  34.  
  35.  
  36.   // check if email subsystem has been disabled
  37.   if (SEND_EMAILS != 'true') {
  38.     $messageStack->add(WARNING_EMAIL_SYSTEM_DISABLED, 'error');
  39.   }
  40.  
  41.   // this will let the admin know that the website is DOWN FOR MAINTENANCE to the public
  42.   if (DOWN_FOR_MAINTENANCE == 'true') {
  43.     $messageStack->add(WARNING_ADMIN_DOWN_FOR_MAINTENANCE,'caution');
  44.   }
  45.  
  46. // include the password crypto functions
  47.   require(DIR_WS_FUNCTIONS . 'password_funcs.php');
  48.  
  49. // default admin settings
  50.   $admin_security = false;
  51.  
  52.   $demo_check = $db->Execute("select * from " . TABLE_ADMIN . " where admin_name='demo' or admin_name='Admin'");
  53.   if (!$demo_check->EOF) {
  54.  
  55.     $cnt_admin= 0;
  56.     while (!$demo_check->EOF) {
  57.       $checking = $demo_check->fields['admin_pass'];
  58.       if (($demo_check->fields['admin_name'] =='Admin' and zen_validate_password('admin', $checking))) {
  59.         $admin_security = true;
  60.         $cnt_admin++;
  61.       }
  62.       if (($demo_check->fields['admin_name'] =='demo' and zen_validate_password('demoonly', $checking))) {
  63.         $admin_security = true;
  64.         $cnt_admin++;
  65.       }
  66.  
  67.       $demo_check->MoveNext();
  68.     }
  69.  
  70.     if ($admin_security == true) {
  71.       $messageStack->add(ERROR_ADMIN_SECURITY_WARNING, 'caution');
  72.     }
  73.   }
  74.  
  75.   // log cleanup
  76.   if ($za_dir = @dir(DIR_FS_SQL_CACHE)) {
  77.     while ($zv_file = $za_dir->read()) {
  78.       if (preg_match('/^zcInstall.*\.log$/', $zv_file)) {
  79.         unlink(DIR_FS_SQL_CACHE . '/' . $zv_file);
  80.       }
  81.     }
  82.     $za_dir->close();
  83.     unset($za_dir);
  84.   }
  85.  


cron