Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose. Author : Vijay Srinivas Email : vijay.srini@frlht.org */ $SubstitutionArray['ben_']=array("[tr]"=>"Œ", "[tt]"=>"Š", "[~jj]"=>"…²", "[nD]"=>"—", "[pt]"=>"›", "[ddh]"=>"Ž", "[ndh]"=>"™", "[Thy]"=>"œ", "[~jc]"=>"ƒ"); //!Used for Database storage of some of the Marathi Baraha Codes. /*!
Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose.
Author : Vijay Srinivas
Email : vijay.srini@frlht.org
*/ $SubstitutionArray['mar_']=array("[Dya]"=>"Ž"); //!Used for Database storage of some of the Hindi Baraha Codes. /*!
Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose.
Author : Vijay Srinivas
Email : vijay.srini@frlht.org
*/ $SubstitutionArray['hin_']=array("[kk]"=>"‚ü", "[~gG]"=>"†¡û", "[~g~g]"=>"ˆû", "[cc]"=>"Š", "[~gm]"=>"‰", "[~gk]"=>"ƒ¡û", "[~gK]"=>"„¡û", "[~gg]"=>"…¡û", "[Ty]"=>"š", "[ThTh]"=>"›û", "[Thy]"=>"œ", "[DG]"=>"†û", "[Dk]"=>"ƒû", "[DK]"=>"„û", "[Dg]"=>"…û", "[DD]"=>"Œû", "[Dy]"=>"Ž", "[Dhy]"=>"ž"); //!Used for Database storage of some of the Tamil Baraha Codes. /*!
Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose.
Author : Vijay Srinivas
Email : vijay.srini@frlht.org
*/ $SubstitutionArray['tam_']=array("[j]"=>"ˆ", "[ja]"=>"ƒ", "[~ju]"=>"š", "[~jU]"=>"œ", "[Sh]"=>"‰", "[Sha]"=>"„", "[S]"=>"Š", "[Sa]"=>"…", "[h]"=>"‹", "[ha]"=>"†", "[kSh]"=>"Œ", "[kSha]"=>"‡"); //!Used for Database storage of some of the Telugu Baraha Codes. /*!
Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose.
Author : Vijay Srinivas
Email : vijay.srini@frlht.org
*/ $SubstitutionArray['tel_']=array(); //!Used for Database storage of some of the Malayalam Baraha Codes. /*!
Description : In some cases, the Baraha Codes when entered into a database, is not stored properly, and hence, not retrieved properly as well. Hence, they are substituted by English phrases and stored in the database, and likewise also retrieved. This is used for that purpose.
Author : Vijay Srinivas
Email : vijay.srini@frlht.org
*/ $SubstitutionArray['mal_']=array(); ?> "; if($_SESSION['auth_user']=="") print "Add New"; else print "Add New"; print ""; print "Plant Name"; //print "Genus"; //print "Species"; print "Description"; print "How to grow"; print "Care and Regime"; print "Part(s) Used"; print "Method of Collection"; //print "Wild"; //print "Kitchen"; //print "Market"; print "Edit"; print "Delete"; while($rs=mysql_fetch_array($result)) { /*if($formbg=="datarowwhite") $formbg="datarowgrey"; else $formbg="datarowwhite";*/ $plantid = "plant_id"; $formbg = $_SESSION['ltag']."txtgreen"; print ""; 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 ""; } else { echo "You are not Authorised to view this page ! ! !"; } ?>