info.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
  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. /**
  18. * \file htdocs/cron/info.php
  19. * \brief Page of info of a cron job
  20. */
  21. require '../main.inc.php';
  22. require_once DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php";
  23. require_once DOL_DOCUMENT_ROOT.'/core/lib/cron.lib.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  25. // Load translation files required by the page
  26. $langs->loadLangs(array('admin', 'cron'));
  27. // Security check
  28. if (!$user->rights->cron->read) {
  29. accessforbidden();
  30. }
  31. $id = GETPOST('id', 'int');
  32. $object = new Cronjob($db);
  33. /*
  34. * View
  35. */
  36. $form = new Form($db); // $form is required as global value into dol_banner_tab
  37. llxHeader('', $langs->trans("CronInfo"));
  38. $object->fetch($id);
  39. $object->info($id);
  40. $head = cron_prepare_head($object);
  41. print dol_get_fiche_head($head, 'info', $langs->trans("CronTask"), -1, 'cron');
  42. $linkback = '<a href="'.DOL_URL_ROOT.'/cron/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
  43. $morehtmlref = '<div class="refidno">';
  44. $morehtmlref .= $langs->trans($object->label);
  45. $morehtmlref .= '</div>';
  46. dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
  47. print '<div class="underbanner clearboth"></div>';
  48. print '<br>';
  49. print '<table width="100%"><tr><td>';
  50. dol_print_object_info($object);
  51. print '</td></tr></table>';
  52. print '</div>';
  53. llxFooter();
  54. $db->close();