add stuff

This commit is contained in:
SilicaAndPina 2021-07-07 01:02:04 +12:00
parent 7a54cd91d7
commit 4414da4648
5 changed files with 61 additions and 14 deletions

View file

@ -122,6 +122,20 @@ function getUserQuestPoints($database, $id)
}
function getUserExistInExt($database, $id)
{
include('config.php');
$dbname = $database;
$connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
$stmt = $connect->prepare("SELECT COUNT(*) FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]) <= 0;
}
function getUserTotalLogins($database, $id)
{
include('config.php');

View file

@ -8,8 +8,7 @@ if(session_status() !== PHP_SESSION_ACTIVE)
if(!function_exists('is_logged_in'))
include('common.php');
$host_names = explode(".", $host);
$host = $host_names[count($host_names)-2] . "." . $host_names[count($host_names)-1];
$host = $_SERVER['HTTP_HOST'];
?>
<HEAD>