$mc = array(); require $c['dir'] . "/system/minecraft.class.php"; /* ----------------------------------------------------- Konfigurāciju rediģēt drīkst pēc šīs līnijas ----------------------------------------------------- */ /* Datubāzes servera adrese, pēc noklusējuma "localhost" */ $mc['db']['host'] = "localhost"; /* Datubāzes pieejas lietotājvārds */ $mc['db']['username'] = ""; /* Datubāzes pieejas parole */ $mc['db']['password'] = ""; /* Datubāzes nosaukums */ $mc['db']['database'] = ""; $mc['servers'] = array("Factions" => (object) array("title" => "Factions", "ip_address" => "", "rcon_port" => 25575, "rcon_password" => "", "show" => true)); foreach ($mc['servers'] as $type => $data) { $mc['rcon'][$type] = new MinecraftRcon($data->ip_address, $data->rcon_port, $data->rcon_password, 10); if ($mc['rcon'][$type]->connect() === false) { $data->show = false; echo baltsms::alert("Nav iespējams savienoties ar Minecraft serveri: <strong>" . $type . "</strong>. Pārbaudi pieejas datus!", "danger"); } }
if (empty($_POST['server'])) { $errors[] = $lang[$p]['error_empty_server']; } if (empty($_POST['code'])) { $errors[] = $lang[$p]['error_empty_code']; } else { if (strlen($_POST['code']) != 9 or is_numeric($_POST['code']) === false) { $errors[] = $lang[$p]['error_invalid_code']; } } if (count($errors) > 0) { foreach ($errors as $error) { echo baltsms::alert($error, "danger"); } } else { $baltsms = new baltsms(); $baltsms->setPrice($c[$p]['prices'][$_POST['server']]); $baltsms->setCode($_POST['code']); $baltsms->sendRequest(); if ($baltsms->getResponse() === true) { $unjail = str_replace(array("<NICKNAME>"), array($_POST['nickname']), $c[$p]['commands']['unjail']); $mc['rcon'][$_POST['server']]->send_command($unjail); if ($c[$p]['ingame']['notifications'] === true) { $sendMessage = str_replace(array("<NICKNAME>"), array($_POST['nickname']), $c[$p]['ingame']['message']); $mc['rcon'][$_POST['server']]->send_command("say " . $sendMessage); } echo baltsms::alert($lang[$p]['unjail_successful'], "success"); ?> <script type="text/javascript"> setTimeout(function(){ loadPlugin('<?php
} if (empty($_POST['code'])) { $errors[] = $lang[$p]['error_empty_code']; } else { if (strlen($_POST['code']) != 9 or is_numeric($_POST['code']) === false) { $errors[] = $lang[$p]['error_invalid_code']; } else { $code = true; } } if (count($errors) > 0) { foreach ($errors as $error) { echo baltsms::alert($error, "danger"); } } else { $baltsms = new baltsms(); $baltsms->setPrice($_POST['price']); $baltsms->setCode($_POST['code']); $baltsms->sendRequest(); if ($baltsms->getResponse() === true) { $db->insert("INSERT INTO `" . $c[$p]['db']['table'] . "` (`nickname`, `server`, `mc_group`, `length`, `time`, `expires`) VALUES (?, ?, ?, ?, ?, ?)", array($_POST['nickname'], $_POST['server'], $_POST['group'], $c[$p]['groups'][$_POST['server']][$_POST['group']][$_POST['price']], time(), strtotime("+" . $c[$p]['groups'][$_POST['server']][$_POST['group']][$_POST['price']] . " days", time()))); $addGroup = str_replace(array("<NICKNAME>", "<GROUP>"), array($_POST['nickname'], $_POST['group']), $c[$p]['commands']['addGroup']); $mc['rcon'][$_POST['server']]->send_command($addGroup); if ($c[$p]['ingame']['notifications'] === true) { $sendMessage = str_replace(array("<NICKNAME>", "<GROUP>"), array($_POST['nickname'], $_POST['group']), $c[$p]['ingame']['message']); $mc['rcon'][$_POST['server']]->send_command("say " . $sendMessage); } echo baltsms::alert($lang[$p]['group_purchased'], "success"); ?> <script type="text/javascript"> setTimeout(function(){
<?php /* baltGro - SMS/PayPal maksājumu sistēmas gatavais risinājums baltGro ir aplikācija, kura saistās ar baltGro SMS/PayPal un uzturēšanas risinājumiem. Šo aplikācija drīkst izmantot tikai baltgro.lv klienti, kuriem ir vajadzīgie dati, lai aizpildītu konfigurāciju un izveidotu savienojumu Aplikāciju un tās spraudņus veidoja Miks Zvirbulis http://twitter.com/MiksZvirbulis https://twitter.com/mrYtteroy */ if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) or isset($_SERVER['HTTP_X_REQUESTED_WITH']) and strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) != "xmlhttprequest") { die("Ajax Only!"); } if (isset($_POST['plugin'])) { require "../config.inc.php"; if ($c['sms']['debug'] === true) { echo baltsms::alert("<center>SMS DEBUG IS TURNED ON!</center>", "warning"); } if (file_exists($c['dir'] . "/plugins/" . $_POST['plugin'] . ".php")) { include $c['dir'] . "/plugins/" . $_POST['plugin'] . ".php"; } else { echo baltsms::alert(str_replace("<PLUGIN>", $_POST['plugin'] . ".php", $c['lang']['lv']['plugin_not_found']), "danger"); } } else { exit; }