query('SELECT * FROM `GmTeam` WHERE (`RealmId` = '.$Realm['Id'].') AND (`TimeTo` IS NULL) ORDER BY `RealmId`, `Nick`');
if($Realm['Id'] == 0) $Output = '
'.$Realm['Name'].'
';
else $Output = 'Svět '.$Realm['Name'].'
';
$Output .= ''.
'Jméno | Pověření | Postavy |
';
if($Result->num_rows == 0) return('');
while($Line = $Result->fetch_array())
{
// Create link from name if ForumId defined
if($Line['ForumId'] != 0) $Line['Nick'] = ''.$Line['Nick'].'';
$Output .= ''.$Line['Nick'].' | '.
''.$Line['Delegation'].' | ';
$Output .= '';
$Characters = array();
$ResultMangos = $db2->query('SELECT * FROM `characters` WHERE `account` = "'.$Line['AccountId'].'"');
while($LineMangos = $ResultMangos->fetch_array())
{
if($LineMangos['online'] == 1) $Characters[] = $LineMangos['name'].'(online)';
else $Characters[] = $LineMangos['name'];
}
$Output .= implode(', ', $Characters);
$Output .= ' | ';
/*
* // $Database->select_db($Config['Mangos']['DatabaseRealmd']);
if($Line['ForumId'] != 0)
{
echo('
Profil na foru: | ');
echo('Profil | ');
echo '
';
}
//echo('
|
');
*/
$Output .= '';
}
$Output .= '
';
return($Output);
}
//$Role = array('Hráč', 'Moderátor', 'Game Master', 'Kontrolor chyb', 'Vedoucí Tábora', 'Administrátor', 'Správce Systému');
//$_COOKIE['RealmIndex']
$Realm = new Realm($System, $_COOKIE['RealmIndex']);
$db2 = $Realm->CharactersDatabase;
$Output = 'GM tým
';
$Output .= ShowGMList(array('Id' => 0, 'Name' => 'Všechny světy'));
$DbResult = $System->Database->query('SELECT * FROM Realm WHERE Enabled=1');
while($Realm = $DbResult->fetch_assoc())
{
$Output .= ShowGMList($Realm);
}
$Output .= '
'.$server->RealmSelection();
$Output .= 'Dřívější GM
';
$List = array();
$DbResult = $db->query('SELECT * FROM `GmTeam` WHERE `TimeTo` IS NOT NULL');
while($DbRow = $DbResult->fetch_assoc())
{
$List[] = $DbRow['Nick'].' ('.$server->HumanDate($DbRow['TimeFrom'], 0).' - '.$server->HumanDate($DbRow['TimeTo'], 0).')';
}
$Output .= implode(', ', $List);
echo($Output);
?>