Exemple #1
0
    $imgMap->setMap($action_map->GetName());
    $table->addRow($imgMap);
}
$icon = null;
$fs_icon = null;
if (isset($_REQUEST["sysmapid"])) {
    $sysmap = get_sysmap_by_sysmapid($_REQUEST["sysmapid"]);
    $text = $all_maps[$_REQUEST["sysmapid"]];
    if (infavorites('web.favorite.sysmapids', $_REQUEST['sysmapid'], 'sysmapid')) {
        $icon = new CDiv(SPACE, 'iconminus');
        $icon->setAttribute('title', S_REMOVE_FROM . ' ' . S_FAVOURITES);
        $icon->addAction('onclick', new CScript("javascript: rm4favorites('sysmapid','" . $_REQUEST["sysmapid"] . "',0);"));
    } else {
        $icon = new CDiv(SPACE, 'iconplus');
        $icon->setAttribute('title', S_ADD_TO . ' ' . S_FAVOURITES);
        $icon->addAction('onclick', new CScript("javascript: add2favorites('sysmapid','" . $_REQUEST["sysmapid"] . "');"));
    }
    $icon->setAttribute('id', 'addrm_fav');
    $url = '?sysmapid=' . $_REQUEST['sysmapid'] . ($_REQUEST['fullscreen'] ? '' : '&fullscreen=1');
    $fs_icon = new CDiv(SPACE, 'fullscreen');
    $fs_icon->setAttribute('title', $_REQUEST['fullscreen'] ? S_NORMAL . ' ' . S_VIEW : S_FULLSCREEN);
    $fs_icon->addAction('onclick', new CScript("javascript: document.location = '" . $url . "';"));
}
$map_wdgt->addHeader(S_NETWORK_MAPS_BIG, array($icon, $fs_icon));
if ($cmbMaps->itemsCount() > 0) {
    $form->addItem($cmbMaps);
    $map_wdgt->addHeader($text, $form);
}
$map_wdgt->addItem($table);
$map_wdgt->show();
include_once "include/page_footer.php";