Ejemplo n.º 1
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objSettingsCountryTable = $this->getConfigKey(new S('settings_country_table'));
     self::$objSettingsCountryTableFIso = $this->getConfigKey(new S('settings_country_table_field_iso'));
     self::$objSettingsCountryTableFName = $this->getConfigKey(new S('settings_country_table_field_name'));
     self::$objSettingsCountryTableFPrnt = $this->getConfigKey(new S('settings_country_table_field_printable_name'));
     self::$objSettingsCountryTableFIsoT = $this->getConfigKey(new S('settings_country_table_field_iso3'));
     self::$objSettingsCountryTableFCode = $this->getConfigKey(new S('settings_country_table_field_numcode'));
     // Errors ...
     self::$objSettingsErrTable = $this->getConfigKey(new S('settings_error_pages_table'));
     self::$objSettingsErrTableFId = $this->getConfigKey(new S('settings_error_pages_table_field_id'));
     self::$objSettingsErrTableFCode = $this->getConfigKey(new S('settings_error_pages_table_error_code'));
     self::$objSettingsErrTableFTitle = $this->getConfigKey(new S('settings_error_pages_table_title'));
     self::$objSettingsErrTableFContent = $this->getConfigKey(new S('settings_error_pages_table_content'));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
 }
Ejemplo n.º 2
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objLyricsTable = $this->getConfigKey(new S('lyrics_table'));
     self::$objLyricsTableFId = $this->getConfigKey(new S('lyrics_table_field_id'));
     self::$objLyricsTableFSEO = $this->getConfigKey(new S('lyrics_table_field_seo'));
     self::$objLyricsTableFTitle = $this->getConfigKey(new S('lyrics_table_field_title'));
     self::$objLyricsTableFArtist = $this->getConfigKey(new S('lyrics_table_field_artist'));
     self::$objLyricsTableFAlbum = $this->getConfigKey(new S('lyrics_table_field_album'));
     self::$objLyricsTableFLyrics = $this->getConfigKey(new S('lyrics_table_field_lyrics'));
     self::$objLyricsTableFDateAdded = $this->getConfigKey(new S('lyrics_table_field_date_added'));
     self::$objItemsPerPage = new S('10');
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
 }
Ejemplo n.º 3
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set some configuration defaults, taking them from the config file;
     self::$objContactTable = $this->getConfigKey(new S('contact_table_message'));
     self::$objContactTableFId = $this->getConfigKey(new S('contact_table_message_field_id'));
     self::$objContactTableFMessage = $this->getConfigKey(new S('contact_table_message_content'));
     self::$objContactTableFSubjectId = $this->getConfigKey(new S('contact_table_message_subject_id'));
     self::$objContactTableFEMAIL = $this->getConfigKey(new S('contact_table_message_email'));
     self::$objContactTableFResolved = $this->getConfigKey(new S('contact_table_message_resolved'));
     self::$objContactTableFComment = $this->getConfigKey(new S('contact_table_message_comment'));
     self::$objContactTableFReceived = $this->getConfigKey(new S('contact_table_message_received'));
     self::$objContactTableFLastEdited = $this->getConfigKey(new S('contact_table_message_last_edited'));
     // Subjects ..
     self::$objContactSubjectTable = $this->getConfigKey(new S('contact_table_subject'));
     self::$objContactSubjectFId = $this->getConfigKey(new S('contact_table_subject_field_id'));
     self::$objContactSubjectFTitle = $this->getConfigKey(new S('contact_table_subject_title'));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
 }
Ejemplo n.º 4
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set some requirements ...
     $this->objPathToSkinJSS = $this->getPathToSkinJSS()->toRelativePath();
     $this->objPathToSkinCSS = $this->getPathToSkinCSS()->toRelativePath();
 }
Ejemplo n.º 5
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Tie in common configuration;
     $this->tieInCommonConfiguration();
     // Articles ...
     self::$objArticleTable = $this->getConfigKey(new S('articles_table'));
     self::$objArticleTableFId = $this->getConfigKey(new S('articles_table_field_id'));
     self::$objArticleTableFTitle = $this->getConfigKey(new S('articles_table_field_title'));
     self::$objArticleTableFSEO = $this->getConfigKey(new S('articles_table_field_seo'));
     self::$objArticleTableFExcerpt = $this->getConfigKey(new S('articles_table_field_excerpt'));
     self::$objArticleTableFTags = $this->getConfigKey(new S('articles_table_field_tags'));
     self::$objArticleTableFContent = $this->getConfigKey(new S('articles_table_field_content'));
     self::$objArticleTableFDatePublished = $this->getConfigKey(new S('articles_table_field_date_published'));
     self::$objArticleTableFDateUpdated = $this->getConfigKey(new S('articles_table_field_date_updated'));
     self::$objArticleTableFState = $this->getConfigKey(new S('articles_table_field_state'));
     self::$objArticleTableFAuthorId = $this->getConfigKey(new S('articles_table_field_author_id'));
     self::$objArticleTableFCategoryId = $this->getConfigKey(new S('articles_table_field_category_id'));
     self::$objArticleTableFCanComment = $this->getConfigKey(new S('articles_table_field_can_comment'));
     self::$objArticleTableFViews = $this->getConfigKey(new S('articles_table_field_views'));
     // Comments ...
     self::$objCommentsTable = $this->getConfigKey(new S('articles_comments_table'));
     self::$objCommentsTableFId = $this->getConfigKey(new S('articles_comments_table_id'));
     self::$objCommentsTableFName = $this->getConfigKey(new S('articles_comments_table_name'));
     self::$objCommentsTableFEML = $this->getConfigKey(new S('articles_comments_table_email'));
     self::$objCommentsTableFURL = $this->getConfigKey(new S('articles_comments_table_website'));
     self::$objCommentsTableFRUId = $this->getConfigKey(new S('articles_comments_table_registered_user_id'));
     self::$objCommentsTableFComment = $this->getConfigKey(new S('articles_comments_table_comment'));
     self::$objCommentsTableFApproved = $this->getConfigKey(new S('articles_comments_table_approved'));
     self::$objCommentsTableFDate = $this->getConfigKey(new S('articles_comments_table_date'));
     self::$objCommentsTableFArticleId = $this->getConfigKey(new S('articles_comments_table_article_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('articles_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('articles_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('articles_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('articles_category_table_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('articles_category_table_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('articles_category_table_date'));
     // Configuration ...
     self::$objItemsPerPage = $this->getConfigKey(new S('articles_per_page'));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT ...
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
 }
Ejemplo n.º 6
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objProductsTable = $this->getConfigKey(new S('products_table'));
     self::$objProductsTableFId = $this->getConfigKey(new S('products_table_field_id'));
     self::$objProductsTableFCode = $this->getConfigKey(new S('products_table_field_code'));
     self::$objProductsTableFName = $this->getConfigKey(new S('products_table_field_name'));
     self::$objProductsTableFSEO = $this->getConfigKey(new S('products_table_field_seo'));
     self::$objProductsTableFPDF = $this->getConfigKey(new S('products_table_field_pdf'));
     self::$objProductsTableFURL = $this->getConfigKey(new S('products_table_field_url'));
     self::$objProductsTableFDescription = $this->getConfigKey(new S('products_table_field_description'));
     self::$objProductsTableFPrice = $this->getConfigKey(new S('products_table_field_price'));
     self::$objProductsTableFStoc = $this->getConfigKey(new S('products_table_field_stoc'));
     self::$objProductsTableFCategoryId = $this->getConfigKey(new S('products_table_field_category_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('products_table_categories'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('products_table_categories_field_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('products_table_categories_field_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('products_table_categories_field_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('products_table_categories_field_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('products_table_categories_field_date'));
     // Images for products ...
     self::$objProductsIMGTable = $this->getConfigKey(new S('products_table_images'));
     self::$objProductsIMGTableFId = $this->getConfigKey(new S('products_table_images_field_id'));
     self::$objProductsIMGTableFProdId = $this->getConfigKey(new S('products_table_images_field_product_id'));
     self::$objProductsIMGTableFTitle = $this->getConfigKey(new S('products_table_images_field_title'));
     self::$objProductsIMGTableFURL = $this->getConfigKey(new S('products_table_images_field_url'));
     self::$objProductsIMGTableFCaption = $this->getConfigKey(new S('products_table_images_field_caption'));
     // Properties for product ...
     self::$objProductsPropertyTable = $this->getConfigKey(new S('products_table_properties'));
     self::$objProductsPropertyTableFId = $this->getConfigKey(new S('products_table_properties_field_id'));
     self::$objProductsPropertyTableFPId = $this->getConfigKey(new S('products_table_properties_field_product_id'));
     self::$objProductsPropertyTableFKey = $this->getConfigKey(new S('products_table_properties_field_key'));
     self::$objProductsPropertyTableFVar = $this->getConfigKey(new S('products_table_properties_field_var'));
     // Configuration ...
     self::$objItemsPerPage = new S('10');
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
 }
Ejemplo n.º 7
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Get object configuration data, and set current object properties;
     self::$objTextTable = $this->getConfigKey(new S('texts_table'));
     self::$objTextTableFId = $this->getConfigKey(new S('texts_table_field_id'));
     self::$objTextTableFTitle = $this->getConfigKey(new S('texts_table_field_title'));
     self::$objTextTableFSEO = $this->getConfigKey(new S('texts_table_field_seo'));
     self::$objTextTableFContent = $this->getConfigKey(new S('texts_table_field_content'));
     self::$objTextTableFTags = $this->getConfigKey(new S('texts_table_field_tags'));
     self::$objTextTableFCanComment = $this->getConfigKey(new S('texts_table_field_can_comment'));
     self::$objTextTableFDatePublished = $this->getConfigKey(new S('texts_table_field_date_published'));
     self::$objTextTableFDateUpdated = $this->getConfigKey(new S('texts_table_field_date_updated'));
     self::$objTextTableFAuthorId = $this->getConfigKey(new S('texts_table_field_author_id'));
     self::$objTextTableFCategoryId = $this->getConfigKey(new S('texts_table_field_category_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('texts_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('texts_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('texts_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('texts_category_table_seo'));
     // Comments ...
     self::$objCommentsTable = $this->getConfigKey(new S('texts_comments_table'));
     self::$objCommentsTableFId = $this->getConfigKey(new S('texts_comments_table_id'));
     self::$objCommentsTableFName = $this->getConfigKey(new S('texts_comments_table_name'));
     self::$objCommentsTableFEML = $this->getConfigKey(new S('texts_comments_table_email'));
     self::$objCommentsTableFURL = $this->getConfigKey(new S('texts_comments_table_website'));
     self::$objCommentsTableFRUId = $this->getConfigKey(new S('texts_comments_table_registered_user_id'));
     self::$objCommentsTableFComment = $this->getConfigKey(new S('texts_comments_table_comment'));
     self::$objCommentsTableFApproved = $this->getConfigKey(new S('texts_comments_table_approved'));
     self::$objCommentsTableFDate = $this->getConfigKey(new S('texts_comments_table_date'));
     self::$objCommentsTableFTextId = $this->getConfigKey(new S('texts_comments_table_text_id'));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, new S(__CLASS__));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
 }
Ejemplo n.º 8
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objLetterTable = $this->getConfigKey(new S('newsletter_table'));
     self::$objLetterTableFId = $this->getConfigKey(new S('newsletter_table_field_id'));
     self::$objLetterTableFEML = $this->getConfigKey(new S('newsletter_table_field_email'));
     self::$objLetterTableFFirstName = $this->getConfigKey(new S('newsletter_table_field_first_name'));
     self::$objLetterTableFLastName = $this->getConfigKey(new S('newsletter_table_field_last_name'));
     self::$objLetterTableFType = $this->getConfigKey(new S('newsletter_table_field_email_type'));
     self::$objLetterTableFConfirmed = $this->getConfigKey(new S('newsletter_table_field_is_confirmed'));
     self::$objLetterTableFKey = $this->getConfigKey(new S('newsletter_table_field_confirmation_key'));
     self::$objLetterTableFSubscribed = $this->getConfigKey(new S('newsletter_table_field_date'));
     self::$objLetterTableFCategoryId = $this->getConfigKey(new S('newsletter_table_field_category_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('newsletter_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('newsletter_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('newsletter_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('newsletter_category_table_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('newsletter_category_table_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('newsletter_category_table_date'));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
 }
Ejemplo n.º 9
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Get the confiuration data ...
     self::$objAudioTable = $this->getConfigKey(new S('audio_table'));
     self::$objAudioTableFId = $this->getConfigKey(new S('audio_table_field_id'));
     self::$objAudioTableFFile = $this->getConfigKey(new S('audio_table_field_file'));
     self::$objAudioTableFArtwork = $this->getConfigKey(new S('audio_table_field_artwork'));
     self::$objAudioTableFTitle = $this->getConfigKey(new S('audio_table_field_title'));
     self::$objAudioTableFSEO = $this->getConfigKey(new S('audio_table_field_seo'));
     self::$objAudioTableFArtist = $this->getConfigKey(new S('audio_table_field_artist'));
     self::$objAudioTableFAlbum = $this->getConfigKey(new S('audio_table_field_album'));
     self::$objAudioTableFLyrics = $this->getConfigKey(new S('audio_table_field_lyrics'));
     self::$objAudioTableFDescription = $this->getConfigKey(new S('audio_table_field_description'));
     self::$objAudioTableFUploadedDate = $this->getConfigKey(new S('audio_table_field_date_uploaded'));
     self::$objAudioTableFUploaderId = $this->getConfigKey(new S('audio_table_field_uploader_id'));
     self::$objAudioTableFCategoryId = $this->getConfigKey(new S('audio_table_field_category_id'));
     self::$objAudioTableFApproved = $this->getConfigKey(new S('audio_table_field_approved'));
     self::$objAudioTableFCanComment = $this->getConfigKey(new S('audio_table_field_can_comment'));
     self::$objAudioTableFViews = $this->getConfigKey(new S('audio_table_field_views'));
     // Comments ...
     self::$objCommentsTable = $this->getConfigKey(new S('audio_comments_table'));
     self::$objCommentsTableFId = $this->getConfigKey(new S('audio_comments_table_id'));
     self::$objCommentsTableFName = $this->getConfigKey(new S('audio_comments_table_name'));
     self::$objCommentsTableFEML = $this->getConfigKey(new S('audio_comments_table_email'));
     self::$objCommentsTableFURL = $this->getConfigKey(new S('audio_comments_table_website'));
     self::$objCommentsTableFRUId = $this->getConfigKey(new S('audio_comments_table_registered_user_id'));
     self::$objCommentsTableFComment = $this->getConfigKey(new S('audio_comments_table_comment'));
     self::$objCommentsTableFApproved = $this->getConfigKey(new S('audio_comments_table_approved'));
     self::$objCommentsTableFDate = $this->getConfigKey(new S('audio_comments_table_date'));
     self::$objCommentsTableFAudioFileId = $this->getConfigKey(new S('audio_comments_table_audio_file_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('audio_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('audio_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('audio_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('audio_category_table_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('audio_category_table_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('audio_category_table_date'));
     // Configuration ...
     self::$objItemsPerPage = $this->getConfigKey(new S('audio_settings_audio_items_per_page'));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
     // Get some JSS data ...
     $this->objPathToSkinJSS = $this->getPathToSkinJSS()->toRelativePath();
     $this->objPathToSkinCSS = $this->getPathToSkinCSS()->toRelativePath();
     // CALL them specific TPL methods, add JSS & CSS to page <head'er ...
     TPL::manageJSS(new FilePath($this->objPathToSkinJSS . self::AUDIO_PLAYER_JS_PATH), new S(self::AUDIO_PLAYER_JS_STRING));
 }
Ejemplo n.º 10
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration while doing that;
     parent::__construct();
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Set the proper configuration options for this object;
     self::$objAuthUsersTable = $this->getConfigKey(new S('authentication_users_table'));
     self::$objAuthUsersTableFId = $this->getConfigKey(new S('authentication_users_table_field_id'));
     self::$objAuthUsersTableFUName = $this->getConfigKey(new S('authentication_users_table_field_username'));
     self::$objAuthUsersTableFUPass = $this->getConfigKey(new S('authentication_users_table_field_password'));
     self::$objAuthUsersTableFEML = $this->getConfigKey(new S('authentication_users_table_field_email'));
     self::$objAuthUsersTableFPhone = $this->getConfigKey(new S('authentication_users_table_field_phone'));
     self::$objAuthUsersTableFFName = $this->getConfigKey(new S('authentication_users_table_field_first_name'));
     self::$objAuthUsersTableFLName = $this->getConfigKey(new S('authentication_users_table_field_last_name'));
     self::$objAuthUsersTableFUGId = $this->getConfigKey(new S('authentication_users_table_field_group_id'));
     self::$objAuthUsersTableFRegOn = $this->getConfigKey(new S('authentication_users_table_field_registered_on'));
     self::$objAuthUsersTableFLastLog = $this->getConfigKey(new S('authentication_users_table_field_visited_on'));
     self::$objAuthUsersTableFHash = $this->getConfigKey(new S('authentication_users_table_field_hash'));
     self::$objAuthUsersTableFActivated = $this->getConfigKey(new S('authentication_users_table_field_activated'));
     self::$objAuthUsersTableFCountry = $this->getConfigKey(new S('authentication_users_table_field_country'));
     self::$objAuthUsersTableFSignature = $this->getConfigKey(new S('authentication_users_table_field_signature'));
     self::$objAuthUsersTableFDesc = $this->getConfigKey(new S('authentication_users_table_field_description'));
     self::$objAuthUsersTableFYM = $this->getConfigKey(new S('authentication_users_table_field_ym'));
     self::$objAuthUsersTableFMSN = $this->getConfigKey(new S('authentication_users_table_field_msn'));
     self::$objAuthUsersTableFICQ = $this->getConfigKey(new S('authentication_users_table_field_icq'));
     self::$objAuthUsersTableFAOL = $this->getConfigKey(new S('authentication_users_table_field_aol'));
     self::$objAuthUsersTableFCity = $this->getConfigKey(new S('authentication_users_table_field_city'));
     self::$objAuthUsersTableFAvatar = $this->getConfigKey(new S('authentication_users_table_field_avatar'));
     self::$objAuthUsersTableFIp = $this->getConfigKey(new S('authentication_users_table_field_ip'));
     // Groups ...
     self::$objAuthGroupTable = $this->getConfigKey(new S('authentication_group_table'));
     self::$objAuthGroupTableFId = $this->getConfigKey(new S('authentication_group_table_field_id'));
     self::$objAuthGroupTableFName = $this->getConfigKey(new S('authentication_group_table_field_name'));
     self::$objAuthGroupTableFSEO = $this->getConfigKey(new S('authentication_group_table_field_seo'));
     // Zones ...
     self::$objAuthZonesTable = $this->getConfigKey(new S('authentication_zones_table'));
     self::$objAuthZonesTableFId = $this->getConfigKey(new S('authentication_zones_table_field_id'));
     self::$objAuthZonesTableFName = $this->getConfigKey(new S('authentication_zones_table_field_name'));
     self::$objAuthZonesTableFDesc = $this->getConfigKey(new S('authentication_zones_table_field_description'));
     self::$objAuthZonesTableFPrice = $this->getConfigKey(new S('authentication_zones_table_field_price'));
     // Zone mappings ...
     self::$objAuthZoneMTable = $this->getConfigKey(new S('authentication_gtozm_table'));
     self::$objAuthZoneMTableFId = $this->getConfigKey(new S('authentication_gtozm_table_field_id'));
     self::$objAuthZoneMTableFZId = $this->getConfigKey(new S('authentication_gtozm_table_field_zone_id'));
     self::$objAuthZoneMTableFUGId = $this->getConfigKey(new S('authentication_gtozm_table_field_ug_id'));
     self::$objAuthZoneMTableFIUG = $this->getConfigKey(new S('authentication_gtozm_table_field_is_group'));
     self::$objAuthZoneMTableFAorD = $this->getConfigKey(new S('authentication_gtozm_table_field_deny_or_allow'));
     self::$objAuthZoneMTableFErase = $this->getConfigKey(new S('authentication_gtozm_table_field_eraseable'));
     // Configuration ...
     self::$objAuthDefaultGroup = $this->getConfigKey(new S('authentication_default_group'));
     self::$objAuthDefaultUsername = $this->getConfigKey(new S('authentication_default_admin_username'));
     self::$objAuthDefaultPassword = $this->getConfigKey(new S('authentication_default_admin_password'));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Check non-modified user data, to prevent hackers;
     if ($this->checkIfUserIsLoggedIn()->toBoolean() == TRUE) {
         $this->checkIfUserDataIsOK();
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objAuthGroupTable, self::$objAuthDefaultGroup);
     self::$objMPTTForZones = new MPTT(self::$objAuthZonesTable, $this->getObjectCLASS());
     // Load'em defaults ... ATH, STG and others ...
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // Check that the default administrator user exists, or create it;
     $this->setDefaultAdministratorSettings();
     // Check to see if this zone exists, and if not, add it;
     if ($this->checkZoneByName(new S(__CLASS__))->toBoolean() == FALSE) {
         $this->doMakeZone(new S(__CLASS__), self::$objAuthZonesTableFName);
     }
     if ($this->checkAdministratorIsMappedToZone($this->getObjectCLASS())->toBoolean() == FALSE) {
         $this->doMapAdministratorToZone($this->getObjectCLASS());
     }
     // Do the tie, with myself, just for sub-zones;
     $this->tieInWithAuthentication($this);
 }
Ejemplo n.º 11
0
 /**
  * Constructs the administration object, taking the authentication object as a parameter and storing it for further use;
  *
  * This method will construct the administration object, which automatically takes an authentication object as a parameter. Thus
  * we can have separate authentication mechanisms (besides the implemented MySQL authentication) that can be used with our
  * administration mechanism, as long as the proper parameters respect the IFaceAuthentication interface;
  *
  * @param IFaceAuthentication $objAuthMech The authentication object, passed as a parameter;
  * @return void Doesn't need to return anything (being a constructor);
  */
 public function __construct(IFaceAuthentication $objAuthMech)
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Set the execution time start;
     self::setExeTime(new S('administration_start'));
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Tie in with the authentication mechanism;
     $this->tieInWithAuthenticationMechanism($objAuthMech);
     // Set some requirements ...
     $objPathToSkinJSS = $this->getPathToSkinJSS()->toRelativePath();
     $objPathToSkinCSS = $this->getPathToSkinCSS()->toRelativePath();
     // Auto-LogOut the user if we detect the proper action ...
     if (isset($_GET[ADMIN_INTERFACE_ACTION])) {
         // Switch ...
         switch ($_GET[ADMIN_INTERFACE_ACTION]) {
             case ADMIN_LOG_OUT:
                 self::$objAuthenticationMech->doLogOut();
                 URL::doCleanURLPath();
                 break;
             case ADMIN_SWITCH_THEME:
                 if ($this->objCookie->checkKey(new S('admin_css'))->toBoolean() == TRUE) {
                     switch ($this->objCookie->getKey(new S('admin_css'))) {
                         case 'default.css':
                             $this->objCookie->setKey(new S('admin_css'), new S('default_inverted.css'), new B(TRUE));
                             break;
                         default:
                             $this->objCookie->setKey(new S('admin_css'), new S('default.css'), new B(TRUE));
                             break;
                     }
                 } else {
                     // Set the INVERTED, at first ...
                     $this->objCookie->setKey(new S('admin_css'), new S('default_inverted.css'), new B(TRUE));
                 }
                 // Get out ...
                 $this->setHeaderKey(URL::rewriteURL(new A(array(ADMIN_INTERFACE_ACTION))), new S('Location'));
                 break;
         }
     }
     // Set the required JS dependencies ...
     TPL::manageCSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQUI.css'), new S('jQUICSS'));
     TPL::manageCSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQContextMenu.css'), new S('jQCM'));
     TPL::manageCSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQFancybox.css'), new S('jQFancybox'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQ.js'), new S('jQ'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQUI.js'), new S('jQUI'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQClock.js'), new S('jQClock'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQBind.js'), new S('jQBind'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQUICheckbox.js'), new S('jQUICR'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQFileStyle.js'), new S('jQFStyle'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQEasing.js'), new S('jQEasing'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQFancybox.js'), new S('jQFancybox'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQToolTip.js'), new S('jQTT'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQWidget.js'), new S('jQWidget'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQContextMenu.js'), new S('jQCM'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQMasked.js'), new S('jQMasked'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQTypeFace.js'), new S('jQTF'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQKabelTypeFace.js'), new S('jQTK'));
     TPL::manageJSS(new FilePath($objPathToSkinJSS . 'jQ' . _S . 'jQExe.js'), new S('jQExe'));
     // Add the default CSS, either black or white ...
     if ($this->objCookie->checkKey(new S('admin_css'))->toBoolean() == TRUE) {
         // Set the proper CSS, acording to _SESSION;
         TPL::manageCSS(new FilePath($objPathToSkinCSS . $this->objCookie->getKey(new S('admin_css'))), new S(__CLASS__));
     } else {
         // Set the default to BLACK;
         TPL::manageCSS(new FilePath($objPathToSkinCSS . 'default.css'), new S(__CLASS__));
     }
     // Safari, Google Chrome and maybe others on WebKIT ...
     if ($this->getUserAgentProperty(new S('browser')) == 'sf') {
         // Add'em fixes ...
         TPL::manageCSS(new FilePath($objPathToSkinCSS . 'default_fixed.css'), new S('safari-css-fix'));
     }
     // Get the proper configuration options stored in the object;
     self::$objHeaderText = $this->getConfigKey(new S('administration_header_text'));
     self::$objFooterText = $this->getConfigKey(new S('administration_footer_text'));
     // Do some actions, based on user information;
     if (self::$objAuthenticationMech->checkIfUserIsLoggedIn()->toBoolean() == TRUE and self::$objAuthenticationMech->checkCurrentUserZoneACL(new S(__CLASS__))->toBoolean() == TRUE) {
         // Redirect to the dashboard page;
         if (!isset($_GET[ADMIN_PAGE])) {
             $this->setHeaderKey(URL::rewriteURL(new A(array(ADMIN_PAGE)), new A(array(ADMIN_DASHBOARD))), new S('Location'));
         }
         // Do a CALL to ALL registered administrator interfaces;
         $this->tieALLRegisteredAdminInterfaces();
     } else {
         // Echo an error, for our dear friend, the Internet Explorer (MSIE);
         if ($this->getUserAgentProperty(new S('browser')) == 'ie') {
             self::renderScreenOfDeath(new S(__CLASS__), new S(ADMIN_IE_NOT_ALLOWED), new S(ADMIN_IE_NOT_ALLOWED_FIX));
         } else {
             // Safari, Google Chrome and maybe others on WebKIT ...
             if ($this->getUserAgentProperty(new S('browser')) == 'sf') {
                 // Add'em fixes ...
                 TPL::manageCSS(new FilePath($objPathToSkinCSS . 'default_fixed_adm.css'), new S('safari-fix'));
             }
             // Do the authentication screen;
             self::$objAuthenticationMech->renderForm(new S('adminLoginScreen'));
             // Set some predefines ...
             self::$objMenuArray = new A();
             self::$objSubMArray = new A();
             self::$objLogOutLink = new S();
             self::$objSwitcherLink = new S();
             // After we know all the details, execute the viewer whit these parameters;
             $tpF = new FilePath($this->getPathToSkin()->toRelativePath() . 'administration.tp');
             TPL::tpSet(self::$objHeaderText, new S('objHeaderText'), $tpF);
             TPL::tpSet(self::$objFooterText, new S('objFooterText'), $tpF);
             TPL::tpSet(self::$objMenuArray, new S('objMenuArray'), $tpF);
             TPL::tpSet(self::$objSubMArray, new S('objSubMArray'), $tpF);
             TPL::tpSet(self::$objLogOutLink, new S('objLogOutLink'), $tpF);
             TPL::tpSet(self::$objSwitcherLink, new S('objSwitcherLink'), $tpF);
             TPL::tpExe($tpF);
         }
     }
 }