function media_severity2str($severity) { insert_showhint_javascript(); $mapping = array(0 => array('letter' => 'N', 'style' => $severity & 1 ? 'enabled' : NULL), 1 => array('letter' => 'I', 'style' => $severity & 2 ? 'enabled' : NULL), 2 => array('letter' => 'W', 'style' => $severity & 4 ? 'enabled' : NULL), 3 => array('letter' => 'A', 'style' => $severity & 8 ? 'enabled' : NULL), 4 => array('letter' => 'H', 'style' => $severity & 16 ? 'enabled' : NULL), 5 => array('letter' => 'D', 'style' => $severity & 32 ? 'enabled' : NULL)); foreach ($mapping as $id => $map) { $result[$id] = new CSpan($map['letter'], $map['style']); $result[$id]->SetHint(get_severity_description($id) . " (" . (isset($map['style']) ? "on" : "off") . ")"); } return $result; }
public function setHint($text, $width = '', $class = '') { if (empty($text)) { return false; } insert_showhint_javascript(); $text = unpack_object($text); if ($width != '' || $class != '') { $code = "show_hint_ext(this,event,'" . $text . "','" . $width . "','" . $class . "');"; } else { $code = "show_hint(this,event,'" . $text . "');"; } $this->addAction('onMouseOver', $code); $this->addAction('onMouseMove', 'update_hint(this,event);'); }
} /* POSTGRESQL */ if (zbx_is_callable(array('pg_pconnect', 'pg_fetch_array', 'pg_fetch_row', 'pg_exec', 'pg_getlastoid'))) { $ZBX_CONFIG['allowed_db']['POSTGRESQL'] = 'PostgreSQL'; } /* ORACLE */ if (zbx_is_callable(array('ocilogon', 'ocierror', 'ociparse', 'ociexecute', 'ocifetchinto'))) { $ZBX_CONFIG['allowed_db']['ORACLE'] = 'Oracle'; } /* SQLITE3 */ if (zbx_is_callable(array('sqlite3_open', 'sqlite3_close', 'sqlite3_query', 'sqlite3_error', 'sqlite3_fetch_array', 'sqlite3_query_close', 'sqlite3_exec'))) { $ZBX_CONFIG['allowed_db']['SQLITE3'] = 'SQLite3'; } if (count($ZBX_CONFIG['allowed_db']) == 0) { $ZBX_CONFIG['allowed_db']['no'] = 'No'; } global $ZBX_SETUP_WIZARD; $ZBX_SETUP_WIZARD = new CSetupWizard($ZBX_CONFIG); zbx_set_post_cookie('ZBX_CONFIG', serialize($ZBX_CONFIG)); include_once 'include/page_header.php'; global $ZBX_CONFIGURATION_FILE; if (file_exists($ZBX_CONFIGURATION_FILE)) { if (isset($_REQUEST['message'])) { show_error_message($_REQUEST['message']); } } insert_showhint_javascript(); echo SBR; $ZBX_SETUP_WIZARD->Show(); unset($_POST); include_once 'include/page_footer.php';
public function setHint($text, $width = '', $class = '', $byclick = true) { if (empty($text)) { return false; } insert_showhint_javascript(); $text = unpack_object($text); $this->addAction('onmouseover', "javascript: hintBox.showOver(event,this,'" . $text . "','" . $width . "','" . $class . "');"); $this->addAction('onmouseout', "javascript: hintBox.hideOut(event,this);"); if ($byclick) { $this->addAction('onclick', "javascript: hintBox.onClick(event,this,'" . $text . "','" . $width . "','" . $class . "');"); } }