function get_table_header($columnLeft, $columnRights = SPACE)
{
    if (isset($_REQUEST['print'])) {
        hide_form_items($columnLeft);
        hide_form_items($columnRights);
        if ($columnLeft == SPACE && $columnRights == SPACE) {
            return new CJSscript('');
        }
    }
    $rights = array();
    if ($columnRights) {
        if (!is_array($columnRights)) {
            $columnRights = array($columnRights);
        }
        foreach ($columnRights as $columnRight) {
            $rights[] = new CDiv($columnRight, 'floatright');
        }
        $rights = array_reverse($rights);
    }
    $table = new CTable(null, 'ui-widget-header ui-corner-all header maxwidth');
    $table->setCellSpacing(0);
    $table->setCellPadding(1);
    $table->addRow(array(new CCol($columnLeft, 'header_l left'), new CCol($rights, 'header_r right')));
    return $table;
}
Esempio n. 2
0
function get_table_header($col1, $col2 = SPACE)
{
    if (isset($_REQUEST['print'])) {
        hide_form_items($col1);
        hide_form_items($col2);
        //if empty header than do not show it
        if ($col1 == SPACE && $col2 == SPACE) {
            return new CScript('');
        }
    }
    $table = new CTable(NULL, 'header');
    //		$table->addOption('border',0);
    $table->setCellSpacing(0);
    $table->setCellPadding(1);
    $td_r = new CCol($col2, 'header_r');
    $td_r->addOption('align', 'right');
    $table->addRow(array(new CCol($col1, 'header_l'), $td_r));
    return $table;
}
Esempio n. 3
0
 private function createHeaderRow($col1, $col2 = SPACE)
 {
     if (isset($_REQUEST['print'])) {
         hide_form_items($col1);
         hide_form_items($col2);
         //if empty header than do not show it
         if ($col1 === SPACE && $col2 === SPACE) {
             return new CJSscript('');
         }
     }
     $td_r = new CCol($col2, 'header_r');
     $td_r->setAttribute('align', 'right');
     $row = array(new CCol($col1, 'header_l'), $td_r);
     return $row;
 }
Esempio n. 4
0
function get_table_header($col1, $col2 = SPACE)
{
    if (isset($_REQUEST['print'])) {
        hide_form_items($col1);
        hide_form_items($col2);
        //if empty header than do not show it
        if ($col1 == SPACE && $col2 == SPACE) {
            return new CJSscript('');
        }
    }
    $td_l = new CCol(SPACE, 'header_r');
    $td_l->setAttribute('width', '100%');
    $right_row = array($td_l);
    if (!is_null($col2)) {
        if (!is_array($col2)) {
            $col2 = array($col2);
        }
        foreach ($col2 as $num => $r_item) {
            $right_row[] = new CCol($r_item, 'header_r');
        }
    }
    $right_tab = new CTable(null, 'nowrap');
    $right_tab->setAttribute('width', '100%');
    $right_tab->addRow($right_row);
    $table = new CTable(NULL, 'header');
    //		$table->setAttribute('border',0);
    $table->setCellSpacing(0);
    $table->setCellPadding(1);
    $td_r = new CCol($right_tab, 'header_r');
    $td_r->setAttribute('align', 'right');
    $table->addRow(array(new CCol($col1, 'header_l'), $td_r));
    return $table;
}
Esempio n. 5
0
 public function setFooter($value = NULL, $class = 'footer')
 {
     if (isset($_REQUEST['print'])) {
         hide_form_items($value);
     }
     if (is_null($class)) {
         $class = $this->footerClass;
     }
     $this->footer = $this->prepareRow($value, $class);
     $this->footer = $this->footer->toString();
 }
Esempio n. 6
0
 private function createHeader($col1, $col2 = null)
 {
     if (isset($_REQUEST['print'])) {
         hide_form_items($col1);
         hide_form_items($col2);
         //if empty header than do not show it
         if ($col1 == SPACE && $col2 == SPACE) {
             return new CScript('');
         }
     }
     $table = new CTable(NULL, 'header');
     //		$table->setAttribute('border',1);
     $table->setCellSpacing(0);
     $table->setCellPadding(1);
     if (!is_null($col2)) {
         $td_r = new CCol($col2, 'header_r');
         $td_r->setAttribute('align', 'right');
         $table->addRow(array(new CCol($col1, 'header_l'), $td_r));
     } else {
         $td_c = new CCol($col1, 'header_c');
         $td_c->setAttribute('align', 'center');
         $table->addRow($td_c);
     }
     return $table;
 }