예제 #1
0
파일: sysmap.php 프로젝트: phedders/zabbix
            $table->addRow(array(new CLink('link ' . $i++, 'sysmap.php?sysmapid=' . $_REQUEST['sysmapid'] . '&form=update&linkid=' . $row['linkid'], 'action'), $label1, $label2, $description));
        }
        $table->Show();
    }
}
show_messages();
echo SBR;
$map = get_sysmap_by_sysmapid($_REQUEST['sysmapid']);
show_table_header($map['name']);
$table = new CTable(NULL, 'map');
if (isset($_REQUEST['sysmapid'])) {
    $linkMap = new CMap('links' . $_REQUEST['sysmapid'] . '_' . rand(0, 100000));
    $db_elements = DBselect('select * from sysmaps_elements where sysmapid=' . $_REQUEST['sysmapid']);
    while ($db_element = DBfetch($db_elements)) {
        $tmp_img = get_png_by_selementid($db_element['selementid']);
        if (!$tmp_img) {
            continue;
        }
        $x1_ = $db_element['x'];
        $y1_ = $db_element['y'];
        $x2_ = $db_element['x'] + imagesx($tmp_img);
        $y2_ = $db_element['y'] + imagesy($tmp_img);
        $linkMap->addRectArea($x1_, $y1_, $x2_, $y2_, 'sysmap.php?form=update&sysmapid=' . $_REQUEST['sysmapid'] . '&selementid=' . $db_element['selementid'], $db_element['label']);
    }
    $imgMap = new CImg('map.php?sysmapid=' . $_REQUEST['sysmapid']);
    $imgMap->setMap($linkMap->GetName());
    $table->addRow($linkMap);
    $table->addRow($imgMap);
}
$table->Show();
include_once 'include/page_footer.php';