AccessRequest($cn,CLIENT); ?> remove(); $sub_action="list"; } //----------------------------------------------------- // Add card if ( $sub_action=="insert" ) { $retour=sprintf('', urldecode($_REQUEST['url'])); $customer=new Customer($cn); $customer->Save($_REQUEST['fd_id']); echo $retour; echo ""; echo $customer->Display(true); echo "
"; echo $retour; } //----------------------------------------------------- // Save modification if ( isset ($_POST['mod'])) { // modification is asked $f_id=$_REQUEST['f_id']; $client=new Customer($cn,$f_id); $client->Save(); } // by default open liste if ( $sub_action == "" ) $sub_action="list"; //----------------------------------------------------- //Display a blank card if ( $sub_action=="blank") { $retour=sprintf('', "commercial.php?p_action=client&$str_dossier"); echo '
'; echo $retour; $c=new Customer($cn); echo '
'; echo ''; echo ''; echo ''; echo $c->blank($_GET['fd_id']); 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_CLIENT); echo $w->IOValue(); ?>
'; echo $client->Summary($search); echo '
'; echo ''; } //----------------------------------------------------- // Show Detail if ( $sub_action == 'detail' ) { $f_id=$_REQUEST['f_id']; echo '
'; $client=new Customer($cn,$f_id); $retour=sprintf('', urldecode($_REQUEST['url'])); echo $retour; echo '
'; echo dossier::hidden(); echo $client->Display(false); $w=new widget("hidden"); $w->name="p_action"; $w->value="client"; echo $w->IOValue(); $w->name="f_id"; $w->value=$f_id; echo $w->IOValue(); echo $w->Submit('mod','Sauver les modifications'); echo $w->Reset("Annuler"); echo $w->Submit('delete','Effacer cette fiche'); echo '
'; echo $retour; echo '
'; } html_page_stop(); ?>