<?phpfunction reg() {global $user;if(isset($user['id'])) header('Location: /index.php');}function only_reg() {global $user;if(!isset($user['id'])) header('Location: /index.php');}?>