- Timestamp:
- Nov 17, 2007, 7:51:18 PM (17 years ago)
- Location:
- db
- Files:
-
- 2 added
- 5 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 -
db/databaze_tabulky/sql.sql
r118 r132 187 187 PRIMARY KEY (`id`) 188 188 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; 189 190 -- 191 -- Struktura tabulky `acc_heartstone` 192 -- 193 -- Vytvoření: Sobota 17. listopadu 2007, 19:00 194 -- Poslední změna: Sobota 17. listopadu 2007, 19:00 195 -- 196 197 CREATE TABLE `acc_heartstone` ( 198 `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , 199 `acc` BIGINT( 20 ) UNSIGNED NOT NULL , 200 `char` BIGINT( 20 ) UNSIGNED NOT NULL , 201 `date` BIGINT( 20 ) UNSIGNED NOT NULL , 202 `ip` VARCHAR( 15 ) NOT NULL 203 ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; -
db/include/myacc.php
r118 r132 1 1 <?php 2 2 if (!defined('IN_CODE') OR $user['loged'] != 1 ){ exit; }; 3 4 $sql_select = $BasicWiewer->myAcc(); 3 5 4 $sql_select = $BasicWiewer->myAcc(); 6 require_once './include/position_reset.php'; 7 require_once './include/xp_reset.php'; 8 9 if( !empty($_GET['heartstone']) AND is_numeric($_GET['heartstone']) ) 10 { 11 SwitchDB(3); // nastavení databáze na web 12 $limit_sql = mysql_query("SELECT * FROM `acc_heartstone` WHERE (`acc`='".$sql_select['result']['acc']['id']."' AND `char`='".$_GET['heartstone']."') ORDER BY `date` DESC LIMIT 1"); 13 if( mysql_num_rows($limit_sql) > 0 ){ 14 $limit_sql = mysql_fetch_array($limit_sql); 15 if( date("d-m-Y", $limit_sql['date']) != date("d-m-Y", time()) ){ 16 SwitchDB(1); // nastavení databáze na mangos 17 $PosRess = new PosRess($_GET['heartstone']); 18 if( $PosRess->char_name != false ){ 19 $PosRess->GoHome(); 20 $PosRess->GoHomeDone(); 21 SwitchDB(3); // nastavení databáze na web 22 mysql_query("INSERT INTO `acc_heartstone` (`acc`,`char`,`date`,`ip`) VALUES ('".$sql_select['result']['acc']['id']."','".$_GET['heartstone']."','".time()."','".$_SERVER["REMOTE_ADDR"]."') "); 23 }; 24 }; 25 }; 26 }; 27 28 if( !empty($_GET['resetxp']) AND is_numeric($_GET['resetxp']) ) 29 { 30 SwitchDB(1); // nastavení databáze na mangos 31 $XpRess = new XpRess(4); 32 $XpRess->ShowXp(); 33 $XpRess->XpRestart(); 34 $XpRess->XpRestartDone(); 35 }; 36 37 5 38 ?> 6 39 -
db/index.php
r118 r132 195 195 196 196 switch($id){ 197 case 'char acter': $general_include = "./character.php"; break;197 case 'char': $general_include = "./character.php"; break; 198 198 default: $general_include = "./hlavni.php"; break; 199 199 }; -
db/post_read.php
r118 r132 694 694 $this->sql_select['result']['other']['chars'] .= "<td title=\"Rasa\">".$Database['race'][$this->sql_select['result']['char'][$i]['race']]."</td>"; 695 695 $this->sql_select['result']['other']['chars'] .= "<td title=\"Povolání\">".$Database['class'][$this->sql_select['result']['char'][$i]['class']]."</td>\n"; 696 $this->sql_select['result']['other']['chars'] .= "<td> - <a href=\"./character.php?char=".$this->sql_select['result']['char'][$i]['guid'].$this->sid."\">Exportovat</a></td></tr>\n"; 696 $this->sql_select['result']['other']['chars'] .= "<td> - <a href=\"./index.php?char=".$this->sql_select['result']['char'][$i]['guid'].$this->sid."\" target=\"_blank\">Exportovat</a></td>\n"; 697 $this->sql_select['result']['other']['chars'] .= "<td> - <a href=\"./index.php?id=myacc&heartstone=".$this->sql_select['result']['char'][$i]['guid'].$this->sid."\">Heartstone</a></td>\n"; 698 $this->sql_select['result']['other']['chars'] .= "<td> - <a href=\"./index.php?id=myacc&resetxp=".$this->sql_select['result']['char'][$i]['guid'].$this->sid."\">ResetXP</a></td></tr>\n"; 697 699 }; 698 700 if( $this->sql_select['result']['char_count'] == 0 ){
Note:
See TracChangeset
for help on using the changeset viewer.