Example #1
0
         $_SESSION["acct_canon"] = $canon;
     } else {
         unset($_SESSION["acct_canon"]);
     }
     $_SESSION["acct_official"] = $_SESSION["acct_canon"] ? $_SESSION["acct_canon"] : $_SESSION["acct_username"];
     if (!$addition) {
         $account = findAccount($_SESSION["acct_official"]);
         if ($account === false) {
             $id = createAccount();
             addAccountUsername($id, $_SESSION["acct_official"], $_SESSION["acct_username"]);
             setAccountDetails($id, $sreg);
             if (isset($_COOKIE["pbguid"])) {
                 setAccountGUID($id, $_COOKIE["pbguid"]);
             }
             setAccountAPIKey($id, makeApiKey());
             $account = findAccount($_SESSION["acct_official"]);
         } else {
             pg_Exec($DB, "UPDATE accounts SET last_login=now() WHERE id=" . $account['id']);
         }
         $_SESSION["acct_id"] = $account['id'];
         $_SESSION["acct_sreg"] = $account;
         $_SESSION["kvp"] = findAccountKVP($account['id']);
     } else {
         pageHeader(_("new OpenID associated"));
         pageSidebar();
         makeSection(_("your new OpenID has been associated"));
         print '<p>Thank you! Your new OpenID username has been associated with this account. You may now <a href="/settings.php">continue with more settings</a>.</p>';
         pageFooter();
         exit;
     }
 } else {
Example #2
0
<?php

$timeStart = microtime(true);
session_start();
ob_start();
require_once $_SESSION['File_Root'] . '/Kernel/Include.php';
require_once $_SESSION['File_Root'] . '/HTML/Header.php';
require_once 'Functions/SQL.php';
$accountPseudo = htmlspecialchars(addslashes($_POST['accountPseudo']));
$accountPassword = htmlspecialchars(addslashes($_POST['accountPassword']));
$account = findAccount($bdd, $accountPseudo);
?>

	<br>
	<div class=\"panel panel-danger\">
		<div class=\"panel-heading\"></div>
		<div class=\"panel-body\">
		
<?php 
if (DeCryptMDP($accountPassword, $account['Account_Password'])) {
    $ID = findIdByPseudo($bdd, $accountPseudo);
    deleteAccount($bdd, $ID);
    exit(header("Location: {$linkRoot}/Modules/Main/index.php"));
} else {
    echo $login5;
}
?>
	</div>
		</div>
		
<?php