info.php 2.1 KB

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