noalyss Version-9
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 ,ag_id
44 ,ag_title
45 ,ag_ref
46 , dt_value
47 ,to_char(ag_remind_date,'DD.MM.YY') as ag_timestamp_fmt
48 ,ag_timestamp
49 ,to_char(ag_remind_date,'YYMMDD') as remind_date
50 from action_gestion join document_type
51 on (ag_type=dt_id)
52 left join vw_fiche_attr on (f_id=f_id_dest)
53 where
54 ag_state not in (1,4)
55 and to_char(ag_remind_date,'YYYYMMDD')<=to_char(now()+interval '14 days','YYYYMMDD')
56 and ". \Follow_Up::sql_security_filter($this->db,'R')
57 ." order by ag_remind_date asc";
58 $array=$this->db->get_array($sql);
59 return $array;
60 }
61
62 function display()
63 {
64
65 $this->open_div();
66 $array=$this->get_next10();
67 require "event-display.php";
68
69 $this->close_div();
70 }
71}
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:62
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:157
$SecUser db