public function __construct() { if (empty($_SESSION['right_enter'])) { header('location:./'); exit; } parent::__construct(); }