Changeset 132 for db/character.php
- Timestamp:
- Nov 17, 2007, 7:51:18 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
db/character.php
r118 r132 41 41 /* ############### Konec Nastavení scriptu ############### */ 42 42 43 44 45 $nick = $_POST['username']; $heslo = $_POST['pass']; 46 $zakodovane_heslo = sha1(STRTOUPPER($nick).":".STRTOUPPER($heslo)); 47 48 SwitchDB(2); // nastavení databáze na realmd 49 $sql_acc = @mysql_query("SELECT * FROM `account` WHERE (`username`='$nick' AND `I`='$zakodovane_heslo') LIMIT 1 "); 50 if( mysql_num_rows($sql_acc) == 1 ) { 51 $sql_acc = mysql_fetch_array($sql_acc); 52 53 SwitchDB(1); // nastavení databáze na mangos 54 $sql_user = @mysql_query("SELECT * FROM `character` WHERE `guid`='".addslashes($_POST['char'])."' AND `account`='".$sql_acc['id']."' LIMIT 1 "); 43 $sql_user = @mysql_query("SELECT * FROM `character` WHERE `guid`='".addslashes($_GET['char'])."' AND `account`='".$user['acc']."' LIMIT 1 "); 55 44 if( mysql_num_rows($sql_user) == 1 ) { 56 45 $sql_user = mysql_fetch_array($sql_user); … … 58 47 SwitchDB(3); // nastavení databáze na web 59 48 $limit_sql = mysql_query("SELECT * FROM `acc_down_char` WHERE (`acc`='".$sql_user['account']."' AND `char`='".$sql_user['guid']."') ORDER BY `date` DESC"); 60 if( mysql_num_rows($limit_sql) > 0 ){ 49 if( mysql_num_rows($limit_sql) > 0 ){ 61 50 $limit_sql = mysql_fetch_array($limit_sql); 62 51 if( date("d-m-Y", $limit_sql['date']) == date("d-m-Y", time()) ){ … … 140 129 141 130 } else { echo "Nemůžete stahovat cizí postavu !"; exit; }; 142 } else { echo "Špatný account nebo heslo ! "; exit; };143 131 144 132
Note:
See TracChangeset
for help on using the changeset viewer.