diff --git a/WebInterface/master-site/account.php b/WebInterface/master-site/account.php
index 978859a..32f8fc8 100755
--- a/WebInterface/master-site/account.php
+++ b/WebInterface/master-site/account.php
@@ -45,7 +45,8 @@ if(!is_logged_in())
if(isset($_GET['CONNECT']))
{
- $server = getServerById($_GET['CONNECT']);
+ $server_id = $_GET['CONNECT'];
+ $server = getServerById($server_id);
if($server !== null)
{
@@ -58,18 +59,36 @@ if(isset($_GET['CONNECT']))
$redirectUrl .= '/';
$redirectUrl .= 'account.php?SLID='.(string)$playerId.'&C='.base64_url_encode(hex2bin($hmac));
-
+ set_LastOn($playerId, $server_id);
header("Location: ".$redirectUrl);
exit();
}
}
include("web/header.php");
+
+$player_id = $_SESSION['PLAYER_ID'];
+$lastOnServer = get_LastOn($player_id);
+$moveToFront = getServerById($lastOnServer);
+
+if($moveToFront !== null){
+ for($i = 0; $i < count($server_list); $i++){
+ if($server_list[$i]['id'] == $lastOnServer)
+ unset($server_list[$i]);
+ }
+ array_unshift($server_list, $moveToFront);
+}
+
?>
-
 | You were on this server last time: SERVER: PINTO.HORSEISLE.COM
| Not Subscribed Quest Points: 75pts Times Online: 3 Last On: 0.84 days ago
| 17 players online now | [LOG IN] | ?>
- |
[June 23, 2020 Latest Horse Isle News] Horse Isle 1 Compromise: Unfortunately, some troublemakers made a mess of HI1. We have reverted to a backup from 4am PST and taken some precautions. So, anything you "did" this morning was reverted. We have also given all subs +12hrs to cover the down time.
Because passwords for accounts were likely compromised, we setup a system to verify and unlock for players' protection. When you try to login you will be prompted to reset your password. We can automatically unlock most players' accounts, but some will require manual support via email. Just follow the directions and please be patient with us.
Sorry about the trouble. HI1 was never designed to survive so long into this new mean digital world. ;)
P.S. The XSS alert was a simple javascript alert, just meaningless and harmless.
Thanks!
|
?>
We have a Beginner Guide online to help new players learn how to play.
Horse Isle Server List
Each server is completely independent and has identical game content. Money/horses/subscriptions are all tied to a particular server.
-Normally you will only play on one server. Playing on any server uses up playtime on all servers, so you do not gain any free time. Reasons for playing on more than one include joining a friend, or in case your normal server is down.
-Multiple servers are required since there is a max capacity of around 150 players online per server.
Please note, a profile on any individual server will be permanently deleted after 183 days (6 months) of not logging into the game on that specific server or your subscription expiring, whichever is later. |
GAME SERVERS (all identical please only join 1 or 2) | PROFILE (not current) | ONLINE | LOGIN |
|
+[June 23, 2020 Latest Horse Isle News] Horse Isle 1 Compromise: Unfortunately, some troublemakers made a mess of HI1. We have reverted to a backup from 4am PST and taken some precautions. So, anything you "did" this morning was reverted. We have also given all subs +12hrs to cover the down time.
Because passwords for accounts were likely compromised, we setup a system to verify and unlock for players' protection. When you try to login you will be prompted to reset your password. We can automatically unlock most players' accounts, but some will require manual support via email. Just follow the directions and please be patient with us.
Sorry about the trouble. HI1 was never designed to survive so long into this new mean digital world. ;)
P.S. The XSS alert was a simple javascript alert, just meaningless and harmless.
Thanks!
|
?>
We have a Beginner Guide online to help new players learn how to play.
');
+?>
Horse Isle Server List
Each server is completely independent and has identical game content. Money/horses/subscriptions are all tied to a particular server.
+Normally you will only play on one server. Playing on any server uses up playtime on all servers, so you do not gain any free time. Reasons for playing on more than one include joining a friend, or in case your normal server is down.
+Multiple servers are required since there is a max capacity of around 150 players online per server.
Please note, a profile on any individual server will be permanently deleted after 183 days (6 months) of not logging into the game on that specific server or your subscription expiring, whichever is later.You have 8 rule violation points against your account. [ REVIEW VIOLATIONS ] ?> |
GAME SERVERS (all identical please only join 1 or 2) | PROFILE (not current) | ONLINE | LOGIN |
|
+[JOIN]';
else
$join = '[LOG IN]';
- echo(' | SERVER: '.strtoupper($domain).' '.$desc.' | no existing profile | 0 players online now | '.$join.' |
|
');
+
+ echo(' | ');
+ if($lastOnServer === $id)
+ echo('You were on this server last time: ');
+ echo('SERVER: '.strtoupper($domain).' '.$desc.' | ');
+ if(!$pExist)
+ {
+ echo('no existing profile | ');
+ }
+ else
+ {
+ $newUser = getUserExistInExt($database, $player_id);
+
+ if(!$newUser){
+ $loginDate = getUserLoginDate($database, $player_id);
+ $questPoints = getUserQuestPoints($database, $player_id);
+ $totalLogins = getUserTotalLogins($database, $player_id);
+ $subbed = getUserSubbed($database, $player_id);
+ }
+ else
+ {
+ $loginDate = time();
+ $questPoints = 0;
+ $totalLogins = 0;
+ $subbed = false;
+ }
+
+ echo('');
+ if($subbed)
+ echo('ACTIVE SUBSCRIPTION');
+ else
+ echo('Not Subscribed');
+
+ $lastOn = 0.00;
+ $current_time = time();
+ $difference = $current_time - $loginDate;
+ $lastOn = $difference/86400;
+
+
+ echo(' Quest Points: '.$questPoints.'.pts ');
+ echo('Times Online: '.$totalLogins.' ');
+ echo('Last On: '.number_format((float)$lastOn, 2, '.', '').' days ago ');
+ echo(' | ');
+ }
+ echo(''.$num_on.' players online now | '.$join.' |
|
');
}
?>
diff --git a/WebInterface/master-site/common.php b/WebInterface/master-site/common.php
index a4ddd71..d2cf2b0 100755
--- a/WebInterface/master-site/common.php
+++ b/WebInterface/master-site/common.php
@@ -145,11 +145,66 @@ function check_password(int $userId, string $password)
return false;
}
+function count_LastOn(int $userId)
+{
+ include('config.php');
+ $connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
+ $stmt = $connect->prepare("SELECT COUNT(*) FROM LastOn WHERE Id=?");
+ $stmt->bind_param("i", $userId);
+ $stmt->execute();
+ $result = $stmt->get_result();
+ $v = $result->fetch_row();
+ return intval($v[0]);
+}
+
+
+function get_LastOn(int $userId)
+{
+ if(count_LastOn($userId) <= 0){
+ return "NONE";
+ }
+
+
+ include('config.php');
+ $connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
+ $stmt = $connect->prepare("SELECT ServerId FROM LastOn WHERE Id=?");
+ $stmt->bind_param("i", $userId);
+ $stmt->execute();
+ $result = $stmt->get_result();
+ $v = $result->fetch_row();
+
+
+ return $v[0];
+}
+
+function set_LastOn(int $userId, string $lastOn)
+{
+ include('config.php');
+
+ if(get_LastOn($userId) === "NONE")
+ {
+ $connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
+ $stmt = $connect->prepare("INSERT INTO LastOn VALUES(?, ?)");
+ $stmt->bind_param("is", $userId, $lastOn);
+ $stmt->execute();
+ }
+ else
+ {
+ $connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
+ $stmt = $connect->prepare("UPDATE LastOn SET ServerId=? WHERE Id=?");
+ $stmt->bind_param("si", $lastOn, $userId);
+ $stmt->execute();
+ }
+}
+
+
+
function populate_db()
{
include('config.php');
$connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
mysqli_query($connect, "CREATE TABLE IF NOT EXISTS Users(Id INT, Username TEXT(16),Email TEXT(128),Country TEXT(128),SecurityQuestion Text(128),SecurityAnswerHash TEXT(128),Age INT,PassHash TEXT(128), Salt TEXT(128),Gender TEXT(16), Admin TEXT(3), Moderator TEXT(3))");
+ mysqli_query($connect, "CREATE TABLE IF NOT EXISTS LastOn(Id INT, ServerId TEXT(1028))");
}
diff --git a/WebInterface/master-site/crosserver.php b/WebInterface/master-site/crosserver.php
index 9918230..7b5c275 100644
--- a/WebInterface/master-site/crosserver.php
+++ b/WebInterface/master-site/crosserver.php
@@ -317,6 +317,19 @@ function getNoPlayersOnlineGlobal()
return $playersOn;
}
+function userExistAny($playerId)
+{
+ include('servers.php');
+ for($i = 0; $i < count($server_list); $i++)
+ {
+ if(userid_exists($server_list[$i]['database'], $playerId)){
+ return true;
+ }
+ }
+ return false;
+}
+
+
function getNoSubbedPlayersOnlineGlobal()
{
include('servers.php');
diff --git a/WebInterface/master-site/joinserver.php b/WebInterface/master-site/joinserver.php
index aba051c..8cc015f 100644
--- a/WebInterface/master-site/joinserver.php
+++ b/WebInterface/master-site/joinserver.php
@@ -25,6 +25,7 @@ if(isset($_GET['SERVER']))
$redirectUrl .= '/';
$redirectUrl .= 'account.php?SLID='.(string)$playerId.'&C='.base64_encode(hex2bin($hmac));
+ set_LastOn($playerId, $server_id);
header("Location: ".$redirectUrl);
exit();
diff --git a/WebInterface/master-site/web/rulesbroken.php b/WebInterface/master-site/web/rulesbroken.php
index ac1ce19..1f51f92 100755
--- a/WebInterface/master-site/web/rulesbroken.php
+++ b/WebInterface/master-site/web/rulesbroken.php
@@ -1,3 +1,4 @@
+
HORSE ISLE - Online Multiplayer Horse Game
@@ -96,10 +97,7 @@ color: #440000;
-
+
|
 |
@@ -115,7 +113,7 @@ We will not dispute, nor provide any more details about these Violations.
An account needs at least 10 points prior to being "Examined" to see if it requires removal or other steps.
So do not be concerned if you have 1 or 2 points against you. It has NO negative effect on your account.
Violations "Time Out" After 2 months and are removed from your record. The date shown is when we reviewed the violations, so may be a day or 2 later than the actual violation.
-
Total Chat Violations:
Severity | Description of Rule Broken | Date |
+
Total Chat Violations:
Severity | Description of Rule Broken | Date |
4points | Chat: No Swearing | Jul 02 |
4points | No spamming includes with autoreply | Jul 03 |
 |
|
@@ -129,7 +127,7 @@ Violations "Time Out" After 2 months and are removed from your record. The date
[ Expected Behavior ]
[ Contact Us ]
[ Credits ]
-Copyright © 2020 Horse Isle
+Copyright © 2021 Horse Isle