type = $type; $this->labels = array( 'nav' => _("%s object(s) found"), 'error_noneFound' => _("No objects found!"), 'newEntry' => _("New object"), 'deleteEntry' => _("Delete object")); $this->configOptions = $this->listGetAllConfigOptions(); $this->listReadOptionsFromCookie(); } /** * Reads the list options from the cookie value. */ private function listReadOptionsFromCookie() { if (sizeof($this->configOptions) > 0) { if (isset($_COOKIE["ListOptions_" . $this->type])) { $cookieValue = $_COOKIE["ListOptions_" . $this->type]; $valueParts = explode(";", $cookieValue); $values = array(); for ($i = 0; $i < sizeof($valueParts); $i++) { $key_value = explode('=', $valueParts[$i]); if (sizeof($key_value) == 2) { $values[$key_value[0]] = $key_value[1]; } } for ($i = 0; $i < sizeof($this->configOptions); $i++) { if (isset($values[$this->configOptions[$i]->getID()])) { $this->configOptions[$i]->setValue($values[$this->configOptions[$i]->getID()]); } } // notify subclasses $this->listConfigurationChanged(); } } } /** * Prints the HTML code to display the list view. */ public function showPage() { if (isset($_GET['openConfig'])) { $this->listPrintConfigurationPage(); return; } // do POST actions $postFragment = $this->listDoPost(); // get some parameters $this->listGetParams(); // print HTML head $this->listPrintHeader(); // refresh data if needed if ($this->refresh) { $this->listBuildFilter(); $this->listRefreshData(); } // sort rows by sort column if (isset($this->entries)) { $this->entries = $this->listSort($this->entries); } // insert HTML fragment from listDoPost echo $postFragment; // show form echo "