Прикручиваем шаблон. Хороним идиотские ошибки.

This commit is contained in:
Igor Barkov (iwork) 2020-09-30 15:32:14 +03:00
parent 95fa17237a
commit dd8b9e847c

View File

@ -20,8 +20,8 @@ function join_arena($u, $btl, $team, $at)
$ak = array_keys($battle[$at]); $ak = array_keys($battle[$at]);
$battle[$u] = $battle[$ak[0]]; $battle[$u] = $battle[$ak[0]];
foreach ($battle[$u] as $k => $v) { foreach ($battle[$u] as $k => $v) {
$battle[$u][$k] = array(0, 0, time()); $battle[$u][$k] = [0, 0, time()];
$battle[$k][$u] = array(0, 0, time()); $battle[$k][$u] = [0, 0, time()];
} }
if ($team == 1) { if ($team == 1) {
$adtxt = 'За сторону <b>Тьмы</b>.'; $adtxt = 'За сторону <b>Тьмы</b>.';
@ -36,9 +36,9 @@ function join_arena($u, $btl, $team, $at)
function aligntype($a) function aligntype($a)
{ {
$lightaligns = array("1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9"); $lightaligns = ["1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9"];
$darkaligns = array("2.2", "3", "8.21"); $darkaligns = ["2.2", "3", "8.21"];
$neutralaligns = array("2", "8.31"); $neutralaligns = ["2", "8.31"];
if (in_array($a, $lightaligns)) { if (in_array($a, $lightaligns)) {
return 1; return 1;
} }
@ -126,15 +126,9 @@ if (isset($_GET['append'])) {
} }
} }
} }
Template::header('Арена Ангелов');
?> ?>
<!DOCTYPE html> <link href="css/fight.css" rel="stylesheet"/>
<html>
<head>
<meta charset="utf-8">
<link href="css/main.css" rel="stylesheet"/>
<link href="css/fight.css" rel="stylesheet"/>
</head>
<style> <style>
.hs { .hs {
font-weight: bold; font-weight: bold;
@ -213,7 +207,6 @@ if (isset($_GET['append'])) {
color: Red; color: Red;
} }
</style> </style>
<body>
<h1>Арена Ангелов</h1> <h1>Арена Ангелов</h1>
<div class="contentContainer"> <div class="contentContainer">
<div class="buttonContainer"> <div class="buttonContainer">
@ -224,12 +217,14 @@ if (isset($_GET['append'])) {
<div class="credenzaItem"> <div class="credenzaItem">
<? if (!isset($is_now['id'])) { ?> <? if (!isset($is_now['id'])) { ?>
<div class="credenza-stateCaption"> <div class="credenza-stateCaption">
<?=$winers?>.<br/>Следующая битва для 7-21 ур. состоится: <?=date("d.m.Y H:i", $start['value'])?> <?= $winers ?>.<br/>Следующая битва для 7-21 ур.
состоится: <?= date("d.m.Y H:i", $start['value']) ?>
</div> </div>
<? } else { ?> <? } else { ?>
<div class="credenza-stateCaption"> <div class="credenza-stateCaption">
<h2>Идет сражение [7-21 уровни]</h2> <h2>Идет сражение [7-21 уровни]</h2>
<br/><a href="/logs.php?log=<?=$is_now['id']?>" target="_blank" style="text-align: center;">ход боя »»</a> <br/><a href="/logs.php?log=<?= $is_now['id'] ?>" target="_blank" style="text-align: center;">ход
боя »»</a>
</div> </div>
<table border="0" cellpadding="0" cellspacing="0" width="100%"> <table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody> <tbody>
@ -252,6 +247,4 @@ if (isset($_GET['append'])) {
</div> </div>
</div> </div>
</div> </div>
<? if (!empty($error)) err($error); ?> <?= $error ?>
</body>
</html>