Add files via upload
This commit is contained in:
parent
6fd1469fe8
commit
c4fef66bb4
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
namespace core;
|
||||
require_once 'core/classes.php';
|
||||
use classes\PartyStarter as PartyStarter;
|
||||
|
||||
$getitstarted = new PartyStarter;
|
||||
$getitstarted->bootstrap();
|
||||
$arraybackground = array('win7.png', 'win8.png', 'epic.png', 'yosemite.png', 'aurora.png', 'tiger.png', 'fish.png');
|
||||
$countofarray = rand(0, count($arraybackground)-1);
|
||||
$background = "$arraybackground[$countofarray]";
|
||||
$youtubefunnies = array('bitqf13QU7Q', 'Z_V6yKKIk5U', '2tHl6O5Sp8w', '-5WcDfKndxU', 'cwyTleTL06Y');
|
||||
$getthecount = rand(0, count($youtubefunnies)-1);
|
||||
$youtubevideo = "$youtubefunnies[$getthecount]";
|
||||
?>
|
||||
<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>undefined</title>
|
||||
<div class="text-and-stuff"><h1>undefined</h1>
|
||||
<h3>the funny website with</h3>
|
||||
<a type="button" class="btn btn-dark" href="/register">Register</a>
|
||||
<a type="button" class="btn btn-dark" href="/login">Login</a></div>
|
||||
<div class="youtube-embed"><iframe width="470" height="295"
|
||||
src="https://www.youtube.com/embed/<?php echo $youtubevideo; ?>">
|
||||
</iframe></div>
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
namespace core;
|
||||
use \PDO as PDO;
|
||||
require_once 'core/classes.php';
|
||||
use classes\PartyStarter as PartyStarter;
|
||||
|
||||
$getitstarted = new PartyStarter;
|
||||
$getitstarted->buildloggedoutheader();
|
||||
$passwordconfirmiswrong = "false";
|
||||
if(isset($_POST['submit'])) {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['pass'];
|
||||
$passwordconfirm = $_POST['passconfirm'];
|
||||
echo "ur username: " . $username;
|
||||
echo "<br/>";
|
||||
echo "ur password: " . $password;
|
||||
echo "<br/>";
|
||||
echo "ur passwordconfirm: " . $passwordconfirm;
|
||||
if ($password == $passwordconfirm) {
|
||||
echo '<script>
|
||||
if ( window.history.replaceState ) {
|
||||
window.history.replaceState( null, null, window.location.href );
|
||||
}
|
||||
</script>';
|
||||
echo "confirm pass is correct";
|
||||
if (strlen($password) < 8) {
|
||||
$passwordistooshort = "true";
|
||||
}
|
||||
if (strlen($password) > 8) {
|
||||
$passwordistooshort = "false";
|
||||
}
|
||||
if ($passwordistooshort == "false") {
|
||||
$hashed = password_hash($password, PASSWORD_DEFAULT);
|
||||
echo $hashed;
|
||||
$getitstarted->db();
|
||||
$checkusername = $db->prepare('SELECT * FROM users WHERE username=(username) VALUES (:username)');
|
||||
$checkusername->execute([ 'username' => $username ]);
|
||||
if (mysqli_num_rows($checkusername) > 0) {
|
||||
echo "bruh momento";
|
||||
}else if(mysqli_num_rows($checkusername) < 0){
|
||||
echo "hello romania";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$passwordconfirmiswrong = "true";
|
||||
echo '<script>
|
||||
if ( window.history.replaceState ) {
|
||||
window.history.replaceState( null, null, window.location.href );
|
||||
}
|
||||
</script>';
|
||||
}
|
||||
}
|
||||
$result = file_get_contents("https://useless-facts.sameerkumar.website/api");
|
||||
$thefunfact = json_decode($result);
|
||||
?>
|
||||
<link rel="stylesheet" href="css/register.css">
|
||||
<form action="" method="post">
|
||||
<div class="card mb-3">
|
||||
<h3 class="card-header">Registration</h3>
|
||||
</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">
|
||||
<label class="col-form-label col-form-label-sm mt-4 password" for="inputSmall">Password</label>
|
||||
<input class="<?php if($passwordconfirmiswrong == "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">
|
||||
<?php if($passwordconfirmiswrong == "true") {
|
||||
echo '<div class="invalid-feedback" bis_skin_checked="1">Password Confirmation field is invalid.</div>';
|
||||
} ?>
|
||||
<label class="col-form-label col-form-label-sm mt-4 passwordconfirm" for="inputSmall">Password Confirmation</label>
|
||||
<input class="form-control form-control-sm" type="password" placeholder="Enter your password again" id="inputSmall" name="passconfirm">
|
||||
<button type="submit" class="btn btn-secondary" name="submit">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="card text-white bg-dark mb-3" style="max-width: 20rem;">
|
||||
<div class="card-header">Random useless fact generator</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text"><?php echo $thefunfact->{"data"}; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue