forked from castab/phpWOL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·53 lines (50 loc) · 2.53 KB
/
index.php
File metadata and controls
executable file
·53 lines (50 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
<?php
require_once 'hosts.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
<link rel="stylesheet" href="default.css">
<title>WoL Service</title>
</head>
<body>
<div id="globalAlert" class="alert alert-dismissible fade show" role="alert" style="display: none; position: fixed; top: 20px; right: 20px; z-index: 1050;">
<span id="alertMessage"></span>
<button type="button" class="close" onclick="hideAlert()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Wake On LAN Service</h1>
<p class="lead"></p>
</div>
</div>
<div class="container">
<div id="hostList" class="row">
<?php foreach ($hosts as $host): ?>
<div class="col-12 col-sm-12 col-md-6 col-xl-4">
<div class="card">
<div class="card-body">
<div class="d-flex flex-row">
<i class="card-title fa fa-desktop" style="font-size:30px;"></i>
<h5 class="card-title"><?php echo htmlspecialchars($host['hostName']); ?></h5>
</div>
<div class="btn-group">
<button type="button" onclick="sendAction('<?php echo $host['macAddress']; ?>', '<?php echo $host['ipAddress']; ?>', '<?php echo $host['hostName']; ?>', 'Wake', '')" class="btn btn-primary">Wake</button>
<button type="button" onclick="sendAction('<?php echo $host['macAddress']; ?>', '<?php echo $host['ipAddress']; ?>', '<?php echo $host['hostName']; ?>', 'Restart')" class="btn btn-warning">Restart</button>
<button type="button" onclick="sendAction('<?php echo $host['macAddress']; ?>', '<?php echo $host['ipAddress']; ?>', '<?php echo $host['hostName']; ?>', 'Shutdown')" class="btn btn-danger">Shutdown</button>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<script src="app.js"></script>
</body>
</html>