array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1"), null), // 0 - screens, 1 - slides "elementid"=> array(T_ZBX_INT, O_OPT, P_SYS|P_NZERO, DB_ID,NULL), "step"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535),NULL), "dec"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535*65535),NULL), "inc"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535*65535),NULL), "from"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535*65535),NULL), "left"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535*65535),NULL), "right"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0,65535*65535),NULL), "period"=> array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(ZBX_MIN_PERIOD,ZBX_MAX_PERIOD),NULL), "stime"=> array(T_ZBX_STR, O_OPT, P_SYS, NULL,NULL), "action"=> array(T_ZBX_STR, O_OPT, P_SYS, IN("'go'"),NULL), "reset"=> array(T_ZBX_STR, O_OPT, P_SYS, IN("'reset'"),NULL), "fullscreen"=> array(T_ZBX_INT, O_OPT, P_SYS, IN("0,1,2"), NULL) ); check_fields($fields); $config = $_REQUEST['config'] = get_request('config', 0); if( 2 != $_REQUEST["fullscreen"] ) update_profile('web.screens.config', $_REQUEST['config']); ?> = ZBX_MIN_PERIOD) { update_profile('web.screens'.$_REQUEST['elementid'].'.period',$_REQUEST['period']); } ?> AddVar("fullscreen",$_REQUEST["fullscreen"]); $cmbConfig = new CComboBox('config', $config, 'submit()'); $cmbConfig->AddItem(0, S_SCREENS); $cmbConfig->AddItem(1, S_SLIDESHOWS); $form->AddItem($cmbConfig); $cmbElements = new CComboBox("elementid",$elementid,"submit()"); unset($screen_correct); unset($first_screen); if( 0 == $config ) { $result = DBselect("select screenid as elementid,name from screens where ".DBid2nodeid("screenid")."=".$ZBX_CURNODEID." order by name"); while($row=DBfetch($result)) { if(!screen_accessiable($row["elementid"], PERM_READ_ONLY)) continue; $cmbElements->AddItem($row["elementid"],$row["name"]); if($elementid == $row["elementid"]) $element_correct = 1; if(!isset($first_element)) $first_element = $row["elementid"]; } } else { $result = DBselect("select slideshowid as elementid,name from slideshows where ".DBid2nodeid("slideshowid")."=".$ZBX_CURNODEID." order by name"); while($row=DBfetch($result)) { if(!slideshow_accessiable($row["elementid"], PERM_READ_ONLY)) continue; $cmbElements->AddItem($row["elementid"],$row["name"]); if($elementid == $row["elementid"]) $element_correct = 1; if(!isset($first_element)) $first_element = $row["elementid"]; } } if(!isset($element_correct) && isset($first_element)) { $elementid = $first_element; } if(isset($elementid)) { if( 0 == $config ) { if(!screen_accessiable($elementid, PERM_READ_ONLY)) access_deny(); $element = get_screen_by_screenid($elementid); } else { if(!slideshow_accessiable($elementid, PERM_READ_ONLY)) access_deny(); $element = get_slideshow_by_slideshowid($elementid); } if( $element ) { $url = "?elementid=".$elementid; if($_REQUEST["fullscreen"]==0) $url .= "&fullscreen=1"; $text[] = array(nbsp(" / "),new CLink($element["name"], $url)); } else { $elementid = null; update_profile("web.screens.elementid",0); } } if($cmbElements->ItemsCount() > 0) $form->AddItem($cmbElements); if( 2 != $_REQUEST["fullscreen"] ) show_table_header($text,$form); ?> Show(); $_REQUEST['elementid'] = $elementid; if( 2 != $_REQUEST["fullscreen"] ) navigation_bar("screens.php",array('config','elementid')); } else { echo unpack_object(new CTableInfo( 0 == $config ? S_NO_SCREENS_DEFINED : S_NO_SLIDESHOWS_DEFINED )); } ?>