1) { $spacer = str_repeat('   ', $l[$i] - 1); // just for indenting lower level "pages" } //$list.='["' . $spacer . substr(str_replace('"', '"', $h[$i]), 0, 30) . '", "' . $sn . '?' . $u[$i] . '"],'; $list.='["' . $spacer . addcslashes($h[$i], "\n\r\t\"\\") . '", "?' . $u[$i] . '"],'; } if (@is_dir($downloads_path)) { $list .= '["DOWNLOADS:",""],'; $fs = sortdir($downloads_path); foreach ($fs as $p) { if (preg_match("/.+\..+$/", $p)) { $list .= '["  ' . substr($p, 0, 25) . ' (' . (round((filesize($downloads_path . '/' . $p)) / 102.4) / 10) . ' KB)", "./?download=' . $p . '"],'; } } } $list = substr($list, 0, -1); return($list); }