Update headshot.php

This commit is contained in:
Mario 2023-05-22 13:20:52 +03:00 committed by GitHub
parent f1904071b8
commit af5e01fc02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1,16 +1,17 @@
<?php <?php
// this file is entirely made by nolanwhy, no skid pls // this file is entirely made by nolanwhy, no skid pls
// thanx u nolan im also gonna add some comments here cuz why not - mario
require_once '../../../core/classes.php'; require_once '../../../core/classes.php';
require_once '../../../core/config.php'; require_once '../../../core/config.php';
$id = (int)$_GET["userId"] ?? 0; $id = (int)$_GET["userId"] ?? 1; // get the id!! if its no id then 1
$stmt = $con->prepare("SELECT * FROM users WHERE id = :id"); $stmt = $con->prepare("SELECT * FROM users WHERE id = :id"); // get everythin from users where the id is the id
$stmt->bindParam(':id',$id,PDO::PARAM_INT); $stmt->bindParam(':id',$id,PDO::PARAM_INT);
$stmt->execute(); $stmt->execute();
$ruser = $stmt->fetch(); $ruser = $stmt->fetch();
if(!$ruser) { if(!$ruser) {
exit; exit;
} }
function renderUser($id, $times = 1) { function renderUser($id, $times = 1) { // render function noice
global $RCCServiceSoap; global $RCCServiceSoap;
global $site; global $site;
// times is the like, if you rendered 2 times or shit. // times is the like, if you rendered 2 times or shit.
@ -51,3 +52,4 @@ if(empty($ruser["headshot"])) {
} else { } else {
echo base64_decode($ruser["headshot"]); echo base64_decode($ruser["headshot"]);
} }
?>