Documentation is available at person.php
- <?php
- /**************************************************************
- * This file is part of CompInaBox. *
- * Copyright 2001-2003. Eric D. Nielsen, All rights reserverd *
- * CompInaBox is availible for license under the GPL, see *
- * the COPYING file in the root directory of the install for *
- * the full terms of the GPL. *
- * *
- * *
- * File: index.php *
- * Type: Serveable Page *
- * Author: Eric D. Nielsen *
- * Description: Main result tracker page
- * Change Log: 4/23/03 -- created -- edn *
- ****************************************************************/
- // cib_header will setup $user if logged in, otherwise $user is unset
- // cib_header also establishes the database connection
- // cib_header does not create the CIB_Display object as many scripts
- // use this header as well as viewable pages
- include("include_others.inc");
- include("$CIB_CLASS_PATH/database/ResultsDB.inc");
- include("$CIB_CLASS_PATH/html-formatting/ResultDisplay.inc");
- $db = new ResultsDB($db->getDBName(), $db->getDBuser(), $db->getDBPass());
- $display = new ResultDisplay($db);
- $page = $display->beginPage("CompInaBox",
- "Result Tracker");
- if (!isset($_POST["personID"]) || $_POST["personID"]=="")
- {
- $lookupName=$_POST["name"]; // not sanitized yet
- $lookupName=str_replace(array("<",">"),array("",""),$lookupName);
- $personIDs = $db->getPeopleByName($lookupName);
- if (count($personIDs)==0)
- {
- $page .= <<<END_PAGE
- No matching people for $lookupName
- <form action="person.php" method="post">
- <input type="text" name="name" value="" \>
- <input type="submit" name="submit" value="Get Personal Results" \>
- </form>
- END_PAGE; }
- else if (count($personIDs)>1)
- {
- $personDetails = $db->getIdentificationByID($personIDs);
- $page .= $display->formatPersonChoice($personDetails);
- }
- else
- {
- $personID=$personIDs[0];
- localRedirect("Location: {$CIB_BASE_URL}results/summary/$personID");
- exit;
- }
- }
- // footer matter, OK to be below the fold
- $page .= $display->sectionBreak();
- $page .= $display->compinaboxBox();
- $page .= $display->endPage();
- echo $page;
- clean_up_session();
- ?>
Documentation generated on Tue, 25 Apr 2006 13:07:43 -0400 by phpDocumentor 1.3.0RC3