forked from One-Piece-Online/OPOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzzPatreonDebug.php
More file actions
38 lines (31 loc) · 1.03 KB
/
zzPatreonDebug.php
File metadata and controls
38 lines (31 loc) · 1.03 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
<?php
include_once 'MenuBar.php';
require_once './Assets/patreon-php-master/src/OAuth.php';
require_once './Assets/patreon-php-master/src/API.php';
require_once './Assets/patreon-php-master/src/PatreonLibraries.php';
include_once './Assets/patreon-php-master/src/PatreonDictionary.php';
include_once './includes/functions.inc.php';
include_once "./includes/dbh.inc.php";
if (!isset($_SESSION["useruid"])) {
echo ("Please login to view this page.");
exit;
}
$useruid = $_SESSION["useruid"];
if ($useruid != "OotTheMonk" && $useruid != "Launch" && $useruid != "Tower") {
echo ("You must log in to use this page.");
exit;
}
$userName = $_GET["userName"];
$sql = "SELECT * FROM users where usersUid='$userName'";
$stmt = mysqli_stmt_init($conn);
if (!mysqli_stmt_prepare($stmt, $sql)) {
echo ("ERROR");
exit();
}
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
$row = mysqli_fetch_assoc($result);
$access_token = $row["patreonAccessToken"];
try {
PatreonLogin($access_token, false, true);
} catch (\Exception $e) { }