/** * Outputs the section to the client. */ function Show() { echo "<div class='div_list_full'>\n"; $page = isset($_REQUEST["page_{$this->table->name}"]) ? $_REQUEST["page_{$this->table->name}"] : 0; if ($this->recspage > 0) { $this->table->list_recspage = $this->recspage; } $this->table->ShowList($this->url, $page, $this->data); if (isset($this->sections["{$this->table->name}_list_navigator"])) { $this->sections["{$this->table->name}_list_navigator"]->page = $page; $this->sections["{$this->table->name}_list_navigator"]->pages = $this->table->NumPages($this->data); } parent::Show(); echo "</div>\n"; }
/** * Perform a action. * * @param string $action Action to perform ('S' for INSERT/UPDATE, 'E' for edit, 'N' for new, 'D' for DELETE, 'F' for find). */ function Perform($action) { global $vortex_errors; if (!strcmp($action, 'S')) { if ($this->table->Save($_REQUEST)) { $this->table->Seek(); } else { switch ($this->table->Error()) { case TB_ERR_INCONSIST: $this->AddSection("{$this->table->name}_error", 'SEC_Static', array('code' => "<div class='div_error'>{$vortex_errors[TB_ERR_INCONSIST]}</div>")); $this->table->LoadForm($_REQUEST, FT_OR_USER); break; default: trigger_error($vortex_errors[$this->table->Error()]); break; } } } elseif (!strcmp($action, 'E')) { $this->table->Seek($_REQUEST); } elseif (!strcmp($action, 'F')) { $this->table->Seek($_REQUEST); $_SESSION['vortex_find_' . $this->table->name] = array(); foreach ($this->table->fields_form as $field) { if (isset($_REQUEST[$field->name_form]) && $_REQUEST[$field->name_form] != $field->default) { $_SESSION['vortex_find_' . $this->table->name][$field->name_form] = $_REQUEST[$field->name_form]; } } } elseif (!strcmp($action, 'N')) { $this->table->Seek(); } elseif (!strcmp($action, 'R')) { $this->table->Seek(); unset($_SESSION['vortex_find_' . $this->table->name]); } elseif (!strcmp($action, 'D')) { if ($this->table->Delete($_REQUEST)) { $this->table->Seek(); } else { switch ($this->table->Error()) { case TB_ERR_EMPTY: $this->AddSection("{$this->table->name}_error", 'SEC_Static', array('code' => "<div class='div_error'>{$vortex_errors[TB_ERR_EMPTY]}</div>")); break; default: trigger_error($vortex_errors[$this->table->Error()]); break; } } } }
/** * Outputs the section to the client. */ function Show() { $this->table->ShowForm("form_{$this->table->name}", $this->url->Get(), $this->submit, $this->data); parent::Show(); }