| Server IP : 3.96.16.70 / Your IP : 216.73.216.15 Web Server : Apache System : Linux ip-172-31-26-103.ca-central-1.compute.internal 6.1.163-186.299.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Feb 24 16:35:42 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/dumpchup.ca/behaviour-taco-bell/moderation/controller/ |
Upload File : |
<?php
// Required CSS and JS
$required_css = array('login?v=1');
$required_js = array('login'=>1);
$required_modal = array();
$pagedata['title'] = "";
$pagedata['description'] = "";
$pagedata['og:title'] = "";
$pagedata['og:description'] = "";
/*
$success = true;
setcookie('aarp_admin_id', hashpassword(1), 0, '/');
$_SESSION['aarp_admin_id'] = 1;
$_SESSION['aarp_super_user'] = 2;
*/
//var_dump(password_hash('Nach0Fri3s', PASSWORD_BCRYPT));
if ($_POST && !empty($_POST)) {
// Kill any previous user session
if(isset($_SESSION['taco_admin_id']))
session_unset();
// Process the login
$username = trim($_POST['username']);
$password = trim($_POST['password']);
if (is_string($username)) {
// Check for this user in the db
try {
$query = $db->prepare('SELECT * FROM admin_user WHERE username = "' . $username . '"');
$query->execute();
$user = $query->fetch(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
echo $e->getMessage();
}
if ($user) {
if ( !password_verify($password, $user['password']) ) {
$success = false;
$err = "badpassword";
} else {
$success = true;
$_SESSION['taco_admin_id'] = $user['id'];
$_SESSION['taco_super_user'] = $user['super_user'];
header('Location: '.$cfg['url'].'en/index');
exit();
}
} else {
$success = false;
$err = "nouser";
}
} else {
$success = false;
$err = "nonexistent";
}
}
// Load the view
require ($cfg['server_path'].'/view/v-login.php');
?>