function buildTree($treeData, $parentId = null, $collapseAll = false) { $html = " "; return $html; } $sql=""; if($_SESSION["language"]=="English") { $sql = "SELECT code as id, en_account_name label, en_account_name text, concat('AccountsChart_list.php?q=(code~equal~',code,')&c=',code) link, parent_code as parent_id FROM acc_accounts_chart ORDER BY code"; echo ""; echo ' '; echo ""; } else if($_SESSION["language"]=="Arabic") { $sql ="SELECT code as id, ar_account_name label, ar_account_name text, concat('AccountsChart_list.php?q=(code~equal~',code,')&c=',code) link, parent_code as parent_id FROM acc_accounts_chart ORDER BY code"; echo ""; echo ' '; echo ""; } echo " "; $rs = CustomQuery($sql); $treeData = array(); while ($row = db_fetch_array($rs)) { $treeData[] = $row; } echo buildTree($treeData);