Location: PHPKode > projects > Graphical Botanical Database Management > xgbdmt_alpha_4_single/Size_detailspreview.php
<?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/Size_variables.php");


$conn=db_connect(); 
$recordsCounter = 0;

//	process masterkey value
$mastertable=postvalue("mastertable");
if($mastertable!="")
{
	$_SESSION[$strTableName."_mastertable"]=$mastertable;
//	copy keys to session
	$i=1;
	while(isset($_REQUEST["masterkey".$i]))
	{
		$_SESSION[$strTableName."_masterkey".$i]=$_REQUEST["masterkey".$i];
		$i++;
	}
	if(isset($_SESSION[$strTableName."_masterkey".$i]))
		unset($_SESSION[$strTableName."_masterkey".$i]);
}
else
	$mastertable=$_SESSION[$strTableName."_mastertable"];

//$strSQL = $gstrSQL;

if($mastertable=="Plants")
{
	$where ="";
		$where.= GetFullFieldName("Common_Name")."=".make_db_value("Common_Name",$_SESSION[$strTableName."_masterkey1"]);
}


$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>Size Week1</strong></td>";
	echo "<td><strong>Size week2</strong></td>";
	echo "<td><strong>Size Week3</strong></td>";
	echo "<td><strong>Size Week4</strong></td>";
	echo "<td><strong>Size Week5</strong></td>";
	echo "<td><strong>Size Week6</strong></td>";
	echo "<td><strong>Size Week7</strong></td>";
	echo "<td><strong>Size Week8</strong></td>";
	echo "<td><strong>Size Week9</strong></td>";
	echo "<td><strong>Size Week10</strong></td>";
	echo "<td><strong>Size Week11</strong></td>";
	echo "<td><strong>Size Week12</strong></td>";
	echo "<td><strong>Size Week13</strong></td>";
	echo "<td><strong>Size Week14</strong></td>";
	echo "<td><strong>Size Week15</strong></td>";
	echo "<td><strong>Size Week16</strong></td>";
	echo "<td><strong>Size Week17</strong></td>";
	echo "<td><strong>Size Week18</strong></td>";
	echo "<td><strong>Size Week19</strong></td>";
	echo "<td><strong>Size Week20</strong></td>";
	echo "<td><strong>Size Week21</strong></td>";
	echo "<td><strong>Size Week22</strong></td>";
	echo "<td><strong>Size Week23</strong></td>";
	echo "<td><strong>Size Week24</strong></td>";
	echo "<td><strong>Size Week25</strong></td>";
	echo "<td><strong>Size Week26</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>";
	//	Size_Week1 - HTML
		    $value="";
				$value = GetData($data,"Size_Week1", "HTML");
			echo "<td>".$value."</td>";
	//	Size_week2 - HTML
		    $value="";
				$value = GetData($data,"Size_week2", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week3 - HTML
		    $value="";
				$value = GetData($data,"Size_Week3", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week4 - HTML
		    $value="";
				$value = GetData($data,"Size_Week4", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week5 - HTML
		    $value="";
				$value = GetData($data,"Size_Week5", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week6 - HTML
		    $value="";
				$value = GetData($data,"Size_Week6", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week7 - HTML
		    $value="";
				$value = GetData($data,"Size_Week7", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week8 - HTML
		    $value="";
				$value = GetData($data,"Size_Week8", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week9 - HTML
		    $value="";
				$value = GetData($data,"Size_Week9", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week10 - HTML
		    $value="";
				$value = GetData($data,"Size_Week10", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week11 - HTML
		    $value="";
				$value = GetData($data,"Size_Week11", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week12 - HTML
		    $value="";
				$value = GetData($data,"Size_Week12", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week13 - HTML
		    $value="";
				$value = GetData($data,"Size_Week13", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week14 - HTML
		    $value="";
				$value = GetData($data,"Size_Week14", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week15 - HTML
		    $value="";
				$value = GetData($data,"Size_Week15", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week16 - HTML
		    $value="";
				$value = GetData($data,"Size_Week16", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week17 - HTML
		    $value="";
				$value = GetData($data,"Size_Week17", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week18 - HTML
		    $value="";
				$value = GetData($data,"Size_Week18", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week19 - HTML
		    $value="";
				$value = GetData($data,"Size_Week19", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week20 - HTML
		    $value="";
				$value = GetData($data,"Size_Week20", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week21 - HTML
		    $value="";
				$value = GetData($data,"Size_Week21", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week22 - HTML
		    $value="";
				$value = GetData($data,"Size_Week22", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week23 - HTML
		    $value="";
				$value = GetData($data,"Size_Week23", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week24 - HTML
		    $value="";
				$value = GetData($data,"Size_Week24", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week25 - HTML
		    $value="";
				$value = GetData($data,"Size_Week25", "HTML");
			echo "<td>".$value."</td>";
	//	Size_Week26 - HTML
		    $value="";
				$value = GetData($data,"Size_Week26", "HTML");
			echo "<td>".$value."</td>";
		echo "</tr>";
	}
	echo "</table>";
} else {
	echo "Details found".": <strong>".$rowcount."</strong>";
}

echo "counterSeparator".postvalue("counter");
?>
Return current item: Graphical Botanical Database Management