<?php 

define('H', $_SERVER['DOCUMENT_ROOT'] . '/');

require H.'sys/inc/start.php';
require H.'sys/inc/sess.php';
require H.'sys/inc/settings.php';
require H.'sys/inc/db_connect.php';
require H.'sys/inc/ipua.php';
require H.'sys/inc/fnc.php';

require 'config.php';

require H.'sys/inc/user.php';
//only_reg();

if (isset($_GET['id'])) {
  $ID = (int) $_GET['id'];
} else {
  $ID = 0;
}

if (isset($_GET['func']) && preg_match('#^([A-z0-9\.]+)$#i', $_GET['func'])) {
  if (is_file('inc/' . $_GET['func'] . '.php')) {
    $func = $_GET['func'];
  }
}

require 'inc/' . $func . '.php';

require H.'sys/inc/tfoot.php';