Размер файла: 2.07Kb
<?php
require_once './element_options/element_options.php';
require_once './element_function/element_function_global_battle.php';
if (!$user) { header('Location: /'); exit; }
if (readcache('element_user_mesto'.$user['lost_id']) != 'Битва Алтарей') writecache('element_user_mesto'.$user['lost_id'], 'Битва Алтарей');
$timer = getTimeStart();
$getbattle = getCacheBattle();
$count = count($getbattle['players']);
$dostype = (empty($getbattle['players'][$user['lost_id']]) ? true : false);
if ($getbattle['game'] == 1 AND !$dostype) {
header('Location: /battle/battle?r='.rand(123123,45645645));
}
if ($go == 'start' AND $dostype) {
$getbattle['players'][$user['lost_id']] = array($user['lost_params_strlen'], $user['lost_params_heatpoints'], $user['lost_params_protection']);
writecache('element_global_battle', $getbattle);
header('Location: /battle?r='.rand(123123,45645645));
}
$title = 'Битва Алтарей';
require_once './element_include/element_head.php';
require_once './element_include/element_header_user_true.php';
echo '<div class="nfl p5 mb5 mt5 small cntr mlra">';
echo '<div class="cntr"><img width="100%" height="90" src="/images/logo_battle.png"></div>';
echo '<div class="cntr small yellow1">';
echo 'Игроков: '.$count.'';
echo '<div class="hr mt5 mb5 w80 mlra"></div><span class="white">Битва начнется через: '.$timer.'</span>';
echo '<div class="mt5">';
echo '<a class="button w60" href="/battle"> Обновить</a>';
if ($dostype) {
echo '<a class="button w60" href="/battle?go=start&r346575"> В очередь</a>';
}
echo '</div>';
echo '<div class="hr mt5 mb5 w80 mlra"></div>';
echo '<div class="mt5 yellow1">';
echo '11:30 - Алтарь силы<br/>14:30 - Алтарь здоровья<br/>19:30 - Алтарь защиты';
echo '</div>';
echo '</div>';
echo '</div>';
require_once './element_include/element_foot_user_true.php';