$rubrique="form";
$rubrique2="prog";
//
// Connexion a la base de donnees
//
include ("../script/admin/connect.php");
$query = "SELECT ID, type, titre, titre0, titre2, duree, soustitre, objectif, facultatif";
$query.= " FROM tbl_formation";
if ($edit=="1") $query.= " WHERE publi='prev' OR publi='publi'";
else $query.= " WHERE publi='publi'";
$query.= " ORDER BY ID";
$mysql_result = mysql_query($query)
or die ("Erreur SQL n¡ " . mysql_errno() . " : " . mysql_error() . "
");
$nbFormation = mysql_num_rows($mysql_result);
//
// Affichage de la page
//
include ("../script/gab/page.php");
?>
Formations Management des pratiques
// // Tri des formations // $cpt = 0; while ($cpt < $nbFormation) { // Affichage des formations mysql_data_seek($mysql_result, $cpt); $row = mysql_fetch_array($mysql_result); $formation_ID = $row["ID"]; $formation_type = $row["type"]; $formation_titre = $row["titre"]; $formation_titre0 = $row["titre0"]; $formation_titre2 = $row["titre2"]; $formation_soustitre = $row["soustitre"]; $formation_duree = $row["duree"]; $formation_objectif = $row["objectif"]; $formation_facultatif = $row["facultatif"]; // // Affichage des formations // print "";
if ($formation_titre0 != "") print $formation_titre0 . " ";
?> print $formation_titre ?>
print " " .$formation_titre2;
?>
if ($formation_duree > 0) {
print " (" . $formation_duree . " ";
if ($formation_duree > 1) {
print "jours";
} else {
print "jour";
}
if ($formation_facultatif > 0) {
print " + " . $formation_duree . " ";
if ($formation_facultatif > 1) {
print "jours";
} else {
print "jour";
}
}
print ")";
}
print "
";
if ($formation_soustitre !="") print $formation_soustitre;
else print $formation_objectif;
print "