index.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. require_once('../view/template/header.php');
  3. ?>
  4. <a href="index.php?action=create-pharmacy" class="btn btn-info">Новая Аптека</a>
  5. <table class="table table-striped">
  6. <thead>
  7. <tr>
  8. <th>Имя</th>
  9. <th>Город</th>
  10. <th>Улица</th>
  11. <th>Дом</th>
  12. <th>Телефон</th>
  13. <th>Действия</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <?php foreach ($pharmacies as $pharmacy) { ?>
  18. <tr>
  19. <td><?= htmlspecialchars($pharmacy->name) ?></td>
  20. <td><?= htmlspecialchars($pharmacy->city) ?></td>
  21. <td><?= htmlspecialchars($pharmacy->street) ?></td>
  22. <td><?= htmlspecialchars($pharmacy->house) ?></td>
  23. <td><?= htmlspecialchars($pharmacy->phone) ?></td>
  24. <td>
  25. <a href="index.php?action=view-pharmacy&id=<?= $pharmacy->id ?>" class="btn btn-primary">
  26. <i class="glyphicon glyphicon-eye-open"></i>
  27. </a>
  28. <a href="index.php?action=update-pharmacy&id=<?= $pharmacy->id ?>" class="btn btn-warning">
  29. <i class="glyphicon glyphicon-pencil"></i>
  30. </a>
  31. <a href="index.php?action=delete-pharmacy&id=<?= $pharmacy->id ?>" class="btn btn-danger">
  32. <i class="glyphicon glyphicon-trash"></i>
  33. </a>
  34. </td>
  35. </tr>
  36. <?php } ?>
  37. </tbody>
  38. </table>
  39. <?php
  40. require_once('../view/template/footer.php');
  41. ?>