ossim_valid($winfo['asset'], OSS_HEX, OSS_SCORE, OSS_ALPHA, OSS_USER, 'illegal:' . _("Asset/User/Entity")); if (is_array($chart_info) && !empty($chart_info)) { $validation = get_array_validation(); foreach ($chart_info as $key => $val) { if ($validation[$key] == '') { continue; } eval("ossim_valid(\"\$val\", " . $validation[$key] . ", 'illegal:" . _($key) . "');"); } } if (ossim_error()) { die(ossim_error()); } //End of validation. $assets_filters = array(); $assets_filters = get_asset_filters($conn, $winfo['asset']); //Variables to store the chart information $data = array(); //The widget's data itself. $label = array(); //Widget's label such as legend in charts, titles in tag clouds, etc... $links = array(); //Links of each element of the widget. /* * * The code below is copied from /panel and will have to be adapted to the new DB structutre of the 4.0 version, that's why it is not commented. * */ session_write_close(); //Now the widget's data will be calculated depending of the widget's type. switch ($type) {
$winfo = get_widget_data($conn, $id); //Check it out in widget_common.php $assets = $winfo['asset']; //Params of the widget representation, this is: type of chart, legend params, etc. $speed = $winfo['refresh']; $speed = empty($speed) ? 2000 : $speed * 1000; } //Validation ossim_valid($assets, OSS_HEX, OSS_SCORE, OSS_ALPHA, OSS_USER, 'illegal:' . _('Asset/User/Entity')); ossim_valid($speed, OSS_DIGIT, 'illegal:' . _('Refresh period')); if (ossim_error()) { die(ossim_error()); } //End of validation. $assets_filters = array(); $assets_filters = get_asset_filters($conn, $assets); //session_write_close(); if (GET('modo') == "responder") { // Timezone correction $tz = Util::get_timezone(); $tzc = Util::get_tzc($tz); //Plugins $plugins = ""; $plgs = explode(",", GET('plugins')); foreach ($plgs as $encoded) { $p_id = base64_decode($encoded); ossim_valid($p_id, OSS_DIGIT, 'illegal:' . _('Plugin ID')); if (!ossim_error()) { $plugins .= ',' . $p_id; } }