dolibarr 20.0.2
triggers.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
23// Load Dolibarr environment
24require '../main.inc.php';
25require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
26
27// Load translation files required by the page
28$langs->load("admin");
29
30if (!$user->admin) {
32}
33
34$sortfield = 'file';
35$sortorder = 'ASC';
36
37
38/*
39 * Action
40 */
41
42// None
43
44
45/*
46 * View
47 */
48
49llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-triggers');
50
51$form = new Form($db);
52
53print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup');
54
55print '<span class="opacitymedium">'.$langs->trans("TriggersDesc")."</span><br>";
56print "<br>\n";
57
58
59$interfaces = new Interfaces($db);
60$triggers = $interfaces->getTriggersList();
61$param = '';
62$align = '';
63
64print '<div class="div-table-responsive-no-min">';
65print '<table class="noborder">';
66print '<tr class="liste_titre">';
67print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
68print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
69print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
70print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
71print '</tr>';
72
73foreach ($triggers as $trigger) {
74 print '<tr class="oddeven">';
75 print '<td class=" width="32">'.$trigger['picto'].'</td>';
76 print '<td>'.$trigger['file'].'</td>';
77 print '<td class="center">'.$trigger['status'].'</td>';
78 print '<td>';
79 $text = $trigger['info'];
80 $text .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
81 //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
82 // @phan-suppress-next-line PhanPluginSuspiciousParamPosition
83 print $form->textwithpicto('', $text);
84 print '</td>';
85 print '</tr>';
86}
87
88print '</table>';
89print '</div>';
90
91// End of page
92llxFooter();
93$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage generation of HTML components Only common components must be here.
Class to manage triggers.
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.