if ($hmacPass == $_POST['Password']) { cleanMemberSession($result["Abilit"], $result["Login"], $result["Password"], $result["Access"], $result['enterprise_id'],$tp); $utspas = mktime(0,0,0, substr($result['datpas'],5,2), substr($result['datpas'],8,2), substr($result['datpas'], 0, 4)); $utsoggi = mktime(0,0,0,date("m"),date("d"),date("Y")) - $config->getValue('giornipass') * 86400; if($utspas < $utsoggi) { $message .= $result["Nome"]." ".$result["Cognome"].$script_transl[2]; if (! isset($_POST['Nuovapass'])) { $_POST['Nuovapass'] = ''; } if (! isset($_POST['Confepass'])) { $_POST['Confepass'] = ''; } if($_POST['Password'] != $_POST['Nuovapass'] and $_POST['Nuovapass'] == $_POST['Confepass'] and strlen($_POST['Nuovapass']) >= $config->getValue('psw_min_length') ) { gaz_dbi_put_row($gTables['admin'], "Login",$form['Login'],"datpas",date("Y-m-d H:i:s")); gaz_dbi_put_row($gTables['admin'], "Login",$form['Login'],"Password",$_POST['Nuovapass']); cleanMemberSession($result["Abilit"], $result["Login"], $_POST["Nuovapass"], $result["Access"], $result['enterprise_id'],$tp); header("Location: ../root/admin.php"); exit; } else { $message .= $script_transl[0].$config->getValue('psw_min_length').$script_transl[1]; } $newpass = true; } else { if (isset($_SESSION["lastpage"]) && !empty($_SESSION["lastpage"]) && !strstr($_SESSION["lastpage"], "login_admin")=="login_admin.php") { $lastpage = $_SESSION["lastpage"]; $_SESSION['lastpage'] = ""; header("Location: ".$lastpage); } else { header("Location: ../root/admin.php"); } exit;
<?php include_once "config.php"; if (loggedIn()) { header('Location: index.php'); } if (isset($_POST["submit"])) { if (!($row = checkPass($_POST["login"], $_POST["password"]))) { echo "<p>Incorrect login/password, try again</p>"; exit; } cleanMemberSession($_POST["login"], $_POST["password"]); header("Location: index.php"); } ?> <html lang="es"> <head> <meta charset="UTF-8"> <link rel="shortcut icon" href="img/icon.ico" /> <title>Esneyder-Desarrollo MongoDB</title> </head> <body> <div class="xs-11 sm-8 center contenido"> <div class="panel shadow styled tip "> <h2 class="header">Formulario de ingreso | Programación MongoDB</h2> <div class="body"> <form method="post"action="<?php
if (isset($_POST["submit"])) { // First check that required fields have been filled in. $email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL); if (empty($_POST['email'])) { $errors['email'] = "Email address cannot be empty."; } if (!$email) { $errors['email'] = "Not a valid email address."; } } if (isset($_POST["submit"]) && empty($errors)) { $token = md5(uniqid(mt_rand(), true)); if ($query) { $old_email = $query["email"]; emailChange($query["username"], $_POST['email'], $token); cleanMemberSession($query["username"], "on"); sendMail($_POST['email'], $old_email, "", "email-change"); echo "Your email address has been changed to: " . $_POST['email']; print "</br><a href=\"dashboard.php" . "\">Members Area</a>"; exit; } else { $errors['general'] = "There was an error, try again"; } } ?> <html> <head> <title>Simple Password Reset with MongoDB</title> </head> <?php
<?php include_once "modules/config.php"; include_once "modules/func.user.php"; include_once "modules/class.user.php"; if (loggedIn()) { echo '<script> window.location="dashboard.php"; </script> '; } $hasher = new PasswordHash(8, FALSE); if (isset($_POST["login"])) { $query = $coll->findOne(array('username' => $_POST['username'])); if (isset($query['password']) && $query['password'] == $hasher->CheckPassword($_POST['password'], $query['password'])) { cleanMemberSession($_POST["username"], $_POST["remember_me"]); echo '<script> window.location="dashboard.php"; </script> '; } else { $error = "Incorrect login/password, try again"; } } ?> <?php include_once 'header.php'; ?> </head> <body> <div class="container"> <div class="row"> <div id="content" class="col-sm-12 full"> <div class="row"> <div class="login-box">
//include("Header.php"); if (isset($actionflag)) { // checkUser(); $result = getRow($admin_table, "Login", "{$form['Login']}"); /*$loggedAdmin = new administrator( $result["Cod_utente"], $result["Cognome"], $result["Nome"], $result["Livello"], $result["Login"], $result["Password"]); echo "loggedAdmin=".$loggedAdmin->cognome;*/ if ($result) { if ($result["Password"] == $form["Password"]) { cleanMemberSession($result["Cod_utente"], $result["Login"], $result["Password"]); // print $session["Login"]; //salvaAccesso($form[Login], session_ID()); $conf = array('mode' => 0600, 'timeFormat' => '%X %x'); $logger =& Log::singleton('file', 'logs/login.log', 'ident', $conf); $logger->log("logged " . $result['Login']); header("Location: admin.php"); exit; } else { $message = "Login Password Errate!"; } } /* if (session("Logged_in") == "True") { cleanMemberSession($ID_Cliente,$form["Login"], $form["Password"]);