noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
ajax_boxcard_search.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /*
00004  *   This file is part of NOALYSS.
00005  *
00006  *   NOALYSS is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License as published by
00008  *   the Free Software Foundation; either version 2 of the License, or
00009  *   (at your option) any later version.
00010  *
00011  *   NOALYSS is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details.
00015  *
00016  *   You should have received a copy of the GNU General Public License
00017  *   along with NOALYSS; if not, write to the Free Software
00018  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 // Copyright Author Dany De Bontridder danydb@aevalys.eu
00022 
00023 /**
00024  * @file
00025  * @brief show result card search
00026  *
00027  */
00028 if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis');
00029 $sql="
00030         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
00031         from vw_fiche_attr as vw
00032         join fiche_def as fd on (vw.fd_id=fd.fd_id)
00033         left join fiche_detail as pc on (pc.f_id=vw.f_id)
00034         where
00035         ad_value ~* $1
00036         order by 2
00037 ";
00038 $array=$cn->get_array($sql,array($_GET['card']));
00039 echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div");
00040 $max=(count($array)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array);
00041 ?>
00042 <?php if (count($array)>MAX_CARD_SEARCH ): ?>
00043 <h2 class="notice"><?php printf (_("Résultat limité à %d , %d nombre de fiches trouvées"), MAX_CARD_SEARCH,count($array))?> </h2>
00044 
00045 <?php endif?>
00046 <?php echo _('Filtre')?> <?php echo HtmlInput::infobulle(26);echo HtmlInput::filter_table("tb_fiche", "0,1,2,3,4,5", 1); ?> :
00047 <table id="tb_fiche" class="sorttable" style="width:100%">
00048         <tr>
00049                 <th>
00050                         <?php echo _("Quick Code");?> <?php echo HtmlInput::infobulle(17); ?>
00051                 </th>
00052                 <th class=" sorttable_sorted">
00053                         Nom
00054                 <span id="sorttable_sortfwdind">&nbsp;&#x25BE;</span>
00055                 </th>
00056                 <th>
00057                         <?php echo _("Categorie");?>
00058                 </th>
00059                 <th>
00060                         <?php echo _("Description");?>
00061                 </th>
00062                 <th>
00063                         <?php echo _("Numéro TVA");?>
00064                 </th>
00065                 <th>
00066                         <?php echo _("Poste comptable");?>
00067                 </th>
00068 
00069         </tr>
00070 <?php if (count($array)==0) : ?>
00071         <h2 class="notice"> <?php echo _("Aucun résultat");?></h2>
00072 <?php endif?>
00073 <?php for ($i=0;$i<$max;$i++):?>
00074         <tr class="<?php echo ($i%2 == 0)?'even':'odd';?>">
00075 
00076                 <td>
00077                         <?php echo HtmlInput::card_detail($array[$i]['quick_code'])?>
00078                 </td>
00079                 <td>
00080                         <?php echo h($array[$i]['vw_name'])?>&nbsp;
00081                         <?php echo h($array[$i]['vw_first_name'])?>
00082                 </td>
00083                 <td>
00084                         <?php echo h($array[$i]['fd_label'])?>
00085                 </td>
00086                 <td>
00087                         <?php echo h($array[$i]['vw_description'])?>
00088 
00089                 </td>
00090                 <td>
00091                         <?php echo h($array[$i]['tva_num'])?>
00092 
00093                 </td>
00094                 <td style="text-align:right">
00095                         <?php echo HtmlInput::history_account($array[$i]['poste'],$array[$i]['poste'])?>
00096 
00097                 </td>
00098         </tr>
00099 
00100 
00101 <?php endfor; ?>
00102 </table>
00103 <?php echo HtmlInput::button_close("boxsearch_card_div")?>
 All Data Structures Namespaces Files Functions Variables Enumerations