<?php
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
set_magic_quotes_runtime(0);
include("include/dbcommon.php");
include("include/Origin_variables.php");
$conn=db_connect();
$recordsCounter = 0;
//$strSQL = $gstrSQL;
$str = SecuritySQL("Search");
if(strlen($str))
$where.=" and ".$str;
$strSQL = gSQLWhere($where);
//$strSQL = AddWhere($strSQL,$where);
$strSQL.=" ".$gstrOrderBy;
$rowcount=gSQLRowCount($where);
if ( $rowcount ) {
$rs=db_query($strSQL,$conn);
echo "Details found".": <strong>".$rowcount."</strong>";
echo ( $rowcount > 10 ) ? ". Displaying first: <strong>10</strong>.<br /><br />" : "<br /><br />";
echo "<table cellpadding=1 cellspacing=1 border=0 align=left class=\"detailtable\"><tr>";
echo "<td><strong>Plant ID</strong></td>";
echo "<td><strong>Common Name</strong></td>";
echo "<td><strong>Seed Stock ID</strong></td>";
echo "<td><strong>Clone ID Number</strong></td>";
echo "<td><strong>Clone Mother ID Number</strong></td>";
echo "<td><strong>Reproduced Seed ID</strong></td>";
echo "<td><strong>Male Specimen Plant ID Number</strong></td>";
echo "<td><strong>Generation</strong></td>";
echo "<td><strong>Seed Stock Decription</strong></td>";
echo "<td><strong>This Plants Source Product</strong></td>";
echo "</tr>";
while ($data = db_fetch_array($rs)) {
$recordsCounter++;
if ( $recordsCounter > 10 ) { break; }
echo "<tr>";
$keylink="";
$keylink.="&key1=".htmlspecialchars(rawurlencode($data["PlantsID"]));
// PlantsID -
$value="";
$value = ProcessLargeText(GetData($data,"PlantsID", ""),"field=PlantsID".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Common_Name -
$value="";
$value = ProcessLargeText(GetData($data,"Common_Name", ""),"field=Common%5FName".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Seed_Stock_ID -
$value="";
$value = ProcessLargeText(GetData($data,"Seed_Stock_ID", ""),"field=Seed%5FStock%5FID".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Clone_ID_Number -
$value="";
$value = ProcessLargeText(GetData($data,"Clone_ID_Number", ""),"field=Clone%5FID%5FNumber".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Clone_Mother_ID_Number -
$value="";
$value = ProcessLargeText(GetData($data,"Clone_Mother_ID_Number", ""),"field=Clone%5FMother%5FID%5FNumber".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Reproduced_Seed_ID -
$value="";
$value = ProcessLargeText(GetData($data,"Reproduced_Seed_ID", ""),"field=Reproduced%5FSeed%5FID".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Male_Specimen_Plant_ID_Number -
$value="";
$value = ProcessLargeText(GetData($data,"Male_Specimen_Plant_ID_Number", ""),"field=Male%5FSpecimen%5FPlant%5FID%5FNumber".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Generation -
$value="";
$value = ProcessLargeText(GetData($data,"Generation", ""),"field=Generation".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// Seed_Stock_Decription -
$value="";
$value = ProcessLargeText(GetData($data,"Seed_Stock_Decription", ""),"field=Seed%5FStock%5FDecription".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
// This_Plants_Source_Product -
$value="";
$value = ProcessLargeText(GetData($data,"This_Plants_Source_Product", ""),"field=This%5FPlants%5FSource%5FProduct".$keylink,"",MODE_PRINT);
echo "<td>".$value."</td>";
echo "</tr>";
}
echo "</table>";
} else {
echo "Details found".": <strong>".$rowcount."</strong>";
}
echo "counterSeparator".postvalue("counter");
?>