<?php

	//-----------------------------------------------------------------------------------
	include("../M0/session_start.php") ;

	//-----------------------------------------------------------------------------------
	$p_aqcm_SONDE_PARAMS = explode( ',' , $_POST["aqcm_SONDE_PARAMS"] ) ;

	$_SESSION['MAC']						= $p_aqcm_SONDE_PARAMS[0] ;
	$_SESSION['NAME']					= $p_aqcm_SONDE_PARAMS[1] ;
	$_SESSION['SERVER_PWD']				= $p_aqcm_SONDE_PARAMS[2] ;
	
	$_SESSION['ANNEE'] 					= $_POST["aqcm_ANNEE"];
	$_SESSION['MOIS'] 					= $_POST["aqcm_MOIS"];
	$_SESSION['JOUR'] 					= $_POST["aqcm_JOUR"];
	$_SESSION['ECHELLE_TEMPS'] 		= $_POST["echelle_temps"];
	$_SESSION['SHOW_MINI_MAXI'] 		= isset($_POST["show_mini_maxi"])			? "true"	: "false";
	$_SESSION['SHOW_TOOLTIP_STATUS'] 	= isset($_POST["show_tooltip_status"])	? "true"	: "false";
	$_SESSION['SHOW_TRIGGERS_STATUS']	= isset($_POST["show_triggers"])       	? true		: false;
	$_SESSION['SCHEDULED_STATUS'] 	= isset($_POST["scheduled_status"]) 		? true		: false;
	$_SESSION['MODE_SIMPLIFIE'] 		= isset($_POST["mode_simplifie"]) 		? true		: false;
	
	$_SESSION['PRESENCE'] 				= isset($_POST["presence"]) 				? $_POST["presence"]		: "sans" ;
	$p_show_presence = ( $_SESSION['PRESENCE'] == "sans" ) ? "false" : "true" ;

	$NB_sondes = 1 ;
	$p_aqcm_SITE_ID		= $_SESSION['SITE_ID'] ;
	$p_aqcm_MAC			= $_SESSION['MAC'] ;
	$p_aqcm_NAME			= $p_aqcm_SONDE_PARAMS[1] ;
	$p_aqcm_SERVER_PWD	= $_SESSION['SERVER_PWD'] ;

	$p_annee  			= $_SESSION['ANNEE'] ;
	$p_mois   			= $_SESSION['MOIS'] ;
	$p_jour   			= $_SESSION['JOUR'] ;
	$p_echelle_temps 	= $_SESSION['ECHELLE_TEMPS'] ;

	$show_mini_maxi      = $_SESSION['SHOW_MINI_MAXI'] ;
	$show_tooltip_status = $_SESSION['SHOW_TOOLTIP_STATUS'] ;
	$scheduled_status    = $_SESSION['SCHEDULED_STATUS'] ;
	$mode_simplifie      = $_SESSION['MODE_SIMPLIFIE'] ;

	//-----------------------------------------------------------------------------------
	if ( $_SESSION['SHOW_TRIGGERS_STATUS'] ) {
		include('../M0/AQCM_get_seuils.php'); 
	} else {
		include('../M0/AQCM_hide_seuils.php'); 
	}

	//-----------------------------------------------------------------------------------
	if ( $_SESSION['SCHEDULED_STATUS'] ) {
		include ("graphiques_one_sonde_scheduled.php");
	}
	else {
		include ("graphiques_one_sonde_commun_1_from_local.php");
		include ("graphiques_one_sonde_commun_2.php");//
	}

	//-----------------------------------------------------------------------------------

?>
		


