Ignore:
Timestamp:
Mar 28, 2010, 9:28:01 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Řazení společného výpisu online hráčů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/online-hraci.php

    r700 r701  
    7272  'CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['ArenaPoints'].' + 1), " ", -1) AS UNSIGNED) AS arena_points, '.
    7373  'mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.$Config['Mangos']['CharacterDataOffset']['Gender'].' + 1), " ", -1) as unsigned) ), 8, 0), 4, 1) AS gender '.
    74   'FROM `characters` WHERE `online`= 1 ORDER BY `'.$order_by.'` '.$order_dir);
     74  'FROM `characters` WHERE `online`= 1');
     75    $I = 0;
    7576    while($DbRow = $sql->fetch_assoc())
    7677    {
    7778      $DbRow['svet'] = $DbRealm['Name'];
    78       $PlayerList[$DbRow['name'].$DbRow['svet']] = $DbRow;
     79      $PlayerList[$DbRow[$order_by].$I] = $DbRow;
     80      $I++;
    7981    }
    8082  }
     
    9193    '</tr>');
    9294   
    93   ksort($PlayerList);
     95  if($order_dir == 'ASC') ksort($PlayerList);
     96    else krsort($PlayerList);
    9497
    9598  foreach($PlayerList as $row)
Note: See TracChangeset for help on using the changeset viewer.