// ISSET if (isset($_POST['nic'])) { $nickname = $_POST['nic']; } else { $nickname = null; } if (isset($_POST['clr'])) { $color = $_POST['clr']; } else { $color = null; } if (isset($_POST['msg'])) { $message = $_POST['msg']; } else { $message = null; } if (isset($_POST['dst'])) { $destination = $_POST['dst']; } else { $destination = null; } // DATA $out = null; if ($message != null && $destination != null) { if (AdminServ::initialize(false)) { $out = AdminServ::addChatServerLine($message, $nickname, $color, $destination, true); } $client->Terminate(); } // OUT echo json_encode($out);
define('USER_THEME', AdminServUI::theme($args['theme'])); // LANG define('USER_LANG', AdminServUI::lang($args['lang'])); // VÉRIFICATION DES DROITS $checkRightsList = array('./config/adminserv.cfg.php' => 666, './config/servers.cfg.php' => 666, './config/adminlevel.cfg.php' => 666); if (in_array(true, AdminServConfig::$LOGS)) { if (!Utils::isWinServer()) { $checkRightsList['./logs/'] = 777; } } AdminServ::checkRights($checkRightsList); // LOGOUT AdminServEvent::logout(); // LOGS AdminServLogs::initialize(); // PLUGINS define('USER_PLUGIN', AdminServPlugin::getCurrent()); // INDEX unset($args['theme'], $args['lang']); if (AdminServEvent::isLoggedIn()) { // SWITCH SERVER AdminServEvent::switchServer(); // SERVER CONNECTION if (AdminServ::initialize()) { // PAGES BACKOFFICE AdminServUI::initBackPage(); } } else { // PAGES FRONTOFFICE AdminServUI::initFrontPage(); }
} else { $directory = null; } if (isset($_GET['op'])) { $operation = addslashes($_GET['op']); } else { $operation = null; } if (isset($_GET['select'])) { $selection = $_GET['select']; } else { $selection = null; } // DATA $out = null; if (AdminServ::initialize() && $path != null) { // Maps if ($path == 'currentServerSelection') { $mapsImport = AdminServ::getMapList(); } else { $currentDir = Folder::read($path, AdminServConfig::$MATCHSET_HIDDEN_FOLDERS, AdminServConfig::$MATCHSET_EXTENSION, intval(AdminServConfig::RECENT_STATUS_PERIOD * 3600)); $mapsImport = AdminServ::getLocalMapList($currentDir, $directory); } // Faire une sélection if ($operation == 'setSelection') { // On supprime les maps non sélectionnées if ($selection != null && count($selection) > 0) { foreach ($mapsImport['lst'] as $id => $values) { if (!in_array($id, $selection)) { unset($mapsImport['lst'][$id]); }