Changeset 578


Ignore:
Timestamp:
Apr 30, 2009, 7:10:05 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Některé chyby a varování.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/html.php

    r576 r578  
    221221   
    222222    $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);
    224224
    225225    if($pocet != 0)
  • trunk/inc/player.php

    r577 r578  
    115115  public function GetGmLvl()
    116116  {
    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();
    120121    return($row['gmlevel']);
    121122  }
     
    124125  {
    125126    $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';
    128129    return($Result);
    129130  }
     
    132133  {
    133134    $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';
    136137    return($Result);
    137138  }
  • trunk/index.php

    r576 r578  
    1616$server = new Server($db);
    1717$html = new Html(0, $db);
    18 include_once('functions.php');
    1918$html->Start();
    2019if(isset($_COOKIE['hof-random']) and $_COOKIE['hof-random'] == 'no') $num_headers = 1;
  • trunk/pages/acc.php

    r487 r578  
    33
    44$html -> PrgStart();
    5 $user = $_POST['user'];
    6 $pass = $_POST['pass'];
     5if(array_key_exists('user', $_POST)) $user = $_POST['user']; else $user = '';
     6if(array_key_exists('pass', $_POST)) $pass = $_POST['pass']; else $pass = '';
    77
    88if (isset($_POST["login"]) AND $_POST["user"] != "" AND $_POST["pass"] != "")
Note: See TracChangeset for help on using the changeset viewer.