require_once("DAAHLDataConn.php");
require_once("LookupFunctions.php");
require_once("settings.php");
require_once("header2.php");
$fullPath = "http://" . $_SERVER['SERVER_NAME'] . "/DAAHL";
$user = $_SERVER['PHP_AUTH_USER'];
$brdrcolor = '#800000';
$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
if (isset($_GET['bareQuery'])) { $bareQuery = _INPUT('bareQuery'); }
if (isset($_POST['bareQuery'])) { $bareQuery = _INPUT('bareQuery'); }
$bareQuery=StripAllSlashes($bareQuery);
if (isset($_GET['where'])) { $where = _INPUT('where'); }
if (isset($_POST['where'])) { $where = _INPUT('where'); }
$where=StripAllSlashes($where);
// echo "bareQuery = $bareQuery
\n";
// echo "Where = $where
\n";
if (isset($_POST['ProjId'])) { $ProjId = _INPUT('ProjId'); }
if (isset($_GET['ProjId'])) { $ProjId = _INPUT('ProjId'); }
$sortby = _INPUT('sortby');
if ($sortby!=""):
$sorted = " order by $sortby ";
else : // Note: replace the primary key with a different default sort field name if desired...
$sorted = " order by ProjName ";
$sortby = "ProjName";
endif;
if (strlen($bareQuery)==0) :
$bareQuery = "SELECT ProjId,ProjName,PrincipleInvestigator,ProjectType FROM projects ";
$Title = "Records in Projects Table: ";
if (!is_null($ProjId)) :
$where = " Where ProjId = '$ProjId'";
$Title .= $where;
endif;
endif;
$queryall = $bareQuery.$where.$sorted;
// echo "Query=$queryall
\n";
$resultall = MYSQL_QUERY($queryall);
$numberall = mysql_Numrows($resultall);
// The next line loads a generic display loop for the table...
$a = "all of the";
require_once("DaahlProjectsListDisplay.php");
// Create the buttons at the bottom of the form...
$o .= "