mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-21 12:19:15 +12:00
add sub check
This commit is contained in:
parent
7c987d8d35
commit
7c6414e752
4 changed files with 103 additions and 3 deletions
|
@ -100,6 +100,49 @@ function getUserTotalLogins($database, $id)
|
|||
|
||||
}
|
||||
|
||||
function getUserPlaytime($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 FreeMinutes FROM UserExt WHERE Id=?");
|
||||
$stmt->bind_param("i", $id);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
return intval($result->fetch_row()[0]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getUserSubTimeRemaining($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 SubscribedUntil FROM UserExt WHERE Id=?");
|
||||
$stmt->bind_param("i", $id);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
return intval($result->fetch_row()[0]);
|
||||
|
||||
}
|
||||
|
||||
function getUserSubbed($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 Subscriber FROM UserExt WHERE Id=?");
|
||||
$stmt->bind_param("i", $id);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
|
||||
return $result->fetch_row()[0] == "YES";
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getNoModPlayersOnlineInServer($database)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue