can_request(GESUPPL);
$script=basename($_SERVER['PHP_SELF']);
?>
remove();
$sub_action="list";
}
//-----------------------------------------------------
// Add card
if ( $sub_action=="insert" )
{
echo '
';
$retour=widget::button_href("Retour", urldecode($_REQUEST['url']));
$supplier=new Supplier($cn);
$supplier->Save($_REQUEST['fd_id']);
echo $retour;
echo "
";
echo $supplier->Display(true);
echo "
";
echo $retour;
echo '
';
}
//-----------------------------------------------------
// Save modification
if ( isset ($_POST['mod']))
{
// modification is asked
$f_id=$_REQUEST['f_id'];
$sup=new Supplier($cn,$f_id);
$sup->Save();
}
// by default open liste
if ( $sub_action == "" )
$sub_action="list";
//-----------------------------------------------------
//Display a blank card
if ( $sub_action=="blank")
{
$retour=widget::button_href('Retour','?p_action=fournisseur&'.dossier::get());
echo '
';
echo '
';
echo $sup->Summary($search);
echo '
';
echo '
';
}
//-----------------------------------------------------
// Show Detail
if ( $sub_action == 'detail' )
{
$f_id=$_REQUEST['f_id'];
echo '';
$sup=new Supplier($cn,$f_id);
$retour=widget::button_href("Retour", urldecode($_REQUEST['url']));
echo $retour;
echo '
';
echo $retour;
echo '
';
}
html_page_stop();
?>