<?php $client = new contact($cn); $search = isset($_GET['query']) ? $_GET['query'] : ""; $sql = ""; if (isset($_GET['cat'])) { if ($_GET['cat'] != -1) { $sql = sprintf(" and fd_id = %d", $_GET['cat']); } } if (isset($_GET['sel_company'])) { if ($_GET['sel_company'] != '' && $_GET['sel_company'] != -1) { $client->company = $_GET['sel_company']; } } echo '<div class="content">'; echo $client->Summary($search, "contact", $sql); echo '<br>'; echo '<br>'; echo '<br>'; /* Add button */ $f_add_button = new IButton('add_card'); $f_add_button->label = _('Créer une nouvelle fiche'); $f_add_button->set_attribute('win_refresh', 'yes'); $f_add_button->set_attribute('type_cat', FICHE_TYPE_CONTACT); $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_CONTACT); $f_cat_button->label = _('Ajout d\'une catégorie'); $f_cat_button->javascript = 'add_category(this)';