|
- <?php
- include "header.php";
- connecte("ecomonde");
- $pseudo=$_POST['pseudo'];
- $pass=sha1($_POST['pass']);
- $email=$_POST['email'];
- $hash=md5($email);
- $check_email=requete1l("SELECT * FROM membres WHERE email='$email'");
-
- if ($check_email) {
- header("location:index.php?msg=2");
- }
- else {
- $sql="INSERT INTO membres VALUES(NULL,'$pseudo','$pass','$email')";
- mysql_query($sql) or die("ERREUR !");
- mkdir("medias/".$hash."/");
- mkdir("medias/".$hash."/enemy/");
- copy("medias/default/player.xml", "medias/".$hash."/player.xml");
- copy("medias/default/enemy.xml", "medias/".$hash."/enemy/enemy.xml");
- copy("medias/default/player3.xml", "medias/".$hash."/player3.xml");
- copy("medias/default/map.jpg", "medias/".$hash."/map.jpg");
- copy("medias/default/soft.mp3", "medias/".$hash."/soft.mp3");
- copy("medias/default/tonic.mp3", "medias/".$hash."/tonic.mp3");
- copy("medias/default/hard.mp3", "medias/".$hash."/hard.mp3");
- copy("medias/default/light.mp3", "medias/".$hash."/light.mp3");
- copy("medias/default/dark.mp3", "medias/".$hash."/dark.mp3");
- header("location:index.php?msg=1");
- }
- ?>
|