Location: PHPKode > projects > Graphical Botanical Database Management > xgbdmt_alpha_4_single/Notes_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/Notes_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>Decription Of Growth Process</strong></td>";
	echo "<td><strong>Referance Book Comments And Notations</strong></td>";
	echo "<td><strong>Suggestions And Comments For Next Generations</strong></td>";
	echo "<td><strong>calander notes</strong></td>";
	echo "<td><strong>Notes</strong></td>";
	echo "<td><strong>Comments</strong></td>";
	echo "<td><strong>Recommendations</strong></td>";
	echo "<td><strong>Objectives</strong></td>";
	echo "<td><strong>Conclusion</strong></td>";
	echo "<td><strong>Subjects Not Otherwise Covered</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>";
	//	Decription_Of_Growth_Process - HTML
		    $value="";
				$value = GetData($data,"Decription_Of_Growth_Process", "HTML");
			echo "<td>".$value."</td>";
	//	Referance_Book_Comments_And_Notations - HTML
		    $value="";
				$value = GetData($data,"Referance_Book_Comments_And_Notations", "HTML");
			echo "<td>".$value."</td>";
	//	Suggestions_And_Comments_For_Next_Generations - HTML
		    $value="";
				$value = GetData($data,"Suggestions_And_Comments_For_Next_Generations", "HTML");
			echo "<td>".$value."</td>";
	//	calander_notes - HTML
		    $value="";
				$value = GetData($data,"calander_notes", "HTML");
			echo "<td>".$value."</td>";
	//	Notes - HTML
		    $value="";
				$value = GetData($data,"Notes", "HTML");
			echo "<td>".$value."</td>";
	//	Comments - HTML
		    $value="";
				$value = GetData($data,"Comments", "HTML");
			echo "<td>".$value."</td>";
	//	Recommendations - HTML
		    $value="";
				$value = GetData($data,"Recommendations", "HTML");
			echo "<td>".$value."</td>";
	//	Objectives - HTML
		    $value="";
				$value = GetData($data,"Objectives", "HTML");
			echo "<td>".$value."</td>";
	//	Conclusion - HTML
		    $value="";
				$value = GetData($data,"Conclusion", "HTML");
			echo "<td>".$value."</td>";
	//	Subjects_Not__Otherwise_Covered - HTML
		    $value="";
				$value = GetData($data,"Subjects_Not__Otherwise_Covered", "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