This commit is contained in:
SilicaAndPina 2021-06-27 15:32:09 +12:00
parent 6267910923
commit 7c987d8d35
8 changed files with 242 additions and 29 deletions
WebInterface/master-site

View file

@ -30,6 +30,77 @@ function getNoSubbedPlayersOnlineInServer($database)
return $onlineSubscribers->fetch_row()[0];
}
function getUserMoney($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 Money FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]);
}
function getUserBankMoney($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 BankBalance FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]);
}
function getUserLoginDate($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 LastLogin FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]);
}
function getUserQuestPoints($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 QuestPoints FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]);
}
function getUserTotalLogins($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 TotalLogins FROM UserExt WHERE Id=?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
return intval($result->fetch_row()[0]);
}
function getNoModPlayersOnlineInServer($database)
{
include('config.php');

View file

@ -61,30 +61,30 @@ HREF=/web/parents.php>Parent's Guide</A> <BR>
<FONT COLOR=550000><B>
<?php
if($hasIntl)
echo numfmt_format($fmt, $onlineUsers);
echo numfmt_format($fmt, $onlineUsers);
else
echo $onlineUsers;
echo $onlineUsers;
?></B></FONT> Players Online Now<BR>
<FONT COLOR=550000><B><?php
if($hasIntl)
echo numfmt_format($fmt, $onlineSubscribers);
echo numfmt_format($fmt, $onlineSubscribers);
else
echo $onlineSubscribers;
echo $onlineSubscribers;
?></B></FONT> Subscribers Online Now<BR>
<FONT COLOR=550000><B>
<?php
if($hasIntl)
echo numfmt_format($fmt, $onlineModerators);
echo numfmt_format($fmt, $onlineModerators);
else
echo $onlineModerators;
echo $onlineModerators;
?></B></FONT> Moderators Online Now<BR>
<FONT COLOR=550000><B>
<?php
$activeUserCount = $activeAccounts->fetch_row()[0];
if($hasIntl)
echo numfmt_format($fmt, $activeUserCount);
echo numfmt_format($fmt, $activeUserCount);
else
echo $activeUserCount;
echo $activeUserCount;
?></B></FONT> Active Accounts<BR><BR>
<B>ABOUT:</B><BR>
Horse Isle is a vast multi-player horse based world. It allows for many players to

View file

@ -111,7 +111,7 @@ color: #440000;
if(is_logged_in())
{
$username = $_SESSION['USERNAME'];
echo('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10><TR><TD><B>Logged in as: '.$username.'</B><BR><BR><A HREF=/?LOGOUT=1><img src=/web/but-logout.gif border=0></A><BR><A HREF=/><img src=/web/but-mainpage.gif border=0></A></TD><TD><BR><A HREF=/account.php><img src=/web/but-serverlist.gif border=0></A><BR><A HREF=/web/news.php><img src=/web/but-news.gif border=0></A><BR><A HREF=/web/forums.php><img src=/web/but-forums.gif border=0></A><BR><A HREF=/web/helpcenter.php><img src=/web/but-helpcenter.gif border=0></A></TD></TR></TABLE>');
echo('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10><TR><TD><B>Logged in as: '.htmlspecialchars($username).'</B><BR><BR><A HREF=/?LOGOUT=1><img src=/web/but-logout.gif border=0></A><BR><A HREF=/><img src=/web/but-mainpage.gif border=0></A></TD><TD><BR><A HREF=/account.php><img src=/web/but-serverlist.gif border=0></A><BR><A HREF=/web/news.php><img src=/web/but-news.gif border=0></A><BR><A HREF=/web/forums.php><img src=/web/but-forums.gif border=0></A><BR><A HREF=/web/helpcenter.php><img src=/web/but-helpcenter.gif border=0></A></TD></TR></TABLE>');
}
else
{