File manager - Edit - /home/familylifersmpc/htdocs/www.familylifersmpc.com/editor.php
Back
<?php session_start(); error_reporting(0); include('editor-includes/config.php'); if($_SESSION['alogin']!=''){ $_SESSION['alogin']=''; } if(isset($_POST['login'])) { $uname=$_POST['username']; $password=md5($_POST['password']); $sql ="SELECT username, password FROM superusers WHERE username=: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']; $sid = $_SESSION['alogin']; $sql = "SELECT TYPE FROM superusers WHERE USERNAME='". $sid. "'"; $query = $dbh->prepare($sql); $query->execute(); $results=$query->fetchAll(PDO::FETCH_OBJ); $cnt=1; if($query->rowCount() > 0) { foreach($results as $result) { if($result -> TYPE == "USER") { echo ""; }else{ echo "<script type='text/javascript'> document.location = 'edashboard.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/w3editor-css/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>Website Editor</title> <link rel="stylesheet" href="editor-css/bootstrap.min.css" media="screen" > <link rel="stylesheet" href="editor-css/font-awesome.min.css" media="screen" > <link rel="stylesheet" href="editor-css/animate-editor-css/animate.min.css" media="screen" > <link rel="stylesheet" href="editor-css/lobipanel/lobipanel.min.css" media="screen" > <link rel="stylesheet" href="editor-css/icheck/skins/line/blue.css" > <link rel="stylesheet" href="editor-css/icheck/skins/line/red.css" > <link rel="stylesheet" href="editor-css/icheck/skins/line/green.css" > <link rel="stylesheet" href="editor-css/main.css" media="screen" > <script src="editor-js/modernizr/modernizr.min.js"></script> <link rel="stylesheet" href="editor-css/slides.css"> <div class="w3-top"> <div class=" w3-padding w3-card w3-hide-big" style="background-color:<?php echo htmlentities($BGCOLOR);?>"> <a href="Editor.php" class="w3-bar-item w3-button" style="font-size:20px;color:<?php echo htmlentities($COLOR1);?>"><b style="color:<?php echo htmlentities($COLOR2);?>"> Website</b> Editor</a> </div> </div> </div> <style> #snackbar { visibility: hidden; min-width: 300px; margin-left: -147px; background-color: <?php echo htmlentities($BGCOLOR);?>; color: #fff; 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>Login</b></h2> </div> <hr> </div> <div class="panel-body p-20"> <form class="form-horizontal" method="post"> <div class="form-group"> <label for="inputEmail3" class="col-sm-2 control-label">Username:</label> <div class="col-sm-12"> <input type="text" name="username" class="form-control" id="inputEmail3" placeholder="Username"> </div> </div> <div class="form-group"> <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="form-group mt-20"> <div class="col-sm-offset-2 col-sm-10" > <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> </div> </div> </form> </div> </div> <!-- /.panel --> <div class = "text-center"> <?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) { ?> <p style="background-color:<?php echo htmlentities($BGCOLOR);?>;border-radius:5px;color:<?php echo htmlentities($COLOR1);?>"><b style="font-size:17px;color:<?php echo htmlentities($COLOR2);?>"> <?php echo htmlentities($result->COOPNAME1);?></b><br> <?php echo htmlentities($result->COOPNAME2);?></p> <?php $cnt=$cnt+1;}} ?> </div> </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="editor-js/jquery/jquery-2.2.4.min.js"></script> <script src="editor-js/jquery-ui/jquery-ui.min.js"></script> <script src="editor-js/bootstrap/bootstrap.min.js"></script> <script src="editor-js/pace/pace.min.js"></script> <script src="editor-js/lobipanel/lobipanel.min.js"></script> <script src="editor-js/iscroll/iscroll.js"></script> <!-- ========== PAGE JS FILES ========== --> <!-- ========== THEME JS ========== --> <script src="editor-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.01 |
proxy
|
phpinfo
|
Settings