force sync from /var/www/html/panel: 2025-09-08T20:36:30Z
This commit is contained in:
commit
4f717c9ee8
18119 changed files with 2566034 additions and 0 deletions
35
ControlPanel/_website/db.php
Executable file
35
ControlPanel/_website/db.php
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
text/x-generic _db.php ( PHP script, ASCII text, with CRLF line terminators )
|
||||
<?php
|
||||
$servername = "panel.iaregamer.com";
|
||||
$username = "remoteuser";
|
||||
$password = "Pkloyn7yvpht!";
|
||||
$dbname = "panel";
|
||||
|
||||
// Create connection
|
||||
$db = mysqli_connect($servername, $username, $password, $dbname);
|
||||
|
||||
// Check connection
|
||||
if (!$db) {
|
||||
echo "failed";
|
||||
die("Connection failed: " . mysqli_connect_error());
|
||||
}
|
||||
|
||||
//This gets the current users role , Admin, User or other
|
||||
//returning true/false
|
||||
//$isAdmin = isAdmin(186);
|
||||
function isAdmin($userID){
|
||||
$adminField = $db->query("SELECT 'users_role' FROM ogp_users WHERE userID = $userID");
|
||||
if($adminField == "admin"){
|
||||
$adminStatus = true;
|
||||
}else{
|
||||
$adminStatus = false;
|
||||
}
|
||||
return $adminStatus;
|
||||
}
|
||||
|
||||
function logger($logtext){
|
||||
file_put_contents("logfile.txt",$logtext . PHP_EOL,FILE_APPEND);
|
||||
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue