title=_('Ajout d\'une catégorie'); $ip_cat->value=''; echo $ip_cat->input(); echo IPoste::ipopup('ipop_account'); $search_card=new IPopup('ipop_card'); $search_card->title=_('Recherche de fiche'); $search_card->value=''; echo $search_card->input(); echo ICard::ipopup('ipopcard'); $low_action=(isset($_REQUEST['sb']))?$_REQUEST['sb']:"list"; /*! \file * \brief Called from the module "Gestion" to manage the customer */ $User->can_request(GECUST); $href=basename($_SERVER['PHP_SELF']); // by default open liste if ( $low_action == "" ) $low_action="list"; //----------------------------------------------------- // Remove a card //----------------------------------------------------- if ( isset($_POST['delete'] ) ) { if ( $User->check_action(FICADD) == 0 ) { alert(j(_('Vous ne pouvez pas enlever de fiche'))); return; } $f_id=$_REQUEST['f_id']; $fiche=new Customer($cn,$f_id); $fiche->remove(); $low_action="list"; } //----------------------------------------------------- // list of customer //----------------------------------------------------- if ( $low_action == "list" ) { ?>
', $a); $sel_card=new ISelect('cat'); $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '. ' where frd_id='.FICHE_TYPE_CLIENT. ' order by fd_label ',1); $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1; $sel_card->javascript=' onchange="submit(this);"'; echo _('Catégorie :').$sel_card->input(); $nooperation=new ICheckBox('noop'); $nooperation->selected=(isset($_GET['noop']))?true:false; echo _('Inclure les clients sans opération :').$nooperation->input(); ?>
'; echo $client->Summary($search,'client',$sql,$noop); echo '
'; echo '
'; echo '
'; /* Add button */ $f_add_button=new IButton('add_card'); $f_add_button->label=_('Créer une nouvelle fiche'); $f_add_button->set_attribute('ipopup','ipop_newcard'); $f_add_button->set_attribute('win_refresh','yes'); // $list=$cn->make_list("select fd_id from fiche_def where frd_id=$1",array(FICHE_TYPE_CLIENT)); $f_add_button->set_attribute('type_cat',FICHE_TYPE_CLIENT); $f_add_button->javascript=" select_card_type(this);"; echo $f_add_button->input(); $f_cat_button=new IButton('add_cat'); $f_cat_button->set_attribute('ipopup','ipop_cat'); $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CLIENT); $f_cat_button->label=_('Ajout d\'une catégorie'); $f_cat_button->javascript='add_category(this)'; echo $f_cat_button->input(); echo '
'; echo ''; } /*---------------------------------------------------------------------- * Detail for a card, Suivi, Contact, Operation,... * * cc stands for customer card *----------------------------------------------------------------------*/ if ( $low_action == 'detail') { /* Menu */ require_once('client_card.inc.php'); exit(); } if ( $low_action=="insert" ) { /* security : check if user can add card */ if ( $User->check_action(FICADD) == 0 ) { alert('Vous ne pouvez pas ajouter de fiche'); return; } $customer=new Customer($cn); $customer->Save($_REQUEST['fd_id']); echo '
'; echo ""; echo $customer->Display(true); echo "
"; $retour=new IAction(); $retour->label="Retour"; $retour->value="?p_action=client&".dossier::get(); echo $retour->input(); echo '
'; } html_page_stop(); ?>