noalyss Version-9
ajax_boxcard_search.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21// Copyright Author Dany De Bontridder danydb@aevalys.eu
22
23/**
24 * @file
25 * @brief show result card search
26 *
27 */
28if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
30 select distinct vw.f_id,vw_name,vw_first_name,vw_description,fd_label,quick_code,tva_num,(select ad_value from fiche_Detail where f_id=pc.f_id and ad_id=5) as poste
31 from vw_fiche_attr as vw
32 join fiche_def as fd on (vw.fd_id=fd.fd_id)
33 left join fiche_detail as pc on (pc.f_id=vw.f_id)
34 where
35 ad_value ~* $1
36 order by 2
37";
38$array=$cn->get_array($sql,array($_GET['card']));
39echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div");
41?>
42<?php if (count($array)>MAX_CARD_SEARCH ): ?>
43<h2 class="notice"><?php printf (_("Résultat limité à %d , %d nombre de fiches trouvées"), MAX_CARD_SEARCH,count($array))?> </h2>
44
45<?php endif?>
46<?php echo _('Cherche')?> <?php echo Icon_Action::infobulle(26);echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?> :
47<table id="tb_fiche" class="sorttable" style="width:100%">
48 <tr>
49 <th>
50 <?php echo _("Quick Code");?> <?php echo Icon_Action::infobulle(17); ?>
51 </th>
52 <th class=" sorttable_sorted">
53 Nom
54 </th>
55 <th>
56 <?php echo _("Categorie");?>
57 </th>
58 <th>
59 <?php echo _("Description");?>
60 </th>
61 <th>
62 <?php echo _("Numéro TVA");?>
63 </th>
64 <th>
65 <?php echo _("Poste comptable");?>
66 </th>
67
68 </tr>
69<?php if (count($array)==0) : ?>
70 <h2 class="notice"> <?php echo _("Aucun résultat");?></h2>
71<?php endif?>
72<?php for ($i=0;$i<$max;$i++):?>
73 <tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">
74
75 <td>
76 <?php echo HtmlInput::card_detail($array[$i]['quick_code'])?>
77 </td>
78 <td>
79 <?php echo h($array[$i]['vw_name'])?>&nbsp;
80 <?php echo h($array[$i]['vw_first_name'])?>
81 </td>
82 <td>
83 <?php echo h($array[$i]['fd_label'])?>
84 </td>
85 <td>
86 <?php echo h($array[$i]['vw_description'])?>
87
88 </td>
89 <td>
90 <?php echo h($array[$i]['tva_num'])?>
91
92 </td>
93 <td style="text-align:right">
94 <?php echo HtmlInput::history_account($array[$i]['poste'],$array[$i]['poste'])?>
95
96 </td>
97 </tr>
98
99
100<?php endfor; ?>
101</table>
102<?php echo HtmlInput::button_close("boxsearch_card_div")?>
h2($p_string, $p_class="", $raw="")
Definition: ac_common.php:68
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
h( $row[ 'oa_description'])
$opd_description style
$_GET['qcode']
static history_account($p_account, $p_mesg, $p_style="", $p_exercice="")
display a div with the history of the account
static button_close($div_name, $class='smallbutton')
close button for the HTML popup
static filter_table($p_table_id, $p_col, $start_row)
filter the rows in a table and keep the colored row in alternance
static card_detail($p_qcode, $pname='', $p_style="", $p_nohistory=false, $nofollowup=false)
show the detail of a card
static title_box($p_name, $p_div, $p_mod="close", $p_js="", $p_draggable="n", $p_enlarge='n')
Title for boxes, you can customize the symbol thanks symbol with the mode "custom".
static infobulle($p_comment)
Display a info in a bubble, text is in message_javascript.
$all table
const MAX_CARD_SEARCH
Definition: constant.php:136
endfor