File manager - Edit - /home/familylifersmpc/htdocs/www.familylifersmpc.com/login_copy.php
Back
<?php session_start(); error_reporting(0); include('includes/config.php'); if ($_SESSION['alogin'] != '') { $_SESSION['alogin'] = ''; } if (isset($_POST['login'])) { $uname = $_POST['username']; $password = $_POST['password']; $sql = "SELECT uname,password FROM users WHERE uname=:uname and password=:password"; $query = $dbh->prepare($sql); $query->bindParam(':uname', $uname, PDO::PARAM_STR); $query->bindParam(':password', $password, PDO::PARAM_STR); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); if ($query->rowCount() > 0) { $_SESSION['alogin'] = $_POST['username']; echo "<script type='text/javascript'> document.location = 'dashboard.php'; </script>"; } else { echo "<center><div id='snackbar'>Incorrect Username or Password!</div></center>"; } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <?php $sql = "SELECT * FROM tblsettings"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $result) { ?> <?php $BGCOLOR = $result->BGCOLOR; $COLOR1 = $result->COLOR1; $COLOR2 = $result->COLOR2; ?> <?php $cnt = $cnt + 1; } } ?> <meta name="theme-color" content="<?php echo htmlentities($BGCOLOR); ?>" /> <title>My Coop Account</title> <link rel="stylesheet" href="web-css/bootstrap.min.css" media="screen"> <link rel="stylesheet" href="web-css/font-awesome.min.css" media="screen"> <link rel="stylesheet" href="web-css/animate-css/animate.min.css" media="screen"> <link rel="stylesheet" href="web-css/lobipanel/lobipanel.min.css" media="screen"> <link rel="stylesheet" href="web-css/icheck/skins/line/blue.css"> <link rel="stylesheet" href="web-css/icheck/skins/line/red.css"> <link rel="stylesheet" href="web-css/icheck/skins/line/green.css"> <link rel="stylesheet" href="web-css/main.css" media="screen"> <script src="web-js/modernizr/modernizr.min.js"></script> <link rel="stylesheet" href="web-css/slides.css"> <div class="w3-top"> <div class="w3-bar w3-card w3-hide-big" style="padding:7px 5px 5px 0px;background-color:<?php echo htmlentities($BGCOLOR); ?>;"> <?php $sql = "SELECT * FROM tblsettings"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $result) { ?> <?php $cnt = $cnt + 1; } } ?> <a href="index.php#home" class="w3-bar-item w3-button" style="font-size:20px;color:<?php echo htmlentities($COLOR2); ?>"><i class="fa fa-home" style="color:<?php echo htmlentities($COLOR2); ?>"></i> <b><?php echo htmlentities($result->ABBREVIATION); ?></b></a> </div> </div> <div class="w3-top"> <div class="w3-bar w3-padding w3-card w3-hide-small" style="background-color:<?php echo htmlentities($BGCOLOR); ?>"> <div class="w3-hide-small"> <?php $sql = "SELECT * FROM tblsettings"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $result) { ?> <a href="index.php#home" class="w3-bar-item w3-button" style="font-size:17px;color:<?php echo htmlentities($COLOR1); ?>"><b style="font-size:17px;color:<?php echo htmlentities($result->COLOR2); ?>;"> <?php echo htmlentities($result->COOPNAME1); ?></b> <?php echo htmlentities($result->COOPNAME2); ?></a> <?php $cnt = $cnt + 1; } } ?> </div> <!-- Float links to the right. Hide them on small screens --> <div class="w3-right w3-hide-small"> <a href="index.php#feeds" class="w3-bar-item w3-button" style="color:<?php echo htmlentities($COLOR2); ?>"><b>News and Announcements</b></a> <a href="index.php#services" class="w3-bar-item w3-button " style="color:<?php echo htmlentities($COLOR2); ?>"><b>Services</b></a> <a href="index.php#abouts" class="w3-bar-item w3-button " style="color:<?php echo htmlentities($COLOR2); ?>"><b>About Us</b></a> <a href="index.php#contact" class="w3-bar-item w3-button " style="color:<?php echo htmlentities($COLOR2); ?>"><b>Contact</b></a> <a href="faqs.php" class="w3-bar-item w3-button " style="color:<?php echo htmlentities($COLOR2); ?>"><b>FAQS</b></a> <a href="login.php" class="w3-bar-item w3-button" style="color:<?php echo htmlentities($COLOR1); ?>"><i class="fa fa-user" style="color:<?php echo htmlentities($COLOR1); ?>"></i> <b>My Account</b></a> </div> </div> </div> </div> <style> #snackbar { visibility: hidden; min-width: 300px; margin-left: -147px; background-color: <?php echo htmlentities($BGCOLOR); ?>; color: white; text-align: center; border-radius: 15px; padding: 20px; position: fixed; z-index: 1; left: 50%; right: 50%; bottom: 30px; font-size: 14px; } #snackbar.show { visibility: visible; -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; animation: fadein 0.5s, fadeout 0.5s 2.5s; } @-webkit-keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 30px; opacity: 1; } } @keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 30px; opacity: 1; } } @-webkit-keyframes fadeout { from { bottom: 30px; opacity: 1; } to { bottom: 0; opacity: 0; } } @keyframes fadeout { from { bottom: 30px; opacity: 1; } to { bottom: 0; opacity: 0; } } </style> </head> <body class=""> <div class="container"> <br><br> <div class="col-lg-5"> <section class="sec"> <div class="row mt-20"> <div class="col-md-12 col-md-offset-9 pt-5"> <div class="row mt-30 "> <div class="col-md-11"> <div class="panel"> <div class="panel-heading"> <div class="panel-title text-center"> <br> <h2><b>My Coop Account</b></h2> </div> <hr> </div> <div class="panel-body p-80"> <form class="form-horizontal" method="post"> <div> <label for="inputEmail3" class="col-sm-12">Passbook Number:</label> <div class="col-sm-12"> <input type="text" name="username" class="form-control" id="inputEmail3" placeholder="Passbook Number"> </div> </div> <div> <label for="inputPassword3" class="col-sm-2 control-label">Password:</label> <div class="col-sm-12"> <input type="password" name="password" class="form-control" id="inputPassword3" placeholder="Password"> </div> </div> <div class="mt-20"> <div class="col-sm-offset-2 col-sm-10"> <br> <button type="submit" name="login" class="btn btn-primary btn-labeled pull-right">Sign in<span class="btn-label btn-label-right"><i class="fa fa-check"></i></span></button> <br> <p></p> </div> </div> </form> </div> </div> <!-- /.panel --> <p><b>No account yet?</b><br> Visit our coop to create an account. </p> </div> <!-- /.col-md-11 --> </div> <!-- /.row --> </div> <!-- /.col-md-12 --> </div> <!-- /.row --> </section> </div> <!-- /.col-mdsdsds-6 --> </div> <!-- /.row --> </div> <!-- /. --> </div> <!-- /.main-wrapper --> <!-- ========== COMMON JS FILES ========== --> <script src="web-js/jquery/jquery-2.2.4.min.js"></script> <script src="web-js/jquery-ui/jquery-ui.min.js"></script> <script src="web-js/bootstrap/bootstrap.min.js"></script> <script src="web-js/pace/pace.min.js"></script> <script src="web-js/lobipanel/lobipanel.min.js"></script> <script src="web-js/iscroll/iscroll.js"></script> <!-- ========== PAGE JS FILES ========== --> <!-- ========== THEME JS ========== --> <script src="web-js/main.js"></script> <script> $(function() { }); </script> <script> $(function() { var x = document.getElementById("snackbar"); x.className = "show"; setTimeout(function() { x.className = x.className.replace("show", ""); }, 3000); }); </script> <!-- ========== ADD custom.js FILE BELOW WITH YOUR CHANGES ========== --> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.18 |
proxy
|
phpinfo
|
Settings