dolibarr  7.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  *
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 <http://www.gnu.org/licenses/>.
16  */
17 
23 require '../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
25 
26 $langs->load("admin");
27 
28 if (!$user->admin) accessforbidden();
29 
30 $sortfield='file';
31 $sortorder='ASC';
32 
33 
34 /*
35  * Action
36  */
37 
38 // None
39 
40 
41 /*
42  * View
43  */
44 
45 llxHeader("","");
46 
47 $form = new Form($db);
48 
49 print load_fiche_titre($langs->trans("TriggersAvailable"),'','title_setup');
50 
51 print $langs->trans("TriggersDesc")."<br>";
52 print "<br>\n";
53 
54 
55 $interfaces = new Interfaces($db);
56 $triggers = $interfaces->getTriggersList();
57 $param = ''; $align = '';
58 
59 print '<div class="div-table-responsive-no-min">';
60 print '<table class="noborder">';
61 print '<tr class="liste_titre">';
62 print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
63 print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
64 print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
65 print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
66 print '</tr>';
67 
68 $var=True;
69 foreach ($triggers as $trigger)
70 {
71 
72  print '<tr class="oddeven">';
73  print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
74  print '<td class="tdtop">'.$trigger['file'].'</td>';
75  print '<td valign="top" align="center">'.$trigger['status'].'</td>';
76  print '<td class="tdtop">';
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 llxFooter();
89 
90 $db->close();
llxFooter()
Empty footer.
Definition: wrapper.php:58
if(empty($reshook)) $form
View.
Definition: perms.php:103
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Class to manage generation of HTML components Only common components must be here.
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='')
Get title line of an array.
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
llxHeader()
Empty header.
Definition: wrapper.php:46
print
Draft customers invoices.
Definition: index.php:91
Class to manage triggers.