Location: PHPKode > projects > TestCentral > TC_Server_V0.0.02/TestResultsHTML.php
<?php

	require_once("mysql-1.2.php");
	require_once("config.php");
	require_once("Utils_0.01.php");
	

	echo "<table><tr><td>";

		// Clear Filter
	echo "<Table border=1>";
	echo "<form action=\"".$_SERVER["REQUEST_URI"]."\" method=\"post\">";
	echo "<input type=\"hidden\" name=\"Filter\" value=\"\">";
	echo "<tr><td>";
	echo "<INPUT type=\"submit\" value=\"Clear Filter\">";
	echo "</tr></td>";
	echo "</form>";
	echo "</Table>";
	
	echo "</td><td>";

		//ExecutedOn
	$dbarry['table']="TestResult";
	
	$RawSQL = "select distinct ExecutedOn from TestResult";
	
	$result = sendsql($dbarry, $RawSQL);
	
		//	print_r($result);
	Array2DropdownFilter($result);
	
	echo "</td><td>";

		//TestName
	$dbarry['table']="TestResult";

	$RawSQL = "select distinct TestName from TestResult";
	
	$result = sendsql($dbarry, $RawSQL);
	
//	print_r($result);
	Array2DropdownFilter($result);
	
	echo "</td><td>";
	
		// TimingName
	$RawSQL = "select distinct TimingName from TestResult";
	
	$result = sendsql($dbarry, $RawSQL);
	
//	print_r($result);
	Array2DropdownFilter($result);
	
	echo "</td></tr></table>";
	
		// Display Table
	$RawSQL = "select * from TestResult tr ";
	$RawSQL .= "where tr.Index > 0 "; // This is a nothing requirement as all items meet this requirement. It is here to simplify the code below
	
	
	if (isset($_REQUEST["Filter"]))
	{
			// echo "Filter: '".$_REQUEST["Filter"]."'";
		$filterstring = $_REQUEST["Filter"];
			//echo "$filterstring";
		$filterArr = explode("|", $filterstring);
			// print_r($filterArr);
		foreach ($filterArr as $filteri)
		{
			if (strlen($filteri)>1)
			{
					// $SubFilterArr = explode(",", $filteri);
				$RawSQL .= "and ".stripslashes($filteri);				
			}
		}
	}
	
		// echo "$RawSQL<br>";
	
	$result = sendsql($dbarry, $RawSQL);
	
	Array2HTMLTable($result);
	
		//print_r($result);
		// $retString .= "<Saved>$Saved</Saved>";
	

?>
Return current item: TestCentral