Changeset 627 for trunk/pages/gmteam.php


Ignore:
Timestamp:
Aug 19, 2009, 9:06:06 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Strkutura a názvy tabulek gm_tym, finance, finance_rewards.
  • Upraveno: Stránka informací o serveru doplněna pro podporu zobrazení více fyzických serverů.
  • Přidáno: Zobrazení dřívějších GM v dolní částí stránky GM týmu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pages/gmteam.php

    r625 r627  
    55  global $db, $Config;
    66 
    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`');
    88  if($Realm['Id'] == 0) $Output = '<h3 class="PageTitle">'.$Realm['Name'].'</h3>';
    99    else $Output = '<h3 class="PageTitle">Svět '.$Realm['Name'].'</h3>';
     
    1313 
    1414  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>'.
    2020      '<td>'.$Line['Delegation'].'</td>';
    21     $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);
    2221    $Output .= '<td>';
    2322    $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'].'"');
    2524    while($LineMangos = $ResultMangos->fetch_array())
    2625    {
     
    5049//$_COOKIE['RealmIndex']
    5150
     51$db->select_db($Config['Database']['Database']);
    5252$Output = '<h2 class="PageTitle">GM tým</h3>';
    5353
     
    5959$Output .= '<br />'.$server->RealmSelection();
    6060
     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');
     64while($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
    6170echo($Output);
    6271
Note: See TracChangeset for help on using the changeset viewer.