list_updates.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-buttons">
  5. <a class="button button-secondary button-back js-button-back" href="/list/server/">
  6. <i class="fas fa-arrow-left icon-blue"></i><?= tohtml( _("Back")) ?>
  7. </a>
  8. <?php
  9. if ($autoupdate == 'Enabled') {
  10. $btn_url = '/delete/cron/autoupdate/?token='.$_SESSION['token'].'';
  11. $btn_icon = 'fa-toggle-on icon-green';
  12. $btn_label = _('Disable Automatic Updates');
  13. } else {
  14. $btn_url = '/add/cron/autoupdate/?token='.$_SESSION['token'].'';
  15. $btn_icon = 'fa-toggle-off icon-red';
  16. $btn_label = _('Enable Automatic Updates');
  17. }
  18. ?>
  19. <a class="button button-secondary" href="<?= tohtml($btn_url) ?>">
  20. <i class="fas <?= tohtml($btn_icon) ?>"></i><?= tohtml($btn_label) ?>
  21. </a>
  22. </div>
  23. </div>
  24. </div>
  25. <!-- End toolbar -->
  26. <div class="container">
  27. <h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= tohtml( _("Updates")) ?></h1>
  28. <div class="units-table js-units-container">
  29. <div class="units-table-header">
  30. <div class="units-table-cell"><?= tohtml( _("Package Name")) ?></div>
  31. <div class="units-table-cell"><?= tohtml( _("Description")) ?></div>
  32. <div class="units-table-cell u-text-center"><?= tohtml( _("Version")) ?></div>
  33. <div class="units-table-cell u-text-center"><?= tohtml( _("Status")) ?></div>
  34. </div>
  35. <!-- Begin update list item loop -->
  36. <?php
  37. foreach ($data as $key => $value) {
  38. ++$i;
  39. if ($data[$key]['UPDATED'] == 'yes') {
  40. $status = 'active';
  41. $upd_status = 'updated';
  42. } else {
  43. $status = 'suspended';
  44. $upd_status = 'outdated';
  45. }
  46. ?>
  47. <div class="units-table-row <?php if ($status == 'suspended') echo 'disabled'; ?> js-unit">
  48. <div class="units-table-cell units-table-heading-cell u-text-bold">
  49. <span class="u-hide-desktop"><?= tohtml( _("Package Names")) ?>:</span>
  50. <?= tohtml($key) ?>
  51. </div>
  52. <div class="units-table-cell">
  53. <span class="u-hide-desktop u-text-bold"><?= tohtml( _("Description")) ?>:</span>
  54. <?= tohtml( _($data[$key]["DESCR"])) ?>
  55. </div>
  56. <div class="units-table-cell u-text-center-desktop">
  57. <span class="u-hide-desktop u-text-bold"><?= tohtml( _("Version")) ?>:</span>
  58. <?= tohtml($data[$key]["VERSION"]) ?> (<?= tohtml($data[$key]["ARCH"]) ?>)
  59. </div>
  60. <div class="units-table-cell u-text-center-desktop">
  61. <span class="u-hide-desktop u-text-bold"><?= tohtml( _("Status")) ?>:</span>
  62. <?php if ($data[$key]['UPDATED'] == 'no'): ?>
  63. <i class="fas fa-triangle-exclamation icon-orange" title="<?= tohtml( _("Update available")) ?>"></i>
  64. <?php elseif ($data[$key]['UPDATED'] == 'yes'): ?>
  65. <i class="fas fa-circle-check icon-green" title="<?= tohtml( _("Package up-to-date")) ?>"></i>
  66. <?php endif; ?>
  67. </div>
  68. </div>
  69. <?php } ?>
  70. </div>
  71. </div>