info.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. /* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2005-2006 Regis Houssin <regis.houssin@inodbox.com>
  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/adherents/subscription/info.php
  20. * \ingroup member
  21. * \brief Page with information of subscriptions of a member
  22. */
  23. require '../../main.inc.php';
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
  28. // Load translation files required by the page
  29. $langs->loadLangs(array("companies", "members", "bills", "users"));
  30. if (!$user->rights->adherent->lire)
  31. accessforbidden();
  32. $rowid = GETPOST("rowid", 'int');
  33. /*
  34. * View
  35. */
  36. $form = new Form($db);
  37. llxHeader();
  38. $object = new Subscription($db);
  39. $result = $object->fetch($rowid);
  40. $head = subscription_prepare_head($object);
  41. dol_fiche_head($head, 'info', $langs->trans("Subscription"), -1, 'payment');
  42. $linkback = '<a href="'.DOL_URL_ROOT.'/adherents/subscription/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
  43. dol_banner_tab($object, 'rowid', $linkback, 1);
  44. print '<div class="fichecenter">';
  45. print '<div class="underbanner clearboth"></div>';
  46. print '<br>';
  47. $object->info($rowid);
  48. print '<table width="100%"><tr><td>';
  49. dol_print_object_info($object);
  50. print '</td></tr></table>';
  51. print '</div>';
  52. dol_fiche_end();
  53. // End of page
  54. llxFooter();
  55. $db->close();