Changeset 579 for trunk/pages/guilda.php


Ignore:
Timestamp:
Apr 30, 2009, 8:10:25 AM (16 years ago)
Author:
george
Message:
  • Opraveno: Doplněny ikony pro povolání death knight a soubory přejmenovány dle minimanageru.
  • Upraveno: Přeformátování a pročištění různých stránek.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/guilda.php

    r577 r579  
    5454  while($member = $members->fetch_row())
    5555  {   
    56     $query = $db->query("SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, ' ', ".$Config['Mangos']['CharacterDataOffset']['Level']."+1), ' ', -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data,' ',".($Config['Mangos']['CharacterDataOffset']['Gender'] + 1)."),' ',-1) as unsigned) ),8,'0'),4,1) as gender FROM `characters` WHERE `guid` = '".$member[0]."' LIMIT 1;");
    57     $online = $query -> fetch_array();
    58           $accid = $online["account"];
    59           $llogin = count_days($online["logout_time"], time());
     56    $query = $db->query('SELECT `race`,`class`,`online`, `account`, `logout_time`, SUBSTRING_INDEX(SUBSTRING_INDEX(`characters`.`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS level, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ", -1) as unsigned) ), 8, 0), 4, 1) as gender FROM `characters` WHERE `guid` = '.$member[0].' LIMIT 1;');
     57    $online = $query->fetch_assoc();
     58          $accid = $online['account'];
     59          $llogin = count_days($online['logout_time'], time());
    6060        if($llogin < 1)
    6161        {
     
    8686                $lastlogin = '<font color="#8000FF">'.$llogin.'</font>';
    8787        }
    88         $level = $online["level"];
     88        $level = $online['level'];
    8989        if($level > 0)
    9090                {
     
    123123                        $lev = '<font color="#FFF000">'.$level.'</font>';
    124124                }
    125                 if ($online[6] == 0)
    126                 {
    127                  $gender = "m";
    128     }
    129     else
    130     {
    131       $gender = "f";
    132     }
    133     echo "
    134     <tr>
    135       <td align=\"center\">".$member[2]."</td>
    136       <td align=\"center\"><img src=\"imgs/icons/".$player -> GetPlayerRace($online["race"])."-".$gender.".gif\"></td>
    137       <td align=\"center\"><img src=\"imgs/icons/".$player -> GetPlayerClass($online["class"]).".gif\"></td>
    138       <td align=\"center\">".$lev."</td>
    139       <td align=\"center\">".$member[4]." (".$member[1].")</td>
    140       <td align=\"center\">".$lastlogin."</td>
    141       <td align=\"center\">".(($online["online"]) ? "<img src=\"imgs/inc/on.gif\" alt=\"\" />" : "<img src=\"imgs/inc/off.gif\" alt=\"\" />")."</td>     
    142     </td>
    143     ";
     125                if($online[6] == 0) $gender = '0';
     126    else $gender = '1';
     127    echo('<tr>'.
     128      '<td align="center">'.$member[2].'</td>'.
     129      '<td align="center"><img src="imgs/icons/'.$online['race'].'-'.$gender.'.gif"></td>'.
     130      '<td align="center"><img src="imgs/icons/'.$online['class'].'.gif"></td>'.
     131      '<td align="center">'.$lev.'</td>'.
     132      '<td align="center">'.$member[4].' ('.$member[1].')</td>'.
     133      '<td align="center">'.$lastlogin.'</td>'.
     134      '<td align="center">'.(($online['online']) ? '<img src="imgs/inc/on.gif" alt="online" />' : '<img src="imgs/inc/off.gif" alt="offline" />').'</td></td>');
    144135  }
    145136  echo('</table>');
Note: See TracChangeset for help on using the changeset viewer.