blob: 851f41233baa679ec422c55ea9a0c7af9de802c8 [file] [log] [blame]
Andreu0d72bd62019-09-17 23:31:14 +02001<?php
Andreuabbcb7e2019-09-21 18:22:14 +02002 require 'utils.php';
Andreuefe66eb2019-09-21 18:41:49 +02003
Andreu09b8b052019-09-21 21:47:20 +02004 // Set the 'user' POST and COOKIE variable
5 if (isset($_POST['user'])) {
6 setcookie('user', $_POST['user'], time() + (86400 * 10), "/");
7 } else if (isset($_COOKIE['user']) && !isset($_POST['user'])) {
8 $_POST['user'] = $_COOKIE['user'];
9 } else if (!isset($_COOKIE['user']) && !isset($_POST['user'])) {
10 header("Location: ./index.php");
11 die();
12 }
13
14 header("Location: ../main.php");
Andreu0d72bd62019-09-17 23:31:14 +020015?>