* @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");
$result = $sql_object->DBSelect($req_list_theme);
$sdi_object = new sdi;
$req_sdi = SQL_getListSdi($filter = "R", $valueparam = 0);
$result_sdi = $sql_object->DBSelect($req_sdi);
$finalities = $sql_object->DBSelect(SQL_getSDThemes());
$select_format = selectBox($lang['export']['format'], "format_report", strtolower($lang['export']['format']['pdf']));
/**
* DEBUG_informations
* to access debug informations
* uncomment code and change the value
* of form action to post data
* on the same page
*/
/**
if (isset($_POST['valider'])) {
if (isset($_POST['graphic'])) $graphic = 1;
else $graphic = 'N';
if (isset($_POST['table_value'])) $table_value = $_POST['table_value'];
else $table_value = 'non';
if (isset($_POST['notpublished'])) $notpublished = $_POST['notpublished'];
else $notpublished = 'N';
if (isset($_POST['provider'])) $provider = $_POST['provider'];
else $provider = 'N';
if (isset($_POST['reglementation'])) $reglementation = $_POST['reglementation'];
else $reglementation = 'N';
if (isset($_POST['evaluation'])) $evaluation = $_POST['evaluation'];
else $evaluation = 'N';
if ($_POST['scale']=='det')
{
print_r($_POST['eachscale']);
}
else echo "scale ALL
\n";
if ($_POST['sdi']=='det')
{
while (list(, $value) = each ($_POST['eachsdi'])) {
echo "sdi Valeur: $value
\n";
}
}
else echo "sdi ALL
\n";
$report_title = $_POST['title_report'];
$report_author = $_POST['author'];
$report_mail = $_POST['mail_author'];
$report_service = $_POST['service_author'];
$report_adress = $_POST['adresse_author'];
echo "
" . $graphic;
echo "
" . $table_value;
echo "
" . $notpublished;
echo "
" . $provider;
echo "
" . $reglementation;
echo "
" . $evaluation;
echo "
" . $report_title;
echo "
" . $report_author;
echo "
" . $report_mail;
echo "
" . $report_service;
echo "
" . $report_adress;
echo "
" . $_POST['scale'];
echo "
" . $_POST['sdi'];
}
*/
if (!isset($_REQUEST['scale_id'])) {
$scale_id = 1;
} else {
$scale_id = $_REQUEST['scale_id'];
}
// Finalities filter
$finalities_filter = '
';
$finalities_filter .= '
'._t('dashboard','select_by_finalities').'
';
$js = '';
foreach ($finalities as $finality) {
$finalities_filter .= '
'. formatText($finality['sdtheme_name'], '2HTML'). ' ';
$js .= "$('#filter-finality-".$finality['sdtheme_id']."').click(function() {
if($(this).hasClass('selected')) {
$('li.finality-".$finality['sdtheme_id']." > input:checkbox').removeAttr('checked');
$(this).find('i').replaceWith('
');
$(this).removeClass('selected');
} else {
$('li.finality-".$finality['sdtheme_id']." > input:checkbox').attr('checked', 'checked');
$(this).find('i').replaceWith('
');
$(this).addClass('selected');
}
return false;
});";
}
$finalities_filter .= '
';
footerAddInlineJS($js);
// Attached to dashboard filter
// Finalities filter
$attached_filter = '';
$attached_filter .= '
'._t('dashboard','select_by_association').'
';
$attached_filter .= '
'. _t('dashboard','indicator-attached'). ' ';
$attached_filter .= '
'. _t('dashboard','indicator-not-attached'). '';
$attached_filter .= '
';
$js = "$('#filter-attached').click(function() {
if($(this).hasClass('selected')) {
$('li.attached-to-dashboard > input:checkbox').removeAttr('checked');
$(this).find('i').replaceWith('');
$(this).removeClass('selected');
} else {
$('li.attached-to-dashboard > input:checkbox').attr('checked', 'checked');
$(this).find('i').replaceWith('');
$(this).addClass('selected');
}
return false;
});
$('#filter-not-attached').click(function() {
if($(this).hasClass('selected')) {
$('li.not-attached-to-dashboard > input:checkbox').removeAttr('checked');
$(this).find('i').replaceWith('');
$(this).removeClass('selected');
} else {
$('li.not-attached-to-dashboard > input:checkbox').attr('checked', 'checked');
$(this).find('i').replaceWith('');
$(this).addClass('selected');
}
return false;
});
";
footerAddInlineJS($js);
$listing = "";
// affichage liste échelle
$resultscale = $sql_object->DBSelect($req_list_scale);
$listing .= "" . _t('dashboard','rap_scale_choice') . "
";
$listing .= "\n";
$listing .= "\n";
$listing .= "
\n";
$listing .= "
\n";
$js = "$('#scale_all').click(function() {
$('#display_scale').slideUp();
});
$('#scale_det').click(function() {
$('#display_scale').slideDown();
});";
footerAddInlineJS($js);
// affichage liste indicateur en fonction des thèmes
$current_sdtheme = '';
$listing .= "" . _t('dashboard','rap_sdi_choice') . "
";
$listing .= "\n";
$listing .= "\t
\n";
$listing .= "
\n";
$listing .= "\n";
$listing .= "
\n";
$listing .= "
" . _t('common', 'select') . " :
";
$listing .= $attached_filter;
$listing .= $finalities_filter;
$listing .= "\n";
$listing .= "
\n";
$listing .= "
\n";
$js = "$('#sdi_all').click(function() {
$('#display_sdi').slideUp();
});
$('#sdi_det').click(function() {
$('#display_sdi').slideDown();
});";
footerAddInlineJS($js);
// affichage liste infos
$listing .= "" . _t('dashboard','rap_comp_choice') . "
";
$listing .= "\n";
$listing .= "\t
\n";
$listing .= "
\n";
?>