Example #1
0
 //=========================
 $nb_absences = $nb_abs_ele[$num_eleve];
 $nb_nj = $nb_nj_ele[$num_eleve];
 $nb_retard = $nb_retard_ele[$num_eleve];
 //$ap=$app_ele[$num_eleve];
 //$ap = traitement_magic_quotes(corriger_caracteres(html_entity_decode($ap)));
 $app_ele_courant = "app_eleve_" . $num_eleve;
 //echo "\$app_ele_courant=$app_ele_courant<br />";
 if (isset($NON_PROTECT[$app_ele_courant])) {
     $ap = traitement_magic_quotes(corriger_caracteres($NON_PROTECT[$app_ele_courant]));
 } else {
     $ap = "";
 }
 //echo "\$ap=$ap<br />";
 // Contrôle des saisies pour supprimer les sauts de lignes surnuméraires.
 $ap = nettoyage_retours_ligne_surnumeraires($ap);
 //=========================
 if (!preg_match("/^[0-9]{1,}\$/", $nb_absences)) {
     $nb_absences = '';
 }
 if (!preg_match("/^[0-9]{1,}\$/", $nb_nj)) {
     $nb_nj = '';
 }
 if (!preg_match("/^[0-9]{1,}\$/", $nb_retard)) {
     $nb_retard = '';
 }
 $test_eleve_nb_absences_query = mysqli_query($GLOBALS["mysqli"], "SELECT * FROM absences WHERE (login='******' AND periode='{$periode_num}')");
 $test_nb = mysqli_num_rows($test_eleve_nb_absences_query);
 if ($test_nb != "0") {
     $register = mysqli_query($GLOBALS["mysqli"], "UPDATE absences SET nb_absences='{$nb_absences}', non_justifie='{$nb_nj}', nb_retards='{$nb_retard}', appreciation='{$ap}' WHERE (login='******' AND periode='{$periode_num}')");
 } else {
Example #2
0
$current_group = get_group($id_groupe);
$periode_num = $obj_cn->periode;
/**
 * Gestion des périodes
 */
include "../lib/periodes.inc.php";
$id_dev = isset($_POST["id_dev"]) ? $_POST["id_dev"] : (isset($_GET["id_dev"]) ? $_GET["id_dev"] : NULL);
if ($id_dev) {
    $sql = "SELECT * FROM cc_dev WHERE id='{$id_dev}' AND id_groupe='{$id_groupe}';";
    $query = mysqli_query($GLOBALS["mysqli"], $sql);
    if ($query) {
        $tab_cc_dev = $query->fetch_array();
        $id_cn_dev = $tab_cc_dev['id_cn_dev'];
        $nom_court = $tab_cc_dev['nom_court'];
        $nom_complet = $tab_cc_dev['nom_complet'];
        $description = nettoyage_retours_ligne_surnumeraires($tab_cc_dev['description']);
        $precision = $tab_cc_dev['arrondir'];
        $famille = $tab_cc_dev['vision_famille'];
    } else {
        header("Location: index.php?msg=" . rawurlencode("Le numéro de devoir n est pas associé à ce groupe."));
        die;
    }
} else {
    $nom_court = "CC";
    $nom_complet = ucfirst($nom_cc) . " n°";
    $description = "";
    //$precision="s1";
    $precision = getPref($_SESSION['login'], 'eval_cumul_precision', 's1');
    $famille = getPref($_SESSION['login'], 'eval_cumul_vision_famille', 'no');
}
$matiere_nom = $current_group["matiere"]["nom_complet"];
Example #3
0
    //echo "$sql<br />";
    $query = mysqli_query($GLOBALS["mysqli"], $sql);
    if ($query) {
        // Vérifier que l'évaluation est bien associée au CC.
        $sql = "SELECT * FROM cc_eval WHERE id='{$id_eval}' AND id_dev='{$id_dev}';";
        //echo "$sql<br />";
        $test = mysqli_query($GLOBALS["mysqli"], $sql);
        if (mysqli_num_rows($test) == 0) {
            $mess = "L'évaluation n°{$id_eval} n'est pas associée au {$nom_cc} n°{$id_dev}.<br />";
            header("Location: index_cc.php?id_racine={$id_racine}&msg={$mess}");
            die;
        }
        //$id_cn_dev=old_mysql_result($query, 0, 'id_cn_dev');
        $nom_court = stripslashes(old_mysql_result($query, 0, 'nom_court'));
        $nom_complet = stripslashes(old_mysql_result($query, 0, 'nom_complet'));
        $description = nettoyage_retours_ligne_surnumeraires(stripslashes(old_mysql_result($query, 0, 'description')));
        $display_date = old_mysql_result($query, 0, 'date');
        $vision_famille = old_mysql_result($query, 0, 'vision_famille');
        $note_sur = old_mysql_result($query, 0, 'note_sur');
        $display_date = formate_date($display_date);
        $vision_famille = formate_date($vision_famille);
    } else {
        header("Location: index.php?msg=" . rawurlencode("L évaluation n°{$id_eval} n'existe pas."));
        die;
    }
} else {
    $nom_court = "Ev";
    $nom_complet = "Evaluation n°";
    $description = "";
    $display_date = strftime('%d/%m/%Y');
    $vision_famille = strftime('%d/%m/%Y');