Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'src/config.php';
- include 'src/globalfunc.php';
- include 'login/login.php';
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <!--SEO-->
- <title>Welcome to <?php echo $Websitename; ?> BETA</title>
- <!--CSS-->
- <link href="css/bootstrap.css" rel="stylesheet" />
- <link href="css/style.css" rel="stylesheet" />
- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
- <!--JS-->
- <script src="//code.jquery.com/jquery-3.0.0.min.js" integrity="sha256-JmvOoLtYsmqlsWxa7mDSLMwa6dZ9rrIdtrrVYRnDRH0=" crossorigin="anonymous"></script>
- <script src="js/bootstrap.js"></script>
- </head>
- <body>
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <?php include 'includes/navbar.php'; ?>
- </div>
- </div>
- <div class="row">
- <div class="col-md-6">
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h3 class="panel-title">Login to <?php echo $Websitename; ?></h3>
- </div>
- <div class="panel-body">
- <?php
- if (isset($_POST['submit'])) {
- $username = $_POST['username'];
- $password = $_POST['password'];
- $ip = $_SERVER["HTTP_CF_CONNECTING_IP"]; //Cloudflare yes
- //$ip = $_SERVER["REMOTE_ADDR"]; //Cloudflare no
- if (login::canLogin($ip, $conn)) {
- if (strlen($username) > 4 && (strlen($username) < 17)) {
- if (strlen($password) > 4 && (strlen($password) < 26)) {
- if (login::validateUser($username)) {
- if (login::userCorrect($username, $password, $conn)) {
- if (login::getUserinfo($username, "active", $conn) != 0) {
- if (login::getUserinfo($username, "active", $conn) != 2) {
- echo '<div class="alert alert-success">You have succesfully logged in.</div>';
- //globalfunc::redirect("index.php");
- login::deleteFails($ip, $conn);
- } else {
- echo '<div class="alert alert-danger">Sorry, but your account has been banned.</div>';
- }
- } else {
- echo '<div class="alert alert-warning">Please activate your account before logging in.</div>';
- }
- } else {
- echo '<div class="alert alert-danger">Sorry, but you have filled in a incorrect username or password.</div>';
- login::determineFailAction($ip, $conn);
- }
- } else {
- echo '<div class="alert alert-danger">Your username may only contain A-z, and 0-9.</div>';
- }
- } else {
- echo '<div class="alert alert-danger">Your password must be higher than 4 and lower than 26 characters.</div>';
- }
- } else {
- echo '<div class="alert alert-danger">Your username must be higher than 4 and lower than 17 characters.</div>';
- }
- } else {
- echo '<div class="alert alert-danger">Due to 5 failed login attempts, you cannot login for one hour.
- <br />You can try again at: ' . login::calcNextTry($ip, $conn) . '</div>';
- }
- }
- ?>
- <form method="post" action="">
- <b>Username:</b>
- <input type="text" name="username" placeholder="Enter your username" value="<?php echo htmlspecialchars($_POST['username'], ENT_QUOTES); ?>" class="form-control">
- <br /><b>Password:</b>
- <input type="password" name="password" placeholder="Enter your password" class="form-control">
- <br /><button type="submit" name="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i> Sign in to <?php echo $Websitename; ?></button>
- </form>
- </div>
- </div>
- </div>
- <div class="col-md-6">
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h3 class="panel-title">Latest updates</h3>
- </div>
- <div class="panel-body">
- <h3>Updates: (17/6/2016)</h3>
- <ul>
- <li>Added 3 classes</li>
- <ul><li>Pimp</li>
- <li>Undercover cop</li>
- <li>Drugs dealer</li>
- </ul>
- <li>Finished registration untill E-Mail confirm</li>
- <li>Finished base theme</li>
- <li>Added over 10 general functions</li>
- <li>Added database support</li>
- <li>Added unique email/username support</li>
- <li>Restabled backend</li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- <?php include 'includes/footer.php'; ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement