[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * @package admin 4 * @copyright Copyright 2003-2006 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 3399 2006-04-09 19:20:47Z 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 // this will let the admin know that the website is DOWN FOR MAINTENANCE to the public 36 if (DOWN_FOR_MAINTENANCE == 'true') { 37 $messageStack->add(WARNING_ADMIN_DOWN_FOR_MAINTENANCE,'caution'); 38 } 39 40 // include the password crypto functions 41 require(DIR_WS_FUNCTIONS . 'password_funcs.php'); 42 43 // default admin settings 44 $admin_security = false; 45 46 $demo_check = $db->Execute("select * from " . TABLE_ADMIN . " where admin_name='demo' or admin_name='Admin'"); 47 if (!$demo_check->EOF) { 48 49 $cnt_admin= 0; 50 while (!$demo_check->EOF) { 51 $checking = $demo_check->fields['admin_pass']; 52 if (($demo_check->fields['admin_name'] =='Admin' and zen_validate_password('admin', $checking))) { 53 $admin_security = true; 54 $cnt_admin++; 55 } 56 if (($demo_check->fields['admin_name'] =='demo' and zen_validate_password('demoonly', $checking))) { 57 $admin_security = true; 58 $cnt_admin++; 59 } 60 61 $demo_check->MoveNext(); 62 } 63 64 if ($admin_security == true) { 65 $messageStack->add(ERROR_ADMIN_SECURITY_WARNING, 'caution'); 66 } 67 } 68 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |