<?php

include ("config.php");

$highlight_menu = 5;
$highlight_cousu = 1;
$display_consu = true;

_request("id_rdv", "confirm");

if ($confirm == 1)
{
  if ($rdv->del_rdv($id_rdv))
	{
    header ("Location: rdv.php?action=suppression");
		exit;
	}
}

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

$info_rdv = $rdv->get_rdv($id_rdv);
// $info_pat = $pat->get_patient($info_rdv["id_pat"]);

echo "<div id=\"form-menu\">\n";
echo "<table class=\"center\">\n";

echo "<tr>\n";
echo "<th class=\"center\" colspan=\"2\">Informations concernant un rdv</th>\n";
echo "</tr>\n";
/*
echo "<tr>\n";
echo "<td class=\"r\"><label for=\"patient\">Patient</label></td>\n";
echo "<td><input type=\"text\" class=\"int\" name=\"patient\" id=\"patient\" value=\"" . $info_pat["pat_nom"]  . " " . $info_pat["pat_prenom"] . "\" readonly=\"readonly\" /></td>\n";
echo "</tr>\n";
*/
echo "<tr>\n";
echo "<td class=\"r\"><label for=\"date_rdv\">Date</label></td>\n";
echo "<td><input type=\"text\" class=\"int\" name=\"date_rdv\" id=\"date_rdv\" value=\"" . format_date($info_rdv["rdv_date"])  . "\" readonly=\"readonly\" /></td>\n";
echo "</tr>\n";

echo "<tr>\n";
echo "<td class=\"center\" colspan=\"2\"><a class=\"sdel\" href=\"rdv_suppression.php?id_rdv=" . $id_rdv . "&amp;confirm=1\">Confirmer la suppression de ce rdv</a></td>\n";
echo "</tr>\n";

echo "</table>\n";
echo "</div>\n";

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

include ("footer.php");

?>