'; // Finally, set previous files, indicate changes, set saved points and redo tabs $doNext .= ' top.ICEcoder.setPreviousFiles(); setTimeout(function(){top.ICEcoder.indicateChanges()},4); top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration(); top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);'; // Run our custom processes include_once "../processes/on-file-save.php"; // ====================================================== // MDT'S DON'T MATCH, OFFER TO LOAD FILE & SHOW DIFF VIEW // ====================================================== } else { // Only applicable for local files $loadedFile = toUTF8noBOM(file_get_contents($file, false, $context), true); $fileCountInfo = getVersionsCount($fileLoc, $fileName); $doNext .= ' var loadedFile = document.createElement("textarea"); loadedFile.value = "' . str_replace('"', '\\\\"', str_replace("\r", "\\\\r", str_replace("\n", "\\\\n", str_replace("</textarea>", "<ICEcoder:/:textarea>", $loadedFile)))) . '"; var refreshFile = top.ICEcoder.ask("' . $t['Sorry, this file...'] . '\\\\n' . $file . '\\\\n\\\\n' . $t['Reload this file...'] . '"); if (refreshFile) { var cM = top.ICEcoder.getcMInstance(); var thisTab = top.ICEcoder.selectedTab; var userVersionFile = cM.getValue(); /* Revert back to original */ cM.setValue(loadedFile.value); top.ICEcoder.savedPoints[thisTab-1] = cM.changeGeneration(); top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "' . $filemtime . '"; top.ICEcoder.openFileVersions[top.ICEcoder.selectedTab-1] = "' . $fileCountInfo['count'] . '"; cM.clearHistory(); /* Now for the new version in the diff pane */
<?php // Load common functions include "headers.php"; include "settings.php"; $text = $_SESSION['text']; $t = $text['backup-versions']; $file = str_replace("|", "/", xssClean($_GET['file'], 'html')); $fileCountInfo = getVersionsCount(dirname($file), basename($file)); $versions = $fileCountInfo['count']; ?> <!DOCTYPE html> <html> <head> <title>ICEcoder <?php echo $ICEcoder["versionNo"]; ?> backup version control</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link rel="stylesheet" type="text/css" href="backup-versions.css?microtime=<?php echo microtime(true); ?> "> <link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?> /lib/codemirror.css?microtime=<?php echo microtime(true); ?>
top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1] = cM.changeGeneration(); top.document.getElementById('content').style.visibility='visible'; top.ICEcoder.switchTab(top.ICEcoder.selectedTab,'noFocus'); setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.focus();},0); // Then clean it up, set the text cursor, update the display and get the character data top.ICEcoder.contentCleanUp(); top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLinecM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]], "background"); top.ICEcoder['cMActiveLinecM'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine"); top.ICEcoder.nextcMInstance++; top.ICEcoder.openFileMDTs.push('<?php echo $serverType == "Linux" ? filemtime($file) : "1000000"; ?> '); top.ICEcoder.openFileVersions.push(<?php echo getVersionsCount($fileLoc, $fileName); ?> ); top.ICEcoder.updateVersionsDisplay(); for (var i=0; i<cM.lineCount(); i++) { top.ICEcoder.content.contentWindow.CodeMirror.doFold(cM.getLine(i).indexOf("{")>-1?"brace":"xml",null,"+","-",true)(cM, i); } top.ICEcoder.goToLine(<?php echo $lineNumber; ?> ); top.ICEcoder.loadingFile = false; <?php } ?>