<?php session_start(); // set the root for initial file locations $_root = '..'; // load file locations require $_root . '/Code/pathfinder.class.php'; $_PATH = new Pathfinder(); // load configs require $_PATH->get('Parse'); $_CONFIG = Parse::fromConfig($_PATH->get('Config'), true); // load custom functions require $_PATH->get('Custom Functions'); require 'loginFunctions.php'; // declaring admin for first login if (!isset($_SESSION['admin'])) { $_SESSION['admin'] = array(); } $admin =& $_SESSION['admin']; // scanning for available tools require 'toolsFunctions.php'; $tools = getTools(); // return array of tools if (isset($_POST['tool'])) { // if they are asking for a tool if (isset($tools[$_POST['tool']])) { // if the tool being asked for exists $admin['tool'] = $_POST['tool']; // save tool selection $admin['heading'] = $_POST['tool']; }