Esempio n. 1
0
 /**
  * @fn mk_Errors($message, $id)
  * @brief Make the error
  * 
  * The error maker, main object to make an error, call this from other 
  * classes if an error happen
  * 
  * @version 0.0.5
  * @since Version 0.0.5
  * @author Ruben Storm
  * @param   string  $message
  *      the error message that throw
  * @param   string  $id
  *      the id, 0 or 1, if 1 it will throw an error
  * @return 
  */
 public static function mk_Errors($message, $id)
 {
     // make the Errors
     if (shopControler::_checkSingle('SYSTEM_ERROR') == false) {
         libDefine::_definer('SYSTEM_ERROR', $id);
         libDefine::_definer('SYSTEM_ERROR_MESS', $message);
     }
     return;
 }
Esempio n. 2
0
 /**
  * @fn _getThemeName ()
  * @brief Theme Requester
  * 
  * Check what theme is requsted and return it
  * 
  * @author Ruben Storm
  * @version 0.0.5
  * @since 0.0.5
  * @return  string  USE_THEME
  *      the name of the used theme
  */
 private static function _getThemeName()
 {
     if (SHOP_THEME_SETTINGS == 1) {
         libDefine::_definer('USE_THEME', SHOP_THEME_EXTRA);
     } else {
         libDefine::_definer('USE_THEME', SHOP_THEME);
     }
     return USE_THEME;
 }
Esempio n. 3
0
 /**
  * @fn _getShopMeta()
  * @brief Query shop meta
  * 
  * Loading the shop meta
  * 
  * @version 0.0.5
  * @since 0.0.3
  * @author Ruben Storm
  * @return
  */
 private static function _getShopMeta()
 {
     // get the Shop Meta
     if (shopControler::_checkSingle('USE_THEME') == true) {
         self::$shopMetaThemeFile = self::$shopMetaThemeFolder . USE_THEME . '/theme.xml';
         if (file_exists(self::$shopMetaThemeFile)) {
             $xml = simplexml_load_file(self::$shopMetaThemeFile);
             foreach ($xml->settings as $settings) {
                 libDefine::_definer('THEME_SETTINGS_NAME', $settings->name);
                 libDefine::_definer('THEME_SETTINGS_VERSION', $settings->version);
                 libDefine::_definer('THEME_SETTINGS_SCREEN', $settings->screen);
                 libDefine::_definer('THEME_SETTINGS_FORVERSION', $settings->forVersion);
                 libDefine::_definer('THEME_SETTINGS_AUTHOR', $settings->author);
                 libDefine::_definer('THEME_SETTINGS_HOMEPAGE', '<a href="' . $settings->homepage . '" target="_blank">' . $settings->homepage . '</a>');
                 libDefine::_definer('THEME_SETTINGS_EMAIL', $settings->contact->email);
                 libDefine::_definer('THEME_SETTINGS_CONTACT_STREET', $settings->contact->street);
                 libDefine::_definer('THEME_SETTINGS_CONTACT_CITY', $settings->contact->city);
                 libDefine::_definer('THEME_SETTINGS_CONTACT_COUNTRY', $settings->contact->country);
                 libDefine::_definer('THEME_SETTINGS_MOREINFO', $settings->moreInformation);
                 libDefine::_definer('THEME_SETTINGS_DONATE', $settings->donate->allow);
                 libDefine::_definer('THEME_SETTINGS_DONATE_EMAIL', $settings->donate->email);
                 libDefine::_definer('THEME_SETTINGS_DONATE_WEBSEITE', '<a href="' . $settings->donate->website . '" target="_blank">' . $settings->donate->website . '</a>');
             }
             libDefine::_definer('SHOP_META_READY', 1);
         } else {
             self::$errorMessage = 'Theme File (' . self::$shopMetaThemeFile . ') does not exists';
             libErrors::mk_Errors(self::$errorMessage, 1);
         }
         if (shopControler::_checkSingle('SYSTEM_ERROR_DATA') == true && SYSTEM_ERROR_DATA == 1) {
             libDefine::_definer('SYSTEM_ERROR_DATA', 0);
             libErrors::mk_Errors('', 0);
         }
     } else {
         libErrors::mk_Errors(self::$errorMessage, 1);
     }
     return;
 }