forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_updates.php
More file actions
78 lines (72 loc) · 3 KB
/
list_updates.php
File metadata and controls
78 lines (72 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!-- Begin toolbar -->
<div class="toolbar">
<div class="toolbar-inner">
<div class="toolbar-buttons">
<a class="button button-secondary" id="btn-back" href="/list/server/"><i class="fas fa-arrow-left status-icon blue"></i><?= _("Back") ?></a>
<?php
if($autoupdate == 'Enabled') {
$btn_url = '/delete/cron/autoupdate/?token='.$_SESSION['token'].'';
$btn_icon = 'fa-toggle-on status-icon green';
$btn_label = _('Disable automatic updates');
} else {
$btn_url = '/add/cron/autoupdate/?token='.$_SESSION['token'].'';
$btn_icon = 'fa-toggle-off status-icon red';
$btn_label = _('Enable automatic updates');
}
?>
<a class="button button-secondary" href="<?=$btn_url;?>"><i class="fas <?=$btn_icon;?>"></i><?=$btn_label;?></a>
</div>
</div>
</div>
<!-- End toolbar -->
<div class="container units">
<div class="header table-header">
<div class="l-unit__col l-unit__col--right">
<div>
<div class="clearfix l-unit__stat-col--left super-compact center">
<input id="toggle-all" type="checkbox" name="toggle-all" value="toggle-all" title="<?= _("Select all") ?>">
</div>
<div class="clearfix l-unit__stat-col--left wide"><b><?= _("Package") ?></b></div>
<div class="clearfix l-unit__stat-col--left wide-5"><b><?= _("Description") ?></b></div>
<div class="clearfix l-unit__stat-col--left text-center wide"><b><?= _("Version") ?></b></div>
<div class="clearfix l-unit__stat-col--left text-center"><b><?= _("Status") ?></b></div>
</div>
</div>
</div>
<!-- Begin update list item loop -->
<?php
foreach ($data as $key => $value) {
++$i;
if ($data[$key]['UPDATED'] == 'yes') {
$status = 'active';
$upd_status = 'updated';
} else {
$status = 'suspended';
$upd_status = 'outdated';
}
?>
<div class="l-unit<?php if ($status == 'suspended') echo ' l-unit--outdated';?> animate__animated animate__fadeIn">
<div class="l-unit-toolbar clearfix">
<div class="l-unit-toolbar__col l-unit-toolbar__col--right u-noselect">
</div>
</div>
<div class="l-unit__col l-unit__col--right">
<div>
<div class="clearfix l-unit__stat-col--left super-compact center">
<input id="check<?=$i ?>" class="ch-toggle" type="checkbox" title="<?= _("Select") ?>" name="pkg[]" value="<?=$key?>">
</div>
<div class="clearfix l-unit__stat-col--left wide"><b><?=$key?></b></div>
<div class="clearfix l-unit__stat-col--left wide-5"><?=_($data[$key]['DESCR'])?></div>
<div class="clearfix l-unit__stat-col--left text-center wide"><?=$data[$key]['VERSION'] ?> (<?=$data[$key]['ARCH']?>)</div>
<div class="clearfix l-unit__stat-col--left text-center">
<?php if ($data[$key]['UPDATED'] == 'no') { echo '<i class="fas fa-triangle-exclamation" style="color: orange;"></i>'; } ?>
<?php if ($data[$key]['UPDATED'] == 'yes') { echo '<i class="fas fa-circle-check status-icon green"></i>'; } ?>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<footer class="app-footer">
<div class="container"></div>
</footer>