dolibarr  16.0.5
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 require '../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
25 
26 // Load translation files required by the page
27 $langs->load("admin");
28 
29 if (!$user->admin) {
31 }
32 
33 $sortfield = 'file';
34 $sortorder = 'ASC';
35 
36 
37 /*
38  * Action
39  */
40 
41 // None
42 
43 
44 /*
45  * View
46  */
47 
48 llxHeader("", "");
49 
50 $form = new Form($db);
51 
52 print load_fiche_titre($langs->trans("TriggersAvailable"), '', 'title_setup');
53 
54 print '<span class="opacitymedium">'.$langs->trans("TriggersDesc")."</span><br>";
55 print "<br>\n";
56 
57 
58 $interfaces = new Interfaces($db);
59 $triggers = $interfaces->getTriggersList();
60 $param = ''; $align = '';
61 
62 print '<div class="div-table-responsive-no-min">';
63 print '<table class="noborder">';
64 print '<tr class="liste_titre">';
65 print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
66 print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
67 print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
68 print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align ? 'align="'.$align.'"' : ''), $sortfield, $sortorder, '', 1)."\n";
69 print '</tr>';
70 
71 foreach ($triggers as $trigger) {
72  print '<tr class="oddeven">';
73  print '<td class=" width="32">'.$trigger['picto'].'</td>';
74  print '<td>'.$trigger['file'].'</td>';
75  print '<td class="center">'.$trigger['status'].'</td>';
76  print '<td>';
77  $text = $trigger['info'];
78  $text .= "<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
79  //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
80  print $form->textwithpicto('', $text);
81  print '</td>';
82  print '</tr>';
83 }
84 
85 print '</table>';
86 print '</div>';
87 
88 // End of page
89 llxFooter();
90 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
getTitleFieldOfList
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
Definition: functions.lib.php:5049
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
Interfaces
Class to manage triggers.
Definition: interfaces.class.php:32
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59