Esempio n. 1
0
 function start()
 {
     global $osC_Session, $osC_MessageStack, $osC_Language;
     if (SERVICE_DEBUG_CHECK_LOCALE == '1') {
         $setlocale = osc_setlocale(LC_TIME, explode(',', $osC_Language->getLocale()));
         if ($setlocale === false || $setlocale === null) {
             $osC_MessageStack->add('debug', 'Error: Locale does not exist: ' . $osC_Language->getLocale() . ' [' . __CLASS__ . ']', 'error');
         }
     }
     if (SERVICE_DEBUG_CHECK_INSTALLATION_MODULE == '1' && file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/install')) {
         $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_install_directory_exists'), dirname($_SERVER['SCRIPT_FILENAME']) . '/install') . ' [' . __CLASS__ . ']', 'warning');
     }
     if (SERVICE_DEBUG_CHECK_CONFIGURATION == '1' && file_exists(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php') && is_writeable(dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php')) {
         $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_config_file_writeable'), dirname($_SERVER['SCRIPT_FILENAME']) . '/includes/configure.php') . ' [' . __CLASS__ . ']', 'warning');
     }
     if (SERVICE_DEBUG_CHECK_SESSION_DIRECTORY == '1' && STORE_SESSIONS == '') {
         if (!is_dir($osC_Session->getSavePath())) {
             $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_session_directory_non_existent'), $osC_Session->getSavePath()) . ' [' . __CLASS__ . ']', 'warning');
         } elseif (!is_writeable($osC_Session->getSavePath())) {
             $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_session_directory_not_writeable'), $osC_Session->getSavePath()) . ' [' . __CLASS__ . ']', 'warning');
         }
     }
     if (SERVICE_DEBUG_CHECK_SESSION_AUTOSTART == '1' && (bool) ini_get('session.auto_start')) {
         $osC_MessageStack->add('debug', $osC_Language->get('warning_session_auto_start') . ' [' . __CLASS__ . ']', 'warning');
     }
     if (SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY == '1' && DOWNLOAD_ENABLED == '1') {
         if (!is_dir(DIR_FS_DOWNLOAD)) {
             $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_download_directory_non_existent'), DIR_FS_DOWNLOAD) . ' [' . __CLASS__ . ']', 'warning');
         }
     }
     return true;
 }
Esempio n. 2
0
 public static function start()
 {
     $OSCOM_Language = Registry::get('Language');
     $OSCOM_MessageStack = Registry::get('MessageStack');
     if (SERVICE_DEBUG_CHECK_LOCALE == '1') {
         $setlocale = osc_setlocale(LC_TIME, explode(',', $OSCOM_Language->getLocale()));
         if ($setlocale === false || $setlocale === null) {
             $OSCOM_MessageStack->add('debug', 'Error: Locale does not exist: ' . $OSCOM_Language->getLocale(), 'error');
         }
     }
     if (SERVICE_DEBUG_CHECK_INSTALLATION_MODULE == '1' && file_exists(OSCOM::BASE_DIRECTORY . 'Core/Site/Setup')) {
         $OSCOM_MessageStack->add('debug', sprintf(OSCOM::getDef('warning_install_directory_exists'), OSCOM::BASE_DIRECTORY . 'Core/Site/Setup'), 'warning');
     }
     if (SERVICE_DEBUG_CHECK_CONFIGURATION == '1' && is_writeable(OSCOM::BASE_DIRECTORY . 'config.php')) {
         $OSCOM_MessageStack->add('debug', sprintf(OSCOM::getDef('warning_config_file_writeable'), OSCOM::BASE_DIRECTORY . 'config.php'), 'warning');
     }
     if (SERVICE_DEBUG_CHECK_SESSION_DIRECTORY == '1' && STORE_SESSIONS == '') {
         if (!is_dir(OSCOM_Registry::get('Session')->getSavePath())) {
             $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_session_directory_non_existent'), OSCOM_Registry::get('Session')->getSavePath()) . ' [' . __CLASS__ . ']', 'warning');
         } elseif (!is_writeable(OSCOM_Registry::get('Session')->getSavePath())) {
             $osC_MessageStack->add('debug', sprintf($osC_Language->get('warning_session_directory_not_writeable'), OSCOM_Registry::get('Session')->getSavePath()) . ' [' . __CLASS__ . ']', 'warning');
         }
     }
     if (SERVICE_DEBUG_CHECK_SESSION_AUTOSTART == '1' && (bool) ini_get('session.auto_start')) {
         $OSCOM_MessageStack->add('debug', OSCOM::getDef('warning_session_auto_start'), 'warning');
     }
     if (SERVICE_DEBUG_CHECK_DOWNLOAD_DIRECTORY == '1' && DOWNLOAD_ENABLED == '1') {
         if (!is_dir(DIR_FS_DOWNLOAD)) {
             $OSCOM_MessageStack->add('debug', sprintf(OSCOM::getDef('warning_download_directory_non_existent'), DIR_FS_DOWNLOAD), 'warning');
         }
     }
     return true;
 }
Esempio n. 3
0
 function start()
 {
     global $osC_Language, $osC_Session;
     require 'includes/classes/language.php';
     $osC_Language = new osC_Language();
     if (isset($_GET['language']) && !empty($_GET['language'])) {
         $osC_Language->set($_GET['language']);
     }
     $osC_Language->load('general');
     $osC_Language->load('modules-boxes');
     $osC_Language->load('modules-content');
     header('Content-Type: text/html; charset=' . $osC_Language->getCharacterSet());
     osc_setlocale(LC_TIME, explode(',', $osC_Language->getLocale()));
     return true;
 }
Esempio n. 4
0
 public static function start()
 {
     Registry::set('Language', new LanguageClass());
     $OSCOM_Language = Registry::get('Language');
     if (isset($_GET['language']) && !empty($_GET['language'])) {
         $OSCOM_Language->set($_GET['language']);
     }
     $OSCOM_Language->load('general');
     $OSCOM_Language->load('modules-boxes');
     $OSCOM_Language->load('modules-content');
     $OSCOM_Language->load(OSCOM::getSiteApplication());
     header('Content-Type: text/html; charset=' . $OSCOM_Language->getCharacterSet());
     osc_setlocale(LC_TIME, explode(',', $OSCOM_Language->getLocale()));
     return true;
 }
Esempio n. 5
0
$osC_Session->start();
require 'includes/classes/directory_listing.php';
require 'includes/classes/access.php';
require '../includes/classes/address.php';
require '../includes/classes/weight.php';
require '../includes/classes/xml.php';
require '../includes/classes/datetime.php';
// set the language
require 'includes/classes/language.php';
$osC_Language = new osC_Language_Admin();
if (isset($_GET['language']) && !empty($_GET['language'])) {
    $osC_Language->set($_GET['language']);
}
$osC_Language->loadIniFile();
header('Content-Type: text/html; charset=' . $osC_Language->getCharacterSet());
osc_setlocale(LC_TIME, explode(',', $osC_Language->getLocale()));
// define our localization functions
require 'includes/functions/localization.php';
// initialize the message stack for output messages
require '../includes/classes/message_stack.php';
$osC_MessageStack = new messageStack();
$osC_MessageStack->loadFromSession();
// entry/item info classes
require 'includes/classes/object_info.php';
// email class
require '../includes/classes/mail.php';
// file uploading class
require 'includes/classes/upload.php';
// check if a default currency is set
if (!defined('DEFAULT_CURRENCY')) {
    $osC_MessageStack->add('header', $osC_Language->get('ms_error_no_default_currency'), 'error');