Changeset 578
- Timestamp:
- Apr 30, 2009, 7:10:05 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/html.php
r576 r578 221 221 222 222 $pocet = mysql_num_rows(mysql_query("SELECT id FROM `articles`".$where."ORDER BY `date` DESC;")); 223 $offset = ( $_GET["offset"]? $_GET["offset"] : $pocet);223 $offset = (isset($_GET["offset"]) ? $_GET["offset"] : $pocet); 224 224 225 225 if($pocet != 0) -
trunk/inc/player.php
r577 r578 115 115 public function GetGmLvl() 116 116 { 117 // $this -> NumCheck($guid); 118 $this->db->select_db($db_realmd); 119 $row = $this->db->query('SELECT `gmlevel` FROM `account` WHERE `id` = "'.$_SESSION['UserId'].'" LIMIT 1;')->fetch_array(); 117 global $Config; 118 119 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 120 $row = $this->db->query('SELECT `gmlevel` FROM `account` WHERE `id` = "'.$_SESSION['UserId'].'" LIMIT 1;')->fetch_assoc(); 120 121 return($row['gmlevel']); 121 122 } … … 124 125 { 125 126 $Class = array(1 => 'warrior', 2 => 'paladin', 3 => 'hunter', 4 => 'rogue', 5 => 'priest', 6 => 'death knight', 7 => 'shaman', 8 => 'mage', 9 => 'warlock', 11 => 'druid'); 126 $Result = $Class[$Id];127 if($Result == '')$Result = 'unknown';127 if(array_key_exists($Id, $Class)) $Result = $Class[$Id]; 128 else $Result = 'unknown'; 128 129 return($Result); 129 130 } … … 132 133 { 133 134 $Race = array(1 => 'human', 2 => 'orc', 4 => 'dwarf', 4 => 'nightelf', 5 => 'undead', 6 => 'tauren', 7 => 'gnome', 8 => 'troll', 9 => 'goblin', 10 => 'bloodelf', 11 => 'draenei'); 134 $Result = $Race[$Id];135 if($Result == '')$Result = 'unknown';135 if(array_key_exists($Id, $Race)) $Result = $Race[$Id]; 136 else $Result = 'unknown'; 136 137 return($Result); 137 138 } -
trunk/index.php
r576 r578 16 16 $server = new Server($db); 17 17 $html = new Html(0, $db); 18 include_once('functions.php');19 18 $html->Start(); 20 19 if(isset($_COOKIE['hof-random']) and $_COOKIE['hof-random'] == 'no') $num_headers = 1; -
trunk/pages/acc.php
r487 r578 3 3 4 4 $html -> PrgStart(); 5 $user = $_POST['user'];6 $pass = $_POST['pass'];5 if(array_key_exists('user', $_POST)) $user = $_POST['user']; else $user = ''; 6 if(array_key_exists('pass', $_POST)) $pass = $_POST['pass']; else $pass = ''; 7 7 8 8 if (isset($_POST["login"]) AND $_POST["user"] != "" AND $_POST["pass"] != "")
Note:
See TracChangeset
for help on using the changeset viewer.