document.getElementById('wikiedit').innerHTML = \"
Loading..
'; var req = document.createElement('SCRIPT'); req.type = 'text/javascript'; req.src = \"?action=jsfilelist\"; document.body.appendChild(req); } "; } if ($action == "jsfilelist") { header("Content-Type: text/javascript"); $uploaddir = FmtPageName("$jsflUploadDir$UploadPrefixFmt", $pagename); $dirp = @opendir($uploaddir); ## No Folder if (!$dirp) { echo "document.getElementById('attachlist').innerHTML = \"There are no Attachment for this page, you can still Attach: from other pages.\"; document.getElementById('attachlist').onclick = null;"; exit; } $filelist = array(); while (($file=readdir($dirp)) !== false) { if ($file{0} == '.') continue; if (@$matchext && !preg_match(@$matchext, $file)) continue; $filelist[$file] = $file; } closedir($dirp); $out = array(); $out[] = ""; #$out[] = "