Example #1
0
 public function reload()
 {
     if (!Emulator::getConfig()->getBoolean("hotel.wordfilter.enabled")) {
         return;
     }
     unset($this->autoReportWords);
     unset($this->hideMessageWords);
     unset($this->words);
     $this->autoReportWords = array();
     $this->hideMessageWords = array();
     $this->words = array();
     $query = Emulator::getDatabase()->query("SELECT * FROM wordfilter;");
     foreach ($query as $word) {
         $word = new WordFilterWord($word);
         if ($word->isAutoReport()) {
             $this->autoReportWords[] = $word;
             continue;
         }
         if ($word->isHideMessage()) {
             $this->hideMessageWords[] = $word;
             continue;
         }
         $this->words[] = $word;
     }
 }
Example #2
0
 private function loadCatalogPages()
 {
     $query = Emulator::getDatabase()->query("SELECT * FROM catalog_pages ORDER BY parent_id, id;");
     foreach ($query as $page) {
         switch (new CatalogPageLayouts($page->page_layout)) {
             case CatalogPageLayouts::default_3x3:
                 $this->catalogPages[(int) $page->id] = new Default_3x3Layout($page);
                 break;
             case CatalogPageLayouts::frontpage:
                 $this->catalogPages[(int) $page->id] = new FrontpageLayout($page);
                 break;
             case CatalogPageLayouts::badge_display:
                 $this->catalogPages[(int) $page->id] = new BadgeDisplayLayout($page);
                 break;
             case CatalogPageLayouts::spaces_new:
                 $this->catalogPages[(int) $page->id] = new SpacesLayout($page);
                 break;
             case CatalogPageLayouts::trophies:
                 $this->catalogPages[(int) $page->id] = new TrophiesLayout($page);
                 break;
             case CatalogPageLayouts::bots:
                 $this->catalogPages[(int) $page->id] = new BotsLayout($page);
                 break;
             case CatalogPageLayouts::club_buy:
                 $this->catalogPages[(int) $page->id] = new ClubBuyLayout($page);
                 break;
             case CatalogPageLayouts::club_gift:
                 $this->catalogPages[(int) $page->id] = new ClubGiftsLayout($page);
                 break;
             case CatalogPageLayouts::sold_ltd_items:
                 $this->catalogPages[(int) $page->id] = new SoldLTDItemsLayout($page);
                 break;
             case CatalogPageLayouts::single_bundle:
                 $this->catalogPages[(int) $page->id] = new SingleBundle($page);
                 break;
             case CatalogPageLayouts::roomads:
                 $this->catalogPages[(int) $page->id] = new RoomAdsLayout($page);
                 break;
             case CatalogPageLayouts::recycler:
                 if (!Emulator::getConfig()->getBoolean("hotel.ecotron.enabled")) {
                     break;
                 }
                 $this->catalogPages[(int) $page->id] = new RecyclerLayout($page);
                 break;
             case CatalogPageLayouts::recycler_info:
                 if (!Emulator::getConfig()->getBoolean("hotel.ecotron.enabled")) {
                     break;
                 }
                 $this->catalogPages[(int) $page->id] = new RecyclerInfoLayout($page);
                 break;
             case CatalogPageLayouts::recycler_prizes:
                 if (!Emulator::getConfig()->getBoolean("hotel.ecotron.enabled")) {
                     break;
                 }
                 $this->catalogPages[(int) $page->id] = new RecyclerPrizesLayout($page);
                 break;
             case CatalogPageLayouts::marketplace:
                 if (!Emulator::getConfig()->getBoolean("hotel.marketplace.enabled")) {
                     break;
                 }
                 $this->catalogPages[(int) $page->id] = new MarketplaceLayout($page);
                 break;
             case CatalogPageLayouts::marketplace_own_items:
                 if (!Emulator::getConfig()->getBoolean("hotel.marketplace.enabled")) {
                     break;
                 }
                 $this->catalogPages[(int) $page->id] = new MarketplaceOwnItems($page);
                 break;
             case CatalogPageLayouts::info_duckets:
                 $this->catalogPages[(int) $page->id] = new InfoDucketsLayout($page);
                 break;
             case CatalogPageLayouts::info_pets:
                 $this->catalogPages[(int) $page->id] = new InfoPetsLayout($page);
                 break;
             case CatalogPageLayouts::info_rentables:
                 $this->catalogPages[(int) $page->id] = new InfoRentablesLayout($page);
                 break;
             case CatalogPageLayouts::guilds:
                 $this->catalogPages[(int) $page->id] = new GuildFrontpageLayout($page);
                 break;
             case CatalogPageLayouts::guild_furni:
                 $this->catalogPages[(int) $page->id] = new GuildFurnitureLayout($page);
                 break;
             case CatalogPageLayouts::pets:
                 $this->catalogPages[(int) $page->id] = new PetsLayout($page);
                 break;
             case CatalogPageLayouts::pets2:
                 $this->catalogPages[(int) $page->id] = new Pets2Layout($page);
                 break;
             case CatalogPageLayouts::pets3:
                 $this->catalogPages[(int) $page->id] = new Pets3Layout($page);
                 break;
             case CatalogPageLayouts::productpage1:
                 $this->catalogPages[(int) $page->id] = new ProductPage1Layout($page);
                 break;
             case CatalogPageLayouts::soundmachine:
                 $this->catalogPages[(int) $page->id] = new TraxLayout($page);
                 break;
             case CatalogPageLayouts::default_3x3_color_grouping:
                 $this->catalogPages[(int) $page->id] = new ColorGroupingLayout($page);
                 break;
             case CatalogPageLayouts::recent_purchases:
                 $this->catalogPages[(int) $page->id] = new RecentPurchasesLayout($page);
                 break;
             case CatalogPageLayouts::room_bundle:
                 //$this->catalogPages[(int) $page->id] = new RoomBundleLayout($page);
                 break;
             case CatalogPageLayouts::petcustomization:
                 $this->catalogPages[(int) $page->id] = new PetCustomizationLayout($page);
                 break;
         }
     }
 }