Esempio n. 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);
 }
Esempio n. 2
0
 function modifyForm()
 {
     global $gorumroll, $lll;
     $_EC = EComm::createObject();
     $this->id = $gorumroll->rollid;
     LocationHistory::saveGorumCategory($this->getCid());
     $this->activateVariableFields();
     //csak emiatt kellett feluldefinialn
     $this->initClassVars();
     if (!Roll::isPreviousFormSubmitInvalid()) {
         $ret = $this->load();
         if ($ret) {
             $txt = $lll["not_found_in_db"];
             handleError($txt);
         }
         $old =& $this;
     } else {
         G::load($old, $this->id, "item");
     }
     $this->hasObjectRights($hasRight, "modify", TRUE);
     if (isset($this->expirationTime) && !$this->expirationTime->isEmpty()) {
         $this->expiration = round($this->expirationTime->getDayDiff());
         if ($this->expirationTime->isPast()) {
             $this->expiration = "-{$this->expiration}";
         }
     }
     $this->addDeletePictureStuff();
     $this->addDeleteMediaStuff();
     $_EC->confirmRules($this->cid, $old);
     $this->cName = $this->getCatName();
     $this->catPermaLink = $this->getCatPermaLink();
     $this->generForm();
 }
Esempio n. 3
0
 function sortFieldForm($elementName = "")
 {
     global $gorumroll;
     parent::sortFieldForm($elementName);
     if ($gorumroll->rollid) {
         LocationHistory::saveGorumCategory($gorumroll->rollid);
         $ctrl =& new AppController("fieldset/create_form/{$gorumroll->rollid}");
         $gorumroll->processMethod($ctrl, $elementName);
     }
 }