<?php
function admin(){
global $user;
if($user[prava] < 5)header('Location: /');
}
function admin_forum(){
global $user;
if($user[prava] < 5)header('Location: /forum');
}  
function moder(){
global $user;
if($user[prava] < 4)header('Location: /');
}
function moder_forum(){
global $user;
if($user[prava] < 4)header('Location: /forum');
}
?>