* @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')) ReloadIndex('admin');
////////////
include_once("../lib/input_helpers.php");
include_once("../dashboard/common.php");
include_once("../dashboard/display.php");
include_once(override('../level/display.php', THEME_ADMIN_PATH));
include_once('../class/class.tag.php');
// getting tags menu filter
$otag = new tag();
$tags =$otag->getTags('indicator', -1, false);
$filter_menu = getMenuFilter($tags);
$firstlevels = $sql_object->DBSelect(SQL_getLevelsList(true));
$sdi = $sql_object -> DBSelect(SQL_getListSdi("R", 0));
$bdd_nb_sdi = get_unique_indicators($sdi, true);
$sdi = add_root_level($sdi, 'sdii_level', 'level_root'); // we add extra field with level root
// Number of records
$bdd_nb_sdi_display = '' .$bdd_nb_sdi['count'] .' ' . _t('sdi','nb_total').'
'. PHP_EOL;
$link_list_scale=$rub_link."&todo=list&scale_id=";
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'];
}
$resultscale2 = $sql_object -> DBSelect(SQL_getonescale($scale_id));
function getIndicatorsTable($levels, $indicators, $scale_id, $status, $sql_object) {
global $rub_link;
$sdi_object= new sdi;
if($status=='all') $test = true;
if($status=='attached') $test='Y';
if($status=='not-attached') $test='N';
$listing = '
'.mb_ucfirst(_t('dashboard','graphic_value')).' | ' . PHP_EOL; $listing .= ''.mb_ucfirst(_t('dashboard','label_value')).' | ' . PHP_EOL; $listing .= '' . PHP_EOL; $listing .= ' |
"; $listing.= getViz($sql_object, $scale_id, $indicators[$j], $threshold_value); $listing .= " | "; $listing.="";
$listing.="".formatTextli($indicators[$j]['sdii_name'])."";
if($sclass == 'strategic') $listing .= '' . PHP_EOL;
if(!empty($display_tags)) $listing.= " ";
if($indicators[$j]['sdii_type'] != 'not-set') $listing.=''.formatText(mb_ucfirst($GLOBALS['lang']['sdi']['select_type'][$indicators[$j]['sdii_type']]), '2HTML').'';
if ($indicators[$j]['sdii_statut']=='D') $listing.=""._t('statut','draft')."\n";
$listing .= " " . formatText($indicators[$j]['level_label'], '2HTML') . " : " . formatText($indicators[$j]['level_name'], '2HTML') . " ". PHP_EOL;
$listing.=" | ". PHP_EOL;
$listing.=""; $listing.=" |