Changeset 627 for trunk/pages/gmteam.php
- Timestamp:
- Aug 19, 2009, 9:06:06 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/gmteam.php
r625 r627 5 5 global $db, $Config; 6 6 7 $Result = $db->query('SELECT `gm_tym`.*, `account`.`id`, `account`.`username` FROM `'.$Config['Mangos']['DatabaseRealmd'].'`.`account` LEFT JOIN `'.$Config['Database']['Database'].'`.`gm_tym` ON `gm_tym`.`AccountId` = `account`.`id` WHERE (`account`.`locked` = 0) AND (`account`.`gmlevel` > 0) AND (`gm_tym`.`RealmId` = '.$Realm['Id'].') ORDER BY `gm_tym`.`RealmId`, `account`.`username`');7 $Result = $db->query('SELECT * FROM `GmTeam` WHERE (`RealmId` = '.$Realm['Id'].') AND (`TimeTo` IS NULL) ORDER BY `RealmId`, `Nick`'); 8 8 if($Realm['Id'] == 0) $Output = '<h3 class="PageTitle">'.$Realm['Name'].'</h3>'; 9 9 else $Output = '<h3 class="PageTitle">Svět '.$Realm['Name'].'</h3>'; … … 13 13 14 14 while($Line = $Result->fetch_array()) 15 { 16 $Line['username'] = strtoupper($Line['username'][0]).strtolower(substr($Line['username'], 1));17 if( substr($Line['username'], -2, 2) == 'gm') $Line['username'] = substr($Line['username'], 0, -2);18 19 $Output .= '<tr><td>'.$Line[' username'].'</td>'.15 { 16 // Create link from name if ForumId defined 17 if($Line['ForumId'] != 0) $Line['Nick'] = '<a href="'.$Config['Web']['BaseURL'].'forum/memberlist.php?mode=viewprofile&u='.$Line['ForumId'].'">'.$Line['Nick'].'</a>'; 18 19 $Output .= '<tr><td>'.$Line['Nick'].'</td>'. 20 20 '<td>'.$Line['Delegation'].'</td>'; 21 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);22 21 $Output .= '<td>'; 23 22 $Characters = array(); 24 $ResultMangos = $db->query('SELECT * FROM ` characters` WHERE account = "'.$Line['id'].'"');23 $ResultMangos = $db->query('SELECT * FROM `'.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'`.`characters` WHERE `account` = "'.$Line['AccountId'].'"'); 25 24 while($LineMangos = $ResultMangos->fetch_array()) 26 25 { … … 50 49 //$_COOKIE['RealmIndex'] 51 50 51 $db->select_db($Config['Database']['Database']); 52 52 $Output = '<h2 class="PageTitle">GM tým</h3>'; 53 53 … … 59 59 $Output .= '<br />'.$server->RealmSelection(); 60 60 61 $Output .= '<h3 class="PageTitle">Dřívější GM</h3>'; 62 $List = array(); 63 $DbResult = $db->query('SELECT * FROM `GmTeam` WHERE `TimeTo` IS NOT NULL'); 64 while($DbRow = $DbResult->fetch_assoc()) 65 { 66 $List[] = $DbRow['Nick'].' ('.$server->HumanDate($DbRow['TimeFrom'], 0).' - '.$server->HumanDate($DbRow['TimeTo'], 0).')'; 67 } 68 $Output .= implode(', ', $List); 69 61 70 echo($Output); 62 71
Note:
See TracChangeset
for help on using the changeset viewer.