Example #1
0
    echo "</div>\n";
    require_once "../lib/footer.inc.php";
    die;
}
while ($lig_ele = mysqli_fetch_object($res_ele)) {
    $tab_clas = get_class_from_ele_login($lig_ele->login);
    $ligne_login = "";
    $sql = "SELECT etat, auth_mode FROM utilisateurs WHERE statut='eleve' AND etat='actif' AND login='{$lig_ele->login}';";
    $test_compte = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($test_compte) > 0) {
        $lig_user = mysqli_fetch_object($test_compte);
        $ligne_login = "\n\t\t<tr>\n\t\t\t<th>Login</th>\n\t\t\t<td>\n\t\t\t\t" . $lig_ele->login . "<br />\n\t\t\t\t(<em>compte <span style='color:" . ($lig_user->etat == 'actif' ? "green' title='Le compte peut se connecter" : "red' title='Le compte ne peut pas se connecter") . "'>" . $lig_user->etat . "</span></em>)\n\t\t\t</td>\n\t\t</tr>";
    }
    $ligne_lieu_naissance = "";
    if (getSettingAOui('ele_lieu_naissance')) {
        $ligne_lieu_naissance = "\n\t\t<tr>\n\t\t\t<th>Lieu de naissance</th>\n\t\t\t<td>" . get_commune($lig_ele->lieu_naissance, 1) . "</td>\n\t\t</tr>";
    }
    $ligne_tel_pers_ele = "";
    if (getSettingAOui('ele_tel_pers')) {
        $ligne_tel_pers_ele = "\n\t\t\t<tr>\n\t\t\t\t<th>Tél.personnel</th>\n\t\t\t\t<td>" . $lig_ele->tel_pers . "</td>\n\t\t\t</tr>";
    }
    $ligne_tel_pers_port = "";
    if (getSettingAOui('ele_tel_port')) {
        $ligne_tel_pers_port = "\n\t\t\t<tr>\n\t\t\t\t<th>Tél.portable</th>\n\t\t\t\t<td>" . $lig_ele->tel_port . "</td>\n\t\t\t</tr>";
    }
    $ligne_tel_pers_prof = "";
    if (getSettingAOui('ele_tel_prof')) {
        $ligne_tel_pers_prof = "\n\t\t\t<tr>\n\t\t\t\t<th>Tél.professionnel</th>\n\t\t\t\t<td>" . $lig_ele->tel_prof . "</td>\n\t\t\t</tr>";
    }
    $ligne_regime = "";
    $sql = "SELECT * FROM j_eleves_regime WHERE login='{$lig_ele->login}';";
Example #2
0
	if(mysqli_num_rows($res1)>0){
		// Boucle sur la liste des élèves
		while($lig1=mysqli_fetch_object($res1)){

			$tab_eleves_OOo[$nb_eleve]=array();
			$tab_eleves_OOo[$nb_eleve]['fb_session']=$fb_session;

			//echo "<p>$lig1->nom $lig1->prenom<br />";
			$tab_eleves_OOo[$nb_eleve]['nom']=$lig1->nom;
			$tab_eleves_OOo[$nb_eleve]['prenom']=$lig1->prenom;
			$tab_eleves_OOo[$nb_eleve]['ine']=$lig1->no_gep;
			$tab_eleves_OOo[$nb_eleve]['fille']="";										// on initialise les champs pour ne pas avoir d'erreurs
			if($lig1->sexe=='F') {$tab_eleves_OOo[$nb_eleve]['fille']="e";} // ajouter un e à née si l'élève est une fille
			$tab_eleves_OOo[$nb_eleve]['date_nais']=formate_date($lig1->naissance);
			$tab_eleves_OOo[$nb_eleve]['lieu_nais']="";										// on initialise les champs pour ne pas avoir d'erreurs
			if($ele_lieu_naissance=="y") {$tab_eleves_OOo[$nb_eleve]['lieu_nais']=preg_replace ( '@<[\/\!]*?[^<>]*?>@si'  , ''  , get_commune($lig1->lieu_naissance,1)) ;} // récupérer la commune
			$tab_eleves_OOo[$nb_eleve]['ecole']=$gepiSchoolName;
			$tab_eleves_OOo[$nb_eleve]['adresse1']=$gepiSchoolAdress1;
			$tab_eleves_OOo[$nb_eleve]['adresse2']=$gepiSchoolAdress2;
			$tab_eleves_OOo[$nb_eleve]['codeposte']=$gepiSchoolZipCode;
			$tab_eleves_OOo[$nb_eleve]['commune']=$gepiSchoolCity;
			$tab_eleves_OOo[$nb_eleve]['acad']=mb_strtoupper($fb_academie);
			$tab_eleves_OOo[$nb_eleve]['departe']=$fb_departement;
			$tab_eleves_OOo[$nb_eleve]['session']=$fb_session;

			$sql="SELECT doublant FROM j_eleves_regime WHERE login='".$lig1->login."';";
			$res_reg=mysqli_query($GLOBALS["mysqli"], $sql);
			$doublant='n';
			if(mysqli_num_rows($res_reg)>0) {
				$lig_reg=mysqli_fetch_object($res_reg);
				if($lig_reg->doublant=='R') {
Example #3
0
		$ligne_login="
		<tr>
			<th>Login</th>
			<td>
				".$lig_ele->login."<br />
				(<em>compte <span style='color:".(($lig_user->etat=='actif') ? "green' title='Le compte peut se connecter" : "red' title='Le compte ne peut pas se connecter")."'>".$lig_user->etat."</span></em>)
			</td>
		</tr>";
	}

	$ligne_lieu_naissance="";
	if(getSettingAOui('ele_lieu_naissance')) {
		$ligne_lieu_naissance="
		<tr>
			<th>Lieu de naissance</th>
			<td>".get_commune($lig_ele->lieu_naissance,1)."</td>
		</tr>";
	}

	$ligne_tel_pers_ele="";
	if(getSettingAOui('ele_tel_pers')) {
		$ligne_tel_pers_ele="
			<tr>
				<th>Tél.personnel</th>
				<td>".$lig_ele->tel_pers."</td>
			</tr>";
	}

	$ligne_tel_pers_port="";
	if(getSettingAOui('ele_tel_port')) {
		$ligne_tel_pers_port="
Example #4
0
								echo "</label>";
								echo "</td>\n";

								echo "<td style='text-align: center;'>";
								echo "<label for='check_".$cpt."'>";
								echo "$affiche[2]";
//								echo "<input type='hidden' name='new_".$cpt."_sexe' value='$affiche[2]' />\n";
								echo "</label>";
								echo "</td>\n";

								$new_date=mb_substr($affiche[3],0,4)."-".mb_substr($affiche[3],4,2)."-".mb_substr($affiche[3],6,2);
								echo "<td style='text-align: center;'>";
								echo "<label for='check_".$cpt."'>";
								echo "$new_date";
								if($ele_lieu_naissance=="y") {
									echo " à ".get_commune($affiche[11],1);
//									echo "<input type='hidden' name='new_".$cpt."_lieu_naissance' value=\"".stripslashes($affiche[11])."\" />\n";
								}
//								echo "<input type='hidden' name='new_".$cpt."_naissance' value='$new_date' />\n";
								echo "</label>";
								echo "</td>\n";


								$tmp_doublant="";
								switch($affiche[6]){
									case "O":
										$tmp_doublant="R";
										break;
									case "N":
										$tmp_doublant="-";
										break;
Example #5
0
 $appel_donnees_eleves = mysqli_query($GLOBALS["mysqli"], $sql);
 $nombre_lignes = mysqli_num_rows($appel_donnees_eleves);
 $i = 0;
 //while($i < $nombre_lignes) {
 while ($lig_ele = mysqli_fetch_object($appel_donnees_eleves)) {
     $classe = get_nom_classe($id_classe);
     $eleve_login = $lig_ele->login;
     $eleve_nom = $lig_ele->nom;
     $eleve_prenom = $lig_ele->prenom;
     $eleve_sexe = $lig_ele->sexe;
     $eleve_naissance = $lig_ele->naissance;
     if (isset($format_naiss) && $format_naiss == 'jjmmaaaa') {
         $eleve_naissance = formate_date($eleve_naissance);
     }
     if ($avec_lieu_naiss == 'y') {
         $eleve_lieu_naissance = get_commune($lig_ele->lieu_naissance, '2');
     }
     //$fd.="$classe;$eleve_login;$eleve_nom;$eleve_prenom;$eleve_sexe;$eleve_naissance\n";
     $eleve_email = $lig_ele->email;
     $eleve_no_gep = $lig_ele->no_gep;
     $eleve_elenoet = $lig_ele->elenoet;
     $eleve_ele_id = $lig_ele->ele_id;
     if (isset($avec_doublant) && $avec_doublant == 'y' || isset($avec_regime) && $avec_regime == 'y') {
         $eleve_doublant = $lig_ele->doublant;
         $eleve_regime = $lig_ele->regime;
     }
     if (isset($avec_infos_resp) && $avec_infos_resp == 'y') {
         $eleve_infos_resp_1 = "";
         $eleve_infos_resp_2 = "";
         $eleve_infos_resp_0 = "";
         $sql = "SELECT rp.*, r.resp_legal FROM resp_pers rp, responsables2 r WHERE r.ele_id='{$eleve_ele_id}' AND r.pers_id=rp.pers_id AND (r.resp_legal='1' OR r.resp_legal='2' OR (r.pers_contact='1' AND (rp.tel_pers!='' OR rp.tel_prof!='' OR rp.tel_port!='')));";
Example #6
0
function info_eleve($ele_login)
{
    global $ele_lieu_naissance;
    global $active_cahiers_texte;
    global $date_ct1, $date_ct2;
    global $type_etablissement, $type_etablissement2;
    global $acces_eleve, $acces_responsables, $acces_enseignements, $acces_releves, $acces_bulletins, $acces_cdt, $acces_anna;
    global $date_debut_disc, $date_fin_disc;
    unset($tab_ele);
    $tab_ele = array();
    // Récup des infos sur l'élève, les responsables, le PP, le CPE,...
    $sql = "SELECT * FROM eleves e WHERE e.login='" . $ele_login . "';";
    $res_ele = mysqli_query($GLOBALS["mysqli"], $sql);
    $lig_ele = mysqli_fetch_object($res_ele);
    $tab_ele['login'] = $ele_login;
    $tab_ele['nom'] = $lig_ele->nom;
    $tab_ele['prenom'] = $lig_ele->prenom;
    $tab_ele['sexe'] = $lig_ele->sexe;
    $tab_ele['naissance'] = formate_date($lig_ele->naissance);
    $tab_ele['elenoet'] = $lig_ele->elenoet;
    $tab_ele['ele_id'] = $lig_ele->ele_id;
    $tab_ele['no_gep'] = $lig_ele->no_gep;
    $tab_ele['email'] = $lig_ele->email;
    $tab_ele['date_sortie'] = $lig_ele->date_sortie;
    $tab_ele['code_lieu_naissance'] = $lig_ele->lieu_naissance;
    if ($ele_lieu_naissance == "y") {
        $tab_ele['lieu_naissance'] = get_commune($tab_ele['code_lieu_naissance'], 1);
    } else {
        $tab_ele['lieu_naissance'] = "";
    }
    $tab_ele['mef'] = "";
    $tmp_tab = get_tab_mef_from_mef_code($lig_ele->mef_code);
    if (isset($tmp_tab['designation_courte'])) {
        $tab_ele['mef'] = $tmp_tab['designation_courte'];
    }
    unset($tmp_tab);
    if ($_SESSION['statut'] == "professeur") {
        $is_pp = is_pp($_SESSION['login'], "", $ele_login);
    }
    $AccesDerniereConnexionEle = AccesDerniereConnexionEle($ele_login);
    $AccesDerniereConnexionResp = AccesDerniereConnexionResp("", $ele_login);
    $sql = "SELECT * FROM utilisateurs WHERE statut='eleve' AND login='{$ele_login}';";
    $res_user = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_user) == 1) {
        $lig_user = mysqli_fetch_object($res_user);
        $tab_user = array('login', 'show_email', 'etat', 'date_verrouillage', 'niveau_alerte', 'observation_securite', 'auth_mode');
        for ($loop = 0; $loop < count($tab_user); $loop++) {
            $champ = $tab_user[$loop];
            $tab_ele['compte_utilisateur'][$champ] = $lig_user->{$champ};
        }
        if ($AccesDerniereConnexionEle) {
            $tab_ele['compte_utilisateur']['DerniereConnexionEle'] = get_last_connexion($ele_login);
            $tab_ele['compte_utilisateur']['DerniereConnexionEle_Echec'] = get_last_connexion($ele_login, "n");
        }
    }
    $tab_ele['prof_liste_email'] = "";
    $tab_ele['tab_prof_liste_email'] = array();
    /*
    $tab_ele['classe']=array();
    $sql="SELECT DISTINCT c.*,jec.periode FROM classes c, j_eleves_classes jec WHERE jec.login='$ele_login' AND c.id=jec.id_classe ORDER BY jec.periode;";
    $res_clas=mysql_query($sql);
    if(mysql_num_rows($res_clas)>0) {
    	$tab_ele['liste_classes']="";
    
    	$cpt=0;
    	while($lig_clas=mysql_fetch_object($res_clas)) {
    		if($cpt>0) {$tab_ele['liste_classes'].=", ";}
    		$tab_ele['liste_classes']=$lig_clas->classe;
    
    		$tab_ele['classe'][$cpt]['id_classe']=$lig_clas->id;
    		$tab_ele['classe'][$cpt]['classe']=$lig_clas->classe;
    		$tab_ele['classe'][$cpt]['nom_complet']=$lig_clas->nom_complet;
    		$tab_ele['classe'][$cpt]['periode']=$lig_clas->periode;
    
    		// Récup infos Prof Principal (prof_suivi)
    		$sql="SELECT u.* FROM j_eleves_professeurs jep, utilisateurs u WHERE jep.login='".$ele_login."' AND id_classe='".$lig_clas->id."' AND jep.professeur=u.login;";
    		$res_pp=mysql_query($sql);
    		//echo "$sql<br />";
    		if(mysql_num_rows($res_pp)>0) {
    			$lig_pp=mysql_fetch_object($res_pp);
    			$tab_ele['classe'][$cpt]['pp']=array();
    
    			$tab_ele['classe'][$cpt]['pp']['login']=$lig_pp->login;
    			$tab_ele['classe'][$cpt]['pp']['nom']=$lig_pp->nom;
    			$tab_ele['classe'][$cpt]['pp']['prenom']=$lig_pp->prenom;
    			$tab_ele['classe'][$cpt]['pp']['civilite']=$lig_pp->civilite;
    		}
    
    		$cpt++;
    	}
    }
    */
    // Classes
    $tab_ele['classe'] = array();
    $sql = "SELECT DISTINCT c.* FROM classes c, j_eleves_classes jec WHERE jec.login='{$ele_login}' AND c.id=jec.id_classe ORDER BY jec.periode;";
    $res_clas = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_clas) > 0) {
        $tab_ele['liste_classes'] = "";
        $cpt = 0;
        while ($lig_clas = mysqli_fetch_object($res_clas)) {
            if ($cpt > 0) {
                $tab_ele['liste_classes'] .= ", ";
            }
            $tab_ele['liste_classes'] = $lig_clas->classe;
            $tab_ele['classe'][$cpt] = array();
            $tab_ele['classe'][$cpt]['id_classe'] = $lig_clas->id;
            $tab_ele['classe'][$cpt]['classe'] = $lig_clas->classe;
            $tab_ele['classe'][$cpt]['nom_complet'] = $lig_clas->nom_complet;
            // On devrait mettre $tab_ele['classe'][$cpt]['rn_nomdev'], mais j'ai mis $tab_ele['rn_nomdev']
            // C'est imparfait si l'élève n'est pas dans la même classe sur toutes les périodes , mais cela permet de garder le même code pour visu_releve_notes_func.lib.php et la présente page
            //$tab_ele['rn_app']=$lig_clas->; // Ca ne correspond pas à un champ dans la table 'classes'
            $tab_ele['rn_nomdev'] = $lig_clas->rn_nomdev;
            $tab_ele['rn_toutcoefdev'] = $lig_clas->rn_toutcoefdev;
            $tab_ele['rn_coefdev_si_diff'] = $lig_clas->rn_coefdev_si_diff;
            $tab_ele['rn_datedev'] = $lig_clas->rn_datedev;
            $tab_ele['rn_sign_chefetab'] = $lig_clas->rn_sign_chefetab;
            $tab_ele['rn_sign_pp'] = $lig_clas->rn_sign_pp;
            $tab_ele['rn_sign_resp'] = $lig_clas->rn_sign_resp;
            $tab_ele['rn_formule'] = $lig_clas->rn_formule;
            $tab_ele['rn_sign_nblig'] = $lig_clas->rn_sign_nblig;
            if ($tab_ele['rn_sign_nblig'] == 0) {
                $tab_ele['rn_sign_nblig'] = 3;
            }
            //echo "\$tab_ele['rn_sign_resp']=$lig_clas->rn_sign_resp<br/>";
            // Liste des périodes dans la classe
            $sql = "SELECT p.* FROM periodes p, j_eleves_classes jec WHERE jec.login='{$ele_login}' AND p.num_periode=jec.periode AND jec.id_classe='" . $lig_clas->id . "' AND p.id_classe=jec.id_classe ORDER BY p.num_periode;";
            $res_per = mysqli_query($GLOBALS["mysqli"], $sql);
            $cpt2 = 0;
            if (mysqli_num_rows($res_per) > 0) {
                $tab_ele['classe'][$cpt]['periodes'][$cpt2] = array();
                while ($lig_per = mysqli_fetch_object($res_per)) {
                    $tab_ele['classe'][$cpt]['periodes'][$cpt2]['num_periode'] = $lig_per->num_periode;
                    $tab_ele['classe'][$cpt]['periodes'][$cpt2]['nom_periode'] = $lig_per->nom_periode;
                    // On pourrait extraire les relevés de notes et bulletins à ce niveau
                    $cpt2++;
                }
            }
            // Récup infos Prof Principal (prof_suivi)
            $sql = "SELECT u.* FROM j_eleves_professeurs jep, utilisateurs u WHERE jep.login='" . $ele_login . "' AND id_classe='" . $lig_clas->id . "' AND jep.professeur=u.login;";
            $res_pp = mysqli_query($GLOBALS["mysqli"], $sql);
            //echo "$sql<br />";
            if (mysqli_num_rows($res_pp) > 0) {
                $lig_pp = mysqli_fetch_object($res_pp);
                $tab_ele['classe'][$cpt]['pp'] = array();
                $tab_ele['classe'][$cpt]['pp']['prof_login'] = $lig_pp->login;
                $tab_ele['classe'][$cpt]['pp']['nom'] = $lig_pp->nom;
                $tab_ele['classe'][$cpt]['pp']['prenom'] = $lig_pp->prenom;
                $tab_ele['classe'][$cpt]['pp']['civilite'] = $lig_pp->civilite;
                $tab_ele['classe'][$cpt]['pp']['email'] = $lig_pp->email;
                $tab_ele['classe'][$cpt]['pp']['civ_nom_prenom'] = $lig_pp->civilite . " " . $lig_pp->nom . " " . mb_substr($lig_pp->prenom, 0, 1) . ".";
            }
            $cpt++;
        }
    }
    // Périodes
    //$sql="SELECT DISTINCT p.*, jec.id_classe, c.classe, c.nom_complet FROM periodes p, j_eleves_classes jec, classes c WHERE jec.login='$ele_login' AND p.num_periode=jec.periode AND c.id=jec.id_classe ORDER BY p.num_periode;";
    $sql = "SELECT DISTINCT p.*,jec.id_classe, c.classe, c.nom_complet  FROM periodes p, j_eleves_classes jec, classes c WHERE jec.login='{$ele_login}' AND p.num_periode=jec.periode AND jec.id_classe=p.id_classe AND c.id=jec.id_classe ORDER BY p.num_periode;";
    //echo "$sql<br />";
    $res_per = mysqli_query($GLOBALS["mysqli"], $sql);
    $cpt = 0;
    if (mysqli_num_rows($res_per) > 0) {
        if ($acces_releves == 'y' || $acces_enseignements == 'y' || $acces_bulletins == 'y') {
            while ($lig_per = mysqli_fetch_object($res_per)) {
                $tab_ele['periodes'][$cpt] = array();
                $tab_ele['periodes'][$cpt]['num_periode'] = $lig_per->num_periode;
                $tab_ele['periodes'][$cpt]['nom_periode'] = $lig_per->nom_periode;
                $tab_ele['periodes'][$cpt]['id_classe'] = $lig_per->id_classe;
                $tab_ele['periodes'][$cpt]['classe'] = $lig_per->classe;
                $tab_ele['periodes'][$cpt]['nom_complet'] = $lig_per->nom_complet;
                //echo "\$tab_ele['periodes'][$cpt]['num_periode']=".$tab_ele['periodes'][$cpt]['num_periode']."<br />";
                //echo "\$tab_ele['periodes'][$cpt]['id_classe']=".$tab_ele['periodes'][$cpt]['id_classe']."<br />";
                // On regarde si on affiche les catégories de matières dans la classe courante de l'élève
                $affiche_categories = sql_query1("SELECT display_mat_cat FROM classes WHERE id='" . $lig_per->id_classe . "'");
                if ($affiche_categories == "y") {
                    $affiche_categories = true;
                } else {
                    $affiche_categories = false;
                }
                $tab_ele['periodes'][$cpt]['affiche_categories'] = $affiche_categories;
                if ($affiche_categories) {
                    $sql = "SELECT DISTINCT g.*,m.nom_complet " . "FROM j_eleves_groupes jeg,\n\t\t\t\t\t\t\tj_groupes_classes jgc,\n\t\t\t\t\t\t\tj_groupes_matieres jgm,\n\t\t\t\t\t\t\tj_matieres_categories_classes jmcc,\n\t\t\t\t\t\t\tmatieres m,\n\t\t\t\t\t\t\tgroupes g " . "WHERE ( " . "jeg.login = '" . $ele_login . "' AND " . "jgc.id_groupe = jeg.id_groupe AND " . "jgc.categorie_id = jmcc.categorie_id AND " . "jgc.id_classe = '" . $lig_per->id_classe . "' AND " . "jgm.id_groupe = jgc.id_groupe AND " . "m.matiere = jgm.id_matiere AND " . "g.id=jeg.id_groupe " . "AND jgc.id_groupe NOT IN (SELECT id_groupe FROM j_groupes_visibilite WHERE domaine='cahier_notes' AND visible='n')) " . "ORDER BY jmcc.priority,jgc.priorite,m.nom_complet";
                } else {
                    $sql = "SELECT DISTINCT g.*,m.nom_complet " . "FROM j_groupes_classes jgc, j_groupes_matieres jgm, j_eleves_groupes jeg, matieres m, groupes g " . "WHERE ( " . "jeg.login = '" . $ele_login . "' AND " . "jgc.id_groupe = jeg.id_groupe AND " . "jgc.id_classe = '" . $lig_per->id_classe . "' AND " . "jgm.id_groupe = jgc.id_groupe AND\n\t\t\t\t\tm.matiere=jgm.id_matiere AND jgm.id_groupe=g.id " . "AND jgc.id_groupe NOT IN (SELECT id_groupe FROM j_groupes_visibilite WHERE domaine='cahier_notes' AND visible='n')) " . "ORDER BY jgc.priorite,jgm.id_matiere";
                }
                //$sql="SELECT DISTINCT g.*,m.nom_complet FROM groupes g, j_groupes_matieres jgm, matieres m, j_groupes_classes jgc, j_eleves_groupes jeg WHERE g.id=jgm.id_groupe AND m.matiere=jgm.id_matiere AND jgc.id_groupe=jgm.id_groupe AND jeg.id_groupe=g.id AND jeg.periode='".$lig_per->num_periode."' AND jeg.login='$ele_login' ORDER BY jgc.priorite,m.nom_complet;";
                //echo "$sql<br />";
                $res_grp = mysqli_query($GLOBALS["mysqli"], $sql);
                if (mysqli_num_rows($res_grp) > 0) {
                    $cpt2 = 0;
                    while ($lig_grp = mysqli_fetch_object($res_grp)) {
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2] = array();
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['id_groupe'] = $lig_grp->id;
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['name'] = $lig_grp->name;
                        //echo "\$tab_ele['periodes'][$cpt]['groupes'][$cpt2]['name']=".$tab_ele['periodes'][$cpt]['groupes'][$cpt2]['name']."<br />";
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['description'] = $lig_grp->description;
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['matiere_nom_complet'] = $lig_grp->nom_complet;
                        if ($affiche_categories) {
                            //$sql="SELECT DISTINCT jgc.categorie_id FROM j_groupes_classes jgc WHERE jgc.id_groupe='".$lig_grp->id."' AND id_classe='".$tab_ele['periodes'][$cpt]['id_classe']."';";
                            $sql = "SELECT DISTINCT jgc.categorie_id, mc.nom_court, mc.nom_complet FROM j_groupes_classes jgc, matieres_categories mc WHERE jgc.id_groupe='" . $lig_grp->id . "' AND id_classe='" . $tab_ele['periodes'][$cpt]['id_classe'] . "' AND mc.id=jgc.categorie_id;";
                            //echo "$sql<br />";
                            $res_cat = mysqli_query($GLOBALS["mysqli"], $sql);
                            if (mysqli_num_rows($res_cat) > 0) {
                                $lig_cat = mysqli_fetch_object($res_cat);
                                $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['id_cat'] = $lig_cat->categorie_id;
                                $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['cat_nom_court'] = $lig_cat->nom_court;
                                $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['cat_nom_complet'] = $lig_cat->nom_complet;
                                //echo "\$tab_ele['periodes'][$cpt]['groupes'][$cpt2]['id_cat']=".$tab_ele['periodes'][$cpt]['groupes'][$cpt2]['id_cat']."<br />";
                            }
                        }
                        $sql = "SELECT DISTINCT d.coef FROM cn_notes_devoirs nd, cn_devoirs d, cn_cahier_notes cn WHERE (\n\t\t\t\t\t\tnd.login = '" . $ele_login . "' and\n\t\t\t\t\t\tnd.id_devoir = d.id and\n\t\t\t\t\t\td.display_parents='1' and\n\t\t\t\t\t\td.id_racine = cn.id_cahier_notes and\n\t\t\t\t\t\tcn.id_groupe = '" . $lig_grp->id . "' and\n\t\t\t\t\t\tcn.periode = '" . $lig_per->num_periode . "'\n\t\t\t\t\t\t)";
                        $res_differents_coef = mysqli_query($GLOBALS["mysqli"], $sql);
                        if (mysqli_num_rows($res_differents_coef) > 1) {
                            $differents_coef = "y";
                        } else {
                            $differents_coef = "n";
                        }
                        $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['differents_coef'] = $differents_coef;
                        $sql1 = "SELECT d.coef, nd.note, nd.comment, d.nom_court, nd.statut, d.date, d.note_sur, d.display_parents_app FROM cn_notes_devoirs nd, cn_devoirs d, cn_cahier_notes cn WHERE (\n\t\t\t\t\t\tnd.login = '" . $ele_login . "' and\n\t\t\t\t\t\tnd.id_devoir = d.id and\n\t\t\t\t\t\td.display_parents='1' and\n\t\t\t\t\t\td.id_racine = cn.id_cahier_notes and\n\t\t\t\t\t\tcn.id_groupe = '" . $lig_grp->id . "' and\n\t\t\t\t\t\tcn.periode = '" . $lig_per->num_periode . "'\n\t\t\t\t\t\t)\n\t\t\t\t\t\tORDER BY d.date\n\t\t\t\t\t\t";
                        $query_notes = mysqli_query($GLOBALS["mysqli"], $sql1);
                        $count_notes = mysqli_num_rows($query_notes);
                        $m = 0;
                        while ($m < $count_notes) {
                            $eleve_display_app = @old_mysql_result($query_notes, $m, 'display_parents_app');
                            $eleve_app = @old_mysql_result($query_notes, $m, 'comment');
                            $eleve_note = @old_mysql_result($query_notes, $m, 'note');
                            $eleve_statut = @old_mysql_result($query_notes, $m, 'statut');
                            $eleve_nom_court = @old_mysql_result($query_notes, $m, 'nom_court');
                            $date_note = @old_mysql_result($query_notes, $m, 'date');
                            $coef_devoir = @old_mysql_result($query_notes, $m, 'coef');
                            $note_sur_devoir = @old_mysql_result($query_notes, $m, 'note_sur');
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['display_app'] = $eleve_display_app;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['app'] = $eleve_app;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['note'] = $eleve_note;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['statut'] = $eleve_statut;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['nom_court'] = $eleve_nom_court;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['date'] = $date_note;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['coef'] = $coef_devoir;
                            $tab_ele['periodes'][$cpt]['groupes'][$cpt2]['devoir'][$m]['note_sur'] = $note_sur_devoir;
                            // On ne récupère pas le nom long du devoir?
                            $m++;
                        }
                        $cpt2++;
                    }
                }
                $cpt++;
            }
        }
        $sql = "SELECT DISTINCT g.*,m.nom_complet FROM groupes g, j_groupes_matieres jgm, matieres m, j_groupes_classes jgc, j_eleves_groupes jeg WHERE g.id=jgm.id_groupe AND m.matiere=jgm.id_matiere AND jgc.id_groupe=jgm.id_groupe AND jeg.id_groupe=g.id AND jeg.login='{$ele_login}' ORDER BY jgc.priorite,m.nom_complet;";
        //echo "$sql<br />";
        $res_grp = mysqli_query($GLOBALS["mysqli"], $sql);
        if (mysqli_num_rows($res_grp) > 0) {
            $cpt = 0;
            while ($lig_grp = mysqli_fetch_object($res_grp)) {
                $tab_ele['groupes'][$cpt] = array();
                $tab_ele['groupes'][$cpt]['id_groupe'] = $lig_grp->id;
                $tab_ele['groupes'][$cpt]['name'] = $lig_grp->name;
                $tab_ele['groupes'][$cpt]['description'] = $lig_grp->description;
                $tab_ele['groupes'][$cpt]['matiere_nom_complet'] = $lig_grp->nom_complet;
                $tab_ele['index_grp'][$lig_grp->id] = $cpt;
                $sql = "SELECT periode FROM j_eleves_groupes WHERE login='{$ele_login}' AND id_groupe='" . $lig_grp->id . "' ORDER BY periode;";
                $res_per2 = mysqli_query($GLOBALS["mysqli"], $sql);
                if (mysqli_num_rows($res_per2) > 0) {
                    $tab_ele['groupes'][$cpt]['periodes'] = array();
                    while ($lig_per2 = mysqli_fetch_object($res_per2)) {
                        $tab_ele['groupes'][$cpt]['periodes'][] = $lig_per2->periode;
                    }
                }
                $sql = "SELECT u.* FROM utilisateurs u, j_groupes_professeurs jgp WHERE u.login=jgp.login AND id_groupe='" . $lig_grp->id . "' ORDER BY u.nom, u.prenom;";
                $res_prof = mysqli_query($GLOBALS["mysqli"], $sql);
                if (mysqli_num_rows($res_prof) > 0) {
                    $tab_ele['groupes'][$cpt]['prof'] = array();
                    $tab_ele['groupes'][$cpt]['prof_liste'] = "";
                    //$tab_ele['groupes'][$cpt]['prof_liste_email']="";
                    $cpt2 = 0;
                    while ($lig_prof = mysqli_fetch_object($res_prof)) {
                        if ($cpt2 > 0) {
                            $tab_ele['groupes'][$cpt]['prof_liste'] .= ", ";
                        }
                        $tab_ele['groupes'][$cpt]['prof'][$cpt2]['prof_login'] = $lig_prof->login;
                        $tab_ele['groupes'][$cpt]['prof'][$cpt2]['nom'] = $lig_prof->nom;
                        $tab_ele['groupes'][$cpt]['prof'][$cpt2]['prenom'] = $lig_prof->prenom;
                        $tab_ele['groupes'][$cpt]['prof'][$cpt2]['civilite'] = $lig_prof->civilite;
                        $tab_ele['groupes'][$cpt]['prof'][$cpt2]['email'] = $lig_prof->email;
                        //if($lig_prof->email!='') {
                        //	if($tab_ele['groupes'][$cpt]['prof'][$cpt2]['prof_liste_email']!='') {$tab_ele['groupes'][$cpt]['prof_liste_email'].=", ";}
                        //	$tab_ele['groupes'][$cpt]['prof_liste_email'].=$lig_prof->email;
                        //}
                        if ($lig_prof->email != '' && !in_array($lig_prof->email, $tab_ele['tab_prof_liste_email'])) {
                            $tab_ele['tab_prof_liste_email'][] = $lig_prof->email;
                        }
                        $tab_ele['groupes'][$cpt]['prof_liste'] .= $lig_prof->civilite . " " . $lig_prof->nom . " " . mb_substr($lig_prof->prenom, 0, 1) . ".";
                        $cpt2++;
                    }
                }
                $cpt++;
            }
        }
        // Je ne suis pas sûr de la façon la plus pertinente de gérer les groupes/périodes... et il y aurait aussi les classes:
        // $tab_ele['groupes'][$cpt]['periodes'][]
        // ou $tab_ele['periodes'][$cpt]['groupes'][]
        // ou $tab_ele['classes'][$cpt]['groupes'][$cpt2]['periodes'][]
    }
    for ($i = 0; $i < count($tab_ele['tab_prof_liste_email']); $i++) {
        if ($tab_ele['prof_liste_email'] != "") {
            $tab_ele['prof_liste_email'] .= ", ";
        }
        $tab_ele['prof_liste_email'] .= $tab_ele['tab_prof_liste_email'][$i];
    }
    //===================================
    $get_cat = mysqli_query($GLOBALS["mysqli"], "SELECT id FROM matieres_categories");
    $categories = array();
    while ($row = mysqli_fetch_array($get_cat, MYSQLI_ASSOC)) {
        $categories[] = $row["id"];
    }
    $cat_names = array();
    foreach ($categories as $cat_id) {
        $sql = "SELECT nom_complet FROM matieres_categories WHERE id='" . $cat_id . "';";
        $res_cat = mysqli_query($GLOBALS["mysqli"], $sql);
        if ($res_cat) {
            $cat_names[$cat_id] = old_mysql_result($res_cat, 0);
        }
    }
    foreach ($cat_names as $key => $value) {
        $tab_ele['categorie'][$key] = $value;
    }
    //===================================
    // Régime et redoublement
    $sql = "SELECT * FROM j_eleves_regime WHERE login='" . $ele_login . "';";
    $res_ele_reg = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_ele_reg) > 0) {
        $lig_ele_reg = mysqli_fetch_object($res_ele_reg);
        $tab_ele['regime'] = $lig_ele_reg->regime;
        $tab_ele['doublant'] = $lig_ele_reg->doublant;
    }
    //$sql="SELECT e.* FROM etablissements e, j_eleves_etablissements j WHERE (j.id_eleve ='".$ele_login."' AND e.id = j.id_etablissement);";
    $sql = "SELECT e.* FROM etablissements e, j_eleves_etablissements j WHERE (j.id_eleve ='" . $tab_ele['elenoet'] . "' AND e.id = j.id_etablissement);";
    $data_etab = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($data_etab) > 0) {
        $tab_ele['etab_id'] = @old_mysql_result($data_etab, 0, "id");
        $tab_ele['etab_nom'] = @old_mysql_result($data_etab, 0, "nom");
        $tab_ele['etab_niveau'] = @old_mysql_result($data_etab, 0, "niveau");
        $tab_ele['etab_type'] = @old_mysql_result($data_etab, 0, "type");
        $tab_ele['etab_cp'] = @old_mysql_result($data_etab, 0, "cp");
        $tab_ele['etab_ville'] = @old_mysql_result($data_etab, 0, "ville");
        if ($tab_ele['etab_niveau'] != '') {
            foreach ($type_etablissement as $type_etab => $nom_etablissement) {
                if ($tab_ele['etab_niveau'] == $type_etab) {
                    $tab_ele['etab_niveau_nom'] = $nom_etablissement;
                }
            }
            if ($tab_ele['etab_cp'] == 0) {
                $tab_ele['etab_cp'] = '';
            }
            if ($tab_ele['etab_type'] == 'aucun') {
                $tab_ele['etab_type'] = '';
            } else {
                $tab_ele['etab_type'] = $type_etablissement2[$tab_ele['etab_type']][$tab_ele['etab_niveau']];
            }
        }
    }
    // Récup infos CPE
    $sql = "SELECT u.* FROM j_eleves_cpe jec, utilisateurs u WHERE e_login='" . $ele_login . "' AND jec.cpe_login=u.login;";
    $res_cpe = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_cpe) > 0) {
        $lig_cpe = mysqli_fetch_object($res_cpe);
        $tab_ele['cpe'] = array();
        $tab_ele['cpe']['login'] = $lig_cpe->login;
        $tab_ele['cpe']['nom'] = $lig_cpe->nom;
        $tab_ele['cpe']['prenom'] = $lig_cpe->prenom;
        $tab_ele['cpe']['civilite'] = $lig_cpe->civilite;
        $tab_ele['cpe']['email'] = $lig_cpe->email;
        $tab_ele['cpe']['civ_nom_prenom'] = $lig_cpe->civilite . " " . $lig_cpe->nom . " " . mb_substr($lig_cpe->prenom, 0, 1) . ".";
    }
    $tab_ele['equipe_liste_email'] = $tab_ele['prof_liste_email'];
    if (isset($tab_ele['cpe']['email']) && $tab_ele['cpe']['email'] != "" && !in_array($tab_ele['cpe']['email'], $tab_ele['tab_prof_liste_email'])) {
        if ($tab_ele['equipe_liste_email'] != "") {
            $tab_ele['equipe_liste_email'] .= ", ";
        }
        $tab_ele['equipe_liste_email'] .= $tab_ele['cpe']['email'];
    }
    /*
    // Récup infos Prof Principal (prof_suivi)
    $sql="SELECT u.* FROM j_eleves_professeurs jep, utilisateurs u WHERE jep.login='".$ele_login."' AND id_classe='$id_classe' AND jep.professeur=u.login;";
    $res_pp=mysql_query($sql);
    //echo "$sql<br />";
    if(mysql_num_rows($res_pp)>0) {
    	$lig_pp=mysql_fetch_object($res_pp);
    	$tab_ele['pp']=array();
    
    	$tab_ele['pp']['login']=$lig_pp->login;
    	$tab_ele['pp']['nom']=$lig_pp->nom;
    	$tab_ele['pp']['prenom']=$lig_pp->prenom;
    	$tab_ele['pp']['civilite']=$lig_pp->civilite;
    }
    */
    if ($acces_responsables == 'y') {
        // Récup infos responsables
        $sql = "SELECT rp.*,ra.adr1,ra.adr2,ra.adr3,ra.adr3,ra.adr4,ra.cp,ra.pays,ra.commune,r.resp_legal FROM resp_pers rp,\n\t\t\t\t\t\t\t\t\t\tresp_adr ra,\n\t\t\t\t\t\t\t\t\t\tresponsables2 r\n\t\t\t\t\tWHERE r.ele_id='" . $tab_ele['ele_id'] . "' AND\n\t\t\t\t\t\t\tr.resp_legal!='0' AND\n\t\t\t\t\t\t\tr.pers_id=rp.pers_id AND\n\t\t\t\t\t\t\trp.adr_id=ra.adr_id\n\t\t\t\t\tORDER BY resp_legal;";
        $res_resp = mysqli_query($GLOBALS["mysqli"], $sql);
        //echo "$sql<br />";
        if (mysqli_num_rows($res_resp) > 0) {
            $cpt = 0;
            while ($lig_resp = mysqli_fetch_object($res_resp)) {
                $tab_ele['resp'][$cpt] = array();
                $tab_ele['resp'][$cpt]['pers_id'] = $lig_resp->pers_id;
                $tab_ele['resp'][$cpt]['login'] = $lig_resp->login;
                $tab_ele['resp'][$cpt]['nom'] = $lig_resp->nom;
                $tab_ele['resp'][$cpt]['prenom'] = $lig_resp->prenom;
                $tab_ele['resp'][$cpt]['civilite'] = $lig_resp->civilite;
                $tab_ele['resp'][$cpt]['tel_pers'] = $lig_resp->tel_pers;
                $tab_ele['resp'][$cpt]['tel_port'] = $lig_resp->tel_port;
                $tab_ele['resp'][$cpt]['tel_prof'] = $lig_resp->tel_prof;
                $tab_ele['resp'][$cpt]['mel'] = $lig_resp->mel;
                $tab_ele['resp'][$cpt]['adr1'] = $lig_resp->adr1;
                $tab_ele['resp'][$cpt]['adr2'] = $lig_resp->adr2;
                $tab_ele['resp'][$cpt]['adr3'] = $lig_resp->adr3;
                $tab_ele['resp'][$cpt]['adr4'] = $lig_resp->adr4;
                $tab_ele['resp'][$cpt]['cp'] = $lig_resp->cp;
                $tab_ele['resp'][$cpt]['pays'] = $lig_resp->pays;
                $tab_ele['resp'][$cpt]['commune'] = $lig_resp->commune;
                $tab_ele['resp'][$cpt]['adr_id'] = $lig_resp->adr_id;
                $tab_ele['resp'][$cpt]['resp_legal'] = $lig_resp->resp_legal;
                //echo "\$lig_resp->login=".$lig_resp->login."<br />";
                if ($lig_resp->login != "") {
                    $sql = "SELECT etat, auth_mode FROM utilisateurs WHERE login='" . $lig_resp->login . "';";
                    //echo "$sql<br />";
                    $res_u = mysqli_query($GLOBALS["mysqli"], $sql);
                    if (mysqli_num_rows($res_u) > 0) {
                        $lig_u = mysqli_fetch_object($res_u);
                        $tab_ele['resp'][$cpt]['etat'] = $lig_u->etat;
                        $tab_ele['resp'][$cpt]['auth_mode'] = $lig_u->auth_mode;
                        if ($AccesDerniereConnexionResp) {
                            $tab_ele['resp'][$cpt]['DerniereConnexionResp'] = get_last_connexion($lig_resp->login);
                            $tab_ele['resp'][$cpt]['DerniereConnexionResp_Echec'] = get_last_connexion($lig_resp->login, "n");
                        }
                    }
                }
                $cpt++;
            }
        }
        // Récup infos responsables resp_legal=0
        $sql = "SELECT rp.*,ra.adr1,ra.adr2,ra.adr3,ra.adr3,ra.adr4,ra.cp,ra.pays,ra.commune,r.resp_legal, r.acces_sp, r.envoi_bulletin FROM resp_pers rp,\n\t\t\t\t\t\t\t\t\t\tresp_adr ra,\n\t\t\t\t\t\t\t\t\t\tresponsables2 r\n\t\t\t\t\tWHERE r.ele_id='" . $tab_ele['ele_id'] . "' AND\n\t\t\t\t\t\t\tr.resp_legal='0' AND\n\t\t\t\t\t\t\tr.pers_id=rp.pers_id AND\n\t\t\t\t\t\t\trp.adr_id=ra.adr_id\n\t\t\t\t\tORDER BY resp_legal;";
        $res_resp = mysqli_query($GLOBALS["mysqli"], $sql);
        //echo "$sql<br />";
        if (mysqli_num_rows($res_resp) > 0) {
            //$cpt=0;
            while ($lig_resp = mysqli_fetch_object($res_resp)) {
                $tab_ele['resp'][$cpt] = array();
                $tab_ele['resp'][$cpt]['pers_id'] = $lig_resp->pers_id;
                $tab_ele['resp'][$cpt]['login'] = $lig_resp->login;
                $tab_ele['resp'][$cpt]['nom'] = $lig_resp->nom;
                $tab_ele['resp'][$cpt]['prenom'] = $lig_resp->prenom;
                $tab_ele['resp'][$cpt]['civilite'] = $lig_resp->civilite;
                $tab_ele['resp'][$cpt]['tel_pers'] = $lig_resp->tel_pers;
                $tab_ele['resp'][$cpt]['tel_port'] = $lig_resp->tel_port;
                $tab_ele['resp'][$cpt]['tel_prof'] = $lig_resp->tel_prof;
                $tab_ele['resp'][$cpt]['mel'] = $lig_resp->mel;
                $tab_ele['resp'][$cpt]['adr1'] = $lig_resp->adr1;
                $tab_ele['resp'][$cpt]['adr2'] = $lig_resp->adr2;
                $tab_ele['resp'][$cpt]['adr3'] = $lig_resp->adr3;
                $tab_ele['resp'][$cpt]['adr4'] = $lig_resp->adr4;
                $tab_ele['resp'][$cpt]['cp'] = $lig_resp->cp;
                $tab_ele['resp'][$cpt]['pays'] = $lig_resp->pays;
                $tab_ele['resp'][$cpt]['commune'] = $lig_resp->commune;
                $tab_ele['resp'][$cpt]['adr_id'] = $lig_resp->adr_id;
                $tab_ele['resp'][$cpt]['resp_legal'] = $lig_resp->resp_legal;
                $tab_ele['resp'][$cpt]['acces_sp'] = $lig_resp->acces_sp;
                $tab_ele['resp'][$cpt]['envoi_bulletin'] = $lig_resp->envoi_bulletin;
                //echo "\$lig_resp->login=".$lig_resp->login."<br />";
                if ($lig_resp->login != "") {
                    $sql = "SELECT etat, auth_mode FROM utilisateurs WHERE login='" . $lig_resp->login . "';";
                    //echo "$sql<br />";
                    $res_u = mysqli_query($GLOBALS["mysqli"], $sql);
                    if (mysqli_num_rows($res_u) > 0) {
                        $lig_u = mysqli_fetch_object($res_u);
                        $tab_ele['resp'][$cpt]['etat'] = $lig_u->etat;
                        $tab_ele['resp'][$cpt]['auth_mode'] = $lig_u->auth_mode;
                        if ($AccesDerniereConnexionResp) {
                            $tab_ele['resp'][$cpt]['DerniereConnexionResp'] = get_last_connexion($lig_resp->login);
                            $tab_ele['resp'][$cpt]['DerniereConnexionResp_Echec'] = get_last_connexion($lig_resp->login, "n");
                        }
                    }
                }
                $cpt++;
            }
        }
    }
    if ($active_cahiers_texte == "y" && $acces_cdt == 'y') {
        $ts_limite_visibilite_comptes_rendus_pour_eleves = time();
        $ts_limite_visibilite_devoirs_pour_eleves = time() + getSettingValue('delai_devoirs') * 24 * 3600;
        $cpt1 = 0;
        // pour initialiser la variable
        $tab_date_ct = array();
        // Un DISTINCT pour éviter les trois exemplaires dûs à j_eleves_groupes
        $sql = "SELECT DISTINCT cte.* FROM  ct_entry cte, j_eleves_groupes jeg WHERE cte.id_groupe=jeg.id_groupe AND jeg.login='" . $ele_login . "' AND cte.date_ct>={$date_ct1} AND cte.date_ct<={$date_ct2} AND cte.date_ct<={$ts_limite_visibilite_comptes_rendus_pour_eleves} ORDER BY cte.date_ct, cte.id_groupe;";
        //echo "$sql<br />";
        $res_ct = mysqli_query($GLOBALS["mysqli"], $sql);
        if (mysqli_num_rows($res_ct) > 0) {
            $cpt1 = 0;
            while ($lig_ct = mysqli_fetch_object($res_ct)) {
                $tab_ele['cdt_entry'][$cpt1] = array();
                $tab_ele['cdt_entry'][$cpt1]['id_ct'] = $lig_ct->id_ct;
                $tab_ele['cdt_entry'][$cpt1]['heure_entry'] = $lig_ct->heure_entry;
                $tab_ele['cdt_entry'][$cpt1]['id_groupe'] = $lig_ct->id_groupe;
                $tab_ele['cdt_entry'][$cpt1]['date_ct'] = $lig_ct->date_ct;
                $tab_ele['cdt_entry'][$cpt1]['id_login'] = $lig_ct->id_login;
                $tab_ele['cdt_entry'][$cpt1]['contenu'] = $lig_ct->contenu;
                /*
                echo "<p>\n";
                foreach($tab_ele['cdt_entry'][$cpt] as $key => $value) {
                	echo "\$tab_ele['cdt_entry'][$cpt]['$key']=$value<br />\n";
                }
                echo "</p>\n";
                */
                $tab_date_ct[] = $lig_ct->date_ct;
                $cpt1++;
            }
        }
        $sql = "SELECT DISTINCT ctde.* FROM ct_devoirs_entry ctde, j_eleves_groupes jeg WHERE ctde.id_groupe=jeg.id_groupe AND jeg.login='" . $ele_login . "' AND ctde.date_ct>={$date_ct1} AND ctde.date_ct<={$date_ct2} AND ctde.date_ct<={$ts_limite_visibilite_devoirs_pour_eleves} ORDER BY ctde.date_ct, ctde.id_groupe;";
        //echo "$sql<br />";
        $res_ct = mysqli_query($GLOBALS["mysqli"], $sql);
        $cpt2 = 0;
        if (mysqli_num_rows($res_ct) > 0) {
            //$cpt2=0;
            while ($lig_ct = mysqli_fetch_object($res_ct)) {
                $tab_ele['cdt_dev'][$cpt2] = array();
                $tab_ele['cdt_dev'][$cpt2]['id_ct'] = $lig_ct->id_ct;
                $tab_ele['cdt_dev'][$cpt2]['id_groupe'] = $lig_ct->id_groupe;
                $tab_ele['cdt_dev'][$cpt2]['date_ct'] = $lig_ct->date_ct;
                $tab_ele['cdt_dev'][$cpt2]['id_login'] = $lig_ct->id_login;
                $tab_ele['cdt_dev'][$cpt2]['contenu'] = $lig_ct->contenu;
                $tab_date_ct[] = $lig_ct->date_ct;
                $cpt2++;
            }
        }
        sort($tab_date_ct);
        $tmp_tab_date_ct = $tab_date_ct;
        unset($tab_date_ct);
        $tab_date_ct = array_unique($tmp_tab_date_ct);
        //array_unique($tab_date_ct);
        $cpt1_2 = $cpt1 + $cpt2;
        $cpt = 0;
        //for($i=0;$i<count($tab_date_ct);$i++) {
        //for($i=0;$i<max($cpt1,$cpt2);$i++) {
        for ($i = 0; $i < $cpt1_2; $i++) {
            //echo "\$tab_date_ct[$i]=".$tab_date_ct[$i]."<br />";
            //if($tab_date_ct[$i]!="") {
            if (isset($tab_date_ct[$i]) && $tab_date_ct[$i] != "") {
                $tab_ele['cdt'][$cpt]['date_ct'] = $tab_date_ct[$i];
                $nbre_cdt_dev = isset($tab_ele['cdt_dev']) ? count($tab_ele['cdt_dev']) : 0;
                for ($j = 0; $j < $nbre_cdt_dev; $j++) {
                    if ($tab_ele['cdt_dev'][$j]['date_ct'] == $tab_date_ct[$i]) {
                        $tab_ele['cdt'][$cpt]['dev'][] = $tab_ele['cdt_dev'][$j];
                    } elseif ($tab_ele['cdt_dev'][$j]['date_ct'] > $tab_date_ct[$i]) {
                        break;
                    }
                }
                if (isset($tab_ele['cdt_entry'])) {
                    for ($j = 0; $j < count($tab_ele['cdt_entry']); $j++) {
                        if ($tab_ele['cdt_entry'][$j]['date_ct'] == $tab_date_ct[$i]) {
                            $tab_ele['cdt'][$cpt]['entry'][] = $tab_ele['cdt_entry'][$j];
                        } elseif ($tab_ele['cdt_entry'][$j]['date_ct'] > $tab_date_ct[$i]) {
                            break;
                        }
                    }
                }
                $cpt++;
            }
        }
    }
    $tab_ele['absences'] = array();
    $sql = "SELECT * FROM absences WHERE login='{$ele_login}' ORDER BY periode;";
    $res = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res) > 0) {
        $cpt = 0;
        while ($lig = mysqli_fetch_object($res)) {
            $tab_ele['absences'][$cpt]['periode'] = $lig->periode;
            $tab_ele['absences'][$cpt]['nb_absences'] = $lig->nb_absences;
            $tab_ele['absences'][$cpt]['non_justifie'] = $lig->non_justifie;
            $tab_ele['absences'][$cpt]['nb_retards'] = $lig->nb_retards;
            $tab_ele['absences'][$cpt]['appreciation'] = $lig->appreciation;
            $cpt++;
        }
    }
    // ============================================================================= //
    // === SUIVI des absences pour ceux qui utilisent la saisie 'fond de classe' === //
    // ============================================================================= //
    $tab_ele['abs_quotidien'] = array();
    $tab_ele['abs_quotidien']['autorisation'] = 'non';
    // ne sera changé que dans le cas où la requête suivante renvoie un résultat
    $ts_quinze_jours_avant = date("U") - 1296000;
    $sql2 = "SELECT DISTINCT * FROM absences_rb WHERE eleve_id = '" . $ele_login . "' AND date_saisie > '" . $ts_quinze_jours_avant . "'";
    $query = mysqli_query($GLOBALS["mysqli"], $sql2);
    if ($query) {
        $test = mysqli_num_rows($query);
        if ($test >= 1) {
            $tab_ele['abs_quotidien']['autorisation'] = 'oui';
        }
        // On enregistre toutes les absences de l'élève dans le tableau
        $s = 0;
        while ($rep = mysqli_fetch_object($query)) {
            $jour = date("d/m", $rep->debut_ts);
            $creneau = mysqli_fetch_array(mysqli_query($GLOBALS["mysqli"], "SELECT nom_definie_periode FROM edt_creneaux WHERE id_definie_periode = '" . $rep->creneau_id . "' LIMIT 1"));
            $tab_ele['abs_quotidien'][$s]['retard_absence'] = $rep->retard_absence;
            $tab_ele['abs_quotidien'][$s]['jour_semaine'] = $rep->jour_semaine . ' ' . $jour;
            $tab_ele['abs_quotidien'][$s]['debut_heure'] = date("H:i", $rep->debut_ts);
            $tab_ele['abs_quotidien'][$s]['creneau'] = $creneau["nom_definie_periode"];
            $s++;
        }
    } else {
        // rien et on laisse
    }
    // Affecter auparavant la valeur de $acces_mod_discipline sur deux tests:
    // - Module actif
    // - Accès au module discipline précisé dans Gestion générale/Droits d'accès
    require_once "../mod_discipline/sanctions_func_lib.php";
    // tab_mod_discipline($ele_login,$mode,$date_debut,$date_fin);
    // $mode=all ou bien qualité: responsable, victime, témoin,...
    $tab_ele['tab_mod_discipline'] = tab_mod_discipline($ele_login, "all", $date_debut_disc, $date_fin_disc);
    return $tab_ele;
}
Example #7
0
				echo "</p>\n";
				echo "</td>\n";
				echo "</tr>\n";

				echo "<tr>\n";
				echo "<td valign='top' width='50%' style='font-size:".$fb_titretab."pt; text-align:left;'>\n";
				echo "<p class='info_ele'>\n";
				echo "<b>Né";
				if($lig1->sexe=='F'){echo "e";}
				echo " le:</b> ".formate_date($lig1->naissance);
				echo "</p>\n";
				echo "</td>\n";
				echo "<td valign='top' width='50%' style='font-size:".$fb_titretab."pt; text-align:left;'>\n";
				echo "<p class='info_ele'>\n";
				echo "<b>à:</b> \n";
				if($ele_lieu_naissance=="y") {echo get_commune($lig1->lieu_naissance,1);}
				echo "</p>\n";
				echo "</td>\n";
				echo "</tr>\n";
				echo "</table>\n";

				//=======================================
				//echo "<div class='fb'>\n";
				echo "<table class='fb' width='100%'>\n";
				echo "<tr>\n";
				if(($type_brevet==4)||($type_brevet==7)){
					echo "<td colspan='5' align='left'>\n";
				}
				else{
					echo "<td colspan='6' align='left'>\n";
				}
Example #8
0
     require "../lib/footer.inc.php";
     die;
 }
 $sql = "TRUNCATE TABLE tempo2;";
 $res0 = mysqli_query($GLOBALS["mysqli"], $sql);
 $retour_commune_manquante = "";
 $retour_commune_etrangere = "";
 $cpt = 0;
 $cpt2 = 0;
 while ($lig = mysqli_fetch_object($res)) {
     if ($lig->lieu_naissance != '') {
         if (strstr($lig->lieu_naissance, '@')) {
             if ($cpt2 > 0) {
                 $retour_commune_etrangere .= "<br />";
             }
             $retour_commune_etrangere .= casse_mot($lig->nom) . " " . casse_mot($lig->prenom, 'majf2') . " <span style='font-size:small'>(" . get_commune($lig->lieu_naissance, 1) . ")</span>";
             $cpt2++;
         } else {
             if ($cpt > 0) {
                 $retour_commune_manquante .= ", ";
             }
             $retour_commune_manquante .= casse_mot($lig->nom) . " " . casse_mot($lig->prenom, 'majf2');
             $cpt++;
         }
     }
 }
 if ($cpt > 0) {
     echo "<p>Les lieux de naissance sont manquants pour ";
     echo $retour_commune_manquante;
     echo "</p>\n";
 } else {
Example #9
0
				$pdf->Cell($pdf->GetStringWidth($texte2),$pdf->FontSize*$sc_interligne, $texte2,0,0,'L');
				$pdf->SetFont('DejaVu','',$fs_titre);
				$pdf->Cell($pdf->GetStringWidth($texte3),$pdf->FontSize*$sc_interligne, $texte3,0,1,'L');

				// Problème potentiel de largeur

				// Deuxième ligne
				if($lig1->sexe=='F') {
					$texte="Née le :";
				}
				else {
					$texte="Né le :";
				}
				$texte.=formate_date($lig1->naissance)." à : ";
				if($ele_lieu_naissance=='y') {
					$texte.=get_commune($lig1->lieu_naissance, 2);
				}
				$pdf->Cell($pdf->GetStringWidth($texte),$pdf->FontSize*$sc_interligne, $texte,0,0,'L');

				$pdf->SetFont('DejaVu','B',$fs_txt);
				//$texte="ACADÉMIE DE ".strtoupper($fb_academie);
				$texte="ACADÉMIE DE ".casse_mot($fb_academie);
				$x=$l_page-$marge-$pdf->GetStringWidth($texte);
				$pdf->setXY($x,$pdf->GetY());
				$pdf->Cell($pdf->GetStringWidth($texte),$pdf->FontSize*$sc_interligne, $texte,0,1,'R');

				// Il n'y a pas le département sur le modèle Lille
				//$pdf->SetXY($marge,$pdf->GetY()+$pdf->FontSize*$r_interligne);
				//$pdf->Cell($larg_acad,$pdf->FontSize*$sc_interligne, "Département: $fb_departement",0,2,'');
			
				//================================================
Example #10
0
			$sql="SELECT DISTINCT e.* FROM eleves e, j_eleves_groupes jeg WHERE jeg.login=e.login AND jeg.id_groupe='$id_groupe[$i]' ORDER BY e.nom, e.prenom;";
			$res=mysqli_query($GLOBALS["mysqli"], $sql);
			if(mysqli_num_rows($res)>0) {
				while($lig=mysqli_fetch_object($res)) {
					$tab_eleves_OOo[$nb_eleve]=array();

					$tab_eleves_OOo[$nb_eleve]['login']=$lig->login;
					$tab_eleves_OOo[$nb_eleve]['nom']=$lig->nom;
					$tab_eleves_OOo[$nb_eleve]['prenom']=$lig->prenom;
					$tab_eleves_OOo[$nb_eleve]['ine']=$lig->no_gep;
					$tab_eleves_OOo[$nb_eleve]['fille']="";
					if($lig->sexe=='F') {$tab_eleves_OOo[$nb_eleve]['fille']="e";} // ajouter un e à née si l'élève est une fille
					$tab_eleves_OOo[$nb_eleve]['date_nais']=formate_date($lig->naissance);
					$tab_eleves_OOo[$nb_eleve]['lieu_nais']=""; // on initialise les champs pour ne pas avoir d'erreurs
					if(getSettingValue('ele_lieu_naissance')=="y") {
						$tab_eleves_OOo[$nb_eleve]['lieu_nais']=preg_replace ( '@<[\/\!]*?[^<>]*?>@si'  , ''  , get_commune($lig->lieu_naissance,1)) ;
					} // récupérer la commune

					$tab_eleves_OOo[$nb_eleve]['classe']=$current_group['classlist_string'];

					$nb_eleve++;
				}
			}
		}
	}

	$mode_ooo="imprime";

	include_once('./lib/tinyButStrong.class.php');
	include_once('./lib/tinyDoc.class.php');
Example #11
0
     $sql = "SELECT DISTINCT e.*\n\t\t\tFROM eleves e, j_eleves_classes j\n\t\t\tWHERE (\n\t\t\tj.id_classe='" . $id_classe . "' AND\n\t\t\tj.login = e.login AND\n\t\t\tperiode='" . $periode_num . "'\n\t\t\t) ORDER BY nom, prenom";
 }
 $appel_donnees_eleves = mysqli_query($GLOBALS["mysqli"], $sql);
 $nombre_lignes = mysqli_num_rows($appel_donnees_eleves);
 $i = 0;
 while ($i < $nombre_lignes) {
     $eleve_login = old_mysql_result($appel_donnees_eleves, $i, "login");
     $eleve_nom = old_mysql_result($appel_donnees_eleves, $i, "nom");
     $eleve_prenom = old_mysql_result($appel_donnees_eleves, $i, "prenom");
     $eleve_sexe = old_mysql_result($appel_donnees_eleves, $i, "sexe");
     $eleve_naissance = old_mysql_result($appel_donnees_eleves, $i, "naissance");
     if (isset($format_naiss) && $format_naiss == 'jjmmaaaa') {
         $eleve_naissance = formate_date($eleve_naissance);
     }
     if ($avec_lieu_naiss == 'y') {
         $eleve_lieu_naissance = get_commune(old_mysql_result($appel_donnees_eleves, $i, "lieu_naissance"), '2');
     }
     //$fd.="$classe;$eleve_login;$eleve_nom;$eleve_prenom;$eleve_sexe;$eleve_naissance\n";
     $eleve_email = old_mysql_result($appel_donnees_eleves, $i, "email");
     $eleve_no_gep = old_mysql_result($appel_donnees_eleves, $i, "no_gep");
     $eleve_elenoet = old_mysql_result($appel_donnees_eleves, $i, "elenoet");
     $eleve_ele_id = old_mysql_result($appel_donnees_eleves, $i, "ele_id");
     if (isset($avec_doublant) && $avec_doublant == 'y' || isset($avec_regime) && $avec_regime == 'y') {
         $eleve_doublant = old_mysql_result($appel_donnees_eleves, $i, "doublant");
         $eleve_regime = old_mysql_result($appel_donnees_eleves, $i, "regime");
     }
     /*
     if(((isset($avec_doublant))&&($avec_doublant=='y'))||
     ((isset($avec_regime))&&($avec_regime=='y'))) {
     	$sql="SELECT * FROM j_eleves_regime WHERE login='".$current_eleve["login"]."';";
     	$res_tmp=mysql_query($sql);
Example #12
0
     $motif = "Temoin_eleve" . $id_classe . "_" . $periode_num;
     decompte_debug($motif, "{$motif} élève {$i}: " . $current_eleve_login[$i]);
     flush();
     echo "<script type='text/javascript'>\n\t\tdocument.getElementById('td_ele').innerHTML='" . $current_eleve_login[$i] . "';\n\t</script>\n";
 }
 //==============================
 // Récup des infos sur l'élève, les responsables, le PP, le CPE,...
 $sql = "SELECT * FROM eleves e WHERE e.login='" . $current_eleve_login[$i] . "';";
 $res_ele = mysqli_query($GLOBALS["mysqli"], $sql);
 $lig_ele = mysqli_fetch_object($res_ele);
 $tab_ele['login'] = $current_eleve_login[$i];
 $tab_ele['nom'] = $lig_ele->nom;
 $tab_ele['prenom'] = $lig_ele->prenom;
 $tab_ele['sexe'] = $lig_ele->sexe;
 $tab_ele['naissance'] = formate_date($lig_ele->naissance);
 $tab_ele['lieu_naissance'] = get_commune($lig_ele->lieu_naissance, 2);
 $tab_ele['elenoet'] = $lig_ele->elenoet;
 $tab_ele['ele_id'] = $lig_ele->ele_id;
 $tab_ele['no_gep'] = $lig_ele->no_gep;
 $tab_ele['classe'] = $classe;
 $tab_ele['id_classe'] = $id_classe;
 $tab_ele['classe_nom_complet'] = $classe_nom_complet;
 // Régime et redoublement
 $sql = "SELECT * FROM j_eleves_regime WHERE login='" . $current_eleve_login[$i] . "';";
 $res_ele_reg = mysqli_query($GLOBALS["mysqli"], $sql);
 if (mysqli_num_rows($res_ele_reg) > 0) {
     $lig_ele_reg = mysqli_fetch_object($res_ele_reg);
     $tab_ele['regime'] = $lig_ele_reg->regime;
     $tab_ele['doublant'] = $lig_ele_reg->doublant;
 }
 //$sql="SELECT e.* FROM etablissements e, j_eleves_etablissements j WHERE (j.id_eleve ='".$current_eleve_login[$i]."' AND e.id = j.id_etablissement);";
Example #13
0
				$pdf->SetXY($x_col_prenom,$y_nom_ele);
				$pdf->Cell($larg_col_prenom,$pdf->FontSize*$sc_interligne, "Prénom(s):",$bord_debug,0,'');
				//$pdf->SetXY(135,45);
				//$pdf->Cell(75,10, "Edgar, Simon, Bidule",$bord_debug,2,'');
				$pdf->SetFont('DejaVu','',$fs_txt);
				$pdf->Cell($larg_col_val_prenom,$pdf->FontSize*$sc_interligne, $lig1->prenom,$bord_debug,1,'');
			
				//$pdf->SetXY($x_col_prenom,$y_nom_ele+$pdf->FontSize*$sc_interligne);
				$pdf->SetFont('DejaVu','B',$fs_txt);
				$pdf->SetXY($x_col_prenom,$pdf->GetY());
				$pdf->Cell($larg_col_prenom,$pdf->FontSize*$sc_interligne, "à:",$bord_debug,0,'');
				//$pdf->SetXY(135,55);
				//$pdf->Cell(75,10, "Lisieux (14)",$bord_debug,2,'');
				$pdf->SetFont('DejaVu','',$fs_txt);
				if($ele_lieu_naissance=='y') {
					$pdf->Cell($larg_col_val_prenom,$pdf->FontSize*$sc_interligne, get_commune($lig1->lieu_naissance, 2),$bord_debug,1,'');
				}
				else {
					$pdf->Cell($larg_col_val_prenom,$pdf->FontSize*$sc_interligne, '',$bord_debug,1,'');
				}

				//================================================
				// TABLEAU ADRESSE ETAB
				//$pdf->SetXY($marge,65);
				$pdf->SetFont('DejaVu','B',$fs_txt);
				$y_etab=$pdf->GetY();
				//$pdf->Cell($larg_col_etab,2*$pdf->FontSize*$sc_interligne, "",'LBT',1,'');

				$pdf->SetXY($marge,$y_etab);
				$pdf->Cell($larg_col_etab,$pdf->FontSize*$sc_interligne, "Établissement fréquenté:",'',0,'');
				$x=$pdf->GetX();
Example #14
0
function affiche_tableau_infos_eleves_associes_au_resp($pers_id, $login_resp = "")
{
    $retour = "";
    if ($pers_id != "") {
        $sql = "(SELECT e.* FROM eleves e,\n\t\t\t\t\t\tresponsables2 r\n\t\t\t\t\tWHERE e.ele_id=r.ele_id AND\n\t\t\t\t\t\tr.pers_id='" . $pers_id . "' AND\n\t\t\t\t\t(r.resp_legal='1' OR r.resp_legal='2') ORDER BY e.nom,e.prenom)";
    } else {
        $sql = "(SELECT e.* FROM eleves e,\n\t\t\t\t\t\tresponsables2 r, \n\t\t\t\t\t\tresp_pers rp\n\t\t\t\t\tWHERE e.ele_id=r.ele_id AND \n\t\t\t\t\t\tr.pers_id=rp.pers_id AND \n\t\t\t\t\t\trp.login='" . $login_resp . "' AND \n\t\t\t\t\t(r.resp_legal='1' OR r.resp_legal='2') ORDER BY e.nom,e.prenom)";
    }
    //$retour.="$sql<br />";
    $res_ele = mysqli_query($GLOBALS["mysqli"], $sql);
    if (mysqli_num_rows($res_ele) > 0) {
        while ($lig_ele = mysqli_fetch_object($res_ele)) {
            $tab_clas = get_class_from_ele_login($lig_ele->login);
            $ligne_login = "";
            $sql = "SELECT etat, auth_mode FROM utilisateurs WHERE statut='eleve' AND etat='actif' AND login='{$lig_ele->login}';";
            $test_compte = mysqli_query($GLOBALS["mysqli"], $sql);
            if (mysqli_num_rows($test_compte) > 0) {
                $lig_user = mysqli_fetch_object($test_compte);
                $ligne_login = "\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Login</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . $lig_ele->login . "<br />\n\t\t\t\t\t\t(<em>compte <span style='color:" . ($lig_user->etat == 'actif' ? "green' title='Le compte peut se connecter" : "red' title='Le compte ne peut pas se connecter") . "'>" . $lig_user->etat . "</span></em>)\n\t\t\t\t\t</td>\n\t\t\t\t</tr>";
            }
            $ligne_lieu_naissance = "";
            if (getSettingAOui('ele_lieu_naissance')) {
                $ligne_lieu_naissance = "\n\t\t\t\t<tr>\n\t\t\t\t\t<th>Lieu de naissance</th>\n\t\t\t\t\t<td>" . get_commune($lig_ele->lieu_naissance, 1) . "</td>\n\t\t\t\t</tr>";
            }
            $ligne_tel_pers_ele = "";
            if (getSettingAOui('ele_tel_pers')) {
                $ligne_tel_pers_ele = "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Tél.personnel</th>\n\t\t\t\t\t\t<td>" . $lig_ele->tel_pers . "</td>\n\t\t\t\t\t</tr>";
            }
            $ligne_tel_pers_port = "";
            if (getSettingAOui('ele_tel_port')) {
                $ligne_tel_pers_port = "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Tél.portable</th>\n\t\t\t\t\t\t<td>" . $lig_ele->tel_port . "</td>\n\t\t\t\t\t</tr>";
            }
            $ligne_tel_pers_prof = "";
            if (getSettingAOui('ele_tel_prof')) {
                $ligne_tel_pers_prof = "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Tél.professionnel</th>\n\t\t\t\t\t\t<td>" . $lig_ele->tel_prof . "</td>\n\t\t\t\t\t</tr>";
            }
            $ligne_regime = "";
            $sql = "SELECT * FROM j_eleves_regime WHERE login='{$lig_ele->login}';";
            $res_reg = mysqli_query($GLOBALS["mysqli"], $sql);
            if (mysqli_num_rows($res_reg) > 0) {
                $lig_reg = mysqli_fetch_object($res_reg);
                $ligne_regime = "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Régime</th>\n\t\t\t\t\t\t<td>";
                if ($lig_reg->regime == "d/p") {
                    $ligne_regime .= "Demi-pensionnaire";
                } elseif ($lig_reg->regime == "ext.") {
                    $ligne_regime .= "Externe";
                } elseif ($lig_reg->regime == "int.") {
                    $ligne_regime .= "Interne";
                } elseif ($lig_reg->regime == "i-e") {
                    $ligne_regime .= "Interne&nbsp;externé";
                    if (my_strtoupper($tab_ele['sexe']) != "F") {
                        $ligne_regime .= "e";
                    }
                }
                $ligne_regime .= "</td>\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Redoublant</th>\n\t\t\t\t\t\t<td>" . ($lig_reg->doublant == "R" ? "Oui" : "Non") . "</td>\n\t\t\t\t\t</tr>";
            }
            $retour .= "\n\t\t\t<div style='float:left; width:25em; margin-left:2em;'>\n\t\t\t\t<table class='boireaus boireaus_alt boireaus_th_left' summary='Tableau de vos informations personnelles'>\n\t\t" . $ligne_login . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Nom</th>\n\t\t\t\t\t\t<td>" . $lig_ele->nom . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Prénom</th>\n\t\t\t\t\t\t<td>" . $lig_ele->prenom . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Genre</th>\n\t\t\t\t\t\t<td>" . ($lig_ele->sexe == 'F' ? "féminin" : "masculin") . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Né(e) le</th>\n\t\t\t\t\t\t<td>" . formate_date($lig_ele->naissance) . "</td>\n\t\t\t\t\t</tr>" . $ligne_lieu_naissance . $ligne_tel_pers_ele . $ligne_tel_pers_port . $ligne_tel_pers_prof . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Email (*)</th>\n\t\t\t\t\t\t<td>" . $lig_ele->email . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Classe</th>\n\t\t\t\t\t\t<td>" . $tab_clas['liste_nbsp'] . "</td>\n\t\t\t\t\t</tr>" . $ligne_regime . "\n\t\t\t\t</table>\n\t\t\t</div>";
        }
    }
    return $retour;
}
Example #15
0
    echo "' onKeyDown='clavier_2(this.id,event,1,31);' AutoComplete='off' title=\"Vous pouvez modifier le jour de naissance à l'aide des flèches Up et Down du pavé de direction.\" />";
    echo " Mois <input type='text' name='birth_month' id='birth_month' size='2' onchange='changement();' value='";
    if (isset($eleve_naissance_mois)) {
        echo $eleve_naissance_mois;
    }
    echo "' onKeyDown='clavier_2(this.id,event,1,12);' AutoComplete='off' title=\"Vous pouvez modifier le mois de naissance à l'aide des flèches Up et Down du pavé de direction.\" />";
    echo " Année <input type='text' name='birth_year' id='birth_year' size='2' onchange='changement();' value='";
    if (isset($eleve_naissance_annee)) {
        echo $eleve_naissance_annee;
    }
    echo "' onKeyDown='clavier_2(this.id,event,1970,2100);' AutoComplete='off' title=\"Vous pouvez modifier l'année de naissance à l'aide des flèches Up et Down du pavé de direction.\" />";
    if (getSettingValue('ele_lieu_naissance') == 'y') {
        echo "<br />\n";
        echo "<b>Lieu de naissance&nbsp;:</b> ";
        if (isset($eleve_lieu_naissance)) {
            echo get_commune($eleve_lieu_naissance, 1);
        } else {
            echo "<span style='color:red'>Non défini</span>";
        }
        echo "\n";
    }
    ?>
</div></td>

</tr>
</table></center>

<p><b>Remarque</b> :
<br />- Les champs * sont obligatoires.</p>
<?php 
}