File manager - Edit - /home/autoph/public_html/aee/web/home/index.php
Back
<?php ob_start(); include 'core/init.php'; logged_in_redirect(); if(empty($_POST) === false) { $username = $_POST['MyUsername']; $password = $_POST['MyPassword']; //echo $username; //echo "<br>".$password; if (empty($username) === true || empty($password) ===true){ $errors = 'You need to enter a valid username and password.'; } else if (user_exists($username) === false) { $errors = 'We can\'t find that username.'; } else if (user_active($username) === false) { $errors = 'You haven\'t activated your account!'; } else { $login = login($username, $password); if ($login === false) { $errors = 'Invalid username or password. '; $errorCount = mysql_result(mysql_query("SELECT `u_locked_count` FROM `vts_users` WHERE `u_name` = '$username'"),0); echo "Error Count:".$errorCount; if($errorCount==='5'){ //header('Location: accountlockedout.php'); exit; } $errorCount=$errorCount+1; mysqli_query("UPDATE `vts_users` SET `u_locked_count` = '$errorCount' WHERE `u_name`='$username'"); } else { $_SESSION['u_id'] = $login; echo "Username:".$username; echo "<br>Password:".$password; echo "<br>ID ".$_SESSION['u_id']; //log user mysql_query("UPDATE `vts_users` SET `u_locked_count` = '0' WHERE `u_name`='$username'"); $logged="INSERT INTO `login_history` (`log_id`,`u_name`,`remarks`,`date`,`time`,`branch_code`) VALUES('','$username','IN','$toDate','$currentTime','1')"; if(!mysql_query($logged)) { die('Error: ' . mysql_error()); } Header('Location:mainindex.php?view=&sview=&tab=0&wid=0'); exit(); } } }else { $errors = 'Please login to continue...'; } ?> <!-- END OF PHP CODE--> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="css/style.css"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> body { background: -webkit-linear-gradient(left top, #d1eaf8, #d1eaf8 , #d1eaf8 ); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(bottom right, #d1eaf8,#d1eaf8, #d1eaf8 ); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(bottom top, #d1eaf8,#d1eaf8, #d1eaf8 ); /* For Firefox 3.6 to 15 */ background: linear-gradient(to bottom right, #d1eaf8,#d1eaf8, #d1eaf8 ); /* Standard syntax */ } a:link { color: #3e423d ; } /* visited link */ a:visited { color: #3e423d; } /* mouse over link */ a:hover { color: black; } /* selected link */ a:active { color: #3e423d; } * { box-sizing: border-box; } .menu { float:left; width:18%; text-align:left; border:1px solid #d1eaf8; top-margin:2px; } .menu a { background-color:#fff; padding:1px; margin-top:1px; display:block; width:100%; color:black; } .main { float:left; width:64%; padding:0 0px; min-width:500px; background: -webkit-linear-gradient(left top, #d1eaf8, #d1eaf8 , #d1eaf8 ); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(bottom right, #d1eaf8,#d1eaf8, #d1eaf8 ); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(bottom top, #d1eaf8,#d1eaf8, #d1eaf8 ); /* For Firefox 3.6 to 15 */ background: linear-gradient(to bottom right, #d1eaf8,#d1eaf8, #d1eaf8 ); /* Standard syntax */ } .right { background-color:#fff; float:left; width:18%; padding:0px; margin-top:1px; text-align:center; } @media only screen and (max-width:620px) { /* For mobile phones: */ .menu, .main, .right { width:100%; } } </style> </head> <body style="font-family:Verdana;color:#fff;"> <div style="padding:1px;text-align:center;height:100px"> <h1></h1> </div> <div style="background-color:lightgreen;text-align:center;padding:0px;margin-top:0px;"> </div> <div style="overflow:auto"> <div class="menu"> </div> <div class="main" style='height:500px;border:0px solid red;padding:5px'> <div style='float:left;border:0px solid lightgray;width:60%;padding:10px;background-color:#17a9bd;height:84%'> </div> <div style='float:left;border:0px solid white;width:40%;padding:10px;background-color:#dcf5f8 ;height:84%'> <img src='images/autohub_logo_2016.png' width="30%" style='margin-left:15px'><b style='margin-left:20px;font-family:Verdana;font-size:16px;color:black;font-weight:normal'>Vehicle Aftersales Portal</b><img> <form action='' method='POST' style='margin-left:15px;padding-right:15px'> <p style='margin-bottom:5px;font-family:Verdana;font-size:16px;color:#3e3d39'>Username: </p> <input type='text' name='MyUsername' placeholder='USERNAME' class='loginPage' style="height:40px"> <p style='margin-bottom:5px;font-family:Verdana;font-size:16px;color:#3e3d39'>Password: </p> <input type='password' name='MyPassword' placeholder='PASSWORD' class='loginPage' style="height:40px"><br><br> <input type='submit' name='submit' value='Login' class='loginButton'> <p style='margin-bottom:5px;font-family:Verdana;font-size:12px;color:#3e3d39;f-top:20px'> <b class='subLink'><a href="#" style='text-decoration:none'>Password Recovery</a></b> <b class='subLink'><a href="#" style='text-decoration:none'><a href="#" style='text-decoration:none'>Privacy Policy</b></a> <b class='subLink'><a href="#" style='text-decoration:none'><a href="#" style='text-decoration:none'>Register</a></b> <b class='subLink'><a href="#" style='text-decoration:none'><a href="#" style='text-decoration:none'>Support</a></b> </p> <?php echo "<br> <b style='font-family:Verdana;font-size:12px;color:red;margin-top:5px;font-weight:normal'>".$errors."</b>";?> </form> </div> </div> <div class="right"> </div> </div> <div style="background-color:lightgreen;text-align:center;padding:0px;margin-top:0px;"></div> </body> </html>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings