<?php
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
set_magic_quotes_runtime(0);
include("include/dbcommon.php");
include("include/Logs_variables.php");
$filename="";
$message="";
//connect database
$conn = db_connect();
// Before Process event
if(function_exists("BeforeProcessView"))
BeforeProcessView($conn);
$keys=array();
$keys["PlantsID"]=postvalue("editid1");
// get current values and show edit controls
$strWhereClause = KeyWhere($keys);
$strSQL=gSQLWhere($strWhereClause);
$strSQLbak = $strSQL;
if(function_exists("BeforeQueryView"))
BeforeQueryView($strSQL,$strWhereClause);
if($strSQLbak == $strSQL)
$strSQL=gSQLWhere($strWhereClause);
LogInfo($strSQL);
$rs=db_query($strSQL,$conn);
$data=db_fetch_array($rs);
include('libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->assign("show_key1", htmlspecialchars(GetData($data,"PlantsID", "")));
$keylink="";
$keylink.="&key1=".htmlspecialchars(rawurlencode($data["PlantsID"]));
////////////////////////////////////////////
// PlantsID -
$value="";
$value = ProcessLargeText(GetData($data,"PlantsID", ""),"","",MODE_VIEW);
$smarty->assign("show_PlantsID",$value);
////////////////////////////////////////////
// Common_Name -
$value="";
$value = ProcessLargeText(GetData($data,"Common_Name", ""),"","",MODE_VIEW);
$smarty->assign("show_Common_Name",$value);
////////////////////////////////////////////
// Temprature_Log - HTML
$value="";
$value = GetData($data,"Temprature_Log", "HTML");
$smarty->assign("show_Temprature_Log",$value);
////////////////////////////////////////////
// Reproduction_Log - HTML
$value="";
$value = GetData($data,"Reproduction_Log", "HTML");
$smarty->assign("show_Reproduction_Log",$value);
////////////////////////////////////////////
// Plant_Distress_Log - HTML
$value="";
$value = GetData($data,"Plant_Distress_Log", "HTML");
$smarty->assign("show_Plant_Distress_Log",$value);
////////////////////////////////////////////
// Plant_Distress_Treatment_Log - HTML
$value="";
$value = GetData($data,"Plant_Distress_Treatment_Log", "HTML");
$smarty->assign("show_Plant_Distress_Treatment_Log",$value);
////////////////////////////////////////////
// Pest_Log - HTML
$value="";
$value = GetData($data,"Pest_Log", "HTML");
$smarty->assign("show_Pest_Log",$value);
////////////////////////////////////////////
// Lighting_Log - HTML
$value="";
$value = GetData($data,"Lighting_Log", "HTML");
$smarty->assign("show_Lighting_Log",$value);
////////////////////////////////////////////
// Fertilizer_Log - HTML
$value="";
$value = GetData($data,"Fertilizer_Log", "HTML");
$smarty->assign("show_Fertilizer_Log",$value);
////////////////////////////////////////////
// Soil_Log - HTML
$value="";
$value = GetData($data,"Soil_Log", "HTML");
$smarty->assign("show_Soil_Log",$value);
////////////////////////////////////////////
// PH_Log - HTML
$value="";
$value = GetData($data,"PH_Log", "HTML");
$smarty->assign("show_PH_Log",$value);
////////////////////////////////////////////
// Disolved_Solids_Test_Log - HTML
$value="";
$value = GetData($data,"Disolved_Solids_Test_Log", "HTML");
$smarty->assign("show_Disolved_Solids_Test_Log",$value);
////////////////////////////////////////////
// Clone_Log - HTML
$value="";
$value = GetData($data,"Clone_Log", "HTML");
$smarty->assign("show_Clone_Log",$value);
$templatefile = "Logs_view.htm";
if(function_exists("BeforeShowView"))
BeforeShowView($smarty,$templatefile,$data);
$smarty->display($templatefile);
?>