-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstorage.php
More file actions
78 lines (64 loc) · 2.53 KB
/
storage.php
File metadata and controls
78 lines (64 loc) · 2.53 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
<?php
// START SESSION
session_start();
// LOGOUT REQUEST
if (isset($_POST["logout"])) { unset($_SESSION["user"]); }
// REDIRECT TO LOGIN PAGE IF NOT LOGGED IN
if (!isset($_SESSION["user"])) {
header("Location: login.php");
exit();
}
// INCLUDE CONNECT FILE
include 'connect.php';
// INCLUDE HEADER FILE
include 'header.php';
// PAGE CONTENT
echo '
<!-- End of Topbar -->
<!-- Begin Page Content -->
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-4 text-gray-800"></h1>
<!-- Start Upload Card Section -->
<h1>Disk Management</h1>
<div class="row">
<div class="col-lg-6">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Disk Management Information</h6>
</div>
<div class="card-body">
<p>Here you can find and manage your virtual machine disks.</p>
</div>
</div>
</div>
<!-- End Upload Card Section -->
</div>
<!-- Start Disk Images Section -->
<div class="row">
<div class="col-lg-6">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Disk Images</h6>
</div>
<div class="card-body">
';
$fileList = glob('/var/lib/libvirt/images/*');
foreach($fileList as $filename){
if(is_file($filename)){
echo $filename, '<br>';
}
}
echo '
</div>
</div>
</div>
<!-- End Disk Images Section -->
</div>
<!-- /.container-fluid -->
</div>
</div>
<!-- End of Main Content -->
';
// INCLUDE HEADER FILE
include 'footer.php';