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 $retour; $c=new Supplier($cn); echo '
'; echo ''; echo ''; echo dossier::hidden(); echo $c->blank($_GET['fd_id']); echo ''; echo ''; echo '
'; echo $retour; echo '
'; } //----------------------------------------------------- // list if ( $sub_action == "list" ) { ?>
', $a); ?>
name="fd_id"; $w->value= make_array($cn,"select fd_id,fd_label from fiche_def where ". " frd_id=".FICHE_TYPE_FOURNISSEUR); echo $w->IOValue(); echo dossier::hidden(); ?>
'; 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 $sup->Display(false); $w=new widget("hidden"); $w->name="p_action"; $w->value="fournisseur"; echo $w->IOValue(); $w->name="f_id"; $w->value=$f_id; echo $w->IOValue(); echo widget::submit('mod','Sauver les modifications'); echo widget::reset("Annuler"); echo widget::submit('delete','Effacer cette fiche','onclick="return confirm(\'Confirmer effacement ?\');"'); echo '
'; echo $retour; echo '
'; } html_page_stop(); ?>