/** * Constructor * * * @return void */ public function __construct($mode = '') { parent::__construct(); $dbTable = ''; if (isset($this->tasks[$mode])) { $dbTable = $this->tasks[$mode]['defaultTable']; } if (isset($_GET['frm'])) { $temp = intval($_GET['frm']); if ($temp < 0) { $temp = 0; } $this->showFrom = $temp; } if (isset($_GET['count'])) { $temp = min(intval($_GET['count']), 50); // Limit to 50 per page $temp = max($temp, 5); // ...and minimum 5 per page $this->showCount = $temp; } if (isset($_GET['fld'])) { $temp = e107::getParser()->toDB($_GET['fld']); if (is_array($this->fields[$dbTable][$temp])) { $this->sortField = $temp; } } if (isset($_GET['asc'])) { $temp = strtolower(e107::getParser()->toDB($_GET['asc'])); if ($temp == 'asc' || $temp == 'desc') { $this->sortOrder = $temp; } } $this->newMode($mode); }
/** * Constructor * * * @return void */ public function __construct($mode = '') { parent::__construct(); // require_once(e_HANDLER.'calendar/calendar_class.ph_'); // $this->_cal = new DHTML_Calendar(true); $dbTable = ''; if (isset($this->tasks[$mode])) { $dbTable = $this->tasks[$mode]['defaultTable']; } if (isset($_GET['frm'])) { $temp = intval($_GET['frm']); if ($temp < 0) { $temp = 0; } $this->showFrom = $temp; } if (isset($_GET['count'])) { $temp = min(intval($_GET['count']), 50); // Limit to 50 per page $temp = max($temp, 5); // ...and minimum 5 per page $this->showCount = $temp; } if (isset($_GET['fld'])) { $temp = $this->e107->tp->toDB($_GET['fld']); if (is_array($this->fields[$dbTable][$temp])) { $this->sortField = $temp; } } if (isset($_GET['asc'])) { $temp = strtolower($this->e107->tp->toDB($_GET['asc'])); if ($temp == 'asc' || $temp == 'desc') { $this->sortOrder = $temp; } } $this->newMode($mode); }