<?php

include ("config.php");

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

include ("header.php");

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

echo "<tr>\n";
echo "<th class=\"center\" colspan=\"2\">Liste des couvertures sociales</th>\n";
echo "</tr>\n";

$list_couv = $menu->list_couv_soc();

if ($c = count($list_couv))
{
	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>\n";
		echo "<td>" . $list_couv[$i]["couv_nom"] . "</td>\n";
		echo "<td class=\"action\"><a class=\"slink\" href=\"couverture_edition.php?id_couv=" . $list_couv[$i]["id_couv"] . "\">Modifier</a> <a class=\"sdel\" href=\"couverture_suppression.php?id_couv=" . $list_couv[$i]["id_couv"] . "\">Supprimer</a></td>\n";
		echo "</tr>\n";
	}
}
else
{
	echo "<tr>\n";
	echo "<td class=\"center error\" colspan=\"2\">Aucune couverture sociale enregistr&eacute;e</td>\n";
	echo "</tr>\n";
}

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

echo "<p><a class=\"slink\" href=\"couverture_edition.php\">Ajouter une couverture sociale</a></p>\n";

include ("footer.php");

?>