added funny egg and no games, centered it, read the games page tho pls psl psl as dp ldaspdjasfisdjdk mdpsjn fjsdo fjsdfsdisdij

This commit is contained in:
ui0ppk 2023-02-05 12:13:51 +02:00
parent fe81e20f98
commit e417fde7c1
4 changed files with 29 additions and 7 deletions

View File

@ -113,11 +113,12 @@ $getitstarted->header();
<?php
if ($i == $x) {
break;
echo "</div>";
}
}
}
} else {
echo "no items";} ?> </div>
echo "</div> <h4 class='text-muted text-center'><i class='bi bi-egg-fried' style='font-size: 6rem;'></i><br> Looks like there are no items in the catalog yet...</h4>";} ?>
<br>
</div>
</main>

View File

@ -19,6 +19,16 @@ class PartyStarter {
<span class="visually-hidden">(current)</span>
</a>
</li>';
$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 = '<a class="navbar-brand text-dark" href="/home"><div class="headerLogo d-inline-block align-top" alt=""></div></a>';
$query = $con->prepare('SELECT money FROM users WHERE id=:id');
$query->bindParam(':id', $_SESSION['user'], PDO::PARAM_INT);

View File

@ -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.
*/
?>
</head>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
@ -56,12 +63,12 @@ $getitstarted->header();
<?php
if ($i == $x) {
break;
echo "</div>";
}
}
}
} else {
echo "no games";} ?>
</div>
echo "</div> <h4 class='text-muted text-center'><i class='bi bi-egg-fried' style='font-size: 6rem;'></i><br> Looks like there are no games, sad.</h4>";} ?>
</div>
<div class="carousel-item"><div class="card-group" style=" margin-top: 15px; width: 100%;">
</div></div>
@ -81,7 +88,7 @@ $getitstarted->header();
<div class="carousel-inner">
<div class="carousel-item active">
<div class="card-group" style=" margin-top: 15px; width: 100%;">
<?php
<?php
$sql = "SELECT allStar FROM games";
$q = $con->prepare(str_replace('allStar', 'count(*)', $sql));
$q->execute();
@ -110,12 +117,12 @@ $getitstarted->header();
<?php
if ($i == $x) {
break;
echo "</div>";
}
}
}
} else {
echo "no games";} ?>
</div>
echo "</div> <h4 class='text-muted text-center'><i class='bi bi-egg-fried' style='font-size: 6rem;'></i><br> Looks like there are no games, sad.</h4>";} ?>
</div>
<div class="carousel-item"><div class="card-group" style=" margin-top: 15px; width: 100%;">
</div></div>

View File

@ -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);
</svg>
<div class="card-body">
<label class="col-form-label col-form-label-sm mt-4 username" for="inputSmall">Username</label>
<input class="form-control form-control-sm" type="text" placeholder="Your username" id="inputSmall" for="inputValid" name="username">
<input class="<?php if($userdontexist == true) { echo "form-control is-invalid"; } else {echo "form-control form-control-sm"; } ?>" type="text" placeholder="Your username" id="inputSmall" for="inputValid" name="username">
<?php if($userdontexist == true) {echo '<div class="invalid-feedback" bis_skin_checked="1">User does not exist.</div>'; } ?>
<label class="col-form-label col-form-label-sm mt-4 password" for="inputSmall">Password</label>
<input class="<?php if($passwordiswrong == true) { echo "form-control is-invalid"; } else {echo "form-control form-control-sm"; } ?>"
type="password" placeholder="Your password (Minmum 8 characters)" id="inputSmall" name="pass">