<?php
$authOK                             = security::checkAuth($_SESSION[ALLOW]);

if ($authOK                         == 0) {
  echo '<meta http-equiv="refresh" content="0; URL=' . HOME_DIR_HTML . TEMPLATE_DIR . '/Auth/access-denied.php">';
  exit();
}

if ($belongToUser                   == 1) {
  $checkTom                         = security::checkBelongToUser($_GET['id']);
  if ($checkTom                     == 0) {
    echo '<meta http-equiv="refresh" content="0; URL=' . HOME_DIR_HTML . TEMPLATE_DIR . '/Auth/access-denied.php">';
    exit();
  }
}

if ($area                           == 'ADMINS') {
  if ($_SESSION['role']             >= 2) {
    echo '<meta http-equiv="refresh" content="0; URL=' . HOME_DIR_HTML . TEMPLATE_DIR . '/Auth/access-denied.php">';
    exit();
  }
}

