if (isset($_POST["division"]) && isset($_POST["queryItem"]) && isset($_POST["value"])) { $division = $_POST["division"]; $value = $_POST["value"]; $queryItem = $_POST["queryItem"]; if (isset($_POST["CheckBox"])) { $queryFields = "ALL"; $colNames = $reportFields; } else { if (isset($_POST["QueryFields"])) { $queryFields = $_POST["QueryFields"]; $colNames = $queryFields; } else { header("location:validate.php?status=NoQueryFields"); } } $data = getValidationData($division, $queryItem, $value, $queryFields); $headerMessage = "Validate Data"; if (!$data) { header("location:validate.php?status=NoRecords"); } ?> <div class="bootstrap"> <table id="" class="table table table-condensed table-striped table-bordered"> <tr> <?php //print the header foreach ($colNames as $colName) { $column = substr($colName, 2); echo "<th>{$column}</th>"; }
//printPDF.php ends //search.php starts case 'getlayertablename': require_once("search.php"); $q=$_GET['layername']; $layer_names="'"; $layer_names.=str_replace(",", "','", $q); $layer_names.="'"; $result=getLayerTablenames($layer_names); print $result; break; case 'validation': require_once("search.php"); $result=getValidationData(); print $result; break; case 'getFeaturesForTimeLine': require_once("search.php"); $layer_tablename=$_REQUEST['layer_tablename']; $tlCol=$_REQUEST['tlCol']; $tlStartDate=$_REQUEST['tlStartDate']; $tlEndDate=$_REQUEST['tlEndDate']; $BBOX=$_REQUEST['BBOX']; $result=getFeaturesForTimeLine($layer_tablename, $tlCol, $tlStartDate, $tlEndDate, $BBOX); print $result; break; //search.php ends
function getValidationTable($division, $queryItem, $item) { $results = getValidationData($division, $queryItem, $item); $tableResults = array(); foreach ($results as $result) { foreach ($result as $key => $value) { $tableItem = '<tr><td>' . $value . '</td></tr>'; array_push($tableResults, $tableItem); } } return $tableResults; }