stock.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?php
  2. /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  19. */
  20. /**
  21. * \file lmiprestasync/stock.php
  22. * \ingroup lmiprestasync
  23. * \brief Home page of lmiprestasync top menu
  24. */
  25. // Load Dolibarr environment
  26. require_once 'main_load.inc.php';
  27. require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
  28. require_once './lib/stock.lib.php';
  29. // Load translation files required by the page
  30. $langs->loadLangs(array("lmiprestasync@lmiprestasync"));
  31. $action = GETPOST('action', 'alpha');
  32. // Security check
  33. //if (! $user->rights->lmiprestasync->myobject->read) accessforbidden();
  34. $socid = GETPOST('socid', 'int');
  35. if (isset($user->socid) && $user->socid > 0)
  36. {
  37. $action = '';
  38. $socid = $user->socid;
  39. }
  40. $max = 5;
  41. $now = dol_now();
  42. /*
  43. * Actions
  44. */
  45. // None
  46. /*
  47. * View
  48. */
  49. $form = new Form($db);
  50. $formfile = new FormFile($db);
  51. llxHeader("", $langs->trans("LMIPrestaSyncArea"));
  52. print load_fiche_titre($langs->trans("LMIPrestaSyncArea"), '', 'lmiprestasync.png@lmiprestasync');
  53. print '<div class="fichecenter"><div class="fichethirdleft">';
  54. echo "<h3>Synchronisation des stock produit</h3>";
  55. // BDD Prestashop
  56. $db2 = lmiprestasyncPrestaDBConnect();
  57. //var_dump($db2);
  58. //echo '<div style="height: 200px;overflow: auto;">';
  59. lmiprestasyncProductBatch();
  60. //echo '</div>';
  61. print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
  62. $NBMAX = 3;
  63. $max = 3;
  64. print '</div></div></div>';
  65. // End of page
  66. llxFooter();
  67. $db->close();