<?php require_once '../class_lib.php'; require_once 'functions.php'; require_once 'NewsAdmin.php'; $admin = new NewsAdmin(); if ($admin->activateLogin()) { //Redirect to appropriate page if not PRO or webmaster switch ($admin->getAdminType()) { case Admin::WEBMASTER: case Admin::PRO: //Do not break; case Admin::LIBRARIAN: header("location: ../librarian"); break; case Admin::TREASURER: header("location: ../treasurer"); break; case Admin::CLASS_REP: header("location: ../class_rep"); break; default: $admin->logoutAdmin(); break; } //Set page number $page = filter_input(INPUT_GET, "p"); if (empty($page)) { $page = 1; }