* @copyright PrestaShop * @license http://www.opensource.org/licenses/osl-3.0.php Open-source licence 3.0 * @version 1.3 * */ define('PS_ADMIN_DIR', getcwd()); include(PS_ADMIN_DIR.'/../config/config.inc.php'); include(PS_ADMIN_DIR.'/functions.php'); include(PS_ADMIN_DIR.'/toolbar.php'); include(PS_ADMIN_DIR.'/header.inc.php'); if ($tab) { if ($id_tab = checkingTab($tab)) { $tabs = array(); recursiveTab($id_tab); $tabs = array_reverse($tabs); echo '
'.translate('Back Office').''; foreach ($tabs AS $key => $item) echo ' >> '.((sizeof($tabs) - 1 > $key) ? '' : '').$item['name'].((sizeof($tabs) - 1 > $key) ? '' : ''); echo '
'; if (Validate::isLoadedObject($adminObj)) if (!$adminObj->checkToken()) return; /* Filter memorization */ if (isset($_POST) AND !empty($_POST) AND isset($adminObj->table)) foreach ($_POST AS $key => $value) if (is_array($adminObj->table)) { foreach ($adminObj->table AS $table) if (strncmp($key, $table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) $cookie->$key = !is_array($value) ? $value : serialize($value); } elseif (strncmp($key, $adminObj->table.'Filter_', 7) === 0 OR strncmp($key, 'submitFilter', 12) === 0) $cookie->$key = !is_array($value) ? $value : serialize($value); if (isset($_GET) AND !empty($_GET) AND isset($adminObj->table)) foreach ($_GET AS $key => $value) if (is_array($adminObj->table)) { foreach ($adminObj->table AS $table) if (strncmp($key, $table.'OrderBy', 7) === 0 OR strncmp($key, $table.'Orderway', 8) === 0) $cookie->$key = $value; } elseif (strncmp($key, $adminObj->table.'OrderBy', 7) === 0 OR strncmp($key, $adminObj->table.'Orderway', 12) === 0) $cookie->$key = $value; $adminObj->displayConf(); $adminObj->postProcess(); $adminObj->displayErrors(); $adminObj->display(); } } else /* Else display homepage */ { echo '
Logo

'.translate('Welcome to your Back Office').'

'.translate('Click the tabs to navigate.').'


'; if (@ini_get('allow_url_fopen') AND $update = checkPSVersion()) echo '

'.translate('New PrestaShop version avalaible').' : '.translate('Download').' '.$update['name'].' !

'; elseif (!@ini_get('allow_url_fopen')) { echo '

'.translate('Update notification unavailable').'

'; echo '

 

'; echo '

'.translate('To receive PrestaShop update warnings, you need to activate the allow_url_fopen command in your php.ini config file.').' ['.translate('more infos').']

'; echo '

'.translate('If you don\'t know how to do that, please contact your host administrator !').'


'; } echo '
'; echo Module::hookExec('backOfficeHome'); /* News from PrestaShop website */ echo '

'.translate('PrestaShop live feed').'

'; $isoDefault = Language::getIsoById(intval(Configuration::get('PS_LANG_DEFAULT'))); $isoUser = Language::getIsoById(intval($cookie->id_lang)); echo'
'; } include(PS_ADMIN_DIR.'/footer.inc.php'); ?>