info_subscription.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
  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 2 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 <http://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/adherents/info_subscription.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."/lib/functions2.lib.php");
  25. require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php");
  26. require_once(DOL_DOCUMENT_ROOT."/lib/member.lib.php");
  27. require_once(DOL_DOCUMENT_ROOT."/adherents/class/cotisation.class.php");
  28. $langs->load("companies");
  29. $langs->load("bills");
  30. $langs->load("members");
  31. $langs->load("users");
  32. if (!$user->rights->adherent->lire)
  33. accessforbidden();
  34. $rowid=isset($_GET["rowid"])?$_GET["rowid"]:$_POST["rowid"];
  35. /*
  36. * Visualisation de la fiche
  37. *
  38. */
  39. llxHeader();
  40. $form = new Form($db);
  41. $subscription = new Cotisation($db);
  42. $result=$subscription->fetch($rowid);
  43. $h = 0;
  44. $head = array();
  45. $head[$h][0] = DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$subscription->id;
  46. $head[$h][1] = $langs->trans("SubscriptionCard");
  47. $head[$h][2] = 'general';
  48. $h++;
  49. $head[$h][0] = DOL_URL_ROOT.'/adherents/info_subscription.php?rowid='.$subscription->id;
  50. $head[$h][1] = $langs->trans("Info");
  51. $head[$h][2] = 'info';
  52. $h++;
  53. dol_fiche_head($head, 'info', $langs->trans("Subscription"), '', 'payment');
  54. $subscription->info($rowid);
  55. print '<table width="100%"><tr><td>';
  56. dol_print_object_info($subscription);
  57. print '</td></tr></table>';
  58. print '</div>';
  59. $db->close();
  60. llxFooter();
  61. ?>