-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
138 lines (130 loc) · 4.85 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Hugo 0.84.0">
<title>SteamBot</title>
<link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/album/">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<body style="background-color:#212529;">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
.btn-group{
position: absolute;
bottom: 1%;
}
.btn-primary {
color: #fff;
background-color: #5865F2;
border-color: #0d6efd;
}
</style>
</head>
<body>
<?php
include_once("cfg.php");
?>
<header>
<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="./">SteamBot</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mynavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="mynavbar">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="./index.php">Cases</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">Knives</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)">Weaponskins</a>
</li>
</ul>
<form class="d-flex">
<?php
require __DIR__ . "/functions.php";
require __DIR__ . "/discord.php";
$auth_url = url($client_id, $redirect_url, $scopes);
if (isset($_SESSION['user'])) {
echo '<a href="profile.php"><button type="button" class="btn btn-success">Webhooks</button></a> ';
echo '<a href="logout.php"><button type="button" class="btn btn-danger">Logout</button></a>';
} else {
echo '<a href="' . $auth_url . '">' . '<button type="button" class="btn btn-primary">Login with Discord</button></a>';
}
?>
</form>
</div>
</div>
</nav>
</header>
<main>
<section class="album py-4 bg-dark">
<div class="col-lg-6 col-md-8 mx-auto">
<h1 class="fw-light text-muted">Your Discord connections</h1>
<p class="lead text-muted">Below you can see all your discord connections.</p>
</div>
</section>
<div class="album py-5 bg-dark">
<div class="container">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-6 g-3">
<?php
$username = $_SESSION['user_id'];
// echo 'Hello ' . $username . '<br>';
$get_cases = mysqli_query($con,"SELECT * FROM bots WHERE username = $username");
while($row = mysqli_fetch_array($get_cases))
{
if(!$row['id'] == ''){
$id = $row['id'];
echo '<div class="col "><div class="card h-100 shadow-sm bg-dark">';
echo '<img src="' . $row['img'] .'" class="card-img-top" alt="...">';
echo '<div class="card-body">';
echo '<p class="card-text text-muted">' . $row['name'] . '</p><br>';
if(!$row['custom_name'] == ''){
echo '<p class="card-text text-muted"><b>Note: </b><br>' . $row['custom_name'] . '</p><br>';
}
echo '<div class="d-flex justify-content-between align-items-center">';
echo '<div class="btn-group ">';
if (isset($_SESSION['user'])) {
$_SESSION['r_id'] = $row['id'];
echo '<form action="remove.php" method="post">
<button type="submit" name="remove" class="btn btn-danger">Remove</button>';
echo '</form>';
} else {
echo '<a href="add.php?id=' . $row['id'] . '"><button type="button" class="btn btn-success">Login to add</button></a>';
}
echo '</div></div></div></div></div>';
}
}
?>
</div>
</div>
</div>
</main>
<footer class="text-muted py-5">
<div class="container">
<p class="float-end mb-1">
<a href="#">Back to top</a>
</p>
<p class="mb-1">Made with love by <a href="https://github.com/crilleaz/">Crilleaz</a></p>
</div>
</footer>
<script src="./js/bootstrap.bundle.min.js"></script>
</body>
</html>