Changeset 579 for trunk/pages/guilda.php
- Timestamp:
- Apr 30, 2009, 8:10:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/guilda.php
r577 r579 54 54 while($member = $members->fetch_row()) 55 55 { 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()); 60 60 if($llogin < 1) 61 61 { … … 86 86 $lastlogin = '<font color="#8000FF">'.$llogin.'</font>'; 87 87 } 88 $level = $online[ "level"];88 $level = $online['level']; 89 89 if($level > 0) 90 90 { … … 123 123 $lev = '<font color="#FFF000">'.$level.'</font>'; 124 124 } 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>'); 144 135 } 145 136 echo('</table>');
Note:
See TracChangeset
for help on using the changeset viewer.