<?php function checkAdmin() { if(!isset($_SESSION['admin_password'])){ header("Location: /admin/index.php"); exit(); } } ?>