53 lines
1.5 KiB
PHP
53 lines
1.5 KiB
PHP
<?php
|
|
ob_start();
|
|
session_start();
|
|
require_once 'core/classes.php';
|
|
|
|
$user = new User($con, 0);
|
|
if($user->isLoggedIn()) {
|
|
header('location: /home');
|
|
exit;
|
|
}
|
|
|
|
$getitstarted = new PartyStarter;
|
|
$getitstarted->bootstrap();
|
|
$countofarray = rand(0, count($arraybackground)-1);
|
|
$background = "$arraybackground[$countofarray]";
|
|
$getthecount = rand(0, count($youtubefunnies)-1);
|
|
$youtubevideo = "$youtubefunnies[$getthecount]";
|
|
?>
|
|
<link rel="stylesheet" href="/css/global.css">
|
|
<link rel="stylesheet" href="css/index.css">
|
|
<style>
|
|
body {
|
|
display: block;
|
|
background-image: url('/assets/<?php echo $background; ?>');
|
|
background-repeat: no-repeat;
|
|
background-attachment: fixed;
|
|
background-size: cover;
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
width: 50%;
|
|
}
|
|
|
|
</style>
|
|
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
|
|
<body data-bs-theme="dark">
|
|
<div style="transform: translateY(20%);"class="col d-flex justify-content-center align-middle">
|
|
|
|
<div class="card shadow-sm bg-dark text-white text-center z-2">
|
|
<div class="card-body">
|
|
<h1><?php echo $sitename; ?></h1>
|
|
<h3>the funny website with</h3>
|
|
<a type="button" class="btn btn-secondary" href="/register">Register</a>
|
|
<a type="button" class="btn btn-secondary" href="/login">Login</a>
|
|
|
|
<div class="youtube-embed"><iframe width="470" height="295"
|
|
src="https://www.youtube.com/embed/<?php echo $youtubevideo; ?>">
|
|
</iframe></div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|