require_once $_SESSION['File_Root'] . '/HTML/Header.php'; require_once 'Functions/SQL.php'; if (isset($_POST['accountPseudo']) && $_POST['accountPassword'] && $_POST['accountPasswordConfirm'] && $_POST['accountEmail'] && $_POST['characterLastName'] && $_POST['characterFirstName']) { $accountPseudo = htmlspecialchars(addslashes($_POST['accountPseudo'])); $accountPassword = htmlspecialchars(addslashes($_POST['accountPassword'])); $accountPasswordConfirm = htmlspecialchars(addslashes($_POST['accountPasswordConfirm'])); $accountEmail = htmlspecialchars(addslashes($_POST['accountEmail'])); $characterLastName = htmlspecialchars(addslashes($_POST['characterLastName'])); $characterFirstName = htmlspecialchars(addslashes($_POST['characterFirstName'])); if ($accountPassword == $accountPasswordConfirm) { if (isset($_POST['Licence'])) { $pseudoList = accountExist($bdd, $accountPseudo); if ($pseudoList == 0) { $characterList = characterExist($bdd, $characterLastName); if ($characterList == 0) { $accountPassword = CryptMDP($accountPassword, $accountPseudo); addAccount($bdd, $accountPseudo, $accountPassword, $accountEmail); $ID = findIdByPseudo($bdd, $accountPseudo); addCharacter($bdd, $ID, $characterLastName, $characterFirstName); echo $register10; } else { echo $register11; } } else { echo $register12; } } else { echo $register13; } } else { echo $register14;
echo $install38; ?> </div> <br><br> <?php $mmorpgName = htmlspecialchars(addslashes($_POST['MMORPG_Name'])); $presentation = htmlspecialchars(addslashes($_POST['Presentation'])); $pseudo = htmlspecialchars(addslashes($_POST['Pseudo'])); $email = htmlspecialchars(addslashes($_POST['Email'])); if (isset($_POST['MMORPG_Name']) && $_POST['Presentation'] && $_POST['Pseudo'] && $_POST['Password'] && $_POST['Email']) { $password = htmlspecialchars(addslashes($_POST['Password'])); $passwordConfirm = htmlspecialchars(addslashes($_POST['Password_Confirm'])); if ($password == $passwordConfirm) { $date = date('Y-m-d H:i:s'); $ip = $_SERVER['REMOTE_ADDR']; $password = CryptMDP($password, $pseudo); $addAccount = $bdd->prepare("INSERT INTO Caranille_Accounts VALUES(\n\t '',\n\t :Pseudo,\n\t :Email,\n\t :Password,\n\t '2',\n\t :Date,\n\t :IP,\n\t 'Authorized' ,\n\t 'None')"); $addAccount->execute(['Pseudo' => $pseudo, 'Email' => $email, 'Password' => $password, 'Date' => $date, 'IP' => $ip]); $addCharacter = $bdd->exec("INSERT INTO Caranille_Characters VALUES(\n\t '1', \n\t '1', \n\t 'http://localhost', \n\t 'Admin', \n\t 'Admin', \n\t '1', \n\t '120', \n\t '120', \n\t '0', \n\t '0', \n\t '0', \n\t '120', \n\t '20', \n\t '20', \n\t '0', \n\t '0', \n\t '0', \n\t '20', \n\t '10', \n\t '0', \n\t '0', \n\t '0', \n\t '10', \n\t '10', \n\t '0', \n\t '0', \n\t '0', \n\t '10', \n\t '10', \n\t '0', \n\t '0', \n\t '0', \n\t '10', \n\t '10', \n\t '0', \n\t '0', \n\t '0', \n\t '10', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '0', \n\t '1')"); $mmorpg = $bdd->prepare("UPDATE Caranille_Configuration\n\t SET Configuration_MMORPG_Name = :mmorpgName,\n\t Configuration_Presentation = :presentation\n\t "); $mmorpg->execute(['mmorpgName' => $mmorpgName, 'presentation' => $presentation]); $bdd->exec("INSERT INTO Caranille_News VALUES(\n\t\t '',\n\t\t 'Installation de Caranille',\n\t\t 'Félicitation Caranille est bien installé, vous pouvez éditer cette news ou la supprimer',\n\t\t '{$pseudo}',\n\t\t '{$date}')"); ?> <?php echo $install39; ?> <form method="POST" action="../index.php"> <input type="submit" class="btn btn-success" name="accueil" value="<?php echo $install40; ?>