<?php

include ("config.php");

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

_request("id_mod", "confirm");

if ($info_mod = $menu->get_module($id_mod))
	$mod_nom = $info_mod["mod_nom"];
else
	header ("Location: module.php");

if ($confirm == 1)
{
	if ($menu->del_module($id_mod))
		header ("Location: module.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_module($id_mod))
	echo "<p class=\"error center\">Impossible de supprimer ce module car il est (a &eacute;t&eacute;) suivi 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 un module</th>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"r\"><label for=\"mod_nom\">Nom</label></td>\n";
	echo "<td><input type=\"text\" class=\"int\" name=\"mod_nom\" id=\"mod_nom\" value=\"" . $mod_nom . "\" readonly=\"readonly\" /></td>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"center\" colspan=\"2\"><a class=\"sdel\" href=\"module_suppression.php?id_mod=" . $id_mod . "&amp;confirm=1\">Confirmer la suppression de ce module</a></td>\n";
	echo "</tr>\n";
	
	echo "</table>\n";
	echo "</div>\n";
}

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

include ("footer.php");

?>