if ($_POST["DateNeededStart"] > $_POST["DateNeededEnd"]) { $error_msg = "Invalid Need By Date. Need By End must be after Need By Start."; $_SESSION["ERROR"] = $error_msg; JumpToPage("pages/wo_sort_advanced.php"); } else { if ($_POST["DateCreatedStart"] > $_POST["DateCreatedEnd"]) { $error_msg = "Invalid DateCreated. Created End must be after Created Start."; $_SESSION["ERROR"] = $error_msg; JumpToPage("pages/wo_sort_advanced.php"); } else { unset($_SESSION["ERROR"]); } } /*store input in SESSION so it can still be accessed after redirected to GET */ $_SESSION["FILTERS"] = $_POST; JumpToPage("pages/wo_sort_advanced.php"); } if ($_SERVER["REQUEST_METHOD"] == "GET") { if (isset($_SESSION["FILTERS"])) { $view = $_SESSION["FILTERS"]["View"]; $priority = $_SESSION["FILTERS"]["Priority"]; $receiver = $_SESSION["FILTERS"]["ReceivingTeam"]; $title = $_SESSION["FILTERS"]["Title"]; $requestor = $_SESSION["FILTERS"]["RequestingTeam"]; $author = $_SESSION["FILTERS"]["Author"]; $project = $_SESSION["FILTERS"]["Project"]; $studentAssigned = $_SESSION["FILTERS"]["StudentAssigned"]; $createdStart = $_SESSION["FILTERS"]["DateCreatedStart"]; $createdEnd = $_SESSION["FILTERS"]["DateCreatedEnd"]; $needByStart = $_SESSION["FILTERS"]["DateNeededStart"]; $needByEnd = $_SESSION["FILTERS"]["DateNeededEnd"];
$_POST['Author'] = ""; $_POST['Project'] = ""; $_POST['StudentAssigned'] = ""; $_POST['DateCreatedStart'] = ""; $_POST['DateCreatedEnd'] = ""; $_POST['DateNeededStart'] = ""; $_POST["DateNeededEnd"] = ""; $_POST['Approved'] = ""; $_POST['ApprovedByCap'] = ""; $_POST['Assigned'] = ""; $_POST['Finished'] = ""; $_POST['Closed'] = ""; /*store input in SESSION so it can still be accessed after redirected to GET */ $_SESSION["FILTERS"] = $_POST; /*this allows users to return to page via 'back' */ JumpToPage("pages/findlist_simple.php"); } if ($_SERVER["REQUEST_METHOD"] == "GET") { /*access values stored in session */ if (isset($_SESSION["FILTERS"])) { $view = $_SESSION["FILTERS"]["View"]; $priority = $_SESSION["FILTERS"]["Priority"]; $receiver = $_SESSION["FILTERS"]["ReceivingTeam"]; $filters = $_SESSION["FILTERS"]; } else { $view = "simple"; $priority = ""; $receiver = ""; $filters = array("View" => "simple", "Priority" => "", "ReceivingTeam" => ""); } /* lib function that returns filtering SQL Query */
<?php // -------------------------------------------------------------------- // badges.php -- The main badges page. // // Created: 12/30/14 DLB // -------------------------------------------------------------------- require_once "libs/all.php"; session_start(); log_page(); CheckLogin(); CheckEditor(); $loc = 'badges.php'; $timer = new Timer(); JumpToPage("badges_showall.php"); include "forms/header.php"; include "forms/navform.php"; include "forms/badges_menubar.php"; echo '<div class="content_area">'; echo '<h2>Badges</h2>'; echo '<p>Use links above to work with the badges.</p>'; echo '</div>'; include "forms/footer.php";
<?php // -------------------------------------------------------------------- // wo_setworkder.php -- // // Created: ?? // -------------------------------------------------------------------- session_start(); require_once '../maindef.php'; $loc = rmabs(__FILE__); //JumpToPage("workorders_thisuser.php"); if (isset($_POST['userid'])) { // && // $_POST['completed'] == 'Yes') //{ log_msg($loc, array("User assigned! for Work Order ID =" . $_SESSION["WorkOrderID"])); $WorkOrderID = $_SESSION["WorkOrderID"]; $userid = $_SESSION["UserID"]; $success_msg = 'Work Order ' . $WorkOrderID . ' completed.'; $sql = 'UPDATE WorkOrders SET AssignedTo ="' . $userid . '" WHERE WorkOrderID = "' . $WorkOrderID . '";'; $result = SqlQuery($loc, $sql); echo "Worker " . $_SESSION["WorkOrderID"] . " Completed"; JumpToPage("workorders_thisuser.php"); }
<?php // -------------------------------------------------------------------- // logout.php -- Impements the logout page. // // Created: 12/29/14 DLB // -------------------------------------------------------------------- require "libs/all.php"; session_start(); log_page(); if (IsMasquerading()) { $olduser = GetMasquerader(); log_msg("logout.php", "Masquerade session is over."); session_unset(); session_destroy(); session_start(); if (!empty($olduser)) { log_msg("logout.php", "Attempting to re-login as " . $olduser); $okay = StartLogin($olduser, "", true); if ($okay) { JumpToPage("welcome.php"); } } } else { log_msg("logout.php", "User " . UserLastFirstName() . " is Logging Out."); } session_unset(); session_destroy(); include "forms/header.php"; include "forms/logoutmsg.php"; include "forms/footer.php";
// -------------------------------------------------------------------- // logout.php -- Impements the logout page. // // Created: 12/29/14 DLB // -------------------------------------------------------------------- require "../maindef.php"; $loc = rmabs(__FILE__); session_start(); log_page(); if (IsMasquerading()) { $olduser = GetMasquerader(); log_msg("logout.php", "Masquerade session is over."); session_unset(); session_destroy(); session_start(); if (!empty($olduser)) { log_msg("logout.php", "Attempting to re-login as " . $olduser); $okay = StartLogin($olduser, "", true); if ($okay) { JumpToPage("pages/welcome.php"); } } } else { log_msg("logout.php", "User " . UserLastFirstName() . " is Logging Out."); } session_unset(); session_destroy(); include "forms/header.php"; include "forms/logoutmsg.php"; include "forms/footer.php";
// workorder_selectipt.php -- // // Created: 12/29/14 DLB // -------------------------------------------------------------------- require_once "libs/all.php"; session_start(); log_page(); CheckLogin(); CheckAdmin(); $timer = new timer(); $loc = 'workorders_selectipt.php'; $error_msg = ""; $success_msg = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (!empty($_POST["RequestingIPTGroup"])) { $IPTGroup = $_POST["RequestingIPTGroup"]; } JumpToPage("workorders_listipts.php?IPTGroup=" . $IPTGroup); if (empty($_POST["RequestingIPTGroup"])) { DieWithMsg($loc, "Bad Page Invoke. No IPTGroup given."); } } GenerateHtml: include "forms/header.php"; include "forms/navform.php"; include "forms/workorders_menubar.php"; include "forms/workorders_selectipt_form.php"; include "forms/footer.php"; ?>
<?php // -------------------------------------------------------------- // index.php -- Default entry page into Epic Admin website. // // Created: 12/29/14 DLB // -------------------------------------------------------------------- require_once "libs/all.php"; session_start(); log_page(); if (IsLoggedIn()) { JumpToPage("welcome.php"); } else { JumpToPage("login.php"); } DieWithMsg("index.php", "Unreachable code reached!");
<?php // -------------------------------------------------------------------- // index.php -- Default entry page into Epic Admin website. // // Created: 12/29/14 DLB // -------------------------------------------------------------------- require_once "maindef.php"; session_start(); log_page(); if (IsLoggedIn()) { JumpToPage("pages/welcome.php"); } else { JumpToPage("pages/login.php"); }
<?php // -------------------------------------------------------------------- // members.php -- The main members page. // // Created: 12/30/14 DLB // -------------------------------------------------------------------- require_once "config.php"; require_once "libs/all.php"; session_start(); log_page(); CheckLogin(); CheckEditor(); $loc = 'members.php'; JumpToPage("members_listpics.php"); include "forms/header.php"; include "forms/navform.php"; include "forms/members_menubar.php"; echo '<div class="content_area">'; echo '<h2>Management of Team Members</h2>'; echo '<p>Use the links above to accomplish various management tasks.</p>'; echo '</div>'; include "forms/footer.php";
goto GenerateHtml; } $wo = GetWO(intval($wid), true); if (!$wo) { $widstr = sprintf("W%04d", intval($wid)); $error_msg = "Work Order " . $widstr . ' not found.'; goto GenerateHtml; } if ($wo["Active"] == 0) { $widstr = sprintf("W%04d", intval($wid)); $error_msg = "Work Order " . $widstr . ' has been archived. It must be resurrected by a captain before it can be viewed.'; goto GenerateHtml; } $d = array(); $d["wid"] = intval($wid); JumpToPage("pages/wo_display.php", $d); } GenerateHtml: $stylesheet = array("../css/global.css", "../css/nav.css", "../css/wo_lookup.css"); include "forms/header.php"; include "forms/nav_form.php"; include "forms/wo_lookup_form.php"; include "forms/footer.php"; function checkdigits($d) { $digits = "0123456789"; $n = strlen($d); for ($i = 0; $i < $n; $i++) { $c = $d[$i]; if (strpos($digits, $c) === false) { return false;
if ($_POST["DateNeededStart"] > $_POST["DateNeededEnd"]) { $error_msg = "Invalid Need By Date. Need By End must be after Need By Start."; $_SESSION["ERROR"] = $error_msg; JumpToPage("pages/findlist_advanced.php"); } else { if ($_POST["DateCreatedStart"] > $_POST["DateCreatedEnd"]) { $error_msg = "Invalid DateCreated. Created End must be after Created Start."; $_SESSION["ERROR"] = $error_msg; JumpToPage("pages/findlist_advanced.php"); } else { unset($_SESSION["ERROR"]); } } /*store input in SESSION so it can still be accessed after redirected to GET */ $_SESSION["FILTERS"] = $_POST; JumpToPage("pages/findlist_advanced.php"); } if ($_SERVER["REQUEST_METHOD"] == "GET") { if (isset($_SESSION["FILTERS"])) { /*initialize variables*/ $view = $_SESSION["FILTERS"]["View"]; $priority = $_SESSION["FILTERS"]["Priority"]; $receiver = $_SESSION["FILTERS"]["ReceivingTeam"]; $title = $_SESSION["FILTERS"]["Title"]; $requestor = $_SESSION["FILTERS"]["RequestingTeam"]; $author = $_SESSION["FILTERS"]["Author"]; $project = $_SESSION["FILTERS"]["Project"]; $studentAssigned = $_SESSION["FILTERS"]["StudentAssigned"]; $createdStart = $_SESSION["FILTERS"]["DateCreatedStart"]; $createdEnd = $_SESSION["FILTERS"]["DateCreatedEnd"]; $needByStart = $_SESSION["FILTERS"]["DateNeededStart"];