Check();
include_once("form_inc.php");
include_once ("user_menu.php");
echo '
';
include ("check_priv.php");
$cn=DbConnect($gDossier);
echo ShowMenuAdvanced(6);
// Get The priv on the selected folder
$User->can_request($cn,FORM);
if ( isset ($_POST["record"] )) {
// echo '';
AddForm($cn,$_POST);
//echo "
";
}
if ( isset ($_POST["del_form"]) ) {
// echo '';
DeleteForm($cn,$_POST['fr_id']);
// echo "
";
}
ShowMenuComptaForm();
if ( isset( $_REQUEST['PHPSESSID'])) {
$sessid = $_REQUEST['PHPSESSID'];
}
if ( isset ($_GET["action"]) ) {
$action=$_GET["action"];
if ($action == "add" )
{
echo '';
EncodeForm(10,$sessid);
echo "
";
}
if ($action=="view" ) {
echo '';
if ( ! $_GET["fr_id"] ) {
echo_error("fr_id n'est pas donné");
return;
}
ViewForm($cn,$sessid,$_GET["fr_id"]);
echo "
";
}
} // if $_GET
if ( isset ($_POST["add_line"]) ) {
echo '';
$line=$_POST["line"];
EncodeForm($line+1,$sessid,$_POST);
echo "
";
}
if ( isset ($_POST["update"]) ) {
echo '';
UpdateForm($cn,$_POST);
ViewForm($cn,$sessid,$_POST["fr_id"]);
echo "
";
}
//echo "";
html_page_stop();
?>