Changeset 609 for trunk/pages/guilda.php
- Timestamp:
- Aug 7, 2009, 10:03:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/guilda.php
r595 r609 3 3 function count_days($a, $b) 4 4 { 5 6 7 8 9 5 $gd_a = getdate($a); 6 $gd_b = getdate($b); 7 $a_new = mktime(12, 0, 0, $gd_a['mon'], $gd_a['mday'], $gd_a['year']); 8 $b_new = mktime(12, 0, 0, $gd_b['mon'], $gd_b['mday'], $gd_b['year']); 9 return round(abs($a_new - $b_new) / 86400); 10 10 } 11 11 12 $db->select_db($Config['Mangos'][' DatabaseCharacters']);12 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 13 13 $id = (isset($_GET['id'])) ? $_GET['id'] : 0; 14 14 if($id != 0) … … 59 59 $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;'); 60 60 $online = $query->fetch_assoc(); 61 62 61 $accid = $online['account']; 62 63 63 $LogoutTime = count_days($online['logout_time'], time()); 64 64 $LogoutTimeColorList = array(0 => '#0000CC', 5 => '#FFFF00', 15 => '#FF8000', 30 => '#FF0000', 60 => '#FF00FF', 90 => '#8000FF'); … … 69 69 } 70 70 71 71 $Level = $online['level']; 72 72 $LevelColorList = array(9 => '#858585', 19 => '#339900', 29 => '#3300CC', 39 => '#5552FF', 49 => '#FF8000', 59 => '#FF0000', 69 => '#FF00CC', 70 => '#FFF000'); 73 73 $LevelColor = '#FFFFFF'; … … 77 77 } 78 78 79 79 if($online['gender'] == 0) $gender = 0; 80 80 else $gender = 1; 81 81 echo('<tr>'.
Note:
See TracChangeset
for help on using the changeset viewer.