* @version $Id$ * @access public * @license http://opensource.org/licenses/gpl-3.0.html */ //////////// Check Inclusion de pages //////////// if (!class_exists('auth')){ include_once("../lib/lib_common.php"); ReloadIndex('admin'); } //////////// //////////// Check Droits utilisateur //////////// if (!$l21auth->hasRight('dashboard') && !$l21auth->hasRight('project')) ReloadIndex('admin'); //////////// $plug = new plugin(getCurrentPluginFolder(__FILE__)); // headerAddCSS($plug->getVar('relative_url') .'css/style.css'); addDynamicCSS($plug->getVar('relative_url').'/css/style.css'); footerAddJS('../lib/js/chroma.js/chroma.min.js'); // We prepare the JS content $js = ''; footerAddInlineJS($js); include_once("../lib/input_helpers.php"); include_once("../dashboard/common.php"); // mapping on indicators id - should be dynamic !!!!! // default values $mapping = array('conso-ener' => 10, 'beges' => 2, 'atmo-nox' => 3, 'atmo-pm10' => 4, 'atmo-pm25' => 5, 'atmo-cov' => 6, 'atmo-so2' => 7, 'atmo-nh3' => 8, 'enr-elec' => 9, 'enr-chal' => 10, 'enr-biomethane' => 11, 'enr-biocarburant' => 12, 'sequestration' => 13); // override values with user values include_once($plug->getVar('relative_url').'override/dashboard/user-mapping.php'); $indicatorsColors = array(); // array of all colors // we check if defined colors are set for given indicator in public theme if(file_exists(THEME_PUBLIC_PATH.'indicators-colors.php')) { foreach ($mapping as $k => $v) { $indicator[0]['sdii_id'] = $v; // we prepare data to compare with content in 'indicators-colors.php' if(isset($obj['indicator-colors'])) unset($obj['indicator-colors']); // we delete object before testing on indicators id include(THEME_PUBLIC_PATH.'indicators-colors.php'); if(isset($obj['indicator-colors'])) $indicatorsColors[$k] = $obj['indicator-colors']; } } $atmo = array('NOx' => $mapping['atmo-nox'], 'PM10' => $mapping['atmo-pm10'], 'PM25' => $mapping['atmo-pm25'], 'COV' => $mapping['atmo-cov'], 'S02' => $mapping['atmo-so2'], 'NH3' => $mapping['atmo-nh3']); $atmoseries = array(); $sectors = array('résidentiel', 'tertiaire', 'transport routier', 'autres transports', 'agriculture', 'déchets', 'industrie (hors branche énergie)', 'industrie (branche énergie)'); if (!isset($_GET['scale_id']) && !isset($_POST['scale_id'])) { $scale_id = 1; } else { if (isset($_POST['scale_id'])) $scale_id = $_POST['scale_id']; if (isset($_GET['scale_id'])) $scale_id = $_GET['scale_id']; } $indicators = array(); echo ''; ?>

'; } foreach($indicators as $key) { // echo $key. '
'; print_r( $key['infos']) ; echo '

'; print_r( $key['value']) ; echo '



';; } * */ $atmo_unit = 't.'; // for tonne ?>

[]

NOx PM10 PM25 COV SO2 NH3

[]