dolibarr 23.0.3
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-2025 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
72print '<div class="div-table-responsive-no-min">';
73print '<table class="noborder">';
74print '<tr class="liste_titre">';
75print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
76print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
77print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
78print '</tr>';
79
80foreach ($triggers as $trigger) {
81 print '<tr class="oddeven">';
82 print '<td>'.$trigger['picto'].' '.$trigger['file'].'</td>';
83 print '<td class="center">'.$trigger['status'].'</td>';
84 print '<td>';
85 $htmltooltip = $trigger['info'];
86 $htmltooltip .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
87 //$htmltooltip.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
88 print $form->textwithpicto('', $htmltooltip);
89 print '</td>';
90 print '</tr>';
91}
92
93print '</table>';
94print '</div>';
95
96// End of page
97llxFooter();
98$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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:73
Class to manage generation of HTML components Only common components must be here.
Class to manage triggers.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.