<?php

include ("config.php");

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

_request("id_zone");
_post("zone_nom", "edit_submit");

if (empty($edit_submit) && $info_zone = $menu->get_zone_geo($id_zone))
	$zone_nom = $info_zone["zone_nom"];

if ($edit_submit)
{
	if ($zone_nom)
	{
		if ($menu->edit_zone_geo($id_zone, $zone_nom))
			header ("Location: zone.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=\"zone_edition.php\" method=\"post\">\n";
echo "<table class=\"center\">\n";

echo "<tr>\n";
echo "<th class=\"center\" colspan=\"2\">Informations concernant une zone g&eacute;ographique</th>\n";
echo "</tr>\n";

echo "<tr>\n";
echo "<td class=\"r\"><label for=\"zone_nom\">Nom</label> " . req() . "</td>\n";
echo "<td><input type=\"text\" class=\"int\" name=\"zone_nom\" id=\"zone_nom\" value=\"" . $zone_nom . "\" /></td>\n";
echo "</tr>\n";

echo "<tr>\n";
echo "<td class=\"center\" colspan=\"2\">";
echo "<input type=\"hidden\" name=\"id_zone\" value=\"" . $id_zone . "\" />";
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=\"zone.php\">Retour &agrave; la liste des zones g&eacute;ographiques</a></p>\n";

include ("footer.php");

?>