forked from zeus911/SSLChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetupdate.php
More file actions
81 lines (63 loc) · 2.01 KB
/
getupdate.php
File metadata and controls
81 lines (63 loc) · 2.01 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
79
80
81
<?php
session_start();
include_once("config.php");
include("lib/functions.php");
$admin = $_SESSION['admin'];
if(!isset($_SESSION['admin']) || !isset($_SESSION['username'])) {
$admin = 0;
} else {
$edit1 = "<th>".lang('STATUS_ADMIN_OPTIONS')."</th>";
}
$countdown = "countdown";
$output = "";
$ip1 = $_SERVER['REMOTE_ADDR'];
$sql = "SELECT * FROM servers ORDER BY valid_to, name";
$res = mysqli_query($db, $sql) or die(mysqli_error());
$posts2 = '';
$posts1 = "
<table class='table table-striped'>
<thead>
<tr>
<th>".lang('STATUS_DOMAIN')."</th>
<th>".lang('STATUS_AUTH')."</th>
<th>".lang('STATUS_PERIOD')."</th>
<th>".lang('STATUS_EXPERY')."</th>
<th>".lang('STATUS_STATE')."</th>
$edit1
<tr>
</thead>
<tbody>
";
echo $posts1;
if(mysqli_num_rows($res) > 0) {
while($row = mysqli_fetch_assoc($res)) {
$getupdate = new getUpdate();
$getupdate->id = $row["id"];
$getupdate->naam = $row["name"];
$getupdate->authority_long = $row["authority"];
$getupdate->valid_from = $row["valid_from"];
$getupdate->valid_to = $row["valid_to"];
$getupdate->state = $row["state"];
$getupdate->admin = $admin;
echo $getupdate->fetchData($posts1);
}
}
$posts2 .= "
</tbody>
</table>
";
echo $posts2;
$getupdate = new getUpdate($db);
$allDomains = $getupdate->getAllDomainsByAuthority('null');
echo $getupdate->getRawData( $allDomains );
?>
<script type="text/javascript">
var elems = document.getElementsByClassName('confirmation');
var confirmIt = function (e) {
if (!confirm(<?php echo lang('STATUS_ADMIN_DELETE_MSG');?>)) e.preventDefault();
};
for (var i = 0, l = elems.length; i < l; i++) {
elems[i].addEventListener('click', confirmIt, false);
}
</script>
</html>