-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
389 lines (362 loc) · 16.9 KB
/
profile.php
File metadata and controls
389 lines (362 loc) · 16.9 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
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<?php
session_start();
if(!isset($_SESSION['user'])) {
header('Location: login.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>OnSet Roleplay Web</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="../../dist/css/adminlte.min.css">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<!-- Navbar -->
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<!-- Sidebar -->
<?php include "inc/left.php"; ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Profile</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">User Profile</li>
</ol>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<!-- Profile Image -->
<?php
include ('inc/db.php');
$sql = 'SELECT * FROM accounts WHERE id = ?';
$req = $bdd->prepare($sql);
$req->execute(array($_GET['id']));
while ($row = $req->fetch()) {
$name = $row['name'];
$steamid = $row['steamid'];
$cloth = $row['clothing'];
$bank = $row['bank_balance'];
$inv = $row['inventory'];
$cash = $row['cash'];
$admin = $row['admin'];
}
$req->closeCursor();
?>
<div class="card card-primary card-outline">
<div class="card-body box-profile">
<div class="text-center">
<img class="profile-user-img img-fluid img-circle"
src="../../dist/img/onset.jpg"
alt="User profile picture">
</div>
<div class="form-group">
<label for="exampleSelectPrimary">Ban</label>
<form action="" method="post">
<select class="form-control border-danger" id="exampleSelectPrimary" name="status">
<option>1H</option>
<option>2H</option>
<option>24H</option>
<option>Definitly</option>
</select>
</div>
<div>
<input type="text" class="form-control" id="reason" name="reason" placeholder="reason">
</div>
<div>
<input type="text" class="form-control" id="steam" name="steam" value="<?php echo $steamid ?>">
</div>
<center><button type="submit" class="btn btn-danger btn-block">Ban !
</button></center>
<?php
include ('inc/db.php');
if(isset($_POST['status']) && $_POST['status'] != "")
{
$sql = 'INSERT INTO bans (`steamid`, `ban_time`, `reason`) VALUES (?,?,?)';
$req = $bdd->prepare($sql);
$req->execute(array($_POST['steam'],$_POST['status'],$_POST['reason']));
$req->closeCursor();
}
?>
</form>
<h3 class="profile-username text-center"><?php echo $name ?></h3>
<ul class="list-group list-group-unbordered mb-3">
<li class="list-group-item">
<b>SteamID</b> <a class="float-right"><?php echo $steamid ?></a>
</li>
<li class="list-group-item">
<b>Bank Account</b> <a class="float-right"><?php echo $bank ?> $</a>
</li>
<li class="list-group-item">
<b>Cash</b> <a class="float-right"><?php echo $cash ?> $ </a>
</li>
</ul>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
<!-- About Me Box -->
<!-- /.card-body -->
<!-- /.card -->
</div>
<!-- /.col -->
<div class="col-md-9">
<div class="card">
<div class="card-header p-2">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link active" href="#activity" data-toggle="tab">Info</a></li>
<li class="nav-item"><a class="nav-link" href="" data-toggle="tab" >Sanctions [WIP]</a></li>
</ul>
</div><!-- /.card-header -->
<div class="card-body">
<div class="tab-content">
<div class="active tab-pane" id="activity">
<!-- Post -->
<form class="form-horizontal" method="post">
<div class="form-group row">
<label for="inputName" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName" name="ident" value="<?php echo $name ?>">
</div>
</div>
<div class="form-group row">
<label for="inputName" class="col-sm-2 col-form-label">SteamID</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName" name="steam" value="<?php echo $steamid ?>" disabled>
</div>
</div>
<div class="form-group row">
<label for="inputName" class="col-sm-2 col-form-label">Inventory</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName" name="inv" value="<?php echo $inv ?>">
</div>
</div>
<div class="form-group row">
<label for="inputName" class="col-sm-2 col-form-label">Cloths</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName" name="cloth" value="<?php echo $cloth ?>">
</div>
</div>
<div class="form-group row">
<label for="inputName2" class="col-sm-2 col-form-label">Bank</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName2" name="bank" value="<?php echo $bank ?>">
</div>
</div>
<div class="form-group row">
<label for="inputName2" class="col-sm-2 col-form-label">Cash</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName2" name="cash" value="<?php echo $cash ?>">
</div>
</div>
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
<button type="submit" class="btn btn-danger">Submit</button>
<?php
if(isset($_POST['cash']) && $_POST['cash'] != "")
{
$sql = 'UPDATE accounts SET cash = ?, bank_balance = ?, inventory = ?, name = ?, clothing = ? WHERE id = ?';
$req = $bdd->prepare($sql);
$req->execute(array($_POST['cash'],$_POST['bank'],$_POST['inv'],$_POST['ident'],$_POST['cloth'],$_GET['id']));
$req->closeCursor();
echo '<meta http-equiv="refresh" content="0"/>';
}
?>
</div>
</div>
</form>
<!-- /.post -->
<!-- /.post -->
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="sanction">
<!-- The timeline -->
<div class="timeline timeline-inverse">
<!-- timeline time label -->
<div class="time-label">
<span class="bg-danger">
10 Feb. 2014
</span>
</div>
<!-- /.timeline-label -->
<!-- timeline item -->
<div>
<i class="fas fa-envelope bg-primary"></i>
<div class="timeline-item">
<span class="time"><i class="far fa-clock"></i> 12:05</span>
<h3 class="timeline-header"><a href="#">Support Team</a> sent you an email</h3>
<div class="timeline-body">
Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles,
weebly ning heekya handango imeem plugg dopplr jibjab, movity
jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle
quora plaxo ideeli hulu weebly balihoo...
</div>
<div class="timeline-footer">
<a href="#" class="btn btn-primary btn-sm">Read more</a>
<a href="#" class="btn btn-danger btn-sm">Delete</a>
</div>
</div>
</div>
<!-- END timeline item -->
<!-- timeline item -->
<div>
<i class="fas fa-user bg-info"></i>
<div class="timeline-item">
<span class="time"><i class="far fa-clock"></i> 5 mins ago</span>
<h3 class="timeline-header border-0"><a href="#">Sarah Young</a> accepted your friend request
</h3>
</div>
</div>
<!-- END timeline item -->
<!-- timeline item -->
<div>
<i class="fas fa-comments bg-warning"></i>
<div class="timeline-item">
<span class="time"><i class="far fa-clock"></i> 27 mins ago</span>
<h3 class="timeline-header"><a href="#">Jay White</a> commented on your post</h3>
<div class="timeline-body">
Take me to your leader!
Switzerland is small and neutral!
We are more like Germany, ambitious and misunderstood!
</div>
<div class="timeline-footer">
<a href="#" class="btn btn-warning btn-flat btn-sm">View comment</a>
</div>
</div>
</div>
<!-- END timeline item -->
<!-- timeline time label -->
<div class="time-label">
<span class="bg-success">
3 Jan. 2014
</span>
</div>
<!-- /.timeline-label -->
<!-- timeline item -->
<div>
<i class="fas fa-camera bg-purple"></i>
<div class="timeline-item">
<span class="time"><i class="far fa-clock"></i> 2 days ago</span>
<h3 class="timeline-header"><a href="#">Mina Lee</a> uploaded new photos</h3>
<div class="timeline-body">
<img src="http://placehold.it/150x100" alt="...">
<img src="http://placehold.it/150x100" alt="...">
<img src="http://placehold.it/150x100" alt="...">
<img src="http://placehold.it/150x100" alt="...">
</div>
</div>
</div>
<!-- END timeline item -->
<div>
<i class="far fa-clock bg-gray"></i>
</div>
</div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="settings">
<form class="form-horizontal">
<div class="form-group row">
<label for="inputName" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputName" placeholder="Name">
</div>
</div>
<div class="form-group row">
<label for="inputEmail" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="form-group row">
<label for="inputName2" class="col-sm-2 col-form-label">Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputName2" placeholder="Name">
</div>
</div>
<div class="form-group row">
<label for="inputExperience" class="col-sm-2 col-form-label">Experience</label>
<div class="col-sm-10">
<textarea class="form-control" id="inputExperience" placeholder="Experience"></textarea>
</div>
</div>
<div class="form-group row">
<label for="inputSkills" class="col-sm-2 col-form-label">Skills</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputSkills" placeholder="Skills">
</div>
</div>
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
<div class="checkbox">
<label>
<input type="checkbox"> I agree to the <a href="#">terms and conditions</a>
</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="offset-sm-2 col-sm-10">
<button type="submit" class="btn btn-danger">Submit</button>
</div>
</div>
</form>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div><!-- /.card-body -->
</div>
<!-- /.nav-tabs-custom -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php include('inc/foot.php'); ?>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
</body>
</html>