Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/Administration/ListeEtudiant_aSupprimer.php
<?
    
    include("../BarreDeMenu.php3");
    
    include("../session/security.php");

// Entete
    buildHeader("<font color=red> ATTENTION:</font><BR> Voici la liste des &eacute;tudiants <br>qui vont disparaitre de la BASE");

// Verification de la session
	$autorisation_list[0]=0; // Administrateur
	$autorisation_list[1]=3; // Gestionnaire
	$user_type = validateSession($id_session);
	if ($user_type == -1 || !security($id_session,$autorisation_list)) print("Accès refusé");
    else
    {
// Barre de menu
		buildMenuBar($id_session,$user_type,"etudiant.php3",false);
// Determination du user_id
		$user_id = getUserID($id_session);
// Ouverture de la connexion avec la base de donnees
	    $connection = openConnection($databaseName);
	echo "<form name='formulaire' method='get' action='SupprimerEtudiant_promo.php'>\n";
	$n=count($tab_etudiant);
	echo "<table border=0 align='center' bgcolor='#B1D0F3' width=400>\n";
	echo "<col span=1 align=center>\n";
	if($n!=0){
	  //requete pour selectionner les étudiants
	  foreach($tab_etudiant as $i=>$etudiant){
	    echo "<input type=hidden name='tab_etudiant[$i]' value='$etudiant'>\n";
	    $result=mysql_query("select nom,prenom from etudiant where id_etudiant=$etudiant");
	    $un_etudiant=mysql_fetch_array($result);
	    echo "<tr><td>".$un_etudiant["nom"]." ".$un_etudiant["prenom"]."</td></tr>\n"; 
	  }
	}
	else{
	  echo "<tr><td>Pas d'étudiants sélectionnés</td></tr>";
	}
	echo "</table>\n<br>\n";
 
	print("	 <table  align='center' border=1 bordercolor='#ffffff' bgcolor='#B1D0F3' cellpadding=5 width=400><tr><td>\n");
        print("      <table border=0 cellspacing=1 cellpadding=5 align=center>\n");
        print("        <tr valign=middle align=center>\n");
        if($n!=0){
          $acte="Annuler";
          print("          <td width=40><input type=submit name='test' value='Valider la suppression définitive'></td>\n");
 	}
 	else{
 	  $acte="Retour";
 	}
 	print("          <td width=40><input type=submit name='test' value='$acte'></td>\n");
 	print("        </tr>\n");
  	print("      </table>\n");
  
  	echo "<input type='hidden' name='id_promotion' value='$id_promotion'>\n";
        echo "<input type='hidden' name='id_session' value='$id_session'>\n";
	echo "</form>\n";	    
}	    
buildEndOfPage();	    
?>
Return current item: EmploiNet : a timetable web manager