<?php

include ("config.php");

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

_request("id_spe");
_post("spe_nom", "edit_submit");

if (empty($edit_submit) && $info_spe = $menu->get_specialite($id_spe))
	$spe_nom = $info_spe["spe_nom"];

if ($edit_submit)
{
	if ($spe_nom)
	{
		if ($menu->edit_specialite($id_spe, $spe_nom))
			header ("Location: specialite.php?action=ajout");
	}
	else
		$error = 2;
}

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";
}

echo "<p class=\"center\">(" . req() . ") Champs &agrave; remplir obligatoirement</p>\n";

echo "<div id=\"form-menu\">\n";
echo "<form action=\"specialite_edition.php\" method=\"post\">\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> " . req() . "</td>\n";
echo "<td><input type=\"text\" class=\"int\" name=\"spe_nom\" id=\"spe_nom\" value=\"" . $spe_nom . "\" /></td>\n";
echo "</tr>\n";

echo "<tr>\n";
echo "<td class=\"center\" colspan=\"2\">";
echo "<input type=\"hidden\" name=\"id_spe\" value=\"" . $id_spe . "\" />";
echo "<input class=\"inb\" type=\"submit\" name=\"edit_submit\" value=\"Enregistrer\" />";
echo "</td>\n";
echo "</tr>\n";

echo "</table>\n";
echo "</form>\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");

?>