Visible tabs and auto opening last opened files

Option to show tabs as arrows or blanks
Option to open last opened files on next session or not
Accompanying coding to update list of last opened files on demand
Version no update to v0.6.3
This commit is contained in:
Matt Pass
2012-04-14 17:53:11 +01:00
parent 82fd2a5b5d
commit 2c01eeba17

View File

@@ -1,8 +1,9 @@
<?php
$versionNo = "v 0.6.2";
$versionNo = "v 0.6.3";
$codeMirrorDir = "CodeMirror-2.23";
$cMThisVer = 2.23;
$testcMVersion = false; // test if we're using the latest CodeMirror version
$visibleTabs = true;
$restrictedFiles = array("wp-",".php",".asp",".aspx");
$bannedFiles = array("_coder","wp-",".exe");
$allowedIPs = array("*"); // allowed IPs, * for any
@@ -13,6 +14,21 @@ $plugins = array(
array("Clipboard","images/clipboard.png","","javascript:alert('Doesn\'t do anything yet but will be a clipboard for copied text items, up to 100 levels')","_self","")
);
$accountPassword = "";
$lastOpenedFiles = "";
$openLastFiles = true;
if ($_GET['saveFiles'] && $_SESSION['userLevel'] == 10) {
$settingsFile = 'settings.php';
$settingsContents = file_get_contents($settingsFile);
// Replace our lastOpenedFiles var with the the current
$repPosStart = strpos($settingsContents,'lastOpenedFiles = "')+19;
$repPosEnd = strpos($settingsContents,'";',$repPosStart)-$repPosStart;
$settingsContents = substr($settingsContents,0,$repPosStart).$_GET['saveFiles'].substr($settingsContents,($repPosStart+$repPosEnd),strlen($settingsContents));
// Now update this file
$fh = fopen($settingsFile, 'w') or die("can't update settings file");
fwrite($fh, $settingsContents);
fclose($fh);
echo '<script>top.ICEcoder.serverQueue("del",0);</script>';
}
// ---------------
// End of settings