Site du proximo, utilisé pour gérer le stock.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. $relativePath = "../";
  3. ob_start();
  4. ?>
  5. <tr>
  6. <th class="name-column">Nom</th>
  7. <th class="quantity-column">Quantité</th>
  8. <th class="price-column">Prix</th>
  9. <th class="code-column">Code Barre</th>
  10. <th class="type-column">Type</th>
  11. <th class="image-column">Image</th>
  12. <th class="actions-column">Actions</th>
  13. </tr>
  14. <?php
  15. $tableHeader = ob_get_clean();
  16. ob_start();
  17. ?>
  18. <div class="stock-container">
  19. <h1 class="text-center">Gestion des Stocks</h1>
  20. <h2 class="text-center">Ajouter un article</h2>
  21. <table>
  22. <tbody>
  23. <?= $tableHeader ?>
  24. <tr>
  25. <td>
  26. <input type="text" class="form-control" id="nameInput" placeholder="Nom">
  27. </td>
  28. <td>
  29. <input type="number" class="form-control" id="quantityInput" placeholder="Quantité">
  30. </td>
  31. <td>
  32. <input type="text" class="form-control" id="priceInput" placeholder="Prix">
  33. </td>
  34. <td>
  35. <input type="text" class="form-control" id="codeInput" placeholder="Code Barre">
  36. </td>
  37. <td id="typeCheckboxesCell">
  38. </td>
  39. <td>
  40. <input type="text" class="form-control" id="imageInput" placeholder="Lien Image">
  41. </td>
  42. <td>
  43. <button type="submit" class="btn btn-success" onclick="addNewItem()"><i class="fas fa-check"></i>
  44. </button>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. <h2 class="text-center">Liste d'articles</h2>
  50. <table id="stockTable">
  51. <tbody>
  52. <?= $tableHeader ?>
  53. </tbody>
  54. </table>
  55. <div style="display: flex; margin-top: 100px">
  56. <button class="btn btn-success btn-lg" style="margin: auto"
  57. onclick="saveDataset()">
  58. Sauvegarder le stock
  59. </button>
  60. </div>
  61. </>
  62. <link type="text/css" rel="stylesheet" href="<?= $relativePath ?>assets/css/stock.css" media="screen,projection"/>
  63. <?php
  64. $pageContent = ob_get_clean();
  65. $pageTitle = "Gestion";
  66. $pageScripts = "<script type=\"text/javascript\" src=\"" . $relativePath . "assets/js/stock.js\"></script>";
  67. include($relativePath . "includes/template.php");
  68. ?>