summaryrefslogtreecommitdiffstats
path: root/common/admin/inc/auth.inc.php
blob: 0acf9344b8a9844633f88861f6a77f21c00a4622 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php

include dirname(__FILE__).'/pwd.inc.php';

if (!class_exists('Planet')) {
    require __DIR__.'/../../vendor/autoload.php';
}

if (!Planet::authenticateUser($_COOKIE['auth'], $password)) {
    setcookie('auth', '', time() - 3600);
    header('Location: login.php');
    die();
}