Esempio n. 1
0
$rep_tab->addOption('border', 0);
// --------------
switch ($config) {
    case 1:
        $rep_form = bar_report_form();
        break;
    case 2:
        $rep_form = bar_report_form2();
        break;
    case 3:
        $rep_form = bar_report_form3();
        break;
    default:
        $rep_form = bar_report_form();
}
$form = create_filter(S_REPORTS, NULL, $rep_form, 'report_form', get_profile('web.report6.filter.state', 1));
$form->Show();
if (isset($_REQUEST['report_show'])) {
    $src = 'chart_bar.php?config=' . $_REQUEST['config'] . url_param('title') . url_param('xlabel') . url_param('ylabel') . url_param('scaletype') . url_param('avgperiod') . url_param('showlegend') . url_param('sorttype') . url_param('report_timesince') . url_param('report_timetill') . url_param('periods') . url_param('items') . url_param('hostids') . url_param('groupids') . url_param('palette') . url_param('palettetype');
    $rep_tab->addRow(create_hat(S_REPORT, new CImg($src, 'report'), null, 'hat_report', get_profile('web.report6.hats.hat_report.state', 1)));
}
$outer_table = new CTable();
$outer_table->addOption('border', 0);
$outer_table->addOption('width', '100%');
$outer_table->setCellPadding(1);
$outer_table->setCellSpacing(1);
$tmp_row = new CRow($rep_tab);
$tmp_row->addOption('align', 'center');
$outer_table->addRow($tmp_row);
$outer_table->Show();
include_once 'include/page_footer.php';
Esempio n. 2
0
 private function makeRow($id)
 {
     $table = new CTable();
     $table->setCellSpacing(0);
     $table->setCellPadding(0);
     $table->addOption('border', '0');
     $table->addOption('height', '100%');
     $tr = $this->makeSImgStr($id);
     $td = new CCol($this->tree[$id]['caption']);
     $td->addOption('style', 'height: 100%; vertical-align: top; white-space: normal; padding-right: 10px; padding-left: 2px;');
     $tr->addItem($td);
     $table->addRow($tr);
     $tr = new CRow();
     $tr->addItem($table);
     $tr->addOption('id', 'id_' . $id);
     $tr->addOption('style', $this->tree[$id]['parentid'] != '0' ? 'display: none;' : '');
     foreach ($this->fields as $key => $value) {
         $td = new CCol($this->tree[$id][$value]);
         $td->addOption('style', ' padding-right: 10px; padding-left: 2px;');
         $tr->addItem($td);
     }
     return $tr;
 }
Esempio n. 3
0
function show_history($itemid, $from, $stime, $period)
{
    //$till=date(S_DATE_FORMAT_YMDHMS,time(NULL)-$from*3600);
    //show_table_header(S_TILL.SPACE.$till.' ( '.zbx_date2age($stime,$stime+$period).' )');
    $td = new CCol(get_js_sizeable_graph('graph', 'chart.php?itemid=' . $itemid . url_param($from, false, 'from') . url_param($stime, false, 'stime') . url_param($period, false, 'period')));
    $td->addOption('align', 'center');
    $tr = new CRow($td);
    $tr->addOption('bgcolor', '#dddddd');
    $table = new CTable();
    $table->addOption('width', '100%');
    $table->addOption('bgcolor', '#cccccc');
    $table->addOption('cellspacing', '1');
    $table->addOption('cellpadding', '3');
    $table->addRow($tr);
    $table->show();
}