HabboWeen 0 Posté(e) le 3 novembre 2017 Partager Posté(e) le 3 novembre 2017 Alors voilà lorsque je m'inscris à mon serveur j'ai ça : Code : <?php $page = "home"; require_once('global.php'); if(isset($_SESSION['id'])) { die(header('Location: '.lien.'/profil/')); } else { // ESPACE CONNEXION \\ if(isset($_POST['sub1'])) { if(!empty($_POST['pseudo1']) AND !empty($_POST['password'])) { $pseudo1 = htmlspecialchars($_POST['pseudo1']); $R3 = $bdd->prepare('SELECT * FROM users WHERE username = ?'); $R3->execute(array($pseudo1)); if($R3->rowCount() == 1) { $DR3 = $R3->fetch(PDO::FETCH_OBJ); if(password_verify($_POST['password'], $DR3->password)) { if($DR1->maintenance == 1) { if($DR3->rank >= 7) { $_SESSION['id'] = intval($DR3->id); $R4 = $bdd->prepare('UPDATE users SET last_online = ? WHERE id = ?'); $R4->execute(array(time(), $_SESSION['id'])); die(header('Location: '.lien.'/profil/')); } else { $resultat = "Une maintenance est en cours, impossible de se connecter."; } } else { $_SESSION['id'] = intval($DR3->id); $R4 = $bdd->prepare('UPDATE users SET last_online = ? WHERE id = ?'); $R4->execute(array(time(), $_SESSION['id'])); die(header('Location: '.lien.'/profil/')); } } else { $resultat = "Ton mot de passe est incorrect."; } } else { $resultat = "Ce pseudo n'existe pas."; } } else { $resultat = "Merci de remplir tous les champs."; } } // ESPACE INSCRIPTION \\ if(isset($_POST['sub2'])) { if($DR1->maintenance == 0) { if(!empty($_POST['pseudo2']) AND !empty($_POST['mail2']) AND !empty($_POST['password1']) AND !empty($_POST['password2']) AND !empty($_POST['captcha']) AND !empty($_POST['captcha_code'])) { $pseudo2 = htmlspecialchars($_POST['pseudo2']); $mail2 = htmlspecialchars($_POST['mail2']); $password1 = password_hash($_POST['password1'], PASSWORD_BCRYPT); $captcha = htmlspecialchars($_POST['captcha']); $R5 = $bdd->prepare('SELECT * FROM users WHERE username = ?'); $R5->execute(array($pseudo2)); if($R5->rowCount() == 0) { if(ctype_alnum($_POST['pseudo2'])) { if(strlen($_POST['pseudo2']) >= 2 AND strlen($_POST['pseudo2']) <= 15) { $R6 = $bdd->prepare('SELECT * FROM users WHERE mail = ?'); $R6->execute(array($mail2)); if($R6->rowCount() == 0) { if(filter_var($_POST['mail2'], FILTER_VALIDATE_EMAIL)) { if(strlen($_POST['mail2']) >= 5) { if($_POST['password1'] == $_POST['password2']) { if(strlen($_POST['password1']) >= 12 AND strlen($_POST['password2']) >= 12) { if(strlen($_POST['captcha']) == 8 AND strlen($_POST['captcha_code']) == 8) { if($_POST['captcha'] == $_POST['captcha_code']) { $R7 = $bdd->prepare('INSERT INTO users (username, password, mail, rank, look, account_created, last_online, ip_reg, jetons) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'); $R7->execute(array($pseudo2, $password1, $mail2, "1", "hr-100-61.hd-180-2.sh-290-91.ch-210-66.lg-270-82", time(), time(), $_SERVER['REMOTE_ADDR'], "0")); $R8 = $bdd->query('SELECT * FROM users ORDER BY id DESC LIMIT 0,1')->fetch(PDO::FETCH_OBJ); $_SESSION['id'] = intval($R8->id); die(header('Location: '.lien.'/profil/')); } else { $resultat = "Le captcha est incorrect."; } } else { $resultat = "Le captcha doit faire 8 caractères maximum."; } } else { $resultat = "Ton mot de passe doit faire 12 caractères."; } } else { $resultat = "Les mots de passe ne correspondent pas."; } } else { $resultat = "Ton adresse e-mail doit faire plus de 5 caractères."; } } else { $resultat = "Ton adresse e-mail contient des caractères non-autorisées."; } } else { $resultat = "Cette adresse e-mail est déjà utilisée."; } } else { $resultat = "Ton pseudo doit faire entre 2 et 15 caractères."; } } else { $resultat = "Ton pseudo contient des caractères non-autorisés."; } } else { $resultat = "Ce pseudo est déjà utilisé."; } } else { $resultat = "Merci de remplir tous les champs."; } } else { $resultat = "Une maintenance est en cours, les inscriptions sont suspendu."; } } } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title><?= nom ?>: Un endroit fun à portée de clic !</title> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto"> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css"> <link rel="stylesheet" type="text/css" href="<?= lien ?>/assets/css/theme.css"> <link rel="shortcut icon" href="<?= lien ?>/assets/img/favicon.png"> <meta property="og:site_name" content="HabboWorld"/> <meta property="og:url" content="<?= lien ?>"/> <meta property="og:image" content="<?= lien ?>/assets/img/img.png"/> <meta property="og:locale" content="fr_FR"/> </head> <body> <noscript> <div style="height: 40px;width: 100%;background: #d01f1f;line-height: 40px;text-align: center;color: white;box-shadow: 0px 0px 2px rgba(0,0,0,0.43);font-size: 15px;"> Merci d'activer Javascript pour accéder à toutes nos fonctionnalités. </div> </noscript> <?php if($DR1->maintenance == 1) { ?> <div style="height: 40px;width: 100%;background: #d01f1f;line-height: 40px;text-align: center;color: white;box-shadow: 0px 0px 2px rgba(0,0,0,0.43);font-size: 15px;">Une maintenance est en cours, seule l'équipe du site peut se connecter.</div> <?php } ?> <?php if(isset($resultat)) { ?> <div style="height: 40px;width: 100%;background: #d01f1f;line-height: 40px;text-align: center;color: white;box-shadow: 0px 0px 2px rgba(0,0,0,0.43);font-size: 15px;"><?= $resultat ?></div> <?php } ?> <?php if(isset($_SESSION['logout']) AND $_SESSION['logout'] == 1) { ?> <div style="height: 40px;width: 100%;background: #6c9c14;line-height: 40px;text-align: center;color: white;box-shadow: 0px 0px 2px rgba(0,0,0,0.43);font-size: 15px;">Tu as bien été déconnecté, à bientôt !</div> <?php unset($_SESSION['logout']) ?> <?php } ?> <style type="text/css"> .content { width: 835px; } .btn { width: 45px;float: right;height: 45px;border: 2px solid #6B84CD;background: #3A589B;cursor: pointer;border-radius: 100%;line-height: 0px;text-align: center;color: #fff;text-shadow: 0 1px 2px rgba(0,0,0,0.2);margin-top: 5px; } .btn.fb:before { font: normal normal normal 14px/1 'Material-Design-Iconic-Font';font-size: 30px;content: '\f343';position: relative;top: 8px;left: 0;right: 0;text-align: center; } </style> <div style="background: #bce0ee url(<?= lien ?>/assets/img/header.png) no-repeat top center;width: 100%;height: 175px;padding-top: 25px;color: #fff;margin-bottom: 5px;"> <center> <img src="<?= lien ?>/assets/img/logo.gif"> </center> </div> <div style="background-color: rgba(68, 68, 68, 0.35);margin-top: -65px;margin-bottom: 5px;height: 60px;line-height: 60px;box-shadow: 0 0 10px #949494;"> <div class="content"> <form method="post" style="margin-left: 5px;margin-right: 5px;"> <input type="text" name="pseudo1" style="padding: 11px;border: none;border-radius: 3px;width: 255px;margin-right: 10px;font-size: 16px;box-shadow: 0 3px 0 1px rgba(0, 0, 0, 0.3);" placeholder="Pseudo"> <input type="password" name="password" style="padding: 11px;border: none;border-radius: 3px;width: 255px;margin-right: 10px;font-size: 16px;box-shadow: 0 3px 0 1px rgba(0, 0, 0, 0.3);" placeholder="Mot de passe"> <button type="submit" name="sub1" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2);padding: 11px;border: none;border-radius: 3px;width: 185px;margin-right: 10px;font-size: 15px;background: #6c9c14;cursor: pointer;color: white;box-shadow: 0 3px 0 1px rgba(0, 0, 0, 0.3);">SE CONNECTER</button> <a href="<?= htmlspecialchars($DR1->facebook_site) ?>"><div class="btn fb"></div></a> </form> </div> </div> <div class="content"> <div class="pare" style="width: 455px;"> <div class="title">INSCRIS-TOI GRATUITEMENT</div> <form method="post"> <input type="text" name="pseudo2" placeholder="Entre ton pseudo" style="width: calc(100% - 40px);margin-left: 10px;margin-top: 5px;margin-bottom: 5px;height: 34px;padding: 3px 10px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;"> <input type="mail" name="mail2" placeholder="Entre ton adresse mail" style="width: calc(100% - 40px);margin-left: 10px;margin-top: 5px;margin-bottom: 5px;height: 34px;padding: 3px 10px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;"> <input type="password" name="password1" placeholder="Entre ton mot de passe" style="width: calc(100% - 40px);margin-left: 10px;margin-top: 5px;margin-bottom: 5px;height: 34px;padding: 3px 10px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;"> <input type="password" name="password2" placeholder="Retape ton mot de passe" style="width: calc(100% - 40px);margin-left: 10px;margin-top: 5px;margin-bottom: 5px;height: 34px;padding: 3px 10px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;"> <?php require_once('app/PHP/fonctions.php'); $captcha = random(8); ?> <label style="margin-left: 12px;">Captcha : <b><?= $captcha ?></b></label> <input type="text" name="captcha" placeholder="Recopie le captcha ci-dessus." style="width: calc(100% - 40px);margin-left: 10px;margin-top: 5px;margin-bottom: 5px;height: 34px;padding: 3px 10px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;"> <input type="hidden" name="captcha_code" value="<?= $captcha ?>"> <button type="submit" name="sub2" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2);width: calc(100% - 18px);margin-top: 5px;padding: 13px;border: none;border-radius: 3px;margin-left: 10px;font-size: 14px;background: #6c9c14;cursor: pointer;color: white;">CONFIRMER L'INSCRIPTION</button> </form> </div> <div class="pare" style="width: 320px;"> <div class="title">LES 4 DERNIÈRES NEWS</div> <div style="margin-left: 10px;margin-right: 10px;margin-top: 10px;"> <?php if($R9->rowCount() == 0) { echo '<div style="text-align:center;"><b>Il n\'y a pas de récente news pour l\'instant.</b></div>'; } else { while($DR9 = $R9->fetch(PDO::FETCH_OBJ)) { ?> <a href="<?= lien ?>/articles/<?= intval($DR9->id) ?>" style="text-decoration: none;color: #555"> <div style="float: left;width: 55px;height: 55px;background: url('<?= htmlspecialchars($DR9->image) ?>');background-position: 10% 10%;"></div> <div style="float: left;margin-left: 10px;margin-top: 5px;word-wrap: break-word;height: 50px;overflow: hidden;width: 230px;"> <?= htmlspecialchars($DR9->titre) ?><br/><small><?= htmlspecialchars($DR9->description) ?></small> </div> </a> <br clear="both"> <div style="height: 1px;background: #dedede;margin-top: 9.5px;margin-bottom: 9.5px;"></div> <?php }} ?> </div> </div> <div class="pare" style="width: 805px;"> <div class="title">LES NOUVEAUX INSCRITS</div> <?php if($R10->rowCount() == 0) { echo '<div style="text-align:center;"><b>Il n\'y a pas de nouveau inscrit pour l\'instant.</b></div>'; } else { while($DR10 = $R10->fetch(PDO::FETCH_OBJ)) { ?> <div class="hint--top" aria-label="<?= htmlspecialchars($DR10->username) ?>" style="float:left;padding: 10px;border-radius: 3px;background: url('<?= lien ?>/assets/img/topbg.png');height: 90px;width: 90px;margin-right: 12.1px;margin-left: 10px;border: 1px solid #ccc;margin-top: 10px;"> <div style="background: url('<?= avatar ?><?= htmlspecialchars($DR10->look) ?>&size=l&gesture=sml&head_direction=3&direction=3');-webkit-filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff);width: 100px;margin-left: -20px;margin-top: -45px;height: 145px"></div> </div> <?php }} ?> </div> <?php require_once('app/foot.php'); ?> </div> </body> </html> Lien à poster Partager sur d’autres sites Plus d'options de partage...
Kamobbah 35 Posté(e) le 3 novembre 2017 Partager Posté(e) le 3 novembre 2017 C'est pas très explicite… Amateur langage: HTML | CSS | PHP(PDO) | JQuery | Angular | Féminin(non jris) Lien à poster Partager sur d’autres sites Plus d'options de partage...
HabboWeen 0 Posté(e) le 3 novembre 2017 Auteur Partager Posté(e) le 3 novembre 2017 à l’instant, Kamobbah a dit : C'est pas très explicite… Lorsque je m'inscris : Fatal error: Call to undefined function password_hash() in /var/www/vhosts/monretro.eu/httpdocs/index.php on line 70 L'index me parrais convenable jusqua ce que je clique sur m'inscrire sa me redirige via /home Lien à poster Partager sur d’autres sites Plus d'options de partage...
Nagasaki 117 Posté(e) le 3 novembre 2017 Partager Posté(e) le 3 novembre 2017 C'est car ta version php est en dessous de 5.5 , fait une demande auprès de ton hebergeur pour la mettre en 5.6 ou autre Ancien Responsable des modérateurs Mon discord : Nagasaki#5318 16 août 2017 -> 16 février 2020 Je m'en vais .. Lien à poster Partager sur d’autres sites Plus d'options de partage...
HabboWeen 0 Posté(e) le 3 novembre 2017 Auteur Partager Posté(e) le 3 novembre 2017 Ok merci Lien à poster Partager sur d’autres sites Plus d'options de partage...
Nagasaki 117 Posté(e) le 3 novembre 2017 Partager Posté(e) le 3 novembre 2017 Salut, Ton sujet qui se trouvait dans CMS & TEMPLATES > Ressources Habbo > Recherche, a été déplacé dans Divers Habbo > Aides et support. Ceci est un message automatique. Ancien Responsable des modérateurs Mon discord : Nagasaki#5318 16 août 2017 -> 16 février 2020 Je m'en vais .. Lien à poster Partager sur d’autres sites Plus d'options de partage...
Invité Posté(e) le 3 novembre 2017 Partager Posté(e) le 3 novembre 2017 je vais faire un Tuto pour cette Probléme Lien à poster Partager sur d’autres sites Plus d'options de partage...
Administrateur Narzo 759 Posté(e) le 16 novembre 2017 Administrateur Partager Posté(e) le 16 novembre 2017 Salut, ton sujet n'est plus actif, il a donc été déplacer aux archives. Ceci est un message automatique. 《⠀⠀Founder of Inshare.fr⠀》 《⠀⠀Baylife moderator⠀》 《⠀⠀Twitch channel moderator⠀》 《⠀⠀French translator Trucksbook.eu⠀》 𝐹𝑒𝑒𝑙 𝑓𝑟𝑒𝑒 𝑡𝑜 𝑤𝑟𝑖𝑡𝑒 𝑎 𝑐𝑜𝑚𝑚𝑒𝑛𝑡 ————————————————— ╱⠀⠀⠀⠀⠀⠀⠀⠀⠀Règlements⠀⠀ //⠀⠀Abonnements⠀⠀ //⠀⠀ Discord ⠀⠀⠀⠀⠀⠀⠀⠀⠀╲ Lien à poster Partager sur d’autres sites Plus d'options de partage...
Messages recommandés