Файл: DARK WARS/dark_war/village/set_bone.php
Строк: 50
<?php
include_once '../start.php';
$doc = new document();
$doc->title('Настройки Кости');
if ($player->admin < 3) {
$doc->err('Вы не администратор');
exit;
}
if (isset($_POST['save'])) {
if ($_POST['accessGameBone']) {
$game->accessGameBone = 1;
} else {
$game->accessGameBone = 0;
}
if ($_POST['chanceWinGameBone']) {
$game->chanceWinGameBone = 1;
} else {
$game->chanceWinGameBone = 0;
}
$game->save_settings();
$doc->msg('Изменения приняты');
}
$dispatch = array();
$doc->assign('method', 'post');
$doc->assign('action', null);
$options = array();
$options[] = array(0, 'Открытая', $setGame['accessGameBone'] === '0');
$options[] = array(1, 'Зактрытая', $setGame['accessGameBone'] === '1');
$dispatch[] = array('type' => 'select', 'name' => 'accessGameBone', 'title' => 'Состояние', 'br' => 1, 'options' => $options);
$options = array();
$options[] = array(0, 'Нормальный', $setGame['chanceWinGameBone'] === '0');
$options[] = array(1, 'Маленький', $setGame['chanceWinGameBone'] === '1');
$dispatch[] = array('type' => 'select', 'name' => 'chanceWinGameBone', 'title' => 'Шан победы', 'br' => 1, 'options' => $options);
$dispatch[] = array('type' => 'submit', 'name' => 'save', 'value' => 'Сохранить', 'br' => 0);
$doc->assign('dis', $dispatch);
$doc->display('form.tpl');
$doc->ret("/dark_war/village/", 'В деревню');
$doc->ret("/dark_war/village/bone.php", 'Кости');
?>