|
- <?php
- include "header.php";
- connecte("ecomonde");
- $pseudo=$_POST['pseudo'];
- $pass=sha1($_POST['password']);
- $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 {
- $latest_commit = file_get_contents('./version.txt');
- $sql="INSERT INTO membres VALUES(NULL,'$pseudo','$pass','$email','$latest_commit')";
- mysql_query($sql) or die("ERREUR !");
- mkdir("medias/".$hash."/");
- mkdir("medias/".$hash."/enemy/");
- copy("medias/default/index.php", "medias/".$hash."/index.php");
- copy("medias/default/player.xml", "medias/".$hash."/player.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");
- }
- ?>
|