<?php

include ("config.php");

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

_request("id_spe", "confirm");

if ($info_spe = $menu->get_specialite($id_spe))
	$spe_nom = $info_spe["spe_nom"];
else
	header ("Location: specialite.php");

if ($confirm == 1)
{
	if ($menu->del_specialite($id_spe))
		header ("Location: specialite.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_specialite($id_spe))
	echo "<p class=\"error center\">Impossible de supprimer cette sp&eacute;cialit&eacute; car elle est utilis&eacute; par les correspondants d'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 sp&eacute;cialit&eacute;</th>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"r\"><label for=\"spe_nom\">Nom</label></td>\n";
	echo "<td><input type=\"text\" class=\"int\" name=\"spe_nom\" id=\"spe_nom\" value=\"" . $spe_nom . "\" readonly=\"readonly\" /></td>\n";
	echo "</tr>\n";
	
	echo "<tr>\n";
	echo "<td class=\"center\" colspan=\"2\"><a class=\"sdel\" href=\"specialite_suppression.php?id_spe=" . $id_spe . "&amp;confirm=1\">Confirmer la suppression de cette sp&eacute;cialit&eacute;</a></td>\n";
	echo "</tr>\n";
	
	echo "</table>\n";
	echo "</div>\n";
}

echo "<p><a class=\"slink\" href=\"specialite.php\">Retour &agrave; la liste des sp&eacute;cialit&eacute;s</a></p>\n";

include ("footer.php");

?>