<?
function only_reg()
{
global $user;
if (!isset($user)) {
header("Location: /");
exit;
}
}
function only_unreg()
{
global $user;
if (isset($user)){
header("Location: /");
exit;
}
}
function access($access = 0){
global $user;
if($user['access'] < $access) header('Location: /main');
}
?>