Example #1
0
 function showHtmlList()
 {
     global $gorumroll, $populateTwoLevelsOfSubCategories;
     if ($gorumroll->rollid === "alternative") {
         ini_set("max_execution_time", 0);
         if (isset($_POST["sortId"])) {
             return $this->organizeAlternative();
         }
         return parent::showHtmlList();
     }
     JavaScript::addCss(CSS_DIR . "/category.css");
     $s = "";
     LocationHistory::saveGorumCategory($this->id = $gorumroll->rollid);
     // Ha ilyen-olyan torlesi kavarasok kovetkezteben ez az objektum
     // mar nem letezik, akkor a home-ra megyunk:
     if (load($this)) {
         $gorumroll->rollid = 0;
     }
     $this->loadHtmlList($list);
     hasAdminRights($isAdm);
     $rangeSelText = "";
     $catArr = array();
     $i = 0;
     foreach ($list as $listItem) {
         $ctrl = $listItem->getLinkCtrl();
         $catArr[$i]->link = $ctrl->makeUrl();
         $catArr[$i]->title = htmlspecialchars($listItem->getAttr("name"));
         $catArr[$i]->description = $listItem->getAttr("description");
         $catArr[$i]->itemNum = $listItem->itemNum;
         if ($listItem->picture) {
             $catArr[$i]->picture = CAT_PIC_DIR . "/{$listItem->id}.{$listItem->picture}";
         } else {
             $catArr[$i]->picture = "";
         }
         if ($populateTwoLevelsOfSubCategories) {
             AppCategory::populateTwoLevelsOfSubCategories($listItem->id, $catArr[$i]->subCats);
         }
         $i++;
     }
     if ($gorumroll->rollid && ($this->allowAd || $this->recursive)) {
         $ctrl =& new AppController("item/list/{$gorumroll->rollid}");
         $gorumroll->processMethod($ctrl, "advertisementList");
     }
     View::assign("categories", $catArr);
 }