Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'conn.php';
- mysql_select_db("account");
- $username = $_POST["user"];
- $password = $_POST["pass"];
- $pg = $_POST['nomepg'];
- $strSQL ="SELECT id FROM account WHERE login = '$username' AND password = password('$password')";
- $risultato = mysql_query($strSQL);
- if (! $risultato)
- {
- echo ("L'account non esiste, controlla i dati");
- exit();
- }
- $id = mysql_result($risultato, 0, 'id');
- mysql_select_db("player");
- $strSQL ="SELECT empire FROM player_index WHERE id = '$id'";
- $risultato = mysql_query($strSQL);
- if (! $risultato)
- {
- echo("Errore nela query");
- exit();
- }
- $impero = mysql_result($risultato, 0, 'empire');
- if ($impero == 1)
- {
- $map = "61";
- $x = "436377";
- $y = "215769";
- }
- if ($impero == 2)
- {
- $map = "61";
- $x = "436377";
- $y = "215769";
- }
- if ($impero == 3)
- {
- $map = "61";
- $x = "436377";
- $y = "215769";
- }
- $strSQL ="UPDATE player SET x='$x', y='$y', map_index='$map', exit_x='$x', exit_y='$y', exit_map_index='$map' WHERE name='$pg'";
- $risultato = mysql_query($strSQL);
- if (! $risultato)
- {
- echo ("Comando invalido");
- exit();
- }
- echo ("Utente teletrasportato al Monte Sohan, sei pregato di attendere 15 minuti prima di effettuare un nuovo login");
- mysql_close($conn);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement