info.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /* Copyright (C) 2004-2009 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/contrat/info.php
  19. * \ingroup contrat
  20. * \brief Page des informations d'un contrat
  21. */
  22. require ("../main.inc.php");
  23. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
  26. $langs->load("contracts");
  27. // Security check
  28. $contratid = isset($_GET["id"])?$_GET["id"]:'';
  29. if ($user->societe_id) $socid=$user->societe_id;
  30. $result = restrictedArea($user, 'contrat',$contratid,'');
  31. /*
  32. * View
  33. */
  34. llxHeader();
  35. $contrat = new Contrat($db);
  36. $contrat->fetch($_GET["id"]);
  37. $contrat->info($_GET["id"]);
  38. $head = contract_prepare_head($contrat);
  39. dol_fiche_head($head, 'info', $langs->trans("Contract"), 0, 'contract');
  40. print '<table width="100%"><tr><td>';
  41. dol_print_object_info($contrat);
  42. print '</td></tr></table>';
  43. print '</div>';
  44. $db->close();
  45. llxFooter();