function _overviewAssignTemplates()
 {
     if ($this->db_res->numRows() > 0) {
         include_once 'HTML/Table.php';
         $this->tpl->setCurrentBlock("COMPOUND");
         while ($row = $this->db_res->fetchrow(DB_FETCHMODE_OBJECT)) {
             $tbl = new HTML_Table('class="overview"');
             $tbl->addRow(array($this->lang->translate('name'), '<a class="$this->color" href="' . url(array('module' => 'compound', 'action' => 'details', 'id' => $row->mixid)) . '">' . $row->{"mischname_" . LC_LANG} . "</a>"));
             $tbl->addRow(array($this->lang->translate('category'), $row->{"mischkatname_" . LC_LANG}));
             $tbl->addRow(array('M100', $row->m100));
             $tbl->addRow(array('M300', $row->m300));
             $tbl->addRow(array('TS', $row->ts));
             $tbl->addRow(array('EAB', $row->eab));
             $tbl->addRow(array('Rebound', $row->rebound));
             $tbl->addRow(array('Shore A', $row->shore_a));
             $tbl->addRow(array('SG', $row->sg));
             $tbl->setColAttributes(0, 'width="100"');
             $tbl->setColAttributes(1, 'width="300"');
             $row1Style = array('class' => 'overview');
             $row2Style = array('class' => 'overviewalternate');
             $tbl->altRowAttributes(0, $row1Style, $row2Style);
             $this->tpl->setVariable("TABLE", $tbl->toHTML());
             $this->tpl->parseCurrentBlock();
         }
     }
     include_once 'HTML/Select.php';
     $this->tpl->setVariable("FRM_URL", url(array('module' => 'compound', 'action' => 'browse')));
     $query = "select* from " . $this->cfg['table']['cat_compound'];
     $this->db_res = $this->db_con->Query($query);
     $select = new HTML_Select('frm_category');
     if (!$frm_category) {
         $frm_category = 1;
     }
     $select->loadDbResult($this->db_res, "name_" . LC_LANG, 'id');
     $this->tpl->setVariable("SELECT", $select->toHTML());
     $this->tpl->setVariable("LC_SELECT_CATEGORY", $this->lang->translate('select_category'));
     $this->tpl->setvariable("HEADING", $this->lang->translate('compound'));
     $this->tpl->setVariable("CATEGORY_COLOR", $this->color);
 }
Example #2
0
 /**
  * Class constructor
  *
  * @param     string    $name       (optional)Name attribute of the SELECT
  * @param     int       $size       (optional) Size attribute of the SELECT
  * @param     mixed     $attributes (optional)Either a typical HTML attribute string
  *                                  or an associative array
  * @param     int       $tabOffset  (optional)Number of tabs to offset HTML source
  * @access    public
  * @return    void
  * @throws
  */
 function dmHTML_Select($name = '', $size = 1, $attributes = null, $tabOffset = 0)
 {
     parent::HTML_Select($name, $size, false, $attributes, $tabOffset);
 }