/**
  * Constructor: Load all parameters into member variables.
  *
  * @param array $opts Parameters for the object, as 'var' => 'value'.
  */
 function SEC_List($opts = array())
 {
     parent::SEC_Base($opts);
     if (!empty($this->navigator)) {
         if (empty($this->navigator['opts']['key'])) {
             $this->navigator['opts']['key'] = "page_{$this->table->name}";
         }
         $this->AddSection("{$this->table->name}_list_navigator", $this->navigator['class'], $this->navigator['opts']);
     }
 }
 /**
  * Constructor: Load all parameters into member variables.
  *
  * @param array $opts Parameters for the object, as 'var' => 'value'.
  */
 function SEC_Page($opts = array())
 {
     parent::SEC_Base($opts);
     if (!empty($this->header)) {
         $this->AddSection('header', $this->header['class'], $this->header['opts']);
     }
     $this->AddSection('body_open', 'SEC_Static', array('code' => "<body>" . (!empty($this->onload) ? " onload='{$this->onload}'" : '') . "\n"));
     if (!empty($this->layout)) {
         foreach ($this->layout as $sect) {
             $this->AddSection($sect['name'], $sect['class'], $sect['opts']);
         }
     }
     if (!empty($this->content)) {
         $this->AddSection('content', $this->content['class'], $this->content['opts']);
     }
     $this->AddSection('body_close', 'SEC_Static', array('code' => "</body>\n"));
 }
示例#3
0
 /**
  * Constructor: Process form data and prepare the section to display.
  *
  * @param array $opts Parameters for the object, as 'var' => 'value'.
  */
 function SEC_Edit($opts = array())
 {
     // Load all parameters into member variables.
     parent::SEC_Base($opts);
     // Load Table class if requested
     if (!empty($this->table_class)) {
         include_once $this->table_class . '.class.php';
         $this->table = new $this->table_class($this->db, $this->table_opts);
     }
     // See what to do and perform the action
     if (!empty($_REQUEST["{$this->table->name}_action"])) {
         $this->Perform($_REQUEST["{$this->table->name}_action"]);
     }
     $submit = $this->BuildButtons();
     $url = new URL();
     $url->parameters["{$this->table->name}_action"] = 'E';
     $opts = array('table' => &$this->table, 'url' => $url, 'recspage' => $this->recspage);
     $url = new URL();
     if (!empty($this->navi)) {
         $opts['navigator'] = array('class' => $this->navi, 'opts' => array('url' => $url));
     }
     if (isset($_SESSION['vortex_find_' . $this->table->name])) {
         $opts['data'] = $_SESSION['vortex_find_' . $this->table->name];
     }
     $this->AddSection("{$this->table->name}_list", $this->list, $opts);
     $url = new URL();
     $url->parameters["{$this->table->name}_action"] = 'S';
     $this->AddSection("{$this->table->name}_form", $this->form, array('table' => &$this->table, 'url' => $url, 'submit' => $submit));
 }