<?php
/**
 * @package linea21.templates
 * @subpackage public
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */

$GLOBALS['filters'][LANGUAGE]['scale']['active'] = 1; // filter activation
SetHTMLTitle(_t('dashboard','section')); // HTML title
//////////////////////////////////////////
/////récupération des variables GET et POST
//////////////////////////////////////////
themeInclude('../dashboard/display.php');
if (isset($_REQUEST['parentid']))
{
  $sdi_id=$_REQUEST['id'];
  $scale_id=$_REQUEST['parentid'];
}
else if (isset($_REQUEST['id'])) {
  $scale_id=$_REQUEST['id'];
}
else $scale_id=1;

?>
<?php
//////////////////////////////////////////
/////affichage switch d'affichage jeune public / classique
//////////////////////////////////////////

if(!isset($_REQUEST['parentid'])) {

  if ( ActiveItemKey($GLOBALS['activeitem']) == 'dashboard') {
    DisplayListValues($scale_id, $GLOBALS['filters'][LANGUAGE]['scale']['linkvalue']);
    echo "<br />";
  }


  

} else {
  //////////////////////////////////////////
  /////affichage détail d'un indicateur
  //////////////////////////////////////////

  // set HTML Title
  $result=$GLOBALS['sql_object']->DBSelect(SQL_getOnesdiname($sdi_id));
  SetHTMLTitle(formatText($result[0]['sdii_name'], '2HTML'));
  if(isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard') DisplayOneSdi($sdi_id, $scale_id);
  if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-rules') DisplayOneSdirules($sdi_id, $scale_id);
  if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-assessment') DisplayOneSdievaluation($sdi_id, $scale_id);
  if (isset($_REQUEST['parentid']) && ActiveItemKey($GLOBALS['activeitem'])=='dashboard-provider') DisplayOneSdiprovider($sdi_id, $scale_id);
  }?> 
  

