コード例 #1
0
ファイル: htmlobject.inc.php プロジェクト: kelubo/OpenQRM
 function get_table_bottom()
 {
     $tr = '';
     if (isset($this->bottom[0])) {
         $tr = new htmlobject_tr();
         $tr->css = 'htmlobject_tr';
         $tr->id = 'tr_' . uniqid();
         $td = new htmlobject_td();
         $td->colspan = $this->_num_cols;
         $td->type = 'td';
         $td->css = 'htmlobject_td bottom';
         $str = '';
         foreach ($this->bottom as $key_2 => $v) {
             $html = new htmlobject_input();
             $html->name = 'action';
             $html->value = $v;
             $html->type = 'submit';
             $str .= $html->get_string();
         }
         $str .= join("", $this->_identifiers);
         $td->text = $str;
         $tr->add($td);
     }
     return $tr;
 }
コード例 #2
0
 function get_string()
 {
     $_strReturn = '';
     // build table
     $this->init_table_builder();
     // build additional table head
     foreach ($this->_headrow as $row) {
         $row->arr_tr[0]->colspan = $this->_num_cols;
         htmlobject_table::add($row);
     }
     // build sort functions
     if ($this->sort != '') {
         $td = new htmlobject_td();
         $td->colspan = $this->_num_cols;
         $td->type = 'td';
         $td->css = $this->css_prefix . 'td pageturn_head';
         $tr = new htmlobject_tr();
         $tr->css = $this->css_prefix . 'tr pageturn_head';
         $tr->id = 'tr_' . uniqid();
         $td->text = $this->get_sort() . $this->get_pageturn();
         $tr->add($td);
         htmlobject_table::add($tr);
     }
     // build table head
     htmlobject_table::add($this->get_table_head());
     // build table body
     $i = 'odd';
     foreach ($this->_body as $key => $value) {
         htmlobject_table::add($this->get_table_body($key, $value, $i));
         if ($i == 'odd') {
             $i = 'even';
         } else {
             $i = 'odd';
         }
     }
     // build table bottom
     htmlobject_table::add($this->get_table_bottom());
     // insert bottom pageturn
     if (count($this->_body) > 9 && $this->limit < $this->max && $this->sort != '') {
         $td = new htmlobject_td();
         $td->colspan = $this->_num_cols;
         $td->type = 'td';
         $td->css = $this->css_prefix . 'td pageturn_bottom';
         $tr = new htmlobject_tr();
         $tr->css = $this->css_prefix . 'tr pageturn_bottom';
         $tr->id = 'tr_' . uniqid();
         $td->text = $this->get_pageturn();
         $tr->add($td);
         htmlobject_table::add($tr);
     }
     foreach ($this->_bottomrow as $row) {
         $row->arr_tr[0]->colspan = $this->_num_cols;
         htmlobject_table::add($row);
     }
     // build form
     $_strReturn = $this->get_js();
     $this->form_action != '' ? $_strReturn .= '<form action="' . $this->form_action . '" method="GET">' : null;
     $_strReturn .= htmlobject_table::get_string();
     $this->form_action != '' ? $_strReturn .= '</form>' : null;
     return $_strReturn;
 }