/** * Returns the array describing the database schema. * * If the $table parameter is passed, the method will return the schema for the given table, * otherwise - for the whole database. * * @static * * @throws APIException if the given table does not exist * * @param string $table * * @return array */ public static function getSchema($table = null) { if (is_null(self::$schema)) { self::$schema = (include dirname(__FILE__) . '/' . self::SCHEMA_FILE); } if (is_null($table)) { return self::$schema; } elseif (isset(self::$schema[$table])) { return self::$schema[$table]; } else { self::exception(self::SCHEMA_ERROR, _s('Table "%1$s" does not exist.', $table)); } }
$link = $linkid; $newlink = array('values' => array('name' => $linkoptions['linkname']), 'where' => array('id' => $link)); $res = DBimap::update('hosts_links', array($newlink)); $res = DBimap::delete('hosts_links_settings', array('ids' => array($link))); $res = DBimap::insert('hosts_links_settings', array(array('ids' => $link, 'color' => $linkoptions['linkcolor'], 'weight' => $linkoptions['linkweight'], 'opacity' => $linkoptions['linkopacity']))); $responseData = json_encode(array('result' => htmlspecialchars($res), 'linkoptions' => $linkoptions), FALSE); echo $responseData; exit; } if ($action_ajax == 'del_link') { if (!rightsForLink($linkid)) { rightsErrorAjax(); } $link = $linkid; $res = DBimap::delete('hosts_links_settings', array('ids' => array($link))); $res = DBimap::delete('hosts_links', array('id' => array($link))); $responseData = json_encode(array('result' => TRUE), FALSE); echo $responseData; exit; } } if ($output != 'block') { /* * Display */ //$displayNodes = (is_show_all_nodes() && $pageFilter->groupid == 0 && $pageFilter->hostid == 0); // $showTriggers = $_REQUEST['show_triggers']; // $showEvents = $_REQUEST['show_events']; // $ackStatus = $_REQUEST['ack_status']; $triggerWidget = new CWidget(); $rightForm = new CForm('get');