Exemplo n.º 1
0
                                }
                                Utils::redirection(false, '?p=' . USER_PAGE);
                            }
                        }
                    }
                }
            }
        }
    }
}
// LECTURE
$client->addCall('GetBanList', array(AdminServConfig::LIMIT_PLAYERS_LIST, 0));
$client->addCall('GetBlackList', array(AdminServConfig::LIMIT_PLAYERS_LIST, 0));
$client->addCall('GetGuestList', array(AdminServConfig::LIMIT_PLAYERS_LIST, 0));
$client->addCall('GetIgnoreList', array(AdminServConfig::LIMIT_PLAYERS_LIST, 0));
if (!$client->multiquery()) {
    AdminServ::error();
} else {
    $queriesData = $client->getMultiqueryResponse();
    $data['banlist']['list'] = $queriesData['GetBanList'];
    $data['blacklist']['list'] = $queriesData['GetBlackList'];
    $data['guestlist']['list'] = $queriesData['GetGuestList'];
    $data['ignorelist']['list'] = $queriesData['GetIgnoreList'];
    $data['banlist']['count'] = count($data['banlist']['list']);
    $data['blacklist']['count'] = count($data['blacklist']['list']);
    $data['guestlist']['count'] = count($data['guestlist']['list']);
    $data['ignorelist']['count'] = count($data['ignorelist']['list']);
}
// Liste des joueurs présent sur le serveur
$data['players']['listOptions'] = AdminServUI::getPlayerList();
$data['players']['count'] = AdminServ::getNbPlayers();
Exemplo n.º 2
0
<?php

// LECTURE
$data['serverLines'] = AdminServ::getChatServerLines();
$lastNicknameUsed = Utils::readCookieData('adminserv_user', 2);
$data['nickname'] = $lastNicknameUsed != null ? $lastNicknameUsed : Utils::t('Nickname');
$colorList = array('$ff0' => Utils::t('Color'), '$000' => Utils::t('Black'), '$f00' => Utils::t('Red'), '$0f0' => Utils::t('Green'), '$00f' => Utils::t('Blue'), '$f80' => Utils::t('Orange'), '$f0f' => Utils::t('Pink'), '$888' => Utils::t('Grey'), '$fff' => Utils::t('White'));
$data['colorOptions'] = null;
$lastColorUsed = Utils::readCookieData('adminserv_user', 3);
foreach ($colorList as $colorCode => $colorName) {
    $selected = $colorCode == $lastColorUsed ? ' selected="selected"' : null;
    $data['colorOptions'] .= '<option value="' . $colorCode . '"' . $selected . '>' . $colorName . '</option>';
}
$lastDestination = null;
$lastDestinationTitle = Utils::t('server');
if (isset($_SESSION['adminserv']['chat_dst'])) {
    $lastDestination = $lastDestinationTitle = $_SESSION['adminserv']['chat_dst'];
}
$data['destination']['list'] = AdminServUI::getPlayerList($lastDestination);
$data['destination']['title'] = Utils::t('Message destination') . ' : ' . $lastDestinationTitle;
Exemplo n.º 3
0
            } else {
                $_SESSION['adminserv']['transfer_billid'] = $client->getResponse();
                AdminServLogs::add('action', 'Transfer ' . $playerToServerAmount . ' planets from to ' . $playerToServerLogin . ' player login');
            }
        }
    }
    Utils::redirection(false, '?p=' . USER_PAGE);
}
/* GET */
$client->addCall('GetServerPlanets');
if (isset($_SESSION['adminserv']['transfer_billid']) && $_SESSION['adminserv']['transfer_billid'] != null) {
    $client->addCall('GetBillState', array($_SESSION['adminserv']['transfer_billid']));
}
if (!$client->multiquery()) {
    AdminServ::error();
} else {
    $queriesData = $client->getMultiqueryResponse();
    // Planets number
    $nbPlanets = $queriesData['GetServerPlanets'];
    // Transfer status
    if (isset($queriesData['GetBillState'])) {
        $billState = $queriesData['GetBillState'];
        $transferState = Utils::t('Transaction') . ' #' . $billState['TransactionId'] . ' : ' . $billState['StateName'];
    } else {
        $transferState = '<i>' . Utils::t('No transfer made.') . '</i>';
    }
}
// Players
$playerCount = AdminServ::getNbPlayers();
$getPlayerListUI = AdminServUI::getPlayerList();
$client->Terminate();