info.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/compta/deplacement/info.php
  20. * \ingroup trip
  21. * \brief Page to show a trip information
  22. */
  23. // Load Dolibarr environment
  24. require '../../main.inc.php';
  25. require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
  28. // Load translation files required by the page
  29. $langs->load("trips");
  30. // Security check
  31. $id = GETPOST('id', 'int');
  32. if ($user->socid) {
  33. $socid = $user->socid;
  34. }
  35. $result = restrictedArea($user, 'deplacement', $id, '');
  36. /*
  37. * View
  38. */
  39. llxHeader();
  40. if ($id) {
  41. $object = new Deplacement($db);
  42. $object->fetch($id);
  43. $object->info($id);
  44. $head = trip_prepare_head($object);
  45. print dol_get_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip');
  46. print '<table width="100%"><tr><td>';
  47. dol_print_object_info($object);
  48. print '</td></tr></table>';
  49. print '</div>';
  50. }
  51. // End of page
  52. llxFooter();
  53. $db->close();