<?php

include ("config.php");

$highlight_menu = 4;
$highlight_sous_menu = 3;
$display_menu = true;

include ("header.php");

echo "<div id=\"list-menu\">\n";
echo "<table class=\"list pad\">\n";

echo "<tr>\n";
echo "<th class=\"center\" colspan=\"2\">Liste des sp&eacute;cialit&eacute;s</th>\n";
echo "</tr>\n";

$list_spe = $menu->list_specialite();

if ($c = count($list_spe))
{
	echo "<tr class=\"titre\">\n";
	echo "<td>Nom</td>\n";
	echo "<td>Action</td>\n";
	echo "</tr>\n";

	for ($i = 0; $i < $c; $i++)
	{
		echo "<tr" . ($i % 2 == 0 ? "" : " class=\"inter\"") . ">\n";
		echo "<td>" . $list_spe[$i]["spe_nom"] . "</td>\n";
		echo "<td class=\"action\"><a class=\"slink\" href=\"specialite_edition.php?id_spe=" . $list_spe[$i]["id_spe"] . "\">Modifier</a> <a class=\"sdel\" href=\"specialite_suppression.php?id_spe=" . $list_spe[$i]["id_spe"] . "\">Supprimer</a></td>\n";
		echo "</tr>\n";
	}
}
else
{
	echo "<tr>\n";
	echo "<td class=\"center error\" colspan=\"2\">Aucune sp&eacute;cialit&eacute; enregistr&eacute;e</td>\n";
	echo "</tr>\n";
}

echo "</table>\n";
echo "</div>\n";

echo "<p><a class=\"slink\" href=\"specialite_edition.php\">Ajouter une sp&eacute;cialit&eacute;</a></p>\n";

include ("footer.php");

?>