* Project name: Battles-Game */ session_start(); //require_once '../functions.php'; $user = new \Battles\User($_SESSION['uid']); if (!$user->admin) { header("HTTP/1.0 404 Not Found"); exit; } $al = db::c()->query('SELECT * FROM `aligns` WHERE `align` = "?s" LIMIT 1', $user['align'])->fetch_assoc(); function statsat($nu) { /*in admin.php*/ $stats = 0; $master = 0; $vinos = 0; $money = 0; foreach (Config::$exptable as $k => $v) { if ($k == $nu) { break; } $stats += $v[0]; $master += $v[1]; $vinos += $v[2]; $money += $v[3]; } return ["stats" => $stats + 12, "master" => $master + 1, "vinos" => $vinos + 3, "money" => $money]; } function imp($array) { $str = ''; foreach ($array as $k => $v) { $str .= $k . ";" . $v . ";"; } return $str; } function expa($str) { $array = explode(";", $str); for ($i = 0; $i <= count($array) - 2; $i = $i + 2) { $rarray[$array[$i]] = $array[$i + 1]; } if (isset($rarray)) { return $rarray; } else { return []; } } if ($_POST['ali']) { //Что делает эта штука? $accs = $_POST; array_shift($accs); array_shift($accs); array_shift($accs); db::c()->query('INSERT INTO `aligns` (`align`,`img`,`name`,`accses`) VALUES ("?s","?s","?s","?s") ON DUPLICATE KEY UPDATE `img` = "?s", `name` = "?s", `accses` = "?s"', $_POST['ali'], $_POST['im'], $_POST['txt'], imp($accs), $_POST['im'], $_POST['txt'], imp($accs)); } $aligns = db::c()->query('SELECT `img`,`align`,`name` FROM `aligns` ORDER BY `align`'); \Battles\Template::header('ᐰdminка'); ?>
"; #################################################### $moj = expa($al['accses']); switch ($_POST['use']) { /* Подключаем строго тот свиток который используем. 36 Свитков править. Мама дорогая! */ case "healing": include("../magic/Healing.php"); break; case "al_neut_power": include("../magic/al_neut_power.php"); break; case "ct1": //Заменён на CureInjury.php class. Придумать вызов. //include("../magic/ct1.php"); break; case "ct2": //Заменён на CureInjury.php class. Придумать вызов. //include("../magic/ct2.php"); break; case "ct3": //Заменён на CureInjury.php class. Придумать вызов. //include("../magic/ct3.php"); break; case "sleep": include("../magic/sleep.php"); break; case "sleepf": include("../magic/sleepf.php"); break; case "sleep_off": include("../magic/sleep_off.php"); break; case "sleepf_off": include("../magic/sleepf_off.php"); break; case "haos": include("../magic/haos.php"); break; case "haos_off": include("../magic/haos_off.php"); break; case "obezl": include("../magic/obezl.php"); break; case "obezl_off": include("../magic/obezl_off.php"); break; case "death": include("../magic/death.php"); break; case "death_off": include("../magic/death_off.php"); break; case "ldadd": include("../magic/ldadd.php"); break; case "attack": include("../magic/eattack.php"); break; case "attack_t": include("../magic/attack_t.php"); break; case "battack": include("../magic/ebattack.php"); break; case "attackk_close": include("../magic/attackk_close.php"); break; case "attackk_open": include("../magic/attackk_open.php"); break; case "pal_off": include("../magic/pal_off.php"); break; case "marry": include("../magic/marry.php"); break; case "unmarry": include("../magic/unmarry.php"); break; case "ct_all": //Заменён на CureInjury.php class. Придумать вызов. //include("../magic/ct_all.php"); break; case "check": include("../magic/check.php"); break; case "brat": include("../magic/brat.php"); break; case "vampir": include("../magic/vampir.php"); break; case "crush": include("../magic/devastate.php"); break; case "def": include("../magic/defence.php"); break; case "bexit": include("../magic/bexit.php"); break; case "vip": include("../magic/vips.php"); break; case "dlight": include("../magic/dlight.php"); break; case "ddark": include("../magic/ddark.php"); break; case "dneit": include("../magic/dneit.php"); break; case "un_align": include("../magic/un_align.php"); break; } echo "