-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
87 lines (68 loc) · 3.09 KB
/
profile.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PCManager | <?php session_start(); if(isset($_SESSION['username'])) { echo $_SESSION['username']; } else { header("location: index.php"); exit(); } ?></title>
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/profile.css">
</head>
<body style="background: url('images/background-image.png') center top / cover no-repeat;">
<?php
include 'connection.php';
include_once 'navbar.php';
?>
<div class="welcome-text">
<?php
if(isset($_SESSION["username"])) {
echo "<h1>Hi there, ". $_SESSION['username'] ."</h1>";
} else {
header("location: index.php");
exit();
}
?>
</div>
<div class="panel-holder">
<div class="panel">
<h1 class="panel-title">PCManager</h1>
<div class="information">
<h3>Timestamps</h3>
<?php
if(isset($_SESSION["username"])) {
$username = $_SESSION["username"];
$query = mysqli_query($connection, "SELECT * FROM timestamps WHERE username='$username'");
while ($row = mysqli_fetch_assoc($query))
{
echo "<h6>Cleaning PC<span style='float:right; color:rgba(255,255,255,0.5)'>" . $row['cleaner_timestamp'] . "</span></h6>";
echo "<h6>Renewing IP<span style='float:right; color:rgba(255,255,255,0.5)'>" . $row['renewip_timestamp'] . "</span></h6>";
echo "<h6>Releasing IP<span style='float:right; color:rgba(255,255,255,0.5)'>" . $row['releaseip_timestamp'] . "</span></h6>";
echo "<h6>Flushing DNS<span style='float:right; color:rgba(255,255,255,0.5)'>" . $row['flushdns_timestamp'] . "</span></h6>";
}
$connection -> close();
}
?>
</div>
</div>
<div class="panel">
<h1 class="panel-title">PCSpecs</h1>
<div class="settings">
<div class="information">
<h3>Recently used classes</h3>
<ul>
<?php
$username = $_SESSION["username"];
$connection = mysqli_connect("sql106.epizy.com", "epiz_30541862", "EG1DDkotFx", "epiz_30541862_mainDB");
$query = mysqli_query($connection, "SELECT DISTINCT class FROM win32classes WHERE username='$username'");
for ($x = 0; $x < 5; $x++) {
$row = mysqli_fetch_assoc($query);
echo "<li><h6>" . $row['class'] . "</h6>";
}
$connection -> close();
?>
</ul>
</div>
</div>
</div>
</body>
</html>