array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, DB_ID, NULL), "fullscreen"=> array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1"), NULL), //ajax 'favobj'=> array(T_ZBX_STR, O_OPT, P_ACT, NULL, NULL), 'favid'=> array(T_ZBX_STR, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'state'=> array(T_ZBX_INT, O_OPT, P_ACT, NOT_EMPTY, 'isset({favobj})'), 'action'=> array(T_ZBX_STR, O_OPT, P_ACT, IN("'add','remove'"),NULL) ); check_fields($fields); ?> AddOption('title',S_REMOVE_FROM.' '.S_FAVORITES); $icon->AddAction('onclick',new CScript("javascript: rm4favorites('sysmapid','".$_REQUEST["sysmapid"]."',0);")); } else{ $icon = new CDiv(SPACE,'iconplus'); $icon->AddOption('title',S_ADD_TO.' '.S_FAVORITES); $icon->AddAction('onclick',new CScript("javascript: add2favorites('sysmapid','".$_REQUEST["sysmapid"]."');")); } $icon->AddOption('id','addrm_fav'); $url = '?sysmapid='.$_REQUEST['sysmapid'].($_REQUEST['fullscreen']?'':'&fullscreen=1'); $fs_icon = new CDiv(SPACE,'fullscreen'); $fs_icon->AddOption('title',$_REQUEST['fullscreen']?S_NORMAL.' '.S_VIEW:S_FULLSCREEN); $fs_icon->AddAction('onclick',new CScript("javascript: document.location = '".$url."';")); } $form = new CForm(); $form->SetMethod('get'); $form->AddVar("fullscreen",$_REQUEST["fullscreen"]); $cmbMaps = new CComboBox("sysmapid",get_request("sysmapid",0),"submit()"); foreach($all_maps as $id => $name){ $cmbMaps->AddItem($id, $name); } if($cmbMaps->ItemsCount()>0){ $form->AddItem($cmbMaps); } $p_elements[] = get_table_header($text,$form); ?> AddRow($action_map); $imgMap = new CImg("map.php?noedit=1&sysmapid=".$_REQUEST["sysmapid"]); $imgMap->SetMap($action_map->GetName()); $table->AddRow($imgMap); } $p_elements[] = $table; $latest_hat = create_hat( S_NETWORK_MAPS_BIG, $p_elements, array($icon,$fs_icon), 'hat_maps', get_profile('web.maps.hats.hat_maps.state',1) ); $latest_hat->Show(); ?>