battles/new_year.php
2018-11-01 14:07:31 +02:00

34 lines
894 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
session_start();
if ($_SESSION['uid'] == null) header("Location: index.php");
include "config.php";
$user = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id` = '{$_SESSION['uid']}' LIMIT 1;"));
include "functions.php";
if ($user['room'] != 44) {
header("Location: main.php");
die();
}
if ($user['battle'] != 0) {
header('location: fbattle.php');
die();
}
$do_ng = 365 - date("z");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="css/main.css" rel="stylesheet"/>
<title>Новый год!</title>
</head>
<body>
<a href="/"> ← на главную</a>
<h1>Новый <?= date('Y') ?> Год</h1>
<div>
Совсем недавно мы праздновали начало <?= (date('Y') - 1) ?> года, а всего через <?= $do_ng ?> дней
наступит <?= date('Y') ?> год.
</div>
</body>
</html>