dolibarr 21.0.0-beta
triggers.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program 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 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
24// Load Dolibarr environment
25require '../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
27
36// Load translation files required by the page
37$langs->load("admin");
38
39if (!$user->admin) {
41}
42
43$sortfield = 'file';
44$sortorder = 'ASC';
45
46
47/*
48 * Action
49 */
50
51// None
52
53
54/*
55 * View
56 */
57
58llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-triggers');
59
60$form = new Form($db);
61
62print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup');
63
64print '<span class="opacitymedium">'.$langs->trans("TriggersDesc")."</span><br>";
65print "<br>\n";
66
67
68$interfaces = new Interfaces($db);
69$triggers = $interfaces->getTriggersList();
70$param = '';
71$align = '';
72
73print '<div class="div-table-responsive-no-min">';
74print '<table class="noborder">';
75print '<tr class="liste_titre">';
76print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
77print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
78print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
79print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
80print '</tr>';
81
82foreach ($triggers as $trigger) {
83 print '<tr class="oddeven">';
84 print '<td class=" width="32">'.$trigger['picto'].'</td>';
85 print '<td>'.$trigger['file'].'</td>';
86 print '<td class="center">'.$trigger['status'].'</td>';
87 print '<td>';
88 $text = $trigger['info'];
89 $text .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
90 //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
91 // @phan-suppress-next-line PhanPluginSuspiciousParamPosition
92 print $form->textwithpicto('', $text);
93 print '</td>';
94 print '</tr>';
95}
96
97print '</table>';
98print '</div>';
99
100// End of page
101llxFooter();
102$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
Class to manage generation of HTML components Only common components must be here.
Class to manage triggers.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.