triggers.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. $langs->load("admin");
  24. if (!$user->admin) accessforbidden();
  25. /*
  26. * Action
  27. */
  28. // None
  29. /*
  30. * View
  31. */
  32. llxHeader("","");
  33. $form = new Form($db);
  34. print load_fiche_titre($langs->trans("TriggersAvailable"),'','title_setup');
  35. print $langs->trans("TriggersDesc")."<br>";
  36. print "<br>\n";
  37. $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
  38. $interfaces = new Interfaces($db);
  39. $triggers = $interfaces->getTriggersList();
  40. print '<div class="div-table-responsive-no-min">';
  41. print '<table class="noborder">
  42. <tr class="liste_titre">
  43. <td colspan="2">'.$langs->trans("File").'</td>
  44. <td align="center">'.$langs->trans("Active").'</td>
  45. <td align="center">&nbsp;</td>
  46. </tr>
  47. ';
  48. $var=True;
  49. foreach ($triggers as $trigger)
  50. {
  51. print '<tr class="oddeven">';
  52. print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
  53. print '<td class="tdtop">'.$trigger['file'].'</td>';
  54. print '<td valign="top" align="center">'.$trigger['status'].'</td>';
  55. print '<td class="tdtop">';
  56. $text=$trigger['info'];
  57. $text.="<br>\n<strong>".$langs->trans("File")."</strong>:<br>\n".$trigger['relpath'];
  58. //$text.="\n".$langs->trans("ExternalModule",$trigger['isocreorexternal']);
  59. print $form->textwithpicto('', $text);
  60. print '</td>';
  61. print '</tr>';
  62. }
  63. print '</table>';
  64. print '</div>';
  65. llxFooter();
  66. $db->close();