require "header.php"; require "t_search.php"; // require "../admin/phpfunc.php"; function treeEnc($str) { $str = htmlspecialchars($str); $str = str_replace("\"",""",$str); return $str; } $queryString = "SELECT A.AAT_TreeID, A.Name$qLang , A.ParentID , A1.GRCOUNT, B.MNCOUNT FROM aat_tree A LEFT JOIN ( SELECT ParentID, COUNT( AAT_TreeID ) AS GRCOUNT FROM aat_tree GROUP BY ParentID ) AS A1 ON A.AAT_TreeID = A1.ParentID LEFT JOIN ( SELECT AM.AAT_TreeID, COUNT( AM.MonumentID ) AS MNCOUNT FROM aat_monuments AM GROUP BY AM.AAT_TreeID ) AS B ON A.AAT_TreeID = B.AAT_TreeID ORDER BY A.ParentID, A.Name$qLang "; $result = mysql_query($queryString); if($result && mysql_num_rows($result)>0) { $i = 0; echo ""; } ?> function SetTree($parentID, $padding, $qLang) { $queryString = "SELECT AAT_TreeID, NameArm FROM aat_tree WHERE ParentID =".$parentID; $result = mysql_query($queryString); if($result && mysql_num_rows($result)>0) { while($row = mysql_fetch_array($result)) { echo"