";
if($_SESSION['ltag']=='kan_' || $_SESSION['ltag']=='hin_' || $_SESSION['ltag']=='mar_' || $_SESSION['ltag']=='tel_' || $_SESSION['ltag']=='ben_' || $_SESSION['ltag']=='tam_' || $_SESSION['ltag']=='mal_') {
//print "".stripslashes($rs['genus'])." | ";
//print "".stripslashes($rs['species'])." | ";
if($rs['wild']=='Y')
{
$ArrGenusDisp=unserialize(stripslashes($rs['genus']));
$ArrSpeciesDisp=unserialize(stripslashes($rs['species']));
$ArrDescDisp=unserialize(stripslashes($rs['description']));
$ArrGrowDisp=unserialize(stripslashes($rs['grow']));
$ArrRegimeDisp=unserialize(stripslashes($rs['regime']));
$ArrPartsDisp=unserialize(stripslashes($rs['parts_used']));
$ArrCollDisp=unserialize(stripslashes($rs['collection']));
print "".utf8_encode($ArrGenusDisp[1]." ".$ArrSpeciesDisp[1])." | ";
print "".substr(utf8_encode($ArrDescDisp[1]), 0, 50)."... | ";
print "".substr(utf8_encode($ArrGrowDisp[1]), 0, 50)."... | ";
print "".substr(utf8_encode($ArrRegimeDisp[1]), 0, 50)."... | ";
print "".utf8_encode($ArrPartsDisp[1])."... | ";
print "".substr(utf8_encode($ArrCollDisp[1]), 0, 50)."... | ";
}
else
{
$ShowGenus=utf8_encode(stripslashes($rs['genus']));
$ShowSpecies=utf8_encode(stripslashes($rs['species']));
$ShowDescription=utf8_encode(stripslashes($rs['description']));
$ShowGrow=utf8_encode(stripslashes($rs['grow']));
$ShowRegime=utf8_encode(stripslashes($rs['regime']));
$ShowParts=utf8_encode(stripslashes($rs['parts_used']));
$ShowCollection=utf8_encode(stripslashes($rs['collection']));
if($_SESSION['ltag']=='ben_' || $_SESSION['ltag']=='mar_' || $_SESSION['ltag']=='hin_' || $_SESSION['ltag']=='tam_' || $_SESSION['ltag']=='tel_' || $_SESSION['ltag']=='mal_')
{
foreach($SubstitutionArray[$_SESSION['ltag']] as $rskey=>$rsval)
{
$ShowGenus=str_replace($rskey, $rsval, $ShowGenus);
$ShowSpecies=str_replace($rskey, $rsval, $ShowSpecies);
$ShowDescription=str_replace($rskey, $rsval,$ShowDescription);
$ShowGrow= str_replace($rskey, $rsval,$ShowGrow);
$ShowRegime=str_replace($rskey, $rsval,$ShowRegime);
$ShowParts= str_replace($rskey, $rsval,$ShowParts);
$ShowCollection= str_replace($rskey, $rsval,$ShowCollection);
}
}
print "".$ShowGenus." ".$ShowSpecies." | ";
print "".substr($ShowDescription, 0, 50)."... | ";
print "".substr($ShowGrow, 0, 50)."... | ";
print "".substr($ShowRegime, 0, 50)."... | ";
print "".$ShowParts."... | ";
print "".substr($ShowCollection, 0, 50)."... | ";
}
}else
{
if($rs['wild']=='Y')
{
$ArrGenusDisp=unserialize(stripslashes($rs['genus']));
$ArrSpeciesDisp=unserialize(stripslashes($rs['species']));
$ArrDescDisp=unserialize(stripslashes($rs['description']));
$ArrGrowDisp=unserialize(stripslashes($rs['grow']));
$ArrRegimeDisp=unserialize(stripslashes($rs['regime']));
$ArrPartsDisp=unserialize(stripslashes($rs['parts_used']));
$ArrCollDisp=unserialize(stripslashes($rs['collection']));
print "".$ArrGenusDisp[1]." ".$ArrSpeciesDisp[1]." | ";
print "".substr($ArrDescDisp[1], 0, 50)."... | ";
print "".substr($ArrGrowDisp[1], 0, 50)."... | ";
print "".substr($ArrRegimeDisp[1], 0, 50)."... | ";
print "".$ArrPartsDisp[1]."... | ";
print "".substr($ArrCollDisp[1], 0, 50)."... | ";
}
else
{
$new_genus=$rs['genus'];
$new_species=$rs['species'];
$new_description=$rs['description'];
$new_grow=$rs['grow'];
$new_regime=$rs['regime'];
$new_parts_used=$rs['parts_used'];
$new_collection=$rs['collection'];
print "".stripslashes($new_genus)." ".stripslashes($new_species)." | ";
//print "".stripslashes($rs['genus'])." | ";
//print "".stripslashes($rs['species'])." | ";
print "".stripslashes($new_description)."... | ";
print "".stripslashes($new_grow)."... | ";
print "".stripslashes($new_regime)."... | ";
print "".stripslashes($new_parts_used)."... | ";
print "".stripslashes($new_collection)."... | ";
}
}
//print "".stripslashes($rs['wild'])." | ";
//print "".stripslashes($rs['kitchen'])." | ";
//print "".stripslashes($rs['market'])." | ";
//print "Edit";
//print " | Edit";
//if( isset($_SESSION['auth_admin']) ) $lnk="Addedit_botmast.php?id=$rs[plant_id]";
//else if( !isset($_SESSION['auth_admin']) ) $lnk="login.php?actn=U&id=$rs[plant_id]";
if($_SESSION['auth_user']=="")
print " | Edit";
else
print " | Edit";
//check if recipe has a plant added to it.
//print " ".$_SESSION['ltag']." ";
// $rec_pl = mysql_query("SELECT * FROM ".$_SESSION['ltag']."rec_plant WHERE plant_id=$rs[plant_id]");
$rec_pl = mysql_query("SELECT * FROM rec_plant WHERE plant_id=$rs[plant_id]");
//check if plant has vernacular names added for it.
// $vnames = mysql_query("SELECT * FROM ".$_SESSION['ltag']."ver_names WHERE plant_id=$rs[plant_id]");
$vnames = mysql_query("SELECT * FROM ver_names WHERE plant_id=$rs[plant_id]");
//print " | ".mysql_num_rows($rec_pl)."&".mysql_num_rows($vnames);
if( ( mysql_num_rows($rec_pl) == 0) && ( mysql_num_rows($vnames) == 0) )
print " | Delete | ";
else
print "Delete | ";
//print "- $rec_cnt | ";
print "
";
}
}
print "