* @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'); } //////////// include_once("../lib/input_helpers.php"); include_once(override('../level/mysql.inc.php', THEME_ADMIN_PATH)); //////////// Check Droits utilisateur //////////// if (!$l21auth->isSuperAdmin()) ReloadIndex('admin'); //////////// ?>
AddSdi($data_table_sdi, $sql_object); $result_e=$sdi_object->ModifyParam($result, $data_table_e, "E", $sql_object); $result_p=$sdi_object->ModifyParam($result, $data_table_p, "P", $sql_object); $result_r=$sdi_object->ModifyParam($result, $data_table_r, "R", $sql_object); $link_confirm="confirm.php?rub=".$rub."&todo=".$todo; if(is_numeric($result)) { // light-ui mode, we close the iframe if(!empty($http_params)) { echo ""; } else { header("Location: ".$link_confirm); } } else system_error(); } $form_type = -1; $form_dashboard_viz = -1; $form_detail_viz = -1; $form_value_type = -1; $form_name = ''; $form_level = ''; $form_statut = ''; $mask_statut_P="checked=\"checked\""; $mask_statut_D=''; $mask_dashboard="checked=\"checked\""; $mask_threshold_relative = ""; //$form_range = ''; $form_description = ''; $form_comment = ''; $form_goal = ''; $form_consulting = ''; $form_unit = ''; $form_max_value = ''; $form_min_value = ''; $form_threshold_value = ''; $form_frequency = ''; $form_e_scale_compare = ''; $form_e_fiability = ''; $form_e_accessibility = ''; $form_e_lisibility = ''; $form_e_relevance = ''; $form_e_global_performance = ''; $form_p_name = ''; $form_p_service = ''; $form_p_description = ''; $form_p_incharge = ''; $form_p_address = ''; $form_p_phone = ''; $form_p_fax = ''; $form_p_email = ''; $form_r_title = ''; $form_r_body = ''; $form_r_referer_uri = ''; $form_r_mask_uri = ''; if (isset($_POST['valider1'])) { $table[0] = $_POST['sdi_name']; $table[1] = $_POST['description']; $table[2] = $_POST['comment']; $table[3] = $_POST['sdi_level']; //$table[4] = $_POST['range']; $table[4] = 0; $table[5] = $_POST['goal']; $table[6] = $_POST['consulting']; $table[7] = $_POST['unit']; $table[8] = $_POST['max_value']; $table[9] = $_POST['min_value']; $table[10]= $_POST['threshold_value']; $table[11]= $_POST['frequency']; $table[12]= $_POST['sdi_statut']; if (isset($_POST['threshold_relative'])) { $table[32]="Y"; $mask_threshold_relative="checked=\"checked\""; } else { $table[32]="N"; $mask_threshold_relative=""; } if (isset($_POST['attached_to_dashboard'])) { $table[33]="Y"; $mask_dashboard="checked=\"checked\""; } else { $table[33]="N"; $mask_dashboard=""; } $table[34]=$_POST['sdi_type']; $table[35]=$_POST['sdi_dashboard_viz']; $table[36]=$_POST['sdi_detail_viz']; $table[37]=$_POST['sdi_value_type']; $integrity = $sdi_object -> CheckDataIntegrity_info($table); $form_type = $_POST['sdi_type']; $form_dashboard_viz = $_POST['sdi_dashboard_viz']; $form_detail_viz = $_POST['sdi_detail_viz']; $form_value_type = $_POST['sdi_value_type']; $form_name = formatText($_POST['sdi_name'], '2FIELD'); $form_level = $_POST['sdi_level']; $form_statut= $_POST['sdi_statut']; //$form_range = $_POST['range']; $form_description = formatText($_POST['description'], '2FIELD'); $form_comment = formatText($_POST['comment'], '2FIELD'); $form_goal = formatText($_POST['goal'], '2FIELD'); $form_consulting = formatText($_POST['consulting'], '2FIELD'); $form_unit = formatText($_POST['unit'], '2FIELD'); $form_max_value =$_POST['max_value']; $form_min_value = $_POST['min_value']; $form_threshold_value = $_POST['threshold_value']; $form_frequency = $_POST['frequency']; if($form_statut=='D') $mask_statut_D="checked=\"checked\""; else $mask_statut_D=''; if($form_statut=='P') $mask_statut_P="checked=\"checked\""; else $mask_statut_P=''; $table = urlencode(serialize($table)); } if (isset($_POST['enregistrer2'])) { //intégrité des étapes 2,3,4 OK $integrity2 = 1; $integrity3 = 1; $integrity4 = 1; $table[0] = $_POST['sdi_name']; $table[1] = $_POST['description']; $table[2] = $_POST['comment']; $table[3] = $_POST['sdi_level']; //$table[4] = $_POST['range']; $table[4] = 0; $table[5] = $_POST['goal']; $table[6] = $_POST['consulting']; $table[7] = $_POST['unit']; $table[8] = $_POST['max_value']; $table[9] = $_POST['min_value']; $table[10]= $_POST['threshold_value']; $table[11]= $_POST['frequency']; $table[12]= $_POST['sdi_statut']; if (isset($_POST['threshold_relative'])) { $table[32]="Y"; $mask_threshold_relative="checked=\"checked\""; } else { $table[32]="N"; $mask_threshold_relative=""; } if (isset($_POST['attached_to_dashboard'])) { $table[33]="Y"; $mask_dashboard="checked=\"checked\""; } else { $table[33]="N"; $mask_dashboard=""; } $table[34]=$_POST['sdi_type']; $table[35]=$_POST['sdi_dashboard_viz']; $table[36]=$_POST['sdi_detail_viz']; $table[37]=$_POST['sdi_value_type']; // ugly array fill-up for ($z=13;$z<31;$z++){ $table[$z]=""; } $integrity = $sdi_object -> CheckDataIntegrity_info($table); $form_type = $_POST['sdi_type']; $form_dashboard_viz = $_POST['sdi_dashboard_viz']; $form_detail_viz = $_POST['sdi_detail_viz']; $form_value_type = $_POST['sdi_value_type']; $form_name = formatText($_POST['sdi_name'], '2FIELD'); $form_level = $_POST['sdi_level']; $form_statut= $_POST['sdi_statut']; //$form_range = $_POST['range']; $form_description = formatText($_POST['description'], '2FIELD'); $form_comment = formatText($_POST['comment'], '2FIELD'); $form_goal = formatText($_POST['goal'], '2FIELD'); $form_consulting = formatText($_POST['consulting'], '2FIELD'); $form_unit = formatText($_POST['unit'], '2FIELD'); $form_max_value =$_POST['max_value']; $form_min_value = $_POST['min_value']; $form_threshold_value = $_POST['threshold_value']; $form_frequency = $_POST['frequency']; if($form_statut=='D') $mask_statut_D="checked=\"checked\""; else $mask_statut_D=''; if($form_statut=='P') $mask_statut_P="checked=\"checked\""; else $mask_statut_P=''; $table = urlencode(serialize($table)); } if (isset($_POST['valider2'])) { $integrity = 1; $table = unserialize(urldecode($_POST['table'])); $table[13] = $_POST['e_scale_compare']; $table[14] = $_POST['e_fiability']; $table[15] = $_POST['e_accessibility']; $table[16] = $_POST['e_lisibility']; $table[17] = $_POST['e_relevance']; $table[18] = $_POST['e_global_performance']; $integrity2 = $sdi_object -> CheckDataIntegrity_eval($table); $form_e_scale_compare = $_POST['e_scale_compare']; $form_e_fiability = $_POST['e_fiability']; $form_e_accessibility = $_POST['e_accessibility']; $form_e_lisibility = $_POST['e_lisibility']; $form_e_relevance = $_POST['e_relevance']; $form_e_global_performance = $_POST['e_global_performance']; $table = urlencode(serialize($table)); } if (isset($_POST['valider3'])) { $integrity = 1; $integrity2 = 1; $table = unserialize(urldecode($_POST['table'])); $table[19] = $_POST['p_name']; $table[20] = $_POST['p_service']; $table[21] = $_POST['p_description']; $table[22] = $_POST['p_incharge']; $table[23] = $_POST['p_address']; $table[24] = str_replace(' ', '', $_POST['p_phone']); $table[25] = str_replace(' ', '', $_POST['p_fax']); $table[26] = $_POST['p_email']; $integrity3 = $sdi_object -> CheckDataIntegrity_provider($table); $form_p_name = formatText($_POST['p_name'], '2FIELD'); $form_p_service = formatText($_POST['p_service'], '2FIELD'); $form_p_description = formatText($_POST['p_description'], '2FIELD'); $form_p_incharge = formatText($_POST['p_incharge'], '2FIELD'); $form_p_address = formatText($_POST['p_address'], '2FIELD'); $form_p_phone = str_replace(' ', '', $_POST['p_phone']); $form_p_fax = str_replace(' ', '', $_POST['p_fax']); $form_p_email = $_POST['p_email']; $table = urlencode(serialize($table)); } if (isset($_POST['valider4'])) { $integrity = 1; $integrity2 = 1; $integrity3 = 1; $table = unserialize(urldecode($_POST['table'])); $table[27] = $_POST['r_title']; $table[28] = $_POST['r_body']; $table[29] = $_POST['r_referer_uri']; if ($_POST['r_mask_uri']=="")$table[30] = $table[29]; else $table[30]=$_POST['r_mask_uri']; $integrity4 = $sdi_object -> CheckDataIntegrity_reglementation($table); $form_r_title = formatText($_POST['r_title'], '2FIELD'); $form_r_body = formatText($_POST['r_body'], '2FIELD'); $form_r_referer_uri = $_POST['r_referer_uri']; if ($_POST['r_mask_uri']=="")$form_r_mask_uri = $form_r_referer_uri; else $form_r_mask_uri =$_POST['r_mask_uri']; $table = urlencode(serialize($table)); } // select-box des niveaux $data=$sql_object->DBSelect(SQL_getLevelsList()); $select_level=LevelSelectBox($data, "sdi_level", $form_level); $select_type=selectBox($lang['sdi']['select_type'], "sdi_type", $form_type); $select_dashboard_viz = selectBox($lang['sdi']['select_dashboard_viz'], "sdi_dashboard_viz", $form_dashboard_viz, INDICATOR_DASHBOARD_VIZ); $select_detail_viz = selectBox($lang['sdi']['select_detail_viz'], "sdi_detail_viz", $form_detail_viz); $select_value_type = selectBox($lang['sdi']['select_value_type'], "sdi_value_type", $form_value_type); ?> '. sprintf(_t('sdi','boolindicator_notice'), '#attached_to_dashboard').'<\/span>"); } else { $("#sdi_dashboard_viz option[value=\'sparkline\']").removeAttr("disabled"); $("#boolean-indic-notice").remove(); } }); // we call the function on loading page $("#sdi_type").change(); '; footerAddInlineJS($js); ?>
step1
step2
step3
step4

:
required /> />

/>

* :
/>
step1
step2
step3
step4

step1
step2
step3
step4

step1
step2
step3
step4

DBSelect(SQL_getoneLevel($table[3])); $display_sdi_level=formatText($record[0]['level_name'], '2HTML'); $table = urlencode(serialize($table)); ?>

:
:
*/ ?>
:
:
:
:
:
:
*/ ?>
:
:
:
:
:

:
:
:
:
:
:

:
:
:
:
:
:

:
:
:
:
:
:
:
:

:
:
:
: