"); }; } // If we're due to open a file... if ($_GET['action']=="load") { echo 'action="load";'; $lineNumber = max(isset($_REQUEST['lineNumber'])?intval($_REQUEST['lineNumber']):1, 1); // Check this file isn't on the banned list at all $canOpen = true; for ($i=0;$i'); exit; } // Get our file contents and close the FTP connection $loadedFile = toUTF8noBOM(ftpGetContents($ftpConn, $ftpRoot.$fileLoc."/".$fileName, $ftpMode)); ftpEnd(); // Get local file } else { $loadedFile = toUTF8noBOM(getData($file),true); //echo 'console.log('.$loadedFile.');'; } $encoding=ini_get("default_charset"); if($encoding=="") { $encoding="UTF-8"; } // Left trim any \r from start of text after setting HTML entities on it according to encoding $loadedFile = ltrim(htmlentities($loadedFile,ENT_COMPAT,$encoding),"\r"); if (substr($loadedFile,0,1) == "\n") { $loadedFile = " ".substr($loadedFile,1); } echo '