diff --git a/catalog.php b/catalog.php
index 51ef453..ee8b42a 100644
--- a/catalog.php
+++ b/catalog.php
@@ -113,11 +113,12 @@ $getitstarted->header();
";
}
}
}
} else {
- echo "no items";} ?>
+ echo "
Looks like there are no items in the catalog yet...
";} ?>
diff --git a/core/classes.php b/core/classes.php
index 0541482..ea48995 100644
--- a/core/classes.php
+++ b/core/classes.php
@@ -19,6 +19,16 @@ class PartyStarter {
(current)
';
+
+ $query = $con->prepare('SELECT COUNT(id) FROM users WHERE id=:id');
+ $query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT);
+ $query->execute();
+ $userExists = $query->fetchColumn();
+ if($userExists <= 1) {
+ // php me when
+ } else {
+ unset($_SESSION["user"]);
+ }
$grubloxlogotohome = '';
$query = $con->prepare('SELECT money FROM users WHERE id=:id');
$query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT);
diff --git a/games.php b/games.php
index 95b4cd7..c3a89a6 100644
--- a/games.php
+++ b/games.php
@@ -15,6 +15,13 @@ if(isset($_SESSION['user'])) {
}
$getitstarted = new PartyStarter;
$getitstarted->header();
+
+/* !!! IMPORTANT !!!
+To whoever reading this, if your going to make the games page functional, please use array slice https://www.php.net/manual/en/function.array-slice.php,
+since there can only be 8 in one carousel, make sure to make the offset work.
+Signing off, qzip.
+*/
+
?>
|
@@ -56,12 +63,12 @@ $getitstarted->header();
";
}
}
}
} else {
- echo "no games";} ?>
-
+ echo "
Looks like there are no games, sad.
";} ?>
@@ -81,7 +88,7 @@ $getitstarted->header();
- prepare(str_replace('allStar', 'count(*)', $sql));
$q->execute();
@@ -110,12 +117,12 @@ $getitstarted->header();
";
}
}
}
} else {
- echo "no games";} ?>
-
+ echo "
Looks like there are no games, sad.
";} ?>
diff --git a/login.php b/login.php
index 46cb397..0d40c2d 100644
--- a/login.php
+++ b/login.php
@@ -11,6 +11,7 @@ require_once 'core/config.php';
$getitstarted = new PartyStarter;
$getitstarted->header();
$passwordiswrong = false;
+$userdontexist = false;
$user = new User($con, 0);
if(isset($_POST['submit'])) {
$username = $_POST['username'];
@@ -30,6 +31,8 @@ if(isset($_POST['submit'])) {
$passwordiswrong = true;
//echo $password." - sex - ".$user->getPassword($con, $username);
}
+ } else {
+ $userdontexist = true;
}
}
$result = file_get_contents("https://useless-facts.sameerkumar.website/api");
@@ -58,7 +61,8 @@ $thefunfact = json_decode($result);
-
+ " type="text" placeholder="Your username" id="inputSmall" for="inputValid" name="username">
+ User does not exist.
'; } ?>
"
type="password" placeholder="Your password (Minmum 8 characters)" id="inputSmall" name="pass">