<?php

include ("config.php");

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

_request("id_couv", "confirm");

if ($info_couv = $menu->get_couv_soc($id_couv))
	$couv_nom = $info_couv["couv_nom"];
else
	header ("Location: couverture.php");

if ($confirm == 1)
{
	if ($menu->del_couv_soc($id_couv))
		header ("Location: couverture.php?action=suppression");
}

include ("header.php");

if (!empty($error))
{
	if (is_int($error)) 
		echo "<p class=\"center error\">" . $error_list[$error] . "</p>\n";
	else
		echo "<p class=\"center error\">" . $error . "</p>\n";
}

if ($menu->check_couv_soc($id_couv))
	echo "<p class=\"error center\">Impossible de supprimer cette couverture sociale car elle est utilis&eacute; par un patient</p>\n";
else
{
	echo "<div id=\"form-menu\">\n";
	echo "<table class=\"center\">\n";
	
	echo "<tr>\n";
	echo "<th class=\"center\" colspan=\"2\">Informations concernant une couverture sociale</th>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"r\"><label for=\"couv_nom\">Nom</label></td>\n";
	echo "<td><input type=\"text\" class=\"int\" name=\"couv_nom\" id=\"couv_nom\" value=\"" . $couv_nom . "\" readonly=\"readonly\" /></td>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"center\" colspan=\"2\"><a class=\"sdel\" href=\"couverture_suppression.php?id_couv=" . $id_couv . "&amp;confirm=1\">Confirmer la suppression de cette couverture sociale</a></td>\n";
	echo "</tr>\n";
	
	echo "</table>\n";
	echo "</div>\n";
}

echo "<p><a class=\"slink\" href=\"couverture.php\">Retour &agrave; la liste des couvertures sociales</a></p>\n";

include ("footer.php");

?>