* @copyright 2007-2011 PrestaShop SA * @version Release: $Revision: 7634 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ class AdminHome extends AdminTab { public function postProcess() { } private function _displayOptimizationTips() { $rewrite = 0; if (Configuration::get('PS_REWRITING_SETTINGS')) { $rewrite = 2; if (!file_exists(dirname(__FILE__).'/../../.htaccess')) $rewrite = 1; else { $stat = stat(dirname(__FILE__).'/../../.htaccess'); if (strtotime(Db::getInstance()->getValue('SELECT date_upd FROM '._DB_PREFIX_.'configuration WHERE name = "PS_REWRITING_SETTINGS"')) > $stat['mtime']) $rewrite = 0; } } $htaccessAfterUpdate = 2; $htaccessOptimized = (Configuration::get('PS_HTACCESS_CACHE_CONTROL') ? 2 : 0); if (!file_exists(dirname(__FILE__).'/../../.htaccess')) { if (Configuration::get('PS_HTACCESS_CACHE_CONTROL')) $htaccessOptimized = 1; } else { $stat = stat(dirname(__FILE__).'/../../.htaccess'); $dateUpdHtaccess = Db::getInstance()->getValue('SELECT date_upd FROM '._DB_PREFIX_.'configuration WHERE name = "PS_HTACCESS_CACHE_CONTROL"'); if (Configuration::get('PS_HTACCESS_CACHE_CONTROL') AND strtotime($dateUpdHtaccess) > $stat['mtime']) $htaccessOptimized = 1; $dateUpdate = Configuration::get('PS_LAST_SHOP_UPDATE'); if ($dateUpdate AND strtotime($dateUpdate) > $stat['mtime']) $htaccessAfterUpdate = 0; } $indexRebuiltAfterUpdate = 0; $needRebuild=Configuration::get('PS_NEED_REBUILD_INDEX'); if ($needRebuild !='0'); $indexRebuiltAfterUpdate = 2; $smartyOptimized = 0; if (!Configuration::get('PS_SMARTY_FORCE_COMPILE')) ++$smartyOptimized; if (Configuration::get('PS_SMARTY_CACHE')) ++$smartyOptimized; $cccOptimized = Configuration::get('PS_CSS_THEME_CACHE') + Configuration::get('PS_JS_THEME_CACHE') + Configuration::get('PS_HTML_THEME_COMPRESSION') + Configuration::get('PS_JS_HTML_THEME_COMPRESSION'); if ($cccOptimized == 4) $cccOptimized = 2; else $cccOptimized = 1; $shopEnabled = (Configuration::get('PS_SHOP_ENABLE') ? 2 : 1); $lights = array( 0 => array('image'=>'error2.png','color'=>'#fbe8e8'), 1 => array('image'=>'warn2.png','color'=>'#fffac6'), 2 => array('image'=>'ok2.png','color'=>'#dffad3')); if ($rewrite + $htaccessOptimized + $smartyOptimized + $cccOptimized + $shopEnabled + $htaccessAfterUpdate + $indexRebuiltAfterUpdate != 14) { echo '
'; } } public function display() { global $cookie; $this->warnDomainName(); $tab = get_class(); $protocol = (!empty($_SERVER['HTTPS']) AND strtolower($_SERVER['HTTPS']) != 'off')?'https':'http'; $isoDefault = Language::getIsoById(intval(Configuration::get('PS_LANG_DEFAULT'))); $isoUser = Language::getIsoById(intval($cookie->id_lang)); $isoCountry = Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT')); $currency = new Currency((int)(Configuration::get('PS_CURRENCY_DEFAULT'))); echo ''.$this->l('Update notification unavailable').'
'; echo ''; echo '
'.$this->l('To receive PrestaShop update warnings, you need to activate the allow_url_fopen command in your php.ini config file.').' ['.$this->l('more info').']
'; echo ''.$this->l('If you don\'t know how to do that, please contact your host administrator !').'
'.$this->l('Create a new category and organize your products.').'
'.$this->l('Fill up your catalog with new articles and attributes.').'
'.$this->l('Manage your activity with a thorough analysis of your e-shop.').'
'.$this->l('Add a new employee account and discharge a part of your duties of shop owner.').'
'.$this->l('Sales').' | '.Tools::displayPrice($results['total_sales'], $currency).' |
'.$this->l('Total registrations').' | '.(int)($results['total_registrations']).' |
'.$this->l('Total orders').' | '.(int)($results['total_orders']).' |
'.$this->l('Product pages viewed').' | '.(int)($results['total_viewed']).' |
'.$this->l('Thread unread').' | '.$unread.' |
'.$this->l('Thread pending').' | '.$pending.' |
'.$this->l('Thread closed').' | '.$close.' |
'.$this->l('Total thread').' | '.$all.' |
'.translate('Loading...').'
'.translate('Loading...').'