00001 <?php 00002 /* 00003 * This file is part of NOALYSS. 00004 * 00005 * NOALYSS is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * NOALYSS is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with NOALYSS; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00020 // Copyright Author Dany De Bontridder danydb@aevalys.eu 00021 /*!\file 00022 * \brief this file will handle all the actions for a specific customer ( 00023 * contact,operation,invoice and financial) 00024 * include from supplier.inc.php and concerned only the customer card and 00025 * the customer category 00026 * parameter 00027 * - p_action = supplier 00028 * - sb = detail 00029 * - sc = dc 00030 */ 00031 //---------------------------------------------------------------------------- 00032 // Save modification 00033 //--------------------------------------------------------------------------- 00034 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); 00035 if ( isset ($_POST['mod'])) 00036 { 00037 00038 // modification is asked 00039 $f_id=$_REQUEST['f_id']; 00040 00041 $supplier=new Customer($cn,$f_id); 00042 $supplier->Save(); 00043 00044 } 00045 00046 echo '<div class="u_content">'; 00047 $f_id=$_REQUEST['f_id']; 00048 echo '<div class="content" style="width:50%">'; 00049 if ( isset($_POST['mod'])) echo hb(_('Information sauvée')); 00050 00051 $supplier=new Fiche($cn,$f_id); 00052 $p_readonly=($g_user->check_action(FICADD)==0)?true:false; 00053 if ( ! $p_readonly) echo '<form method="post">'; 00054 echo dossier::hidden(); 00055 echo HtmlInput::hidden('sb','detail'); 00056 echo HtmlInput::hidden('dc','cc'); 00057 echo $supplier->Display($p_readonly); 00058 $w=new IHidden(); 00059 $w->name="p_action"; 00060 $w->value="supplier"; 00061 echo $w->input(); 00062 $w->name="f_id"; 00063 $w->value=$f_id; 00064 echo $w->input(); 00065 if ( ! $p_readonly) 00066 { 00067 echo HtmlInput::submit('mod',_('Sauver les modifications')); 00068 echo HtmlInput::reset(_("Annuler")); 00069 echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick="return confirm(\'Confirmer effacement ?\');"'); 00070 echo '</form>'; 00071 } 00072 echo '</div>'; 00073 00074