load_page($pathname . '/content/index_top.html'); //This prints the top of the index_page to the buffer $top_page->output_page(); //Default action is loadPage if (!isset($_GET['action'])) { $_GET['action'] = 'loadPage'; } //Default page to load is home if (!isset($_GET['pageName'])) { $_GET['pageName'] = 'home'; } //Perform the requested action if ($_GET['action'] == "loadPage") //Action = Load Page { $pageName = $_GET['pageName']; if($pageName=="employee_login" && $_COOKIE["LoggedIn"]=="true") { $pageName="emp_home"; } elseif($pageName=="emp_home" && $_COOKIE["LoggedIn"]!="true") { $pageName="employee_login"; } elseif($pageName=="employee_schedules" && $_COOKIE["LoggedIn"]!="true") { $pageName="employee_login"; } elseif($pageName=="employee_timeoff" && $_COOKIE["LoggedIn"]!="true") { $pageName="employee_login"; } elseif($pageName=="employee_timeclock" && $_COOKIE["LoggedIn"]!="true") { $pageName="employee_login"; } $inner_page = new page; $inner_page->load_page($pathname . '/content/' . $pageName . '.html'); //This prints the html to the buffer $inner_page->output_page(); } elseif ($_GET['action'] == "track") //Action = Track { if ($_POST['ShipType'] == "UPS") { require_once($pathname . '/include/UPS_include.php'); Track_UPS(); } if ($_POST['ShipType'] == "USPS") { require_once($pathname . '/include/USPS_include.php'); Track_USPS(); } if ($_POST['ShipType'] == "FEDEX") { require_once($pathname . '/include/FedEx_include.php'); Track_FedEx(); } if ($_POST['ShipType'] == "DHL") { require_once($pathname . '/include/DHL_include.php'); Track_DHL(); } } elseif ($_GET['action'] == "trackLink") //Action = TrackLink { if ($_GET['ShipType'] == "UPS") { require_once($pathname . '/include/UPS_include.php'); Track_UPS(); } if ($_GET['ShipType'] == "USPS") { require_once($pathname . '/include/USPS_include.php'); Track_USPS(); } if ($_GET['ShipType'] == "FEDEX") { require_once($pathname . '/include/FedEx_include.php'); Track_FedEx(); } if ($_GET['ShipType'] == "DHL") { require_once($pathname . '/include/DHL_include.php'); Track_DHL(); } } elseif ($_GET['action'] == "uploadFile") //Action = Upload File { require_once($pathname . '/include/upload.php'); UploadFile(); } elseif ($_GET['action'] == "sendQuote") //Action = Send Quote { require_once($pathname . '/include/sendQuote.php'); SendQuote(); } elseif ($_GET['action'] == "sendContactInfo") //Action = Send Contact Info { require_once($pathname . '/include/sendContactInfo.php'); SendContactInfo(); } elseif ($_GET['action'] == "sendTimeOffRequest") //Action = Send Timeoff Request { require_once($pathname . '/include/sendTimeOffRequest.php'); SendTimeOffRequest(); } elseif ($_GET['action'] == "sendTimeClockRequest") //Action = Send TimeClock Change Request { require_once($pathname . '/include/sendTimeclockChangeRequest.php'); SendTimeClockRequest(); } elseif ($_GET['action'] == "empLogin") //Action = Go to employee pages, login screen if not logged-in { require_once($pathname . '/include/login.php'); login(); } elseif ($_GET['action'] == "empLogOut") //Action = Logout as employee, and go to home page { require_once($pathname . '/include/login.php'); logout(); } elseif ($_GET['action'] == "sendChangePasswordRequest") //Action = Logout as employee, and go to home page { require_once($pathname . '/include/login.php'); changePassword(); } elseif ($_GET['action'] == "resetPasswordRequest") { require_once($pathname . '/include/login.php'); resetPassword(); } //Flush the output buffer ob_end_flush(); ?>
