-
Notifications
You must be signed in to change notification settings - Fork 1
/
devices.php
94 lines (92 loc) · 3.28 KB
/
devices.php
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
session_start();
if (!isset($_SESSION['Admin-name'])) {
header("location: login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Manage Devices</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="icon" type="image/png" href="images/favicon.png"> -->
<link rel="stylesheet" type="text/css" href="css/devices.css"/>
<script type="text/javascript" src="js/jquery-2.2.3.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha1256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
</script>
<script type="text/javascript" src="js/bootbox.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script src="js/dev_config.js"></script>
<script>
$(window).on("load resize ", function() {
var scrollWidth = $('.tbl-content').width() - $('.tbl-content table').width();
$('.tbl-header').css({'padding-right':scrollWidth});
}).resize();
</script>
<script>
$(document).ready(function(){
$.ajax({
url: "dev_up.php",
type: 'POST',
data: {
'dev_up': 1,
}
}).done(function(data) {
$('#devices').html(data);
});
});
</script>
</head>
<body>
<?php include'header.php';?>
<main>
<h1 class="slideInDown animated">Add a new Device/update/remove/Enable/Disable</h1>
<section class="container py-lg-5">
<div class="alert_dev"></div>
<!-- devices -->
<div class="row">
<div class="col-lg-12 mt-4">
<div class="panel">
<div class="panel-heading" style="font-size: 19px;">Your Devices:
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#new-device" style="font-size: 18px; float: right; margin-top: -6px;">New Device</button>
</div>
<div class="panel-body">
<div id="devices"></div>
</div>
</div>
</div>
</div>
<!-- \\devices -->
<!-- New Devices -->
<div class="modal fade" id="new-device" tabindex="-1" role="dialog" aria-labelledby="New Device" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="exampleModalLongTitle">Add new device:</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="" method="POST" enctype="multipart/form-data">
<div class="modal-body">
<label for="User-mail"><b>Device Name:</b></label>
<input type="text" name="dev_name" id="dev_name" placeholder="Device Name..." required/><br>
<label for="User-mail"><b>Device Department:</b></label>
<input type="text" name="dev_dep" id="dev_dep" placeholder="Device Department..." required/><br>
</div>
<div class="modal-footer">
<button type="button" name="dev_add" id="dev_add" class="btn btn-success">Create new Device</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
<!-- //New Devices -->
</section>
</main>
</body>
</html>