triggers.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. /**
  18. * \file htdocs/admin/triggers.php
  19. * \brief Page to view triggers
  20. */
  21. require '../main.inc.php';
  22. require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
  23. // Load translation files required by the page
  24. $langs->load("admin");
  25. if (!$user->admin) accessforbidden();
  26. $sortfield='file';
  27. $sortorder='ASC';
  28. /*
  29. * Action
  30. */
  31. // None
  32. /*
  33. * View
  34. */
  35. llxHeader("","");
  36. $form = new Form($db);
  37. print load_fiche_titre($langs->trans("TriggersAvailable"),'','title_setup');
  38. print $langs->trans("TriggersDesc")."<br>";
  39. print "<br>\n";
  40. $interfaces = new Interfaces($db);
  41. $triggers = $interfaces->getTriggersList();
  42. $param = ''; $align = '';
  43. print '<div class="div-table-responsive-no-min">';
  44. print '<table class="noborder">';
  45. print '<tr class="liste_titre">';
  46. print getTitleFieldOfList($langs->trans("File"), 0, $_SERVER["PHP_SELF"], 'file', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
  47. print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, '', $sortfield, $sortorder, '', 1)."\n";
  48. print getTitleFieldOfList($langs->trans("Active"), 0, $_SERVER["PHP_SELF"], 'active', "", $param, 'align="center"', $sortfield, $sortorder, '', 1)."\n";
  49. print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], 'none', "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder, '', 1)."\n";
  50. print '</tr>';
  51. foreach ($triggers as $trigger)
  52. {
  53. print '<tr class="oddeven">';
  54. print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
  55. print '<td class="tdtop">'.$trigger['file'].'</td>';
  56. print '<td valign="top" align="center">'.$trigger['status'].'</td>';
  57. print '<td class="tdtop">';
  58. $text=$trigger['info'];
  59. $text.="<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
  60. //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
  61. print $form->textwithpicto('', $text);
  62. print '</td>';
  63. print '</tr>';
  64. }
  65. print '</table>';
  66. print '</div>';
  67. // End of page
  68. llxFooter();
  69. $db->close();