noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
event.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu 18/08/24
20/*!
21 * \file
22 * \brief show 10 next events , or 10 late
23 */
24
25namespace Noalyss\Widget;
26
27/*!
28 * \class Event
29 * \brief show 10 next events , or 10 late
30*/
31
32class Event extends Widget
33{
34 /**
35 * @brief get the action where the remind day is within 14 days
36 * @return array
37 */
38 function get_next10()
39 {
40 $sql="select ag_ref
41 ,ag_hour
42 ,coalesce(vw_name,'Interne') as vw_name
43 ,coalesce(quick_code,'interne') as quick_code
44 ,ag_id
45 ,ag_title
46 ,ag_ref
47 , dt_value
48 ,to_char(ag_remind_date,'DD.MM.YY') as ag_timestamp_fmt
49 ,ag_timestamp
50 ,to_char(ag_remind_date,'YYMMDD') as remind_date
51 from action_gestion join document_type
52 on (ag_type=dt_id)
53 left join vw_fiche_attr on (f_id=f_id_dest)
54 where
55 ag_state not in (1,4)
56 and to_char(ag_remind_date,'YYYYMMDD')<=to_char(now()+interval '14 days','YYYYMMDD')
57 and ". \Follow_Up::sql_security_filter($this->db,'R')
58 ." order by ag_remind_date asc";
59 $array=$this->db->get_array($sql);
60 return $array;
61 }
62
63 function display()
64 {
65
66 $this->open_div();
67 $array=$this->get_next10();
68 require "event-display.php";
69
70 $this->close_div();
71 }
72}
static sql_security_filter($cn, $p_mode)
Create a filter based on the current user,.
show 10 next events , or 10 late
Definition event.php:33
display()
display the content for the current connected user of the widget with the parameter
Definition event.php:63
get_next10()
get the action where the remind day is within 14 days
Definition event.php:38
Main class for widget.
Definition widget.php:32
open_div()
output the DIV HTML with class and id for the widget
Definition widget.php:179
$SecUser db