index.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
  3. * Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
  4. * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. /**
  21. * \file htdocs/accountancy/journal/index.php
  22. * \ingroup Accounting Expert
  23. * \brief Index
  24. */
  25. // Dolibarr environment
  26. $res = @include ("../main.inc.php");
  27. if (! $res && file_exists("../main.inc.php"))
  28. $res = @include ("../main.inc.php");
  29. if (! $res && file_exists("../../main.inc.php"))
  30. $res = @include ("../../main.inc.php");
  31. if (! $res && file_exists("../../../main.inc.php"))
  32. $res = @include ("../../../main.inc.php");
  33. if (! $res)
  34. die("Include of main fails");
  35. // Langs
  36. $langs->load("compta");
  37. $langs->load("bills");
  38. $langs->load("other");
  39. $langs->load("main");
  40. $langs->load("accountancy");
  41. // Security check
  42. if ($user->societe_id > 0)
  43. accessforbidden();
  44. if (! $user->rights->accountingex->access)
  45. accessforbidden();
  46. llxHeader('', 'Journaux', '');
  47. $form = new Form($db);
  48. // End of page
  49. $db->close();
  50. llxFooter();