Plugins  LAST
 All Data Structures Files Functions Variables Pages
historique.inc.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 /* $Revision$ */
21 
22 // Copyright (c) 2002 Author Dany De Bontridder dany@alchimerys.be
23 
24 /**
25  * @file
26  * @brief show the history of the saved declaration
27  * take data from rapport_avance.declaration and display via ajax
28  */
29 global $cn;
30 $cn->exec_sql("delete from rapport_advanced.declaration where to_keep='N' and d_generated < now() - interval '5 hours'");
31 $cn->exec_sql("delete from rapport_advanced.listing_compute where l_keep='N' and l_timestamp < now() - interval '5 hours'");
32 $data=$cn->get_array("select d_id,d_title,
33  d_start,d_end,to_char(d_generated,'DD/MM/YY HH24:MI') as fmt_generated,
34  d_description,d_generated,
35  to_char(d_start,'YYMMDD') as fmt_start,
36  to_char(d_end,'YYMMDD') as fmt_end,
37  to_char(d_generated,'YYMMDDHH24MI') as fmt_order_generated,
38  1 as type
39  from rapport_advanced.declaration
40  where to_keep='Y'
41 
42 order by d_generated desc,d_title");
43 ?>
44 <div id="declaration_list_div">
45 <?php
46 echo '<span style="display:block">';
47  echo _('Cherche').HtmlInput::infobulle(204);
48  echo HtmlInput::filter_table("t_declaration", "0,1,2,3","1");
49  echo '</span>';
50 ?>
51 <table id="t_declaration" class="sortable">
52  <tr>
53  <th class=" sorttable_sorted_reverse">
54  Date début <?php echo HtmlInput::infobulle(17);?>
55  </th>
56  <th>
57  Date Fin
58  </th>
59  <th>
60  Déclaration
61  </th>
62  <th>
63  Description
64  </th>
65  <th>
66  Date génération
67  <span id="sorttable_sortrevind">&nbsp;&blacktriangle;</span>
68  </th>
69  <th>
70 
71  </th>
72  <th>
73 
74  </th>
75  </tr>
76  <?php for ($i=0;$i<count($data);$i++) :?>
77  <?php $class=($i%2==0)?'class="even"':' class="odd" '; ?>
78  <tr id="tr_<?php echo $data[$i]['d_id']?>" <?php echo $class;?> >
79  <td sorttable_customkey="<?php echo $data[$i]['fmt_start']?>">
80 
81  <?php echo format_date($data[$i]['d_start'])?>
82  </td>
83  <td sorttable_customkey="<?php echo $data[$i]['fmt_end']?>">
84  <?php echo format_date($data[$i]['d_end'])?>
85  </td>
86  <td>
87  <?php echo h($data[$i]['d_title'])?>
88  </td>
89  <td>
90  <?php echo h($data[$i]['d_description'])?>
91  </td>
92  <td sorttable_customkey="<?php echo $data[$i]['fmt_order_generated']?>">
93  <?php echo h($data[$i]['fmt_generated'])?>
94  </td>
95 <?php if ($data[$i]['type']==1): ?>
96 
97  <td id="mod_<?php echo $data[$i]['d_id']?>">
98  <?php echo HtmlInput::anchor("Afficher","",sprintf("onclick=\"rapav_declaration_display('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
99  </td>
100  <td id="del_<?php echo $data[$i]['d_id']?>">
101  <?php echo HtmlInput::anchor("Efface","",sprintf("onclick=\"rapav_declaration_delete('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
102  </td>
103 <?php endif; ?>
104 <?php if ($data[$i]['type']==2): ?>
105 
106  <td id="mod_<?php echo $data[$i]['d_id']?>">
107  <?php echo HtmlInput::anchor("Afficher","",sprintf("onclick=\"rapav_listing_display('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
108  </td>
109  <td id="del_<?php echo $data[$i]['d_id']?>">
110  <?php echo HtmlInput::anchor("Efface","",sprintf("onclick=\"rapav_listing_delete('%s','%s','%s','%s')\"",$_REQUEST['plugin_code'],$_REQUEST['ac'],$_REQUEST['gDossier'],$data[$i]['d_id']))?>
111  </td>
112 <?php endif; ?>
113  </tr>
114  <?php endfor; ?>
115 </table>
116 </div>
117 <div id="declaration_display_div">
118 
119 </div>
else $class
Definition: show_import.php:25
endfor
global $cn
endif
Definition: detail_item.php:95
& nbsp
$categorie_appel table
$_REQUEST['sb']
Definition: am_print.php:39