mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-15 21:07:12 +01:00
Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f76270b7b9 | ||
|
|
694daa15aa | ||
|
|
0d8cd9a612 | ||
|
|
2171dd5664 | ||
|
|
9a9d66ffb9 | ||
|
|
b5566c8382 | ||
|
|
385d4e0efd | ||
|
|
8eeb64ad09 | ||
|
|
caa9fab5b4 | ||
|
|
c087283e46 | ||
|
|
55f8b9adc2 | ||
|
|
9cb89463bb | ||
|
|
3a48fd9cdd | ||
|
|
c4bba758c7 | ||
|
|
db44da92f1 | ||
|
|
bedd75c0c5 | ||
|
|
c277d3a6bb | ||
|
|
f681cc88c9 | ||
|
|
c106c0a410 | ||
|
|
50a4a3e4bc | ||
|
|
586a4e6a64 | ||
|
|
ef98e4f5ab | ||
|
|
7f039d81d8 | ||
|
|
ab39f9f51b | ||
|
|
47263bdbed | ||
|
|
b65a7a690e | ||
|
|
3dc26528b4 | ||
|
|
73305b3be2 | ||
|
|
de4c63c37e | ||
|
|
8b720dd0e6 | ||
|
|
f0a2bbc531 | ||
|
|
c322c501ac | ||
|
|
5f948d9c56 | ||
|
|
b2d13e0e30 | ||
|
|
4a1ba5dfe3 | ||
|
|
6861fa9ced | ||
|
|
29857e7d70 | ||
|
|
b50bc5e598 | ||
|
|
aaf1ce1526 | ||
|
|
36b20938b7 | ||
|
|
670e3c47a6 | ||
|
|
4ef49f0172 | ||
|
|
aef3340d0f | ||
|
|
3ea34fb87a | ||
|
|
efdf729f83 | ||
|
|
5ce3a9912c | ||
|
|
2897c75a3d | ||
|
|
fe29a57cdb | ||
|
|
f75bd9fe53 | ||
|
|
a7c0123072 | ||
|
|
3b84af75d2 | ||
|
|
505f5b35c7 | ||
|
|
77c0f61d7b | ||
|
|
8d5715ebcd | ||
|
|
cab12fd73c |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,4 +3,5 @@ backups/*.zip
|
||||
lib/config-*
|
||||
plugins/*
|
||||
test/test-file1.txt
|
||||
tmp/*
|
||||
tmp/*
|
||||
!tmp/index.php
|
||||
40
CodeMirror-4.7/theme/icecoder-classic.css
Normal file
40
CodeMirror-4.7/theme/icecoder-classic.css
Normal file
@@ -0,0 +1,40 @@
|
||||
/* ICEcoder classic theme by Matt Pass */
|
||||
|
||||
.cm-s-icecoder-classic {color: #666; background: #161612}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-keyword {color: #eee; font-weight:bold}
|
||||
.cm-s-icecoder-classic span.cm-atom {color: #8b67cc}
|
||||
.cm-s-icecoder-classic span.cm-number {color: #080}
|
||||
.cm-s-icecoder-classic span.cm-def {color: #ca7919}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-variable {color: #85b525}
|
||||
.cm-s-icecoder-classic span.cm-variable-2 {color: #c71e5b}
|
||||
.cm-s-icecoder-classic span.cm-variable-3 {color: #080}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-property {color: #85b525}
|
||||
.cm-s-icecoder-classic span.cm-operator {color: #080}
|
||||
.cm-s-icecoder-classic span.cm-comment {color: #444}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-string {color: #ccb100}
|
||||
.cm-s-icecoder-classic span.cm-string-2 {color: #cc6d00}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-meta {color: #555}
|
||||
.cm-s-icecoder-classic span.cm-error {color: #d00}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-qualifier {color: #555}
|
||||
.cm-s-icecoder-classic span.cm-builtin {color: #0052a3}
|
||||
.cm-s-icecoder-classic span.cm-bracket {color: #cc7}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-tag {color: #e8e8e8}
|
||||
.cm-s-icecoder-classic span.cm-attribute {color: #099}
|
||||
|
||||
.cm-s-icecoder-classic span.cm-header {color: #808}
|
||||
.cm-s-icecoder-classic span.cm-quote {color: #070}
|
||||
.cm-s-icecoder-classic span.cm-hr {color: #888}
|
||||
.cm-s-icecoder-classic span.cm-link {color: #cc0}
|
||||
|
||||
.cm-s-icecoder-classic .CodeMirror-cursor {border-left: 1px solid white !important}
|
||||
.cm-s-icecoder-classic .CodeMirror-selected {color: #fff !important; background: #037 !important}
|
||||
.cm-s-icecoder-classic .CodeMirror-gutters {background: #161612; min-width: 41px; border-right: 0}
|
||||
.cm-s-icecoder-classic .CodeMirror-linenumber {color: #555; cursor: default}
|
||||
.cm-s-icecoder-classic .CodeMirror-matchingbracket {border: 1px solid grey; color: black !important}
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
ICEcoder is a web IDE / browser based code editor, which allows you to develop websites directly within the web browser. It uses the brilliant CodeMirror for code highlighting & editing, with a slick IDE wrapped around it to make the whole thing work.
|
||||
|
||||
<img src="https://icecoder.net/images/icecoder-v4-5-browser-code-editor.png" alt="ICEcoder web IDE">
|
||||
<img src="https://icecoder.net/images/icecoder-v5-0-beta-browser-code-editor.png" alt="ICEcoder web IDE">
|
||||
|
||||
###Requirements
|
||||
You can run ICEcoder either online or locally, on Linux, Windows or Mac based platforms. The only requirement is to have PHP 5 available (5.3 recommended). You can have this either as a vanilla installation or via a program such as WAMP or XAMPP (for Windows) or MAMP (for Mac).
|
||||
|
||||
27
editor.php
27
editor.php
@@ -10,36 +10,37 @@ $t = $text['editor'];
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> editor</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/hint/show-hint.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/lint/lint.css?microtime=<?php echo microtime(true);?>">
|
||||
<!--
|
||||
codemirror-compressed.js
|
||||
incls: codemirror
|
||||
modes: clike, coffeescript, css, erlang, go, htmlmixed, javascript, julia, lua, markdown, perl, php, python, ruby, rust, sass, sql, xml, yaml
|
||||
addon: brace-fold, closebrackets, closetag, css-hint, html-hint, javascript-hint, javascript-lint, lint, match-highlighter, searchcursor, show-hint, sql-hint, trailingspace, xml-fold, xml-hint
|
||||
//-->
|
||||
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
|
||||
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint-2.5.6.min.js")) {
|
||||
echo '<script src="plugins/jshint/jshint-2.5.6.min.js"></script>';
|
||||
echo '<script src="plugins/jshint/jshint-2.5.6.min.js?microtime='.microtime(true).'></script>';
|
||||
};?>
|
||||
<script src="lib/mmd.js"></script>
|
||||
<script src="lib/foldcode.js"></script>
|
||||
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/foldcode.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
|
||||
echo '<script src="plugins/emmet/emmet.min.js"></script>';
|
||||
echo '<script src="plugins/emmet/emmet.min.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
|
||||
echo '<script src="plugins/pesticide/pesticide.js"></script>';
|
||||
echo '<script src="plugins/pesticide/pesticide.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<?php
|
||||
if (file_exists(dirname(__FILE__)."/plugins/stats.js/stats.min.js")) {
|
||||
echo '<script src="plugins/stats.js/stats.min.js"></script>';
|
||||
echo '<script src="plugins/stats.js/stats.min.js?microtime='.microtime(true).'"></script>';
|
||||
};?>
|
||||
<link rel="stylesheet" href="<?php
|
||||
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
|
||||
echo "?microtime=".microtime(true);
|
||||
$activeLineBG = array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","neat","solarized","xq-light")) !== false ? "#ccc" : "#000";
|
||||
?>">
|
||||
|
||||
@@ -74,8 +75,8 @@ h2 {color: rgba(0,198,255,0.7)}
|
||||
.diffGreyLighter {background: #888 !important; color: #222 !important}
|
||||
.diffNone {}
|
||||
</style>
|
||||
<link rel="stylesheet" href="lib/file-types.css">
|
||||
<link rel="stylesheet" href="lib/file-type-icons.css">
|
||||
<link rel="stylesheet" href="lib/file-types.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="lib/file-type-icons.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
@@ -255,4 +256,4 @@ function createNewCMInstance(num) {
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -12,10 +12,10 @@ $isGitHubRepoDir = in_array($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
|
||||
<head>
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" type="text/css" href="lib/files.css">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-types.css">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-type-icons.css">
|
||||
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" type="text/css" href="lib/files.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-types.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" type="text/css" href="lib/file-type-icons.css?microtime=<?php echo microtime(true);?>">
|
||||
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';}; echo ".js?microtime=".microtime(true);?>" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body onFocus="top.ICEcoder.files.style.background='#444'" onBlur="top.ICEcoder.files.style.background='#383838'" onload="top.ICEcoder.showHideGithubNav(top.ICEcoder.githubDiff ? 'show' : 'hide')" onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
|
||||
|
||||
16
index.php
16
index.php
@@ -42,8 +42,8 @@ $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;
|
||||
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=no">
|
||||
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<script>
|
||||
iceRoot = "<?php echo $ICEcoder['root']; ?>";
|
||||
@@ -71,11 +71,11 @@ $t = $text['index'];
|
||||
?>
|
||||
}
|
||||
</script>
|
||||
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js"></script>
|
||||
<script src="lib/mmd.js"></script>
|
||||
<script src="farbtastic/farbtastic.js"></script>
|
||||
<script src="lib/difflib.js"></script>
|
||||
<link rel="stylesheet" href="farbtastic/farbtastic.css" type="text/css">
|
||||
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="farbtastic/farbtastic.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="lib/difflib.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<link rel="stylesheet" href="farbtastic/farbtastic.css?microtime=<?php echo microtime(true);?>" type="text/css">
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php
|
||||
@@ -141,7 +141,7 @@ $t = $text['index'];
|
||||
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
|
||||
<a href="javascript:top.ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Upload File(s)'];?></a>
|
||||
<div style="display: none">
|
||||
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control.php?action=upload&file=/uploaded" method="POST" target="fileControl">
|
||||
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control-xhr.php?action=upload&file=/uploaded" method="POST" target="fileControl">
|
||||
<input type="hidden" name="folder" id="uploadDir" value="/">
|
||||
<input type="file" name="filesInput[]" id="fileInput" onchange="top.ICEcoder.uploadFilesSubmit(this)" multiple>
|
||||
<input type="submit" value="Upload File">
|
||||
|
||||
@@ -47,16 +47,16 @@ $text = array(
|
||||
"UPDATE INFO" => "Update Infos",
|
||||
"now available" => "jetzt verfügbar",
|
||||
"Your version is" => "Deine Version ist",
|
||||
"Update now" => "Aktualisiere jetzt",
|
||||
"You have some..." => "Du hast einige nicht gespeicherete Datein",
|
||||
"Update now" => "Jetzt aktualisieren",
|
||||
"You have some..." => "Du hast einige nicht gespeicherete Dateien",
|
||||
"working" => "arbeite",
|
||||
"Color picker" => "Farbauswahl",
|
||||
"New File" => "Neue Datei",
|
||||
"New Folder" => "Neuer Ordner",
|
||||
"Upload File(s)" => "Dateie(n) hochladen",
|
||||
"Upload File(s)" => "Datei(en) hochladen",
|
||||
"Paste" => "Einfügen",
|
||||
"Open" => "Öffnen",
|
||||
"Copy" => "Kopiere",
|
||||
"Copy" => "Kopieren",
|
||||
"Duplicate" => "Duplizieren",
|
||||
"Delete" => "Löschen",
|
||||
"Rename" => "Umbenennen",
|
||||
@@ -85,7 +85,7 @@ $text = array(
|
||||
"Manual" => "Anleitung",
|
||||
"Shortcuts" => "Schnellzugriffe",
|
||||
"Settings" => "Einstellungen",
|
||||
"Search for selected" => "Nach selektiertem suchen",
|
||||
"Search for selected" => "Nach Auswahl suchen",
|
||||
"website" => "Website",
|
||||
"Close all tabs" => "Alle Tabs schließen",
|
||||
"Alphabetize tabs" => "Tabs alphabetisch sortieren",
|
||||
@@ -150,7 +150,7 @@ $text = array(
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Entschuldigung, kann Verzeichnis nicht anlegen",
|
||||
"Cannot update config..." => "Kannn die Config Datei nicht aktualisieren. Bitte Lese- und Schreibrechte setzen",
|
||||
"Cannot update config..." => "Kann die Config Datei nicht aktualisieren. Bitte Schreibrechte setzen",
|
||||
"and try again" => "und versuch es noch einmal",
|
||||
"saving github paths" => "Speichere GitHub Pfad ...",
|
||||
"github paths" => "GitHub Pfad",
|
||||
@@ -216,9 +216,9 @@ $text = array(
|
||||
"Wrap unwrap strong" => "Umschließen / Mit <strong> auschließen",
|
||||
"Wrap unwrap em" => "Umschließen / Mit <em> auschließen",
|
||||
"Wrap unwrap h1..." => "Umschließen / Mit <h1> - <h3> auschließen",
|
||||
"End line with..." => "Zeile abschließ mit <br>",
|
||||
"End line with..." => "Zeile abschließen mit <br>",
|
||||
"Close tab" => "Tab schließen",
|
||||
"Select file folder" => "Datei / Verzeichnis ausählen",
|
||||
"Select file folder" => "Datei / Verzeichnis auswählen",
|
||||
"Open file" => "Datei öffnen",
|
||||
"Range select" => "Bereich auswählen",
|
||||
"Options for selected" => "Optionen für ausgewählte",
|
||||
@@ -272,13 +272,13 @@ $text = array(
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder muss neu geladen werden, damit das Plugin genutzt werden kann. Jetzt neu laden?",
|
||||
"saving plugins" => "speicher Plugins ...",
|
||||
"saving plugins" => "speichere Plugins ...",
|
||||
"Cannot update config..." => "Kann die Konfigurationsdatei nicht aktualisieren. Bitte Schreibrechte vergeben",
|
||||
"and try again" => "und es nochmal versuchen",
|
||||
"couldnt delete dir" => "kann Verzeichnis nicht löschen",
|
||||
"couldnt delete file" => "kann Datei nicht löschen",
|
||||
"plugins" => "Plugins",
|
||||
"Guide to writing..." => "Anleitung zum erstellen von Plugins",
|
||||
"Guide to writing..." => "Anleitung zum Erstellen von Plugins",
|
||||
"Manage Installed" => "Geführte Installtion",
|
||||
"URL" => "URL",
|
||||
"Target" => "Ziel",
|
||||
@@ -328,20 +328,20 @@ $text = array(
|
||||
"version" => "Version",
|
||||
"website" => "Website",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "gespiegeltes Verzeichnis",
|
||||
"codemirror version" => "gespiegelte Version",
|
||||
"file manager root" => "Grundverzeichnis vom Dateimanager",
|
||||
"codemirror dir" => "CodeMirror Verzeichnis",
|
||||
"codemirror version" => "CodeMirror Version",
|
||||
"file manager root" => "Stammverzeichnis vom Dateimanager",
|
||||
"Free to use..." => "Kostenfrei nutzbar, kommerziell oder nicht. Gebt mir Bescheid über eure Nutzung oder Anpassungen. :)<br><br>Keine Garantie oder Haftung, Nutzung auf eigene Gefahr.<br><br>Viele fantastische Leute und Unternehmen haben dabei geholfen ICEcoder zu dem zu machen, was es heute ist. Und es sind zu viele um ihnen einzelen zu danken. Eine vollständige Liste gibt es unter",
|
||||
"functionality" => "Funktionalität",
|
||||
"check for updates..." => "Bei jedem Ladem nach Updates suchen",
|
||||
"auto open last..." => "Lade automatisch alle zuletzt geöffneten Datein beim Login",
|
||||
"when finding in..." => "bei der Suche in Dateien ausschließen",
|
||||
"assisting" => "assestieren",
|
||||
"assisting" => "Assistenten",
|
||||
"code assist" => "Codeassistent",
|
||||
"visible tabs" => "sichtbare Tabs",
|
||||
"locked nav" => "gesperrte Navigation",
|
||||
"tag wrapper command" => "Tag für Wrapper Kommando setzen",
|
||||
"auto-complete on" => "auto-complete an",
|
||||
"tag wrapper command" => "Kommando für Tag Wrapper",
|
||||
"auto-complete on" => "Auto-Vervollständigen mit",
|
||||
"security" => "Sicherheit",
|
||||
"new password" => "neues Passwort",
|
||||
"8 chars min" => "8 Zeichen mindestens",
|
||||
@@ -354,13 +354,13 @@ $text = array(
|
||||
"style" => "Style",
|
||||
"theme" => "Theme",
|
||||
"line wrapping" => "Zeilenumbruch",
|
||||
"indent type" => "Gedankenstrich Typ",
|
||||
"indent size" => "Größe Gedankenstrich",
|
||||
"indent type" => "Einrückung mit",
|
||||
"indent size" => "Tabweite",
|
||||
"font size" => "Schriftgröße",
|
||||
"layout" => "Layout",
|
||||
"plugin panel aligned" => "Plugin-Panel ausgerichtet",
|
||||
"plugin panel aligned" => "Ausrichtung Plugin-Panel",
|
||||
"file manager" => "Dateimanager",
|
||||
"root" => "Stamm",
|
||||
"root" => "Stammordner",
|
||||
"Slash prefixed" => "Schrägstrich vorangestellt",
|
||||
"bug reporting" => "Fehlermeldung",
|
||||
"check in files" => "Dateien einchecken",
|
||||
@@ -370,7 +370,7 @@ $text = array(
|
||||
"multi-user" => "Mehrbenutzer",
|
||||
"Make sure you..." => "Sei sicher, dass du dich nicht selber aussperrst",
|
||||
"Registration" => "Registrieren",
|
||||
"auth token" => "Authetifizierungs-Token",
|
||||
"auth token" => "Authentifizierungs-Token",
|
||||
"Required to get..." => "Notwendig für diffs, commits des bei GitHub gehosteten Repository usw.. Wenn du keinen hast, kannst du einen:".PHP_EOL.PHP_EOL.
|
||||
"- persönlichen Zugriffs Token (https://help.github.com/articles/creating-an-access-token-for-command-line-use) erstellen, oder".PHP_EOL.
|
||||
"- Full Client/geheimen Token (http://developer.github.com/v3/oauth) erstellen.".PHP_EOL.PHP_EOL.
|
||||
@@ -393,4 +393,4 @@ $text = array(
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
?>
|
||||
|
||||
437
lang/portuguese_brazilian.php
Normal file
437
lang/portuguese_brazilian.php
Normal file
@@ -0,0 +1,437 @@
|
||||
<?php
|
||||
// Português do Brasil
|
||||
// by: @leonardoroese (GitHub)
|
||||
|
||||
|
||||
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &). Translations on right side.
|
||||
|
||||
$text = array(
|
||||
|
||||
// / [ROOT LEVEL]
|
||||
|
||||
"editor" =>
|
||||
array(
|
||||
"Click icons for..." => "<b>Ícones<br>para ajuda &<br>info. utilização</b>",
|
||||
"server" => "Servidor",
|
||||
"Server name, OS..." => "Nome do Servidor, OS & IP:",
|
||||
"Root" => "Raiz:",
|
||||
"ICEcoder root" => "ICEcoder raiz:",
|
||||
"PHP version" => "Versâo do PHP:",
|
||||
"Date & time" => "Data e Hora:",
|
||||
"your device" => "seu dispositivo",
|
||||
"Browser" => "Exibir:",
|
||||
"Your IP" => "Seu IP:",
|
||||
"files" => "arquivos",
|
||||
"Last 10 files..." => "ùltimos 10 arquivos abertos:",
|
||||
"none" => "[nenhum]",
|
||||
"test suite" => "suíte de teste",
|
||||
"Run unit tests" => "Executar testes unitários",
|
||||
"dev mode" => "modo desenv.",
|
||||
"Status" => "Status",
|
||||
"Using" => "Usando",
|
||||
"You can switch..." => "Você pode alterar modo desenv. on/off em lib/config__settings.php"
|
||||
|
||||
),
|
||||
|
||||
"files" =>
|
||||
array(
|
||||
"Lock" => "Trava",
|
||||
"Refresh" => "Atualizar",
|
||||
"ROOT" => "[RAIZ]"
|
||||
|
||||
),
|
||||
|
||||
"index" =>
|
||||
array(
|
||||
"UPDATE INFO" => "INFO ATUALIZAÇÃO",
|
||||
"now available" => "disponível agora",
|
||||
"Your version is" => "Sua versão é",
|
||||
"Update now" => "Atualizar já",
|
||||
"You have some..." => "Voce possui alterações não salvas",
|
||||
"working" => "trabalhando",
|
||||
"Color picker" => "Color picker",
|
||||
"New File" => "Novo Arquivo",
|
||||
"New Folder" => "Nova Pasta",
|
||||
"Upload File(s)" => "Carregar arquivo(s)",
|
||||
"Paste" => "Colar",
|
||||
"Open" => "Abrir",
|
||||
"Copy" => "Copiar",
|
||||
"Duplicate" => "Duplicar",
|
||||
"Delete" => "Excluir",
|
||||
"Rename" => "Renomear",
|
||||
"View Webpage" => "Exibir Página Web",
|
||||
"Download" => "Download",
|
||||
"Properties" => "Propriedades",
|
||||
"File" => "Arquivo",
|
||||
"Remote" => "Remoto",
|
||||
"Edit" => "Editar",
|
||||
"Source" => "Fonte",
|
||||
"Help" => "Ajuda",
|
||||
"Save" => "Salvar",
|
||||
"Save As" => "Salvar Como",
|
||||
"Live Preview" => "Preview",
|
||||
"Upload" => "Upload",
|
||||
"Zip" => "Zip",
|
||||
"Print" => "Imprimir",
|
||||
"Fullscreen toggle" => "Exibir tela cheia",
|
||||
"Logout" => "Sair",
|
||||
"Undo" => "Desfazer",
|
||||
"Redo" => "Refazer",
|
||||
"Indent more" => "Indentar +",
|
||||
"Indent less" => "Indentar -",
|
||||
"Autocomplete" => "Autocompletar",
|
||||
"Comment/Uncomment" => "Comentar/Descomentar",
|
||||
"Jump to Definition" => "Ir para definição",
|
||||
"Manual" => "Manual",
|
||||
"Shortcuts" => "Atalhos",
|
||||
"Settings" => "Configurações",
|
||||
"Search for selected" => "Procurar por selecionado",
|
||||
"website" => "website",
|
||||
"Close all tabs" => "Fechar todas as abas",
|
||||
"Alphabetize tabs" => "Ordenar abas por nome",
|
||||
"Find" => "Procurar",
|
||||
"in" => "em",
|
||||
"and" => "e",
|
||||
"replace" => "substituir",
|
||||
"replace all" => "substituir tudo",
|
||||
"this document" => "este documento",
|
||||
"open documents" => "documentos abertos",
|
||||
"all files" => "todos os arquivos",
|
||||
"all filenames" => "todos nomes de arquivo",
|
||||
"Turn on/off..." => "Ligar/Desligar Assistente",
|
||||
"Code Assist" => "Assistente",
|
||||
"Go to Line" => "Ir para linha",
|
||||
"View" => "Exibir",
|
||||
"Bug reporting not active" => "Relatório de Bug desativado"
|
||||
),
|
||||
|
||||
// /LIB
|
||||
|
||||
"bug-files-check" =>
|
||||
array(
|
||||
"Found in" => "Encontrado em:"
|
||||
),
|
||||
|
||||
"file-control" =>
|
||||
array(
|
||||
"Sorry" => "Desculpe",
|
||||
"does not seem..." => "Não encontrado no servidor",
|
||||
"Sorry, could not..." => "Desculpe, conteudo não encontrado para",
|
||||
"Sorry, cannot create..." => "Desculpe, não é possível criar pasta",
|
||||
"Sorry, cannot copy" => "Desculpe, não é possível copy",
|
||||
"into" => "into",
|
||||
"Uploaded file(s) OK" => "Arquivos carregados",
|
||||
"Sorry, cannot upload" => "Desculpe, não é possível carregar",
|
||||
"Sorry, cannot upload..." => "Desculpe, não é possível carregar lista no modo DEMO",
|
||||
"Sorry, cannot rename" => "Desculpe, não é possível renomear",
|
||||
"Maybe public write..." => "A pasta superior possui permissão de escrita?",
|
||||
"Sorry, cannot move" => "Desculpe, não é possível mover",
|
||||
"Sorry, cannot save" => "Desculpe, não é possível salvar",
|
||||
"Sorry, cannot replace..." => "Desculpe, não é possível substituir texto em",
|
||||
"Sorry, cannot change..." => "Desculpe, não é possível mudar permissões para",
|
||||
"Sorry, cannot delete..." => "Desculpe, não é possível excluir nível raiz",
|
||||
"Sorry, cannot delete" => "Desculpe, não é possível remover",
|
||||
"Sorry, this file..." => "Desculpe, este arquivo foi modificado, não é possível salvar",
|
||||
"Reload this file..." => "Recarregar e copiar sua versão?",
|
||||
"There was a..." => "Ocorreu algum problema. O ICEcoder recarregou o arquivo de controle novamente",
|
||||
"displayed at" => "exibido em",
|
||||
"Enter filename to..." => "Informe o nome do aquivo para salvar",
|
||||
"That file exists..." => "Este arquivo já existe, sobrescrever?",
|
||||
"Saving" => "Salvando"
|
||||
),
|
||||
|
||||
"get-branch" =>
|
||||
array(
|
||||
"There are no..." => "Não há diferenças entre loca/Github. Retornar para modo normal?",
|
||||
"Sorry, there was..." => "Desculpe, ocorreu um erro, código:",
|
||||
"Your local folder..." => "Sua pasta local está vazia, gostaria de clonar"
|
||||
),
|
||||
|
||||
"github-manager" =>
|
||||
array(
|
||||
"Sorry, cannot create..." => "Desculpe, não foi possível criar em",
|
||||
"Cannot update config..." => "Não é possível atualizar config. Habilitar permissões públicas",
|
||||
"and try again" => "e tentar novamente",
|
||||
"saving github paths" => "salvando caminhos Github...",
|
||||
"github paths" => "caminhos Github",
|
||||
"Choose existing path" => "Escolha caminho existente",
|
||||
"Local path" => "Caminho local",
|
||||
"Remote GitHub path" => "Caminho remoto Github",
|
||||
"Choose" => "Selecione",
|
||||
"Set local and..." => "Alterar caminho local e remoto como vazio para excluír",
|
||||
"Update" => "Atualizar",
|
||||
"Add new path" => "Adicionar novo caminho",
|
||||
"Add" => "Adicionar",
|
||||
"Usage Info" => "Info. de utilização:",
|
||||
"Enter relative local..." => "Informe os caminhos relativos (ex.: /server/myfiles) e absolutos do GitHub (ex.: https://github.com/user/repo ou https://github.com/user/repo/tree/branch for branches).Com isso estabelece os caminho dos fontes em ambos locais, como pares.",
|
||||
"You can then..." => "Você pode então escolher um caminho par para ser a raiz do ICEcoder.",
|
||||
"The file manager..." => "O gerenciador de arquivo exibirá o ícone GitHub, você pode clicar para verificar a diferença entre arquivos.Essas diferenças podem ser efetivadas e enviadas ao diretório remoto do GitHub ou clonado para pasta local, para sincronizar seus arquivos.",
|
||||
"If you want..." => "Se quiser configurar novo caminho raiz, pode ser feito na tela de configurações."
|
||||
),
|
||||
|
||||
"github" =>
|
||||
array(
|
||||
"Sorry, you do..." => "Desculpe, o OpenSSL não foi encontrado, https indisponível. Isso é necessário para o GitHub transferir dados, verificar php.ini, reinicie o sistema e tente novamente"
|
||||
),
|
||||
|
||||
"headers" =>
|
||||
array(
|
||||
"Bad CSRF token..." => "Erro na chave CSRF. Reportar em https://github.com/mattpass/ICEcoder para ser corrigido."
|
||||
),
|
||||
|
||||
"help" =>
|
||||
array(
|
||||
"shortcuts" => "atalhos",
|
||||
"Within document" => "Neste documento",
|
||||
"On Tabs" => "Em abas",
|
||||
"Within file manager" => "No gerenciador de arquivos",
|
||||
"Anywhere" => "Qualquer Lugar",
|
||||
"Space" => "Espaço",
|
||||
"Click" => "Clique",
|
||||
"or" => "ou",
|
||||
"Left click" => "Clique esquerdo",
|
||||
"Middle click" => "Clique Meio",
|
||||
"Double click tap..." => "Clique duplo / toque (mobile)",
|
||||
"Right click" => "Clique direito",
|
||||
"Middle scrollwheel" => "Meio scroll",
|
||||
"Drag" => "Arrastar",
|
||||
"Autocomplete add snippet" => "Auto-completar / adicionar snippet",
|
||||
"Multiple select" => "Multipla seleção",
|
||||
"Move line up" => "Move linha acima",
|
||||
"Move line down" => "Move linha abaixo",
|
||||
"Duplicate lines" => "Duplicar linha(s)",
|
||||
"Remove lines" => "Remover linha(s)",
|
||||
"Insert line before" => "Inserir linha antes",
|
||||
"Insert line after" => "Inserir linha após",
|
||||
"Search for selected" => "Procurar selecionado",
|
||||
"Jump to definition" => "Ir para definição / voltar",
|
||||
"Comment uncomment" => "Commentar / descomentar",
|
||||
"Insert tab indent" => "Inserir aba / auto indent selected",
|
||||
"Insert more" => "Indentar +",
|
||||
"Insert less" => "Indentar -",
|
||||
"Wrap with div" => "Quabra com <div>",
|
||||
"Wrap with span" => "Quabra com <span>",
|
||||
"Wrap unwrap p" => "Quabra / desfaz com <p>",
|
||||
"Wrap unwrap a" => "Quabra / desfaz com <a>",
|
||||
"Wrap unwrap b" => "Quabra / desfaz com <b>",
|
||||
"Wrap unwrap i" => "Quabra / desfaz com <i>",
|
||||
"Wrap unwrap strong" => "Quabra / desfaz com <strong>",
|
||||
"Wrap unwrap em" => "Quabra / desfaz com <em>",
|
||||
"Wrap unwrap li" => "Quabra / desfaz com <li>",
|
||||
"Wrap unwrap h1..." => "Quabra / desfaz com <h1> - <h3>",
|
||||
"End line with..." => "Fim de linha com <br>",
|
||||
"Close tab" => "Fechar aba",
|
||||
"Select file folder" => "Selecionar arquivo / pasta",
|
||||
"Open file" => "Abrir arquivo",
|
||||
"Range select" => "Seleção",
|
||||
"Options for selected" => "Opções para seleção",
|
||||
"Delete selected" => "Excluir selecionado",
|
||||
"Next previous tab" => "Próxima aba / anterior",
|
||||
"Next tab" => "Próxima aba",
|
||||
"Previous tab" => "Aba anterior",
|
||||
"New tab" => "Nova aba",
|
||||
"Close current tab" => "Fechar aba atual",
|
||||
"Open file prompt" => "Abrir prompt de comando",
|
||||
"Find" => "Buscar",
|
||||
"Focus on Go..." => "Foco campo ir para linha",
|
||||
"Save" => "Salvar",
|
||||
"Save as" => "Salvar como...",
|
||||
"View webpage" => "Exibir página",
|
||||
"Contract expand file..." => "Contrair / expandir gerenciador de arquivos",
|
||||
"Fold unfold current..." => "Contrair / expandir linha atual",
|
||||
"Refocus on document" => "Foco no documento",
|
||||
"Cancel tasks" => "Cancelar tarefas"
|
||||
),
|
||||
|
||||
"ice-coder" =>
|
||||
array(
|
||||
"No text selected..." => "Sem texto selecionado para buscar",
|
||||
"all files" => "todos arquivos",
|
||||
"all filenames" => "todos nomes de arquivos",
|
||||
"selected files" => "arquivos selecionados",
|
||||
"selected filenames" => "nomes de arquivos selecionados",
|
||||
"Creating Folder" => "Criando pasta",
|
||||
"Sorry you can..." => "Deculpe, permitido abrir máx. 100 arquivos!",
|
||||
"Opening File" => "Abrindo arquivo",
|
||||
"Enter relative file..." => "Informe caminho relativo (prefixado por /) ou URL remota",
|
||||
"Getting" => "Selecionando",
|
||||
"Please enter the..." => "Informe novo nome para",
|
||||
"Renaming to" => "Renomeando para",
|
||||
"Moving to" => "Movendo para",
|
||||
"Deleting File" => "Excluindo arquivo",
|
||||
"Pasting File" => "Colando arquivo",
|
||||
"Sorry cannot paste..." => "Desculpe, não é possível colar em toda raiz",
|
||||
"Nothing to paste..." => "Nada para colar,copiar arquivo/pasta primeiro!",
|
||||
"and" => "e",
|
||||
"this document" => "este documento",
|
||||
"replace" => "substituir",
|
||||
"replace all" => "substituir tudo",
|
||||
"file" => "arquivo",
|
||||
"Replacing text in" => "Substituindo texto em",
|
||||
"Cancelled tasks" => "Tarefas canceladas",
|
||||
"Open previous files" => "Abrir arquivos anteriores?",
|
||||
"Please enter your..." => "Informe sua chave GitHub (chave pessoal ou par). Veja dica próximo à chave Github em Ajuda > Configurações para mais informações",
|
||||
"This will compare..." => "Esta ação irá comparar e exibir diferenças do seu repositório local. OK?",
|
||||
"Please note for..." => "Atenção: para atualizar corretamente, é necessário permissâo de escrita em todos os diretórios/arquivos do ICEcoder. \\n\\nSe por algum motivo necessite recuperar esta versão do ICEcoder, estará disponível na pasta /tmp.\\n\\nClique OK para prosseguir com a atualização, ou cancelar para visitar a página do ICEcoder na internet onde poderá baixar a atualização manualmente.",
|
||||
"You can start..." => "Voce pode reportar um bug em Ajuda > Configurações",
|
||||
"Error cannot find..." => "Erro: não é possível acessar caminho/arquivo de erros",
|
||||
"No new errors..." => "Nenhum erro encontrado",
|
||||
"You have made..." => "Voce fez alterações. Deseja realmente fechar sem salvar?",
|
||||
"Close all tabs" => "Fechar todas as abas?",
|
||||
"results" => "resultados"
|
||||
),
|
||||
|
||||
"login" =>
|
||||
array(
|
||||
"set password" => "altera senha",
|
||||
"login" => "login",
|
||||
"To disable registration..." => "Para desabilitar modo registro, acesse menu/configurações ou em lib/config___settings.php altere enableRegistration para false e recarregue esta página",
|
||||
"Registration mode enabled" => "Modo registro habilitado",
|
||||
"auto-check for updates" => "verificar atualizações auto.",
|
||||
"To put into..." => "Para habilitar multi-usuários, acesse menu/configurações ou em lib/config___settings.php altere multiUser para true e recarregue esta página",
|
||||
"multi-user" => "multi-usuários"
|
||||
),
|
||||
|
||||
"multiple-results" =>
|
||||
array(
|
||||
"rename all" => "renomear tudo",
|
||||
"replace all" => "substituir tudo",
|
||||
"document" => "documento",
|
||||
"Found" => "Encontrado",
|
||||
"times" => "vezes",
|
||||
"replace" => "substituir",
|
||||
"file folder" => "arquivo/pasta",
|
||||
"rename to" => "renomear para",
|
||||
"rename" => "renomear",
|
||||
"file" => "arquivo",
|
||||
"No matches found" => "Nenhum resultado encontrado",
|
||||
"selected" => "selecionado",
|
||||
"found in" => "encontrado em",
|
||||
"Replaced" => "Substituído(s)"
|
||||
),
|
||||
|
||||
"plugins-manager" =>
|
||||
array(
|
||||
"ICEcoder needs to..." => "ICEcoder deve ser reiniciado para habilitar plugin. Deseja Reiniciar?",
|
||||
"saving plugins" => "salvando plugins...",
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de escrita.",
|
||||
"and try again" => "e tente novamente",
|
||||
"couldnt delete dir" => "não foi possível excluir pasta",
|
||||
"couldnt delete file" => "não foi possível excluir arquivo",
|
||||
"plugins" => "plugins",
|
||||
"Guide to writing..." => "Guia para criar plugins",
|
||||
"Manage Installed" => "Gerenciar plugins",
|
||||
"URL" => "URL",
|
||||
"Target" => "Alvo",
|
||||
"Timer" => "Temporizador",
|
||||
"Update" => "Atualizar",
|
||||
"Install" => "Instalar",
|
||||
"Uninstall" => "Desinstalar",
|
||||
"Reload after install..." => "Atualização necessária após instalação"
|
||||
),
|
||||
|
||||
"properties" =>
|
||||
array(
|
||||
"properties" => "propriedades",
|
||||
"Size" => "Tamanho",
|
||||
"Modified" => "Modificado",
|
||||
"Last access" => "Último acesso",
|
||||
"Type" => "Tipo",
|
||||
"Readable Writeable" => "Leitura / Escrita",
|
||||
"Relative path" => "Caminho relativo",
|
||||
"Absolute path" => "Caminho absoluto",
|
||||
"Contains" => "Contem",
|
||||
"Permissions" => "Permissões",
|
||||
"Owner" => "Proprietário",
|
||||
"Group" => "Grupo",
|
||||
"Public" => "Público",
|
||||
"Read" => "Ler",
|
||||
"Write" => "Salvar",
|
||||
"Execute" => "Executar",
|
||||
"Change to" => "Alterar para",
|
||||
"update" => "atualizar"
|
||||
),
|
||||
|
||||
"settings-common" =>
|
||||
array(
|
||||
"Your document does..." => "Seu arquivo não está no formato UTF-8, deve ser convertido"
|
||||
),
|
||||
|
||||
"settings-save-current-files" =>
|
||||
array(
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de acesso (públicas)",
|
||||
"and try again" => "e tente novamente"
|
||||
),
|
||||
|
||||
"settings-screen" =>
|
||||
array(
|
||||
"settings" => "configurações",
|
||||
"version" => "versão",
|
||||
"website" => "website",
|
||||
"git" => "git",
|
||||
"codemirror dir" => "pasta codemirror",
|
||||
"codemirror version" => "versão codemirror",
|
||||
"file manager root" => "Raiz gerenciador de arquivos",
|
||||
"Free to use..." => "Livre para utilização para seus propósitos, comercial ou não, mas aviseme sobre sua implementação se puder. :)<br><br>Sem garantias, Muitas empresas e pessoas fantásticas contribuiram para desenvolver o ICEcoder, há muito o que agradecermos aqui. Veja a lista completa aqui",
|
||||
"functionality" => "funcionalidade",
|
||||
"check for updates..." => "verificar atualizações ao iniciar",
|
||||
"auto open last..." => "carregar últimos arquvos abertos ao iniciar",
|
||||
"when finding in..." => "ao buscar arquivos, excluir",
|
||||
"assisting" => "assistindo",
|
||||
"code assist" => "Assist. de cód.",
|
||||
"visible tabs" => "Abas visíveis",
|
||||
"locked nav" => "Trava Nav.",
|
||||
"tag wrapper command" => "comando de quebra",
|
||||
"auto-complete on" => "hab. auto-completar",
|
||||
"security" => "segurança",
|
||||
"new password" => "nova senha",
|
||||
"8 chars min" => "mín. 8 carac.",
|
||||
"confirm password" => "confirmar senha",
|
||||
"banned files/folders" => "arquivos/pastas bloqueados",
|
||||
"banned paths" => "caminhos bloqueados",
|
||||
"ip addresses" => "endereços IP",
|
||||
"Slash prefixed comma..." => "Prefixo barra, separado por vígula",
|
||||
"Comma delimited" => "Separado por vírgula",
|
||||
"style" => "estilo",
|
||||
"theme" => "tema",
|
||||
"line wrapping" => "quebra de linha",
|
||||
"indent type" => "indent type",
|
||||
"indent size" => "indent size",
|
||||
"font size" => "tam. fonte",
|
||||
"layout" => "layout",
|
||||
"plugin panel aligned" => "painel plugin alinhado",
|
||||
"file manager" => "gerenciador de arquivos",
|
||||
"root" => "raiz",
|
||||
"Slash prefixed" => "Prefixo barra",
|
||||
"bug reporting" => "reportar erro",
|
||||
"check in files" => "verificar em arquivos",
|
||||
"every" => "tudo",
|
||||
"secs getting last" => "segs, pegando últimos",
|
||||
"lines" => "linhas",
|
||||
"multi-user" => "multi-usuário",
|
||||
"Make sure you..." => "Cuidado para nâo travar seu usuário",
|
||||
"Registration" => "Cadastro",
|
||||
"auth token" => "Chave de Autenticação",
|
||||
"Required to get..." => "RNecessário para verificar diferenças, e efetivar alterações no GitHub. Se não tiver uma pode usar:".PHP_EOL.PHP_EOL.
|
||||
"- chave de acesso pessoal (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
|
||||
"- cliente/par secreto (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
|
||||
"Não é recomendado configurar sua chave aqui, mas quando solicitado pelo ICEcoderpara mantes em sessão apenas.".PHP_EOL.PHP_EOL.
|
||||
"No entanto, se trabalhar em ambiente seguro, é melhor setar essa propriedade.",
|
||||
"Sorry cannot commit..." => "Desculpe, não é permitido efetivar atulização no modo DEMO",
|
||||
"update" => "atualizar"
|
||||
),
|
||||
|
||||
"settings-update" =>
|
||||
array(
|
||||
"Cannot update config..." => "Não foi possível atualizar arquivo de configuração. Verifique permissões de acesso (públicas)",
|
||||
"and try again" => "e tentar novamente",
|
||||
"and press refresh" => "e pressione atulizar"
|
||||
),
|
||||
|
||||
"updater" =>
|
||||
array(
|
||||
"Update appears to..." => "Atualização completada"
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
// ICEcoder system settings
|
||||
$ICEcoderSettings = array(
|
||||
"versionNo" => "4.5",
|
||||
"versionNo" => "5.0 beta",
|
||||
"codeMirrorDir" => "CodeMirror-4.7",
|
||||
"docRoot" => $_SERVER['DOCUMENT_ROOT'],
|
||||
"demoMode" => false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$ICEcoderUserSettings = array(
|
||||
"versionNo" => "4.5",
|
||||
"versionNo" => "5.0 beta",
|
||||
"licenseEmail" => "",
|
||||
"licenseCode" => "",
|
||||
"configCreateDate" => 0,
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
/* ICEcoder default theme by Matt Pass */
|
||||
|
||||
.cm-s-icecoder {color: #666; background: #161612}
|
||||
.cm-s-icecoder {color: #666; background: #141612}
|
||||
|
||||
.cm-s-icecoder span.cm-keyword {color: #eee; font-weight:bold}
|
||||
.cm-s-icecoder span.cm-atom {color: #8b67cc}
|
||||
.cm-s-icecoder span.cm-number {color: #080}
|
||||
.cm-s-icecoder span.cm-def {color: #ca7919}
|
||||
.cm-s-icecoder span.cm-keyword {color: #eee; font-weight:bold} /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-atom {color: #e1c76e} /* yellow */
|
||||
.cm-s-icecoder span.cm-number {color: #6cb5d9} /* blue */
|
||||
.cm-s-icecoder span.cm-def {color: #b9ca4a} /* green */
|
||||
|
||||
.cm-s-icecoder span.cm-variable {color: #85b525}
|
||||
.cm-s-icecoder span.cm-variable-2 {color: #c71e5b}
|
||||
.cm-s-icecoder span.cm-variable-3 {color: #080}
|
||||
.cm-s-icecoder span.cm-variable {color: #6cb5d9} /* blue */
|
||||
.cm-s-icecoder span.cm-variable-2 {color: #bf255c} /* pink */
|
||||
.cm-s-icecoder span.cm-variable-3 {color: #f9602c} /* orange */
|
||||
|
||||
.cm-s-icecoder span.cm-property {color: #85b525}
|
||||
.cm-s-icecoder span.cm-operator {color: #080}
|
||||
.cm-s-icecoder span.cm-comment {color: #444}
|
||||
.cm-s-icecoder span.cm-property {color: #eee} /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-operator {color: #9179bb} /* purple */
|
||||
.cm-s-icecoder span.cm-comment {color: #44535a} /* grey-blue */
|
||||
|
||||
.cm-s-icecoder span.cm-string {color: #ccb100}
|
||||
.cm-s-icecoder span.cm-string-2 {color: #cc6d00}
|
||||
.cm-s-icecoder span.cm-string {color: #b9ca4a} /* green */
|
||||
.cm-s-icecoder span.cm-string-2 {color: #6cb5d9} /* blue */
|
||||
|
||||
.cm-s-icecoder span.cm-meta {color: #555}
|
||||
.cm-s-icecoder span.cm-error {color: #d00}
|
||||
.cm-s-icecoder span.cm-meta {color: #555} /* grey */
|
||||
.cm-s-icecoder span.cm-error {color: #d00} /* red */
|
||||
|
||||
.cm-s-icecoder span.cm-qualifier {color: #555}
|
||||
.cm-s-icecoder span.cm-builtin {color: #0052a3}
|
||||
.cm-s-icecoder span.cm-bracket {color: #cc7}
|
||||
.cm-s-icecoder span.cm-qualifier {color: #555} /* grey */
|
||||
.cm-s-icecoder span.cm-builtin {color: #214e7b} /* bright blue */
|
||||
.cm-s-icecoder span.cm-bracket {color: #cc7} /* grey-yellow */
|
||||
|
||||
.cm-s-icecoder span.cm-tag {color: #e8e8e8}
|
||||
.cm-s-icecoder span.cm-attribute {color: #099}
|
||||
.cm-s-icecoder span.cm-tag {color: #e8e8e8} /* off-white 2 */
|
||||
.cm-s-icecoder span.cm-attribute {color: #099} /* teal */
|
||||
|
||||
.cm-s-icecoder span.cm-header {color: #808}
|
||||
.cm-s-icecoder span.cm-quote {color: #070}
|
||||
.cm-s-icecoder span.cm-hr {color: #888}
|
||||
.cm-s-icecoder span.cm-link {color: #cc0}
|
||||
.cm-s-icecoder span.cm-header {color: #6a0d6a} /* purple-pink */
|
||||
.cm-s-icecoder span.cm-quote {color: #186718} /* dark green */
|
||||
.cm-s-icecoder span.cm-hr {color: #888} /* mid-grey */
|
||||
.cm-s-icecoder span.cm-link {color: #e1c76e} /* yellow */
|
||||
|
||||
.cm-s-icecoder .CodeMirror-cursor {border-left: 1px solid white !important}
|
||||
.cm-s-icecoder .CodeMirror-selected {color: #fff !important; background: #037 !important}
|
||||
.cm-s-icecoder .CodeMirror-gutters {background: #161612; min-width: 41px; border-right: 0}
|
||||
.cm-s-icecoder .CodeMirror-gutters {background: #141612; min-width: 41px; border-right: 0}
|
||||
.cm-s-icecoder .CodeMirror-linenumber {color: #555; cursor: default}
|
||||
.cm-s-icecoder .CodeMirror-matchingbracket {border: 1px solid grey; color: black !important}
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
include("headers.php");
|
||||
include("settings.php");
|
||||
$t = $text['file-control'];
|
||||
@@ -167,7 +167,7 @@ if (!$error && $_GET['action']=="save") {
|
||||
}
|
||||
clearstatcache();
|
||||
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
|
||||
$doNext .= 'top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.$filemtime.'";';
|
||||
$doNext = 'top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.$filemtime.'";';
|
||||
// Reload file manager, rename tab & remove old file highlighting if it was a new file
|
||||
if (isset($_POST['newFileName']) && $_POST['newFileName']!="") {
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'file\');';
|
||||
@@ -250,16 +250,312 @@ if (!$error && $_GET['action']=="save") {
|
||||
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot save']."\\n".$file."');";
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot save']."\\\\n".$file."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
};
|
||||
|
||||
// ==========
|
||||
// NEW FOLDER
|
||||
// ==========
|
||||
|
||||
if (!$error && $_GET['action']=="newFolder") {
|
||||
if (!$demoMode && is_writable($docRoot.$fileLoc)) {
|
||||
mkdir($file, octdec($ICEcoder['newDirPerms']));
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');';
|
||||
$finalAction = "newFolder";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-new-dir.php");
|
||||
} else {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot create...']."\\\\n".$fileLoc."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ================
|
||||
// MOVE FILE/FOLDER
|
||||
// ================
|
||||
|
||||
if (!$error && $_GET['action']=="move") {
|
||||
$moved=false;
|
||||
$doNext = "";
|
||||
$srcDir = $docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName']));
|
||||
$tgtDir = $docRoot.$fileLoc."/".$fileName;
|
||||
if ($srcDir != $tgtDir && $fileLoc != "") {
|
||||
if (!$demoMode && is_writable($srcDir)) {
|
||||
if(rename($srcDir,$tgtDir)) {
|
||||
// Reload file manager
|
||||
$fileOrFolder = is_dir($docRoot.$fileLoc."/".$fileName) ? "folder" : "file";
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'move\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean(str_replace("|","/",$_GET['oldFileName']))).'\',false,\''.$fileOrFolder.'\');';
|
||||
$finalAction = "move";
|
||||
$moved=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-move.php");
|
||||
}
|
||||
}
|
||||
if (!$moved) {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot move']."\\\\n".str_replace("|","/",strClean($_GET['oldFileName']))."\\\\n\\\\n".$t['Maybe public write...']."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==================
|
||||
// RENAME FILE/FOLDER
|
||||
// ==================
|
||||
|
||||
if (!$error && $_GET['action']=="rename") {
|
||||
$renamed=false;
|
||||
if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
|
||||
if(rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName)) {
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
|
||||
$finalAction = "rename";
|
||||
$renamed=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-rename.php");
|
||||
}
|
||||
}
|
||||
if (!$renamed) {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot rename']."\\\\n".strClean($_GET['oldFileName'])."\\\\n\\\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// =================
|
||||
// PASTE FILE/FOLDER
|
||||
// =================
|
||||
|
||||
if (!$error && $_GET['action']=="paste") {
|
||||
$source = $file;
|
||||
$dest = str_replace("//","/",$docRoot.$iceRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source));
|
||||
if (!$demoMode && is_writable(dirname($dest))) {
|
||||
if (is_dir($source)) {
|
||||
$fileOrFolder = "folder";
|
||||
if (!is_dir($dest)) {
|
||||
mkdir($dest, octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!is_dir($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
mkdir($dest, octdec($ICEcoder['newDirPerms']));
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::SELF_FIRST) as $item
|
||||
) {
|
||||
if ($item->isDir()) {
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$fileOrFolder = "file";
|
||||
if (!file_exists($dest)) {
|
||||
copy($source, $dest);
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!file_exists($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
copy($source, $dest);
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');';
|
||||
$finalAction = "pasteFile";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-paste.php");
|
||||
} else {
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot copy']." \\\\n".str_replace($docRoot,"",$source)."\\\\n ".$t['into']." \\\\n".str_replace($docRoot,"",$dest)."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==============
|
||||
// UPLOAD FILE(S)
|
||||
// ==============
|
||||
|
||||
if (!$error && $_GET['action']=="upload") {
|
||||
if (!$demoMode) {
|
||||
$doNext = "";
|
||||
class fileUploader {
|
||||
public function __construct($uploads) {
|
||||
global $docRoot,$iceRoot,$doNext;
|
||||
$uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
|
||||
foreach($uploads as $current) {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
if ($this->upload($current,$this->uploadFile)) {
|
||||
$doNext .= 'top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,\'/\'),\''.str_replace("'","\'",$fileName).'\',false,false,true,\'file\'); top.ICEcoder.serverMessage("'.$t['Uploaded file(s) OK'].'");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
$finalAction = "upload";
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot upload']." \\\\n".$fileName."\\\\n ".$t['into']." \\\\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upload($current,$uploadFile){
|
||||
if(move_uploaded_file($current->tmp_name,$uploadFile)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getDetails($fileArr) {
|
||||
foreach($fileArr['name'] as $keyee => $info) {
|
||||
$uploads[$keyee]->name=$fileArr['name'][$keyee];
|
||||
$uploads[$keyee]->type=$fileArr['type'][$keyee];
|
||||
$uploads[$keyee]->tmp_name=$fileArr['tmp_name'][$keyee];
|
||||
$uploads[$keyee]->error=$fileArr['error'][$keyee];
|
||||
}
|
||||
return $uploads;
|
||||
}
|
||||
|
||||
if($_FILES['filesInput']){
|
||||
$uploads = getDetails($_FILES['filesInput']);
|
||||
$fileUploader=new fileUploader($uploads);
|
||||
}
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-upload.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot upload...']."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
|
||||
$doNext .= "top.ICEcoder.hideFileMenu();top.document.getElementById('fileInput').value='';top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));";
|
||||
|
||||
// Upload is not handled by XHR methods, but form post, so we need to manually trigger $doNext in a script tag
|
||||
echo "<script>".$doNext."</script>";
|
||||
};
|
||||
|
||||
// ========================
|
||||
// DELETE FILE(S)/FOLDER(S)
|
||||
// ========================
|
||||
|
||||
if (!$error && $_GET['action']=="delete") {
|
||||
$doNext = "";
|
||||
$filesArray = explode(";",$file); // May contain more than one file here
|
||||
for ($i=0;$i<count($filesArray);$i++) {
|
||||
$fullPath = str_replace($docRoot,"",$filesArray[$i]);
|
||||
$fullPath = str_replace($iceRoot,"",$fullPath);
|
||||
$fullPath = $docRoot.$iceRoot.$fullPath;
|
||||
|
||||
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot delete...']."');";
|
||||
} else if (!$demoMode && is_writable($fullPath)) {
|
||||
is_dir($fullPath)
|
||||
? rrmdir($fullPath)
|
||||
: unlink($fullPath);
|
||||
$fileName = basename($fullPath);
|
||||
$fileLoc = dirname(str_replace($docRoot,"",$fullPath));
|
||||
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";};
|
||||
// Reload file manager
|
||||
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
$finalAction = "delete";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-delete.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot delete']."\\\\n".str_replace($docRoot,"",$fullPath)."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// The function to recursively remove folders & files
|
||||
function rrmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
filetype($dir."/".$object) == "dir"
|
||||
? rrmdir($dir."/".$object)
|
||||
: unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
rmdir($dir);
|
||||
}
|
||||
};
|
||||
|
||||
// ======================
|
||||
// REPLACE TEXT IN A FILE
|
||||
// ======================
|
||||
|
||||
if (!$error && $_GET['action']=="replaceText") {
|
||||
$doNext = "";
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile);
|
||||
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
|
||||
fwrite($fh, $newContent);
|
||||
fclose($fh);
|
||||
$finalAction = "replaceText";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-replace-text.php");
|
||||
} else {
|
||||
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot replace...']."\\\\n".$file."');";
|
||||
$finalAction = "nothing";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// ==========================
|
||||
// GET CONTENTS OF REMOTE URL
|
||||
// ==========================
|
||||
|
||||
if (!$error && $_GET['action']=="getRemoteFile") {
|
||||
$doNext = "";
|
||||
if ($remoteFile = toUTF8noBOM(file_get_contents($file,false,$context),true)) {
|
||||
// replace \r\n (Windows), \r (old Mac) and \n (Linux) line endings with whatever we chose to be lineEnding
|
||||
$remoteFile = str_replace("\r\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\r", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$doNext .= 'top.ICEcoder.newTab();';
|
||||
$doNext .= 'top.ICEcoder.getcMInstance().setValue(\''.str_replace("\r","",str_replace("\t","\\\\t",str_replace("\n","\\\\n",str_replace("'","\\\\'",str_replace("\\","\\\\",preg_quote($remoteFile)))))).'\');';
|
||||
$finalAction = "getRemoteFile";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-get-remote-file.php");
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext .= 'top.ICEcoder.message(\''.$t['Sorry, could not...'].' '.$file.'\');';
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
};
|
||||
|
||||
// =======================
|
||||
// CHANGING FILE/DIR PERMS
|
||||
// =======================
|
||||
|
||||
if (!$error && $_GET['action']=="perms") {
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
chmod($file,octdec(numClean($_GET['perms'])));
|
||||
// Reload file manager
|
||||
$doNext = 'top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
$finalAction = "perms";
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-perms.php");
|
||||
} else {
|
||||
$finalAction = "nothing";
|
||||
$doNext = "top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
|
||||
}
|
||||
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -284,7 +580,7 @@ echo '{
|
||||
"timeEnd": 0,
|
||||
"timeTaken": 0,
|
||||
"csrf": "'.$_GET["csrf"].'",
|
||||
"doNext" : "'.str_replace(PHP_EOL,'',str_replace(' ','',str_replace('"','\"',$doNext))).'top.ICEcoder.switchMode();"
|
||||
"doNext" : "'.preg_replace('/\r|\n/','',str_replace(' ','',str_replace('"','\"',$doNext))).'top.ICEcoder.switchMode();"
|
||||
},
|
||||
"status": {
|
||||
"error" : '.($error ? 'true' : 'false').',
|
||||
|
||||
@@ -4,8 +4,8 @@ include("settings.php");
|
||||
$t = $text['file-control'];
|
||||
?>
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
<script src="github.js"></script>
|
||||
<script src="underscore-min.js"></script>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="underscore-min.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php ;}; ?>
|
||||
<script>
|
||||
<?php
|
||||
@@ -100,261 +100,7 @@ if ($_GET['action']=="load") {
|
||||
|
||||
};
|
||||
|
||||
// Get the contents of a remote URL
|
||||
if ($_GET['action']=="getRemoteFile") {
|
||||
if ($remoteFile = toUTF8noBOM(file_get_contents($file,false,$context),true)) {
|
||||
// replace \r\n (Windows), \r (old Mac) and \n (Linux) line endings with whatever we chose to be lineEnding
|
||||
$remoteFile = str_replace("\r\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\r", $ICEcoder["lineEnding"], $remoteFile);
|
||||
$remoteFile = str_replace("\n", $ICEcoder["lineEnding"], $remoteFile);
|
||||
echo 'top.ICEcoder.newTab();';
|
||||
echo '</script><textarea name="remoteFile" id="remoteFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&",$remoteFile)).'</textarea><script>';
|
||||
echo 'top.ICEcoder.getcMInstance().setValue(document.getElementById("remoteFile").value);action="getRemoteFile";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-get-remote-file.php");
|
||||
} else {
|
||||
echo 'action="nothing"; top.ICEcoder.message(\''.$t['Sorry, could not...'].' '.$file.'\');';
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to add a new folder...
|
||||
if ($_GET['action']=="newFolder") {
|
||||
if (!$demoMode && is_writable($docRoot.$fileLoc)) {
|
||||
mkdir($file, octdec($ICEcoder['newDirPerms']));
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');action="newFolder";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-new-dir.php");
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$fileLoc."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to paste a new file...
|
||||
if ($_GET['action']=="paste") {
|
||||
$source = $file;
|
||||
$dest = str_replace("//","/",$docRoot.$iceRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source));
|
||||
if (!$demoMode && is_writable(dirname($dest))) {
|
||||
if (is_dir($source)) {
|
||||
$fileOrFolder = "folder";
|
||||
if (!is_dir($dest)) {
|
||||
mkdir($dest, octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!is_dir($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
mkdir($dest, octdec($ICEcoder['newDirPerms']));
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::SELF_FIRST) as $item
|
||||
) {
|
||||
if ($item->isDir()) {
|
||||
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), octdec($ICEcoder['newDirPerms']));
|
||||
} else {
|
||||
copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$fileOrFolder = "file";
|
||||
if (!file_exists($dest)) {
|
||||
copy($source, $dest);
|
||||
} else {
|
||||
for ($i=2; $i<1000000000; $i++) {
|
||||
if (!file_exists($dest." (".$i.")")) {
|
||||
$dest = $dest." (".$i.")";
|
||||
copy($source, $dest);
|
||||
$i=1000000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');action="pasteFile";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-paste.php");
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot copy']." \\n".str_replace($docRoot,"",$source)."\\n ".$t['into']." \\n".str_replace($docRoot,"",$dest)."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to upload files...
|
||||
if ($_GET['action']=="upload") {
|
||||
if (!$demoMode) {
|
||||
class fileUploader {
|
||||
public function __construct($uploads) {
|
||||
global $docRoot,$iceRoot;
|
||||
$uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
|
||||
foreach($uploads as $current) {
|
||||
$this->uploadFile=$uploadDir.$current->name;
|
||||
$fileName = $current->name;
|
||||
if ($this->upload($current,$this->uploadFile)) {
|
||||
echo 'action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,\'/\'),\''.str_replace("'","\'",$fileName).'\',false,false,true,\'file\'); top.ICEcoder.serverMessage("'.$t['Uploaded file(s) OK'].'");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot upload']." \\n".$fileName."\\n ".$t['into']." \\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function upload($current,$uploadFile){
|
||||
if(move_uploaded_file($current->tmp_name,$uploadFile)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getDetails($fileArr) {
|
||||
foreach($fileArr['name'] as $keyee => $info) {
|
||||
$uploads[$keyee]->name=$fileArr['name'][$keyee];
|
||||
$uploads[$keyee]->type=$fileArr['type'][$keyee];
|
||||
$uploads[$keyee]->tmp_name=$fileArr['tmp_name'][$keyee];
|
||||
$uploads[$keyee]->error=$fileArr['error'][$keyee];
|
||||
}
|
||||
return $uploads;
|
||||
}
|
||||
|
||||
if($_FILES['filesInput']){
|
||||
$uploads = getDetails($_FILES['filesInput']);
|
||||
$fileUploader=new fileUploader($uploads);
|
||||
}
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-upload.php");
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot upload...']."');";
|
||||
}
|
||||
|
||||
echo "top.ICEcoder.hideFileMenu();top.document.getElementById('fileInput').value='';top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));";
|
||||
}
|
||||
|
||||
// If we're due to rename a file/folder...
|
||||
if ($_GET['action']=="rename") {
|
||||
$renamed=false;
|
||||
if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
|
||||
if(rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName)) {
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
|
||||
echo 'action="rename";';
|
||||
$renamed=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-rename.php");
|
||||
}
|
||||
}
|
||||
if (!$renamed) {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot rename']."\\n".strClean($_GET['oldFileName'])."\\n\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to move a file/folder...
|
||||
if ($_GET['action']=="move") {
|
||||
$moved=false;
|
||||
$srcDir = $docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName']));
|
||||
$tgtDir = $docRoot.$fileLoc."/".$fileName;
|
||||
if ($srcDir != $tgtDir && $fileLoc != "") {
|
||||
if (!$demoMode && is_writable($srcDir)) {
|
||||
if(rename($srcDir,$tgtDir)) {
|
||||
// Reload file manager
|
||||
$fileOrFolder = is_dir($docRoot.$fileLoc."/".$fileName) ? "folder" : "file";
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'move\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\',false,\''.$fileOrFolder.'\');';
|
||||
echo 'action="move";';
|
||||
$moved=true;
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-move.php");
|
||||
}
|
||||
}
|
||||
if (!$moved) {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot move']."\\n".strClean($_GET['oldFileName'])."\\n\\n".$t['Maybe public write...']."');";
|
||||
}
|
||||
} else {
|
||||
echo "action='nothing';";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to replace text in a file...
|
||||
if ($_GET['action']=="replaceText") {
|
||||
if (!$demoMode && is_writable(str_replace("|","/",strClean($_GET['fileRef'])))) {
|
||||
$file = str_replace("|","/",strClean($_GET['fileRef']));
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile);
|
||||
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
|
||||
fwrite($fh, $newContent);
|
||||
fclose($fh);
|
||||
echo 'action="replaceText";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-replace-text.php");
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot replace...']."\\n".strClean($_GET['fileRef'])."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to change permissions on a file/folder...
|
||||
if ($_GET['action']=="perms") {
|
||||
if (!$demoMode && is_writable($file)) {
|
||||
chmod($file,octdec(numClean($_GET['perms'])));
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
|
||||
echo 'action="perms";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-perms.php");
|
||||
} else {
|
||||
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// If we're due to delete a file...
|
||||
if ($_GET['action']=="delete") {
|
||||
$filesArray = explode(";",$file); // May contain more than one file here
|
||||
for ($i=0;$i<count($filesArray);$i++) {
|
||||
$fullPath = str_replace($docRoot,"",$filesArray[$i]);
|
||||
$fullPath = str_replace($iceRoot,"",$fullPath);
|
||||
$fullPath = $docRoot.$iceRoot.$fullPath;
|
||||
|
||||
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
|
||||
echo "top.ICEcoder.message('".$t['Sorry, cannot delete...']."');";
|
||||
} else if (!$demoMode && is_writable($fullPath)) {
|
||||
is_dir($fullPath)
|
||||
? rrmdir($fullPath)
|
||||
: unlink($fullPath);
|
||||
$fileName = basename($fullPath);
|
||||
$fileLoc = dirname(str_replace($docRoot,"",$fullPath));
|
||||
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";};
|
||||
// Reload file manager
|
||||
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
|
||||
echo 'action="delete";';
|
||||
// Run our custom processes
|
||||
include_once("../processes/on-file-dir-delete.php");
|
||||
} else {
|
||||
echo "top.ICEcoder.message('".$t['Sorry, cannot delete']."\\n".str_replace($docRoot,"",$fullPath)."');";
|
||||
}
|
||||
echo 'action="nothing";';
|
||||
}
|
||||
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
|
||||
}
|
||||
|
||||
// The function to recursively remove folders & files
|
||||
function rrmdir($dir) {
|
||||
if (is_dir($dir)) {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
filetype($dir."/".$object) == "dir"
|
||||
? rrmdir($dir."/".$object)
|
||||
: unlink($dir."/".$object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
rmdir($dir);
|
||||
}
|
||||
}
|
||||
?>
|
||||
if (action=="load") {
|
||||
if (fileType=="text") {
|
||||
@@ -376,35 +122,37 @@ if (action=="load") {
|
||||
top.ICEcoder.setLayout();
|
||||
top.ICEcoder.content.contentWindow.createNewCMInstance(top.ICEcoder.nextcMInstance);
|
||||
|
||||
// If we're in GitHub diff mode and have a split pane display, get the content for the diff pane
|
||||
if (top.ICEcoder.githubDiff && top.ICEcoder.splitPane) {
|
||||
<?php
|
||||
// Get our GitHub relative site path & local path
|
||||
$ghRemoteURLPos = array_search($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
// If we're in GitHub diff mode and have a split pane display, get the content for the diff pane
|
||||
if (top.ICEcoder.githubDiff && top.ICEcoder.splitPane) {
|
||||
<?php
|
||||
// Get our GitHub relative site path & local path
|
||||
$ghRemoteURLPos = array_search($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
|
||||
|
||||
$ghLocalURLPaths = $ICEcoder['githubLocalPaths'];
|
||||
$ghLocalPath = $ghLocalURLPaths[$ghRemoteURLPos];
|
||||
$ghLocalURLPaths = $ICEcoder['githubLocalPaths'];
|
||||
$ghLocalPath = $ghLocalURLPaths[$ghRemoteURLPos];
|
||||
|
||||
$ghRemoteURLPaths = $ICEcoder['githubRemotePaths'];
|
||||
$ghRemoteURL = $ghRemoteURLPaths[$ghRemoteURLPos];
|
||||
$ghRemoteURLPaths = $ICEcoder['githubRemotePaths'];
|
||||
$ghRemoteURL = $ghRemoteURLPaths[$ghRemoteURLPos];
|
||||
|
||||
$ghRemoteURL = str_replace("https://github.com/","",$ghRemoteURL);
|
||||
$ghRemoteURL = str_replace("/","|",$ghRemoteURL);
|
||||
$ghRemoteURL = str_replace("https://github.com/","",$ghRemoteURL);
|
||||
$ghRemoteURL = str_replace("/","|",$ghRemoteURL);
|
||||
|
||||
// If the file is not in a sub-sub dir of the doc root
|
||||
if (!strpos($fileLoc,"/",1)) {
|
||||
// The file path is simply the file name in the root
|
||||
$ghFilePath = $fileName;
|
||||
} else {
|
||||
// We need to get rid of the root dir and trailing slash
|
||||
$ghFilePath = substr(str_replace($ghLocalPath,"",$fileLoc),1);
|
||||
// If it's not within a sub-dir, it's just the filename, otherwise prefix with dir path and pipe
|
||||
$ghFilePath = $ghFilePath == "" ? $fileName : $ghFilePath."|".$fileName;
|
||||
// If the file is not in a sub-sub dir of the doc root
|
||||
if (!strpos($fileLoc,"/",1)) {
|
||||
// The file path is simply the file name in the root
|
||||
$ghFilePath = $fileName;
|
||||
} else {
|
||||
// We need to get rid of the root dir and trailing slash
|
||||
$ghFilePath = substr(str_replace($ghLocalPath,"",$fileLoc),1);
|
||||
// If it's not within a sub-dir, it's just the filename, otherwise prefix with dir path and pipe
|
||||
$ghFilePath = $ghFilePath == "" ? $fileName : $ghFilePath."|".$fileName;
|
||||
}
|
||||
?>
|
||||
|
||||
top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = "github.php?action=read&repo=<?php echo $ghRemoteURL;?>&filePath=<?php echo $ghFilePath;?>&csrf="+top.ICEcoder.csrf;
|
||||
}
|
||||
?>
|
||||
|
||||
top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = "github.php?action=read&repo=<?php echo $ghRemoteURL;?>&filePath=<?php echo $ghFilePath;?>&csrf="+top.ICEcoder.csrf;
|
||||
}
|
||||
<?php ;}; ?>
|
||||
|
||||
// Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on ICEcoder's load)
|
||||
top.ICEcoder.switchMode();
|
||||
|
||||
@@ -19,7 +19,7 @@ $t = $text['get-branch'];
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<?php if ($_SESSION['githubDiff']) { ?>
|
||||
<script src="github.js"></script>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<?php ;}; ?>
|
||||
</head>
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub manager</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="github-manager.css">
|
||||
<link rel="stylesheet" type="text/css" href="github-manager.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="githubManager">
|
||||
|
||||
@@ -23,7 +23,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="github.js"></script>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
</body>
|
||||
<script>
|
||||
top.ICEcoder.githubAuthTokenSet = true;
|
||||
@@ -47,8 +47,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="github.js"></script>
|
||||
<script src="underscore-min.js"></script>
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<script src="underscore-min.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
</body>
|
||||
<script>
|
||||
// Start our github object, establish this repo & file path
|
||||
@@ -153,8 +153,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub commit files</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<script src="github.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="github.css">
|
||||
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
<link rel="stylesheet" type="text/css" href="github.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="githubAction">
|
||||
|
||||
@@ -6,8 +6,10 @@ if(strpos(str_replace("\\","/",dirname(__FILE__)),"tmp/oldVersion") !== false) {
|
||||
|
||||
// Load common functions
|
||||
include_once(dirname(__FILE__)."/settings-common.php");
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['headers'];
|
||||
if (isset($_SESSION['text'])) {
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['headers'];
|
||||
}
|
||||
|
||||
// CSRF synchronizer token pattern, 32 chars
|
||||
if (!isset($_SESSION["csrf"])) {
|
||||
@@ -31,5 +33,8 @@ if (!headers_sent()) {
|
||||
header("X-XSS-Protection: 1; mode=block"); // Turn on IE8-9 XSS prevention tools
|
||||
// header("X-Content-Security-Policy: allow 'self'"); // Only allows JS on same domain & not inline to run
|
||||
header("X-Content-Type-Options: nosniff"); // Prevent MIME based attacks
|
||||
header('Cache-Control: no-cache, no-store, must-revalidate'); // Caching over HTTP 1.1 covered
|
||||
header('Pragma: no-cache'); // Caching over HTTP 1.0 covered
|
||||
header('Expires: 0'); // Caching over Proxies covered
|
||||
}
|
||||
?>
|
||||
@@ -10,7 +10,7 @@ $t = $text['help'];
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</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="help.css">
|
||||
<link rel="stylesheet" type="text/css" href="help.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="help">
|
||||
|
||||
@@ -107,7 +107,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
.tabsBar .newTab {position: absolute; display: inline-block; height: 15px; padding: 4px 7px 3px 7px; background: #ddd; cursor: pointer; z-index: 0;
|
||||
transition: left 0.15s ease-in-out;
|
||||
}
|
||||
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #161612}
|
||||
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #141612}
|
||||
.findBar .findReplace {position: absolute; padding-top: 2px; z-index: 1}
|
||||
.findReplace .selectWrapper {position: relative; display: inline-block}
|
||||
.findReplace .selectWrapper select {position: relative; padding: 1px; border: 0; background: url('../images/select-arrow.gif') no-repeat right #444; color: #fff; font-size: 10px; height: 16px;
|
||||
@@ -153,7 +153,7 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
|
||||
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb}
|
||||
.screenCenter .trialBarContainer {display: inline-block; width: 170px; height: 8px; color: #bbb; background: #0b0b0b; text-align: right; margin-bottom: 40px}
|
||||
.screenCenter .trialBarRemaining {display: inline-block; width: 170px; height: 8px; background: rgba(0,198,255,0.7); box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
|
||||
transition: width 1s ease-in-out;
|
||||
transition: width 0.7s ease-in-out;
|
||||
}
|
||||
.screenCenter .trialBarText {text-align: center}
|
||||
.screenCenter .trialBarText a {color: #fff; text-decoration: none}
|
||||
|
||||
@@ -1132,8 +1132,7 @@ var ICEcoder = {
|
||||
|
||||
// Create a new file (start & instant save)
|
||||
newFile: function() {
|
||||
top.ICEcoder.newTab();
|
||||
top.ICEcoder.saveFile();
|
||||
top.ICEcoder.newTab('alsoSave');
|
||||
},
|
||||
|
||||
// Create a new folder
|
||||
@@ -1144,7 +1143,7 @@ var ICEcoder = {
|
||||
newFolder = top.ICEcoder.getInput('Enter new folder name at '+shortURL,'');
|
||||
if (newFolder) {
|
||||
newFolder = (shortURL + "/" + newFolder).replace(/\/\//,"/");
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=newFolder&file="+newFolder.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=newFolder&csrf="+top.ICEcoder.csrf,newFolder.replace(/\//g,"|"));
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Creating Folder']+'</b><br>'+newFolder);
|
||||
}
|
||||
},
|
||||
@@ -1180,7 +1179,7 @@ var ICEcoder = {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Opening File']+'</b><br>'+top.ICEcoder.shortURL);
|
||||
} else {
|
||||
top.ICEcoder.createNewTab();
|
||||
top.ICEcoder.createNewTab('new');
|
||||
}
|
||||
top.ICEcoder.fMIconVis('fMView',1);
|
||||
}
|
||||
@@ -1209,7 +1208,7 @@ var ICEcoder = {
|
||||
|
||||
// Get remote file contents
|
||||
getRemoteFile: function(remoteFile) {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=getRemoteFile&file="+remoteFile+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=getRemoteFile&csrf="+top.ICEcoder.csrf,remoteFile);
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Getting']+'</b><br>'+remoteFile);
|
||||
},
|
||||
|
||||
@@ -1253,7 +1252,7 @@ var ICEcoder = {
|
||||
top.get('tab'+(i+1)).innerHTML = closeTabLink + " " + fileName.slice(fileName.lastIndexOf("/")).replace(/\//,"");
|
||||
top.get('tab'+(i+1)).title = newName;
|
||||
}
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+oldName.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,newName);
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Renaming to']+'</b><br>'+newName);
|
||||
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
@@ -1274,7 +1273,7 @@ var ICEcoder = {
|
||||
top.get('tab'+(i+1)).innerHTML = closeTabLink + " " + fileName.slice(fileName.lastIndexOf("/")).replace(/\//,"");
|
||||
top.get('tab'+(i+1)).title = newName;
|
||||
}
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=move&file="+newName+"&oldFileName="+oldName.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+oldName.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,newName.replace(/\//g,"|"));
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Moving to']+'</b><br>'+newName);
|
||||
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
@@ -1288,7 +1287,7 @@ var ICEcoder = {
|
||||
tgtFiles = fileList ? fileList : top.ICEcoder.selectedFiles;
|
||||
tgtListDisplay = tgtFiles.toString().replace(/\|/g,"/").replace(/,/g,"\n");
|
||||
if (tgtFiles.length>0 && top.ICEcoder.ask('Delete:\n\n'+tgtListDisplay+'?')) {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=delete&file="+tgtFiles.join(";")+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=delete&&csrf="+top.ICEcoder.csrf,tgtFiles.join(";"));
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Deleting File']+'</b><br>'+tgtListDisplay);
|
||||
};
|
||||
},
|
||||
@@ -1312,7 +1311,7 @@ var ICEcoder = {
|
||||
if (top.ICEcoder.copiedFiles) {
|
||||
for (var i=0; i<top.ICEcoder.copiedFiles.length; i++) {
|
||||
if (top.ICEcoder.copiedFiles[i]!="|") {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+top.ICEcoder.copiedFiles[i]+"&location="+location+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=paste&location="+location+"&csrf="+top.ICEcoder.csrf,top.ICEcoder.copiedFiles[i]);
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Pasting File']+'</b><br>'+top.ICEcoder.copiedFiles[i].toString().replace(/\|/g,"/").replace(/,/g,"\n"));
|
||||
} else {
|
||||
top.ICEcoder.message(top.t['Sorry cannot paste...']);
|
||||
@@ -1736,7 +1735,7 @@ var ICEcoder = {
|
||||
|
||||
// Replace text in a file
|
||||
replaceInFile: function(fileRef,find,replace) {
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=replaceText&fileRef="+fileRef.replace(/\//g,"|")+"&find="+find+"&replace="+replace+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+find+"&replace="+replace+"&csrf="+top.ICEcoder.csrf,fileRef.replace(/\//g,"|"));
|
||||
top.ICEcoder.serverMessage('<b>'+top.t['Replacing text in']+'</b><br>'+fileRef);
|
||||
},
|
||||
|
||||
@@ -2108,7 +2107,8 @@ var ICEcoder = {
|
||||
// If we've just removed from the array and there's another action queued up, or we're triggering for the first time
|
||||
// then do the next requested process, stored at array pos 0
|
||||
if (action=="del" && ICEcoder.serverQueueItems.length>=1 || ICEcoder.serverQueueItems.length==1) {
|
||||
if (item && item.indexOf('action=save')>0) {
|
||||
// If we have an item, we're not saving previous file refs and not loading
|
||||
if (item && (item.indexOf('saveFiles=')==-1 && item.indexOf('action=load')==-1)) {
|
||||
xhr = top.ICEcoder.xhrObj();
|
||||
xhr.onreadystatechange=function() {
|
||||
if (xhr.readyState==4 && xhr.status==200) {
|
||||
@@ -2132,7 +2132,11 @@ var ICEcoder = {
|
||||
xhr.open("POST",ICEcoder.serverQueueItems[0],true);
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
timeStart = new Date().getTime();
|
||||
xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
|
||||
if (item.indexOf('action=save')>0) {
|
||||
xhr.send('timeStart='+timeStart+'&file='+file+'&contents='+encodeURIComponent(top.document.getElementById('saveTemp1').value));
|
||||
} else {
|
||||
xhr.send('timeStart='+timeStart+'&file='+file);
|
||||
}
|
||||
} else {
|
||||
setTimeout(function() {top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href=ICEcoder.serverQueueItems[0]},1);
|
||||
}
|
||||
@@ -2381,7 +2385,7 @@ var ICEcoder = {
|
||||
chmod: function(file,perms) {
|
||||
file = file.replace(top.iceRoot,"");
|
||||
top.ICEcoder.showHide('hide',top.get('blackMask'));
|
||||
top.ICEcoder.serverQueue("add","lib/file-control.php?action=perms&file="+file+"&perms="+perms+"&csrf="+top.ICEcoder.csrf);
|
||||
top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=perms&perms="+perms+"&csrf="+top.ICEcoder.csrf,file);
|
||||
top.ICEcoder.serverMessage('<b>chMod '+perms+' on </b><br>'+file.replace(/\|/g,"/"));
|
||||
},
|
||||
|
||||
@@ -2461,9 +2465,8 @@ var ICEcoder = {
|
||||
// ICEcoder just updated
|
||||
updated: function() {
|
||||
top.get('blackMask').style.visibility = "visible";
|
||||
top.get('mediaContainer').innerHTML = '<h1>Thanks for updating to v'+top.ICEcoder.versionNo+'!</h1>'
|
||||
+ '<p style="line-height: 24px; padding-bottom: 24px">ICEcoder relies entirely on donations to fund future versions.<br>If you find it useful, please consider donating.<br>Many thanks!</p>'
|
||||
+ '<a href="https://icecoder.net/?display=updateDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate $5</a>';
|
||||
top.get('mediaContainer').innerHTML = '<h1 style="color: #fff; cursor: default">Thanks for updating to v'+top.ICEcoder.versionNo+'!</h1>'
|
||||
+ '<h2 style="color: #888; cursor: default">Click anywhere to continue using ICEcoder...</h2>';
|
||||
},
|
||||
|
||||
// XHR object
|
||||
@@ -2658,7 +2661,7 @@ var ICEcoder = {
|
||||
},
|
||||
|
||||
// Starts a new file by setting a few vars & creating a new cM instance
|
||||
newTab: function() {
|
||||
newTab: function(alsoSave) {
|
||||
var cM;
|
||||
|
||||
ICEcoder.cMInstances.push(ICEcoder.nextcMInstance);
|
||||
@@ -2677,10 +2680,15 @@ var ICEcoder = {
|
||||
cM.removeLineClass(ICEcoder['cMActiveLinecM'+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]], "background");
|
||||
ICEcoder['cMActiveLinecM'+ICEcoder.selectedTab] = cM.addLineClass(0, "background", "cm-s-activeLine");
|
||||
ICEcoder.nextcMInstance++;
|
||||
|
||||
// Also save?
|
||||
if (alsoSave) {
|
||||
top.ICEcoder.saveFile();
|
||||
}
|
||||
},
|
||||
|
||||
// Create a new tab for a file
|
||||
createNewTab: function() {
|
||||
createNewTab: function(isNew) {
|
||||
var closeTabLink, fileName;
|
||||
|
||||
// Push new file into array
|
||||
@@ -2703,7 +2711,9 @@ var ICEcoder = {
|
||||
// Add a new value ready to indicate if this content has been changed
|
||||
top.ICEcoder.savedPoints.push(0);
|
||||
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
if (!isNew) {
|
||||
top.ICEcoder.setPreviousFiles();
|
||||
}
|
||||
},
|
||||
|
||||
// Cycle to next tab
|
||||
|
||||
137
lib/ice-coder.min.js
vendored
137
lib/ice-coder.min.js
vendored
@@ -46,20 +46,20 @@ ICEcoder.selectDeselectFile("select",d),top.ICEcoder.selectedFiles.push(f);top.I
|
||||
top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.selectedFiles[b]),ICEcoder.selectDeselectFile("deselect",a);top.ICEcoder.selectedFiles.length=0},selectDeselectFile:function(a,b){var c;b&&(c=-1<top.ICEcoder.openFiles.indexOf(b.id.replace(/\|/g,"/"))?!0:!1,top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]==b.id.replace(/\|/g,"/")?b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:top.ICEcoder.tabBGcurrent:b.style.backgroundColor="select"==a?top.ICEcoder.tabBGselected:
|
||||
b.style.backgroundColor=c?top.ICEcoder.tabBGopen:top.ICEcoder.tabBGnormal,b.style.color="select"==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalFile)},boxSelect:function(a,b){var c,d;c=top.filesFrame.contentWindow.document.getElementById("fmDragBox");"down"==b&&(top.ICEcoder.fmDragBoxStartX=top.ICEcoder.mouseX,top.ICEcoder.fmDragBoxStartY=top.ICEcoder.mouseY,top.ICEcoder.fmDragSelectFirst="",top.ICEcoder.fmDragSelectLast="");top.ICEcoder.mouseDown&&"drag"==b&&(top.ICEcoder.fmDraggedBox=!0,
|
||||
d=0<top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX,c.style.left=(d?top.ICEcoder.fmDragBoxStartX:top.ICEcoder.mouseX)+"px",c.style.width=Math.abs(top.ICEcoder.mouseX-top.ICEcoder.fmDragBoxStartX)+"px",d=0<top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY,c.style.top=(d?top.ICEcoder.fmDragBoxStartY-70:top.ICEcoder.mouseY-70)+"px",c.style.height=Math.abs(top.ICEcoder.mouseY-top.ICEcoder.fmDragBoxStartY)+"px",""!=top.ICEcoder.thisFileFolderLink&&(""==top.ICEcoder.fmDragSelectFirst?(top.ICEcoder.fmDragSelectFirst=
|
||||
top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectFirst),top.ICEcoder.selectFileFolder(a)):(top.ICEcoder.fmDragSelectLast=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectLast),top.ICEcoder.selectFileFolder(a,!1,"shiftSim"))));"up"==b&&(c.style.width=0,c.style.height=0)},newFile:function(){top.ICEcoder.newTab();
|
||||
top.ICEcoder.saveFile()},newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=newFolder&file="+b.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType=
|
||||
"file");"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,
|
||||
"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab(),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;if(a=
|
||||
top.ICEcoder.getInput(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){top.ICEcoder.serverQueue("add","lib/file-control.php?action=getRemoteFile&file="+a+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>"+top.t.Getting+"</b><br>"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0<top.ICEcoder.selectedFiles.length&&
|
||||
top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectFirst),top.ICEcoder.selectFileFolder(a)):(top.ICEcoder.fmDragSelectLast=top.ICEcoder.thisFileFolderLink,top.ICEcoder.overFileFolder(0<top.ICEcoder.thisFileFolderLink.indexOf(".")?"file":"folder",top.ICEcoder.fmDragSelectLast),top.ICEcoder.selectFileFolder(a,!1,"shiftSim"))));"up"==b&&(c.style.width=0,c.style.height=0)},newFile:function(){top.ICEcoder.newTab("alsoSave")},
|
||||
newFolder:function(){var a,b;a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/");if(b=top.ICEcoder.getInput("Enter new folder name at "+a,""))b=(a+"/"+b).replace(/\/\//,"/"),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=newFolder&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage("<b>"+top.t["Creating Folder"]+"</b><br>"+b)},openFile:function(a){var b;a&&(top.ICEcoder.thisFileFolderLink=a,top.ICEcoder.thisFileFolderType="file");
|
||||
"/[NEW]"!=top.ICEcoder.thisFileFolderLink&&!1!==top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)?top.ICEcoder.switchTab(top.ICEcoder.isOpen(top.ICEcoder.thisFileFolderLink)+1):""!=top.ICEcoder.thisFileFolderLink&&"file"==top.ICEcoder.thisFileFolderType&&(a=top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/"),b=!0,100<=top.ICEcoder.openFiles.length&&(top.ICEcoder.message(top.t["Sorry you can..."]),b=!1),b&&(top.ICEcoder.shortURL=a,"/[NEW]"!=a?(top.ICEcoder.thisFileFolderLink=top.ICEcoder.thisFileFolderLink.replace(/\//g,
|
||||
"|"),top.ICEcoder.serverQueue("add","lib/file-control.php?action=load&file="+top.ICEcoder.thisFileFolderLink+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Opening File"]+"</b><br>"+top.ICEcoder.shortURL)):top.ICEcoder.createNewTab("new"),top.ICEcoder.fMIconVis("fMView",1)))},openFilesFromList:function(a){for(var b=0;b<a.length;b++)top.ICEcoder.thisFileFolderLink=a[b].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},openPrompt:function(){var a;
|
||||
if(a=top.ICEcoder.getInput(top.t["Enter relative file..."],""))-1<a.indexOf("://")?top.ICEcoder.getRemoteFile(a):top.ICEcoder.openFile(a)},getRemoteFile:function(a){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=getRemoteFile&csrf="+top.ICEcoder.csrf,a);top.ICEcoder.serverMessage("<b>"+top.t.Getting+"</b><br>"+a)},saveFile:function(a){var b,c;a=a?"saveAs":"save";b=ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,"").replace(/\//g,"|");"|[NEW]"==b&&0<top.ICEcoder.selectedFiles.length&&
|
||||
(c=top.ICEcoder.selectedFiles[0],b=-1==c.lastIndexOf(".")||c.lastIndexOf(".")<c.lastIndexOf("|")?c+b:"|[NEW]");b=b.replace("||","|");top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=save&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf,b);top.ICEcoder.serverMessage("<b>"+top.t.Saving+"</b><br>"+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""))},renameFile:function(a,b){var c,d;a?c=a.replace(/\|/g,"/"):(c=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
1].replace(/\|/g,"/"),a=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"));b||(b=top.ICEcoder.getInput(top.t["Please enter the..."],c));b&&(d=top.ICEcoder.openFiles.indexOf(c.replace(/\|/g,"/")),-1<d&&(top.ICEcoder.openFiles[d]=b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',
|
||||
c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=rename&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Renaming to"]+"</b><br>"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1<d&&(top.ICEcoder.openFiles[d]=
|
||||
c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=rename&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf,b),top.ICEcoder.serverMessage("<b>"+top.t["Renaming to"]+"</b><br>"+b),top.ICEcoder.setPreviousFiles())},moveFile:function(a,b){var c,d;b&&(d=top.ICEcoder.openFiles.indexOf(a.replace(/\|/g,"/")),-1<d&&(top.ICEcoder.openFiles[d]=
|
||||
b,closeTabLink='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a>',c=top.ICEcoder.openFiles[d],top.get("tab"+(d+1)).innerHTML=closeTabLink+" "+c.slice(c.lastIndexOf("/")).replace(/\//,""),top.get("tab"+(d+1)).title=
|
||||
b),top.ICEcoder.serverQueue("add","lib/file-control.php?action=move&file="+b+"&oldFileName="+a.replace(/\|/g,"/")+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Moving to"]+"</b><br>"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0<a.length&&top.ICEcoder.ask("Delete:\n\n"+b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control.php?action=delete&file="+a.join(";")+"&csrf="+
|
||||
top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Deleting File"]+"</b><br>"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d<a.length;d++)top.ICEcoder.copiedFiles[d]=a[d];b||(top.get("fmMenuPasteOption").style.display="block");c||top.ICEcoder.hideFileMenu()},pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=0;b<top.ICEcoder.copiedFiles.length;b++)"|"!=top.ICEcoder.copiedFiles[b]?(top.ICEcoder.serverQueue("add","lib/file-control.php?action=paste&file="+
|
||||
top.ICEcoder.copiedFiles[b]+"&location="+a+"&csrf="+top.ICEcoder.csrf),top.ICEcoder.serverMessage("<b>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));
|
||||
top.ICEcoder.pasteFiles(a);"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a<
|
||||
c.length;a++)top.ICEcoder.showHide("hide",top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.length;d++)top.ICEcoder.showHide("hide",top.get(c[d])),top.get(c[d]+"Nav").style.color="";get("fileOptions").style.opacity=0;"show"==a&&("undefined"!=typeof fileNavInt&&clearTimeout(fileNavInt),top.ICEcoder.showHide(a,top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=1)},showMenu:function(a){var b,c;0!=top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
b),top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=move&oldFileName="+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf,b.replace(/\//g,"|")),top.ICEcoder.serverMessage("<b>"+top.t["Moving to"]+"</b><br>"+b),top.ICEcoder.setPreviousFiles())},deleteFiles:function(a){var b;a=a?a:top.ICEcoder.selectedFiles;b=a.toString().replace(/\|/g,"/").replace(/,/g,"\n");0<a.length&&top.ICEcoder.ask("Delete:\n\n"+b+"?")&&(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=delete&&csrf="+
|
||||
top.ICEcoder.csrf,a.join(";")),top.ICEcoder.serverMessage("<b>"+top.t["Deleting File"]+"</b><br>"+b))},copyFiles:function(a,b,c){top.ICEcoder.copiedFiles=[];for(var d=0;d<a.length;d++)top.ICEcoder.copiedFiles[d]=a[d];b||(top.get("fmMenuPasteOption").style.display="block");c||top.ICEcoder.hideFileMenu()},pasteFiles:function(a){if(top.ICEcoder.copiedFiles)for(var b=0;b<top.ICEcoder.copiedFiles.length;b++)"|"!=top.ICEcoder.copiedFiles[b]?(top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=paste&location="+
|
||||
a+"&csrf="+top.ICEcoder.csrf,top.ICEcoder.copiedFiles[b]),top.ICEcoder.serverMessage("<b>"+top.t["Pasting File"]+"</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message(top.t["Sorry cannot paste..."]);else top.ICEcoder.message(top.t["Nothing to paste..."])},duplicateFiles:function(a){var b;top.ICEcoder.copiedFiles&&(b=top.ICEcoder.copiedFiles);top.ICEcoder.copyFiles(a,"dontShowPaste","dontHide");a=a[0].substr(0,a[0].lastIndexOf("|"));top.ICEcoder.pasteFiles(a);
|
||||
"undefined"!=typeof b&&(top.ICEcoder.copiedFiles=b)},uploadFilesSelect:function(a){top.get("uploadDir").value=a;top.get("fileInput").click()},uploadFilesSubmit:function(a){""!=top.get("fileInput").value&&(top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("uploadFilesForm").submit(),event.preventDefault())},showHideFileNav:function(a,b){var c=["optionsFile","optionsEdit","optionsSource","optionsHelp"];if("hide"==a)fileNavInt=setTimeout(function(){for(var a=0;a<c.length;a++)top.ICEcoder.showHide("hide",
|
||||
top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.length;d++)top.ICEcoder.showHide("hide",top.get(c[d])),top.get(c[d]+"Nav").style.color="";get("fileOptions").style.opacity=0;"show"==a&&("undefined"!=typeof fileNavInt&&clearTimeout(fileNavInt),top.ICEcoder.showHide(a,top.get(b)),top.get(b+"Nav").style.color="#fff",get("fileOptions").style.opacity=1)},showMenu:function(a){var b,c;0!=top.ICEcoder.selectedFiles.length&&-1!=top.ICEcoder.selectedFiles.indexOf(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-
|
||||
1].replace(/\//g,"|"))||top.ICEcoder.selectFileFolder(a);a=129;c=window.innerHeight;"undefined"!=typeof top.ICEcoder.thisFileFolderLink&&""!=top.ICEcoder.thisFileFolderLink&&(b=-1<top.ICEcoder.selectedFiles[0].indexOf(".")?"file":"folder",top.get("folderMenuItems").style.display="folder"==b&&1==top.ICEcoder.selectedFiles.length?"block":"none","folder"==b&&1==top.ICEcoder.selectedFiles.length&&(a+=67,"block"==top.get("fmMenuPasteOption").style.display&&(a+=19)),top.get("singleFileMenuItems").style.display=
|
||||
1<top.ICEcoder.selectedFiles.length?"none":"block",1==top.ICEcoder.selectedFiles.length&&(a+=43),top.get("fileMenu").style.display="inline-block",setTimeout(function(){top.get("fileMenu").style.opacity="1"},4),top.get("fileMenu").style.left=top.ICEcoder.mouseX+20+"px",b=top.ICEcoder.mouseY-top.ICEcoder.filesFrame.contentWindow.document.body.scrollTop-10,b+a>c&&(b-=b+a-c),top.get("fileMenu").style.top=b+"px");return!1},showFileMenu:function(){top.get("fileMenu").style.display="inline-block";setTimeout(function(){top.get("fileMenu").style.opacity=
|
||||
"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,f,e,g){var k,h,l,n,p,m,r;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){k="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?top.ICEcoder.newFilePerms:top.ICEcoder.newDirPerms;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//",
|
||||
@@ -78,7 +78,7 @@ a?e.replaceSelection(d,"around"):document.findAndReplace.replaceAction.value==to
|
||||
{line:0,ch:0},!0),b.findNext());e.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}a=top.ICEcoder.scrollBarVisible?parseInt(top.ICEcoder.content.style.height,10)/e.lineCount():e.defaultTextHeight();b=top.ICEcoder.scrollBarVisible?0:e.heightAtLine(0);f="";for(d=1;d<=e.lineCount();d++)c=-1<ICEcoder.resultsLines.indexOf(d)?e.getCursor().line+1==d?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+a+"px; background: "+c+"; top: "+
|
||||
parseInt(a*(d-1)+b,10)+'px"></div>';top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML=f;top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="inline-block";return!0}f.innerHTML="No results";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="";top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none";return!1}""!=a&&c?(f=b=e="",document.findAndReplace.connector.value==
|
||||
top.t.and&&(e="&replace="+d),0<=document.findAndReplace.target.value.indexOf(top.t.file)&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),document.findAndReplace.target.value==top.t["selected files"]&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),a=a.replace(/\'/g,"'"),a!=encodeURIComponent(a)?a="ICEcoder:"+encodeURIComponent(a):a,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+
|
||||
a+e+b+f+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control.php?action=replaceText&fileRef="+a.replace(/\//g,"|")+"&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>"+
|
||||
a+e+b+f+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 700px; height: 500px"></iframe>'):(f.innerHTML="No results",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").innerHTML="",top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.display="none")},replaceInFile:function(a,b,c){top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=replaceText&find="+b+"&replace="+c+"&csrf="+top.ICEcoder.csrf,a.replace(/\//g,"|"));top.ICEcoder.serverMessage("<b>"+
|
||||
top.t["Replacing text in"]+"</b><br>"+a)},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().line;c=a.getCursor().ch;for(var f=d=0;f<b;f++)d+=a.getLine(f).length+1;ICEcoder.caretPos=d+c-1},updateCharDisplay:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=
|
||||
ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateByteDisplay:function(){var a,b;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;ICEcoder.byteDisplay.innerHTML=a.getValue().length.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" bytes"},showDisplay:function(a){top.ICEcoder.byteDisplay.style.display="byte"==a?"inline-block":"none";top.ICEcoder.charDisplay.style.display="char"==a?"inline-block":
|
||||
"none"},showHide:function(a,b){b.style.visibility="show"==a?"visible":"hidden"},getcMInstance:function(a){return top.ICEcoder.content.contentWindow[isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-1]]},getcMdiffInstance:function(a){return top.ICEcoder.content.contentWindow[(isNaN(a)?"new"==a||"new"!=a&&0<ICEcoder.openFiles.length?"cM"+ICEcoder.cMInstances[ICEcoder.selectedTab-1]:"cM1":"cM"+ICEcoder.cMInstances[a-
|
||||
@@ -94,59 +94,60 @@ b.replaceRange(a,{line:b.getCursor().line,ch:c.start},{line:b.getCursor().line,c
|
||||
b+"'",6E4*d):0==c.indexOf("fileControl")?top.ICEcoder["plugTimer"+a]=setInterval(function(){top.ICEcoder.serverQueue("add",b);top.ICEcoder.serverMessage(c.split(":")[1])},6E4*d):top.ICEcoder["plugTimer"+a]=setInterval("window.open('"+b+"','"+c+"')",6E4*d);top.ICEcoder.pluginIntervalRefs.push(a)},codeAssistToggle:function(){var a,b;top.ICEcoder.codeAssist=!top.ICEcoder.codeAssist;top.get("codeAssistDisplay").style.backgroundPosition=top.ICEcoder.codeAssist?"0 0":"-16px 0";top.ICEcoder.cssColorPreview();
|
||||
top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?"diff":!1);for(i=0;i<top.ICEcoder.cMInstances.length;i++)if(a=top.ICEcoder.openFiles[i],a=a.split("."),a=a[a.length-1],"js"==a||"json"==a)a=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]],b=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]+"diff"],top.ICEcoder.codeAssist?(a.setOption("lint",!0),b.setOption("lint",!0)):(a.clearGutter("CodeMirror-lint-markers"),a.setOption("lint",!1),b.clearGutter("CodeMirror-lint-markers"),
|
||||
b.setOption("lint",!1))},serverQueue:function(a,b,c){var d,f,e,g,k;d=ICEcoder.getcMInstance();for(e=f=0;e<ICEcoder.serverQueueItems.length;e++)0<ICEcoder.serverQueueItems[e].indexOf("action=save")&&f++;f++;if("add"==a)ICEcoder.serverQueueItems.push(b),0<b.indexOf("action=save")&&(e=document.createElement("textarea"),e.setAttribute("id","saveTemp"+f),document.body.appendChild(e),top.get("saveTemp"+f).value=d.getValue());else if("del"==a){if(ICEcoder.serverQueueItems[0]&&0<ICEcoder.serverQueueItems[0].indexOf("action=save")){d=
|
||||
f-1;for(e=1;e<d;e++)top.get("saveTemp"+e).value=top.get("saveTemp"+(e+1)).value;d=top.get("saveTemp"+d);d.parentNode.removeChild(d)}ICEcoder.serverQueueItems.splice(0,1)}if("del"==a&&1<=ICEcoder.serverQueueItems.length||1==ICEcoder.serverQueueItems.length)b&&0<b.indexOf("action=save")?(g=top.ICEcoder.xhrObj(),g.onreadystatechange=function(){4==g.readyState&&200==g.status&&(k=JSON.parse(g.responseText),k.action.timeEnd=(new Date).getTime(),k.action.timeTaken=k.action.timeEnd-k.action.timeStart,k.status.error?
|
||||
top.ICEcoder.message(k.status.errorMsg):eval(k.action.doNext))},g.open("POST",ICEcoder.serverQueueItems[0],!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a=(new Date).getTime(),g.send("timeStart="+a+"&file="+c+"&contents="+encodeURIComponent(top.document.getElementById("saveTemp1").value))):setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href=ICEcoder.serverQueueItems[0]},1)},cancelAllActions:function(){window.stop();0<ICEcoder.serverQueueItems.length&&
|
||||
ICEcoder.serverQueueItems.splice(1,ICEcoder.serverQueueItems.length);top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.serverMessage('<b style="color: #d00">'+top.t["Cancelled tasks"]+"</b>");setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g,"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+
|
||||
"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0<top.ICEcoder.previousFiles.length&&top.ICEcoder.ask(top.t["Open previous files"]+"\n\n"+top.ICEcoder.previousFiles.length+" files:\n"+top.ICEcoder.previousFiles.join("\n").replace(/\|/g,"/").replace(new RegExp(top.docRoot+top.iceRoot,"gi"),"")))for(var a=0;a<top.ICEcoder.previousFiles.length;a++)top.ICEcoder.thisFileFolderLink=top.ICEcoder.previousFiles[a].replace("|","/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},settingsScreen:function(a){a||
|
||||
(top.get("mediaContainer").innerHTML='<iframe src="lib/settings-screen.php" class="whiteGlow" style="width: 970px; height: 610px"></iframe>');top.ICEcoder.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 515px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='<iframe src="https://icecoder.net/manual?version='+
|
||||
a+c+'" class="whiteGlow" style="width: 800px; height: 470px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';
|
||||
top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href=
|
||||
"lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet?(top.get("mediaContainer").innerHTML='<iframe src="lib/github-manager.php" class="whiteGlow" style="width: 660px; height: 450px"></iframe>',top.ICEcoder.showHide("show",top.get("blackMask"))):
|
||||
top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,f,e,g,k,h,l,n,p,m,r,s,t,u){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+
|
||||
1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q);a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&
|
||||
(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=g;c[b][4].style["border-left-width"]=e?"1px":"0";c[b][4].style["margin-left"]=e?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs=
|
||||
h;top.ICEcoder.indentSize=l;for(e=0;e<ICEcoder.cMInstances.length;e++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("tabSize",top.ICEcoder.indentSize),
|
||||
ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].refresh(),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("tabSize",
|
||||
top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].refresh();d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);f!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=f);top.get("plugins").style.left="left"==n?"0":"auto";top.get("plugins").style.right="right"==n?"0":"auto";top.ICEcoder.bugFilePaths=p;top.ICEcoder.bugFileCheckTimer=m;top.ICEcoder.bugFileMaxLines=r;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=
|
||||
typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();top.ICEcoder.githubAuthTokenSet=s;top.ICEcoder.updateDiffOnSave=t;u&&top.ICEcoder.refreshFileManager()},updateResultsDisplay:function(a){ICEcoder.findReplace(top.get("find").value,!0,!1);top.get("results").style.display="show"==a?"inline-block":"none"},fullScreenSwitcher:function(){"undefined"!=typeof document.cancelFullScreen?document.fullScreen?document.cancelFullScreen():
|
||||
document.body.requestFullScreen():"undefined"!=typeof document.mozCancelFullScreen?document.mozFullScreen?document.mozCancelFullScreen():document.body.mozRequestFullScreen():"undefined"!=typeof document.webkitCancelFullScreen&&(document.webkitIsFullScreen?document.webkitCancelFullScreen():document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))},zipIt:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="plugins/zip-it/index.php?zip="+
|
||||
a+"&csrf="+top.ICEcoder.csrf},downloadFile:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/download.php?file="+a+"&csrf="+top.ICEcoder.csrf},chmod:function(a,b){a=a.replace(top.iceRoot,"");top.ICEcoder.showHide("hide",top.get("blackMask"));top.ICEcoder.serverQueue("add","lib/file-control.php?action=perms&file="+a+"&perms="+b+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>chMod "+b+" on </b><br>"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0<
|
||||
top.ICEcoder.openFiles.length){var a,b,c,d,f;d=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];a=d.substr(d.lastIndexOf("/")+1);f=a.substr(a.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;top.ICEcoder.previewWindowLoading=!0;top.ICEcoder.previewWindow=window.open(d,"previewWindow");-1<["md"].indexOf(f)?top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=!1;top.ICEcoder.previewWindow.document.documentElement.innerHTML=
|
||||
mmd(c.getValue())}:top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=!1;try{top.ICEcoder.doPesticide()}catch(a){}try{top.ICEcoder.doStatsJS("open")}catch(b){}}}},logout:function(){window.location=window.location+"?logout&csrf="+top.ICEcoder.csrf},message:function(a){alert(a)},ask:function(a){return confirm(a)},getInput:function(a,b){return prompt(a,b)},dataMessage:function(a){var b;b=top.ICEcoder.content.contentWindow.document.getElementById("dataMessage");b.style.display=
|
||||
"block";b.innerHTML=a},update:function(){confirm(top.t["Please note for..."])?(top.ICEcoder.showHide("show",top.get("loadingMask")),window.location="lib/updater.php"):window.open("https://icecoder.net")},updated:function(){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML="<h1>Thanks for updating to v"+top.ICEcoder.versionNo+'!</h1><p style="line-height: 24px; padding-bottom: 24px">ICEcoder relies entirely on donations to fund future versions.<br>If you find it useful, please consider donating.<br>Many thanks!</p><a href="https://icecoder.net/?display=updateDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate $5</a>'},
|
||||
xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null},openBugReport:function(){var a;"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&
|
||||
top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1<a&&top.ICEcoder.closeTab(a+1,"dontSetPV","dontAsk"),top.ICEcoder.openFile(top.ICEcoder.bugReportPath),top.ICEcoder.bugFilesSizesSeen=top.ICEcoder.bugFilesSizesActual)},startBugChecking:function(){var a;0!==top.ICEcoder.bugFileCheckTimer?("undefined"!=
|
||||
typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt),top.ICEcoder.bugFilesSizesSeen=[],top.ICEcoder.bugFileCheckInt=setInterval(function(){a="lib/bug-files-check.php?";a+="files="+(""!==top.ICEcoder.bugFilePaths[0]?top.ICEcoder.bugFilePaths.join():"null").replace(/\//g,"|");a+="&filesSizesSeen=";if(top.ICEcoder.bugFilesSizesSeen.length!=top.ICEcoder.bugFilePaths.length)for(var b=0;b<top.ICEcoder.bugFilePaths.length;b++)top.ICEcoder.bugFilesSizesSeen[b]="null";a+=top.ICEcoder.bugFilesSizesSeen.join();
|
||||
a+="&maxLines="+top.ICEcoder.bugFileMaxLines;a+="&csrf="+top.ICEcoder.csrf;var c=top.ICEcoder.xhrObj();c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var a=JSON.parse(c.responseText);top.get("bugIcon").style.backgroundPosition="off"==a.result?"0 0":"ok"==a.result?"-32px 0":"bugs"==a.result?"-48px 0":"-16px 0";top.ICEcoder.bugReportStatus=a.result;"null"==top.ICEcoder.bugFilesSizesSeen[0]&&(top.ICEcoder.bugFilesSizesSeen=a.filesSizesSeen);top.ICEcoder.bugFilesSizesActual=a.filesSizesSeen;
|
||||
top.ICEcoder.bugReportPath=a.bugReportPath}};c.open("GET",a,!0);c.send()},parseInt(1E3*top.ICEcoder.bugFileCheckTimer,10)),top.ICEcoder.bugReportStatus="ok"):"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt)},xssClean:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
b:a;b=top.ICEcoder.filesFrame.contentWindow.frames.fileControl;b.window.document.body.innerHTML='<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre style="white-space: pre-wrap">'+top.ICEcoder.xssClean(a.getValue())+"</pre></body></html>";b.focus();b.print();a.focus()},indicateChanges:function(){var a;if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo;for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=
|
||||
" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c){ICEcoder.switchMode();for(var f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].getWrapperElement().style.display="none",ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].getWrapperElement().style.display="none";c.setOption("theme",
|
||||
top.ICEcoder.theme);d.setOption("theme",top.ICEcoder.theme+" diff");c.getWrapperElement().style.display="block";d.getWrapperElement().style.display="block";top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();b||setTimeout(function(){top.ICEcoder.focus()},4);c.refresh();d.refresh();ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.findMode=!1;ICEcoder.findReplace(top.get("find").value,!0,!1);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()}},
|
||||
newTab:function(){var a;ICEcoder.cMInstances.push(ICEcoder.nextcMInstance);ICEcoder.selectedTab=ICEcoder.cMInstances.length;ICEcoder.showHide("show",ICEcoder.content);ICEcoder.content.contentWindow.createNewCMInstance(ICEcoder.nextcMInstance);ICEcoder.setLayout();ICEcoder.thisFileFolderType="file";ICEcoder.thisFileFolderLink="/[NEW]";ICEcoder.openFile();a=ICEcoder.getcMInstance("new");ICEcoder.switchTab(ICEcoder.openFiles.length);a.removeLineClass(ICEcoder["cMActiveLinecM"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-
|
||||
1]],"background");ICEcoder["cMActiveLinecM"+ICEcoder.selectedTab]=a.addLineClass(0,"background","cm-s-activeLine");ICEcoder.nextcMInstance++},createNewTab:function(){var a;top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);top.get("tab"+top.ICEcoder.openFiles.length).style.display="inline-block";a=top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1];top.get("tab"+top.ICEcoder.openFiles.length).innerHTML='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+
|
||||
a.slice(a.lastIndexOf("/")).replace(/\//,"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,"");top.ICEcoder.setTabWidths();top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);top.ICEcoder.selectedTab=top.ICEcoder.openFiles.length;top.ICEcoder.savedPoints.push(0);top.ICEcoder.setPreviousFiles()},nextTab:function(){top.ICEcoder.switchTab(top.ICEcoder.selectedTab+1<=top.ICEcoder.openFiles.length?top.ICEcoder.selectedTab+
|
||||
1:1,"noFocus")},previousTab:function(){top.ICEcoder.switchTab(1<=top.ICEcoder.selectedTab-1?top.ICEcoder.selectedTab-1:top.ICEcoder.openFiles.length,"noFocus")},renameTab:function(a,b){var c;top.ICEcoder.openFiles[a-1]=b;c=top.ICEcoder.openFiles[a-1];top.get("tab"+a).innerHTML='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+
|
||||
c.slice(c.lastIndexOf("/")).replace(/\//,"");top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTabHighlight:function(a){for(var b,c,d=1;d<=ICEcoder.savedPoints.length;d++)top.get("tab"+d).childNodes[0]&&(top.get("tab"+d).childNodes[0].childNodes[0].style.backgroundColor=ICEcoder.savedPoints[d-1]!=top.ICEcoder.getcMInstance(d).changeGeneration()?"#b00":"transparent"),b=d==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalTab,"undefined"!=typeof top.ICEcoder.openFiles[d-
|
||||
1]&&"/[NEW]"!=top.ICEcoder.openFiles[d-1]&&(c=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.openFiles[d-1].replace(/\//g,"|")))&&(c.style.backgroundColor=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen,c.style.color=d==a?top.ICEcoder.tabFGcurrent:top.ICEcoder.tabFGopenFile),top.get("tab"+d).style.color=b,top.get("tab"+d).style.background=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen},closeTab:function(a,b,c){var d;a||(a=top.ICEcoder.selectedTab);ICEcoder.getcMInstance();
|
||||
ICEcoder.getcMdiffInstance();d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;d<ICEcoder.openFiles.length;d++)top.get("tab"+d).innerHTML=top.get("tab"+(d+1)).innerHTML,top.get("tab"+d).title=top.get("tab"+(d+1)).title,ICEcoder.openFiles[d-1]=ICEcoder.openFiles[d],ICEcoder.openFileMDTs[d-1]=ICEcoder.openFileMDTs[d];ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-
|
||||
1]].getWrapperElement().style.display="none";ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-1]+"diff"].getWrapperElement().style.display="none";top.ICEcoder.cMInstances.splice(a-1,1);top.get("tab"+ICEcoder.openFiles.length).style.display="none";top.get("tab"+ICEcoder.openFiles.length).innerHTML="";top.get("tab"+ICEcoder.openFiles.length).title="";ICEcoder.openFiles.pop();ICEcoder.openFileMDTs.pop();ICEcoder.selectedTab==a&&(0<ICEcoder.openFiles.length?--ICEcoder.selectedTab:ICEcoder.selectedTab=
|
||||
0);0<ICEcoder.openFiles.length&&0==ICEcoder.selectedTab&&(ICEcoder.selectedTab=1);0==ICEcoder.openFiles.length?top.ICEcoder.fMIconVis("fMView",.3):(ICEcoder.switchMode(),ICEcoder.switchTab(ICEcoder.selectedTab));top.ICEcoder.savedPoints.splice(a-1,1);top.ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.selectDeselectFile("deselect",top.ICEcoder.filesFrame.contentWindow.document.getElementById(c.replace(/\//g,"|")));b||top.ICEcoder.setPreviousFiles();top.ICEcoder.indicateChanges()}top.ICEcoder.canSwitchTabs=
|
||||
!1;top.ICEcoder.setTabWidths("posOnlyNewTab");setTimeout(function(){top.ICEcoder.canSwitchTabs=!0},100)},closeAllTabs:function(){if(0<top.ICEcoder.cMInstances.length&&ICEcoder.ask(top.t["Close all tabs"]))for(var a=top.ICEcoder.cMInstances.length;0<a;a--)top.ICEcoder.closeTab(a,1<a?!0:!1);top.ICEcoder.indicateChanges()},setTabWidths:function(a){var b,c,d,f,e;if(top.ICEcoder.ready){b=parseInt(top.ICEcoder.content.style.width,10)-53-22-10;c=b/top.ICEcoder.openFiles.length-18;d=-18;f=53;e=0;top.ICEcoder.tabLeftPos=
|
||||
[];for(var g=0;g<top.ICEcoder.openFiles.length;g++)a&&(g=top.ICEcoder.openFiles.length),d=168*top.ICEcoder.openFiles.length>b?parseInt(c*g,10)-parseInt(c*(g-1),10):150,f=0==g?53:parseInt(top.get("tab"+g).style.left,10),e=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=f+e+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(f+e);top.get("newTab").style.left=f+e+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=
|
||||
top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart=(top.ICEcoder.mouseX-(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left,
|
||||
10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left,10)-a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c<top.ICEcoder.draggingTab?top.get("tab"+c).style.left=a<=top.ICEcoder.tabLeftPos[c-1]?
|
||||
top.ICEcoder.tabLeftPos[c-1]+b:top.ICEcoder.tabLeftPos[c-1]:top.get("tab"+c).style.left=a>=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo?
|
||||
top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];
|
||||
c=[[],[],[],[]];for(var f=0;f<b.length;f++){for(var e=0;e<b[f].length;e++)c[f].push(b[f][a[e]-1]);b[f]=c[f]}for(f=0;f<a.length;f++)top.get("tab"+a[f]).id="tab"+(f+1)+".temp",top.ICEcoder.selectedTab==a[f]&&(d=f+1);for(f=0;f<a.length;f++)top.get("tab"+(f+1)+".temp").id="tab"+(f+1);top.get("tab"+d)&&(top.get("tab"+d).className="tab tabSlide");ICEcoder.savedPoints=b[0];ICEcoder.openFiles=b[1];ICEcoder.openFileMDTs=b[2];ICEcoder.cMInstances=b[3];top.ICEcoder.setTabWidths();top.ICEcoder.switchTab(d)},
|
||||
alphaTabs:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,f;a=[];b=[];c=[];for(var e=0;e<top.ICEcoder.openFiles.length;e++)a.push(top.ICEcoder.openFiles[e].slice(top.ICEcoder.openFiles[e].lastIndexOf("/")+1)),b.push(top.ICEcoder.openFiles[e]),top.get("tab"+(e+1)).className="tab tabSlide";for(;0<a.length;){d=a[0];nextValueFull=b[0];for(e=f=0;e<a.length;e++)a[e]<d&&(d=a[e],nextValueFull=top.ICEcoder.openFiles[top.ICEcoder.openFiles.indexOf(b[e])],f=e);c.push(top.ICEcoder.openFiles.indexOf(nextValueFull)+
|
||||
1);a.splice(f,1);b.splice(f,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,b){var c,d;c=b.keyCode?b.keyCode:b.which?b.which:b.charCode;if(224==c||91==c||93==c)top.ICEcoder.cmdKey=!0;if(46==c&&"files"==a)return top.ICEcoder.deleteFiles(),!1;if(b.altKey)return d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1,"ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d?"content"==a?68==c?(top.ICEcoder.tagWrapper("div"),!1):83==c?(top.ICEcoder.tagWrapper("span"),!1):80==
|
||||
c?(top.ICEcoder.tagWrapper("p"),!1):65==c?(top.ICEcoder.tagWrapper("a"),!1):66==c?(top.ICEcoder.tagWrapper("b"),!1):73==c?(top.ICEcoder.tagWrapper("i"),!1):71==c?(top.ICEcoder.tagWrapper("strong"),!1):69==c?(top.ICEcoder.tagWrapper("em"),!1):49==c?(top.ICEcoder.tagWrapper("h1"),!1):50==c?(top.ICEcoder.tagWrapper("h2"),!1):51==c?(top.ICEcoder.tagWrapper("h3"),!1):56==c?(top.ICEcoder.tagWrapper("li"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):37==c?(top.filesFrame.contentWindow.focus(),!1):c:37==
|
||||
c?(top.filesFrame.contentWindow.focus(),!1):39==c?(top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?!0:!1),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c;if(13==c&&b.shiftKey)return top.ICEcoder.insertLineBefore(),!1;if(70==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return top.get("find").focus(),!1;if(71==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return top.get("goToLineNo").focus(),!1;if(73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.searchForSelected(),!1;
|
||||
if(39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.nextTab(),!1;if(37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.previousTab(),!1;if(38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("up"),!1;if(40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("down"),!1;if(107==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1;if(109==
|
||||
c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1;if(83==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return b.shiftKey?top.ICEcoder.saveFile("saveAs"):top.ICEcoder.saveFile(),!1;if(13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1])return top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]),!1;if(13==c&&"files"==a)return b.ctrlKey||top.ICEcoder.cmdKey||
|
||||
(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,"enter")),!1;if(38!=c&&40!=c&&37!=c&&39!=c||"files"!=a)return 79==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):74==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.jumpToDefinition(),!1):223==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.lockUnlockNav(),
|
||||
ICEcoder.changeFilesW(top.ICEcoder.lockedNav?"expand":"contract"),!1):190==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(c=ICEcoder.getcMInstance(),d=ICEcoder.getcMdiffInstance(),c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c,d=c.getCursor().line,top.contentFrame.CodeMirror.doFold(-1<c.getLine(d).indexOf("{")?"brace":"xml",null,"+","-",!1)(c,d),!1):27==c&&"content"==a?(c=ICEcoder.getcMInstance(),d=ICEcoder.getcMdiffInstance(),c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c,1<c.getSelections().length?
|
||||
c.execCommand("singleSelection"):top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),!1):c;b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,38==c?"up":40==c?"down":37==c?"left":"right"));return!1},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=
|
||||
-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().line;c=a.getLine(b).length-a.getLine(b).replace(/^\s\s*/,"").length;a=a.getLine(b).slice(c);"function"==a.slice(0,8)?top.ICEcoder.doSnippet("function","function VAR() {\nINDENT\tCURSOR\nINDENT}"):"if"==a.slice(0,2)?top.ICEcoder.doSnippet("if","if (CURSOR) {\nINDENT\t\nINDENT}"):"for"==a.slice(0,3)&&top.ICEcoder.doSnippet("for","for (var i=0; i<CURSOR; i++) {\nINDENT\t\nINDENT}")},doSnippet:function(a,b){var c,d,f,e,g,k;c=ICEcoder.getcMInstance();
|
||||
d=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c;d=c.getCursor().line;if(-1<c.getLine(d).indexOf(a)){f=c.getLine(d);e=f.indexOf(a);f=f.slice(f.indexOf(a)+a.length+1);b=b.replace(/VAR/g,f);f=c.getLine(d).slice(0,e);e=c.getLine(d).length-c.getLine(d).replace(/^\s\s*/,"").length;e=c.getLine(d).slice(0,e);b=b.replace(/INDENT/g,e);f+=b;e=f.indexOf("CURSOR");g=0;k=d;for(i=0;i<f.length;i++)f.indexOf("\n",g)<f.indexOf("CURSOR")&&(g=f.indexOf("\n",g)+1,k+=1);c.replaceRange(f.replace("CURSOR",
|
||||
""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(k,e);top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?!0:!1)}}};
|
||||
f-1;for(e=1;e<d;e++)top.get("saveTemp"+e).value=top.get("saveTemp"+(e+1)).value;d=top.get("saveTemp"+d);d.parentNode.removeChild(d)}ICEcoder.serverQueueItems.splice(0,1)}if("del"==a&&1<=ICEcoder.serverQueueItems.length||1==ICEcoder.serverQueueItems.length)b&&-1==b.indexOf("saveFiles=")&&-1==b.indexOf("action=load")?(g=top.ICEcoder.xhrObj(),g.onreadystatechange=function(){4==g.readyState&&200==g.status&&(k=JSON.parse(g.responseText),k.action.timeEnd=(new Date).getTime(),k.action.timeTaken=k.action.timeEnd-
|
||||
k.action.timeStart,k.status.error?top.ICEcoder.message(k.status.errorMsg):eval(k.action.doNext))},g.open("POST",ICEcoder.serverQueueItems[0],!0),g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a=(new Date).getTime(),0<b.indexOf("action=save")?g.send("timeStart="+a+"&file="+c+"&contents="+encodeURIComponent(top.document.getElementById("saveTemp1").value)):g.send("timeStart="+a+"&file="+c)):setTimeout(function(){top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href=
|
||||
ICEcoder.serverQueueItems[0]},1)},cancelAllActions:function(){window.stop();0<ICEcoder.serverQueueItems.length&&ICEcoder.serverQueueItems.splice(1,ICEcoder.serverQueueItems.length);top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.serverMessage('<b style="color: #d00">'+top.t["Cancelled tasks"]+"</b>");setTimeout(function(){top.ICEcoder.serverMessage()},2E3)},setPreviousFiles:function(){var a;a=top.ICEcoder.openFiles.join(",").replace(/\//g,"|").replace(/(\|\[NEW\])|(,\|\[NEW\])/g,
|
||||
"").replace(/(^,)|(,$)/g,"");""==a&&(a="CLEAR");top.ICEcoder.serverQueue("add","lib/settings.php?saveFiles="+a+"&csrf="+top.ICEcoder.csrf)},autoOpenFiles:function(){if(0<top.ICEcoder.previousFiles.length&&top.ICEcoder.ask(top.t["Open previous files"]+"\n\n"+top.ICEcoder.previousFiles.length+" files:\n"+top.ICEcoder.previousFiles.join("\n").replace(/\|/g,"/").replace(new RegExp(top.docRoot+top.iceRoot,"gi"),"")))for(var a=0;a<top.ICEcoder.previousFiles.length;a++)top.ICEcoder.thisFileFolderLink=top.ICEcoder.previousFiles[a].replace("|",
|
||||
"/"),top.ICEcoder.thisFileFolderType="file",top.ICEcoder.openFile()},settingsScreen:function(a){a||(top.get("mediaContainer").innerHTML='<iframe src="lib/settings-screen.php" class="whiteGlow" style="width: 970px; height: 610px"></iframe>');top.ICEcoder.showHide(a?"hide":"show",top.get("blackMask"))},helpScreen:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 515px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},
|
||||
showManual:function(a,b){var c;c=b?"#"+b:"";top.get("mediaContainer").innerHTML='<iframe src="https://icecoder.net/manual?version='+a+c+'" class="whiteGlow" style="width: 800px; height: 470px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},propertiesScreen:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/properties.php?fileName='+a.replace(/\//g,"|")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},pluginsManager:function(){top.get("mediaContainer").innerHTML='<iframe src="lib/plugins-manager.php" class="whiteGlow" style="width: 800px; height: 450px"></iframe>';top.ICEcoder.showHide("show",top.get("blackMask"))},githubAction:function(a){top.get("mediaContainer").innerHTML='<iframe src="lib/github.php?action='+a+"&selectedFiles="+top.ICEcoder.selectedFiles.join(";")+"&csrf="+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';top.ICEcoder.showHide("show",
|
||||
top.get("blackMask"))},githubTokenAsk:function(a){if(githubAuthToken=top.ICEcoder.getInput(top.t["Please enter your..."],""))top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/github.php?action=auth&token="+githubAuthToken+"&goNext="+a+"&csrf="+top.ICEcoder.csrf,githubAuthToken=""},showHideGithubNav:function(a){top.get("githubNav").style.display="show"==a?"block":"none";top.get("fileNav").style.display="show"==a?"none":"block"},githubManager:function(){top.ICEcoder.githubAuthTokenSet?
|
||||
(top.get("mediaContainer").innerHTML='<iframe src="lib/github-manager.php" class="whiteGlow" style="width: 660px; height: 450px"></iframe>',top.ICEcoder.showHide("show",top.get("blackMask"))):top.ICEcoder.githubTokenAsk("showManager")},githubDiffToggle:function(){var a;if(!top.ICEcoder.githubAuthTokenSet)top.ICEcoder.githubTokenAsk("loadFiles");else if(top.ICEcoder.githubDiff||top.ICEcoder.ask(top.t["This will compare..."]))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?
|
||||
"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf},useNewSettings:function(a,b,c,d,f,e,g,k,h,l,n,p,m,r,t,u,v){var q;top.ICEcoder.theme=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf("."));"editor"==top.ICEcoder.theme&&(top.ICEcoder.theme="icecoder");q=document.createElement("link");q.setAttribute("rel","stylesheet");q.setAttribute("type","text/css");q.setAttribute("href",a);top.ICEcoder.content.contentWindow.document.getElementsByTagName("head")[0].appendChild(q);
|
||||
a=-1<"3024-day base16-light eclipse elegant neat paraiso-light solarized xq-light".split(" ").indexOf(top.ICEcoder.theme)?"#ccc":"#000";top.ICEcoder.switchTab(top.ICEcoder.selectedTab);b!=top.ICEcoder.codeAssist&&(top.get("codeAssist").checked=b,top.ICEcoder.codeAssistToggle());c!=top.ICEcoder.lockedNav&&top.ICEcoder.lockUnlockNav();c||(ICEcoder.changeFilesW("contract"),top.ICEcoder.hideFileMenu());c=ICEcoder.content.contentWindow.document.styleSheets[4];b=c.rules?"rules":"cssRules";c[b][0].style.fontSize=
|
||||
g;c[b][4].style["border-left-width"]=e?"1px":"0";c[b][4].style["margin-left"]=e?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=k;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=l;for(e=0;e<ICEcoder.cMInstances.length;e++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),
|
||||
ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].setOption("tabSize",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]].refresh(),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("indentWithTabs",
|
||||
top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].setOption("tabSize",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[e]+"diff"].refresh();d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);f!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=f);top.get("plugins").style.left="left"==
|
||||
n?"0":"auto";top.get("plugins").style.right="right"==n?"0":"auto";top.ICEcoder.bugFilePaths=p;top.ICEcoder.bugFileCheckTimer=m;top.ICEcoder.bugFileMaxLines=r;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();top.ICEcoder.githubAuthTokenSet=t;top.ICEcoder.updateDiffOnSave=u;v&&top.ICEcoder.refreshFileManager()},updateResultsDisplay:function(a){ICEcoder.findReplace(top.get("find").value,
|
||||
!0,!1);top.get("results").style.display="show"==a?"inline-block":"none"},fullScreenSwitcher:function(){"undefined"!=typeof document.cancelFullScreen?document.fullScreen?document.cancelFullScreen():document.body.requestFullScreen():"undefined"!=typeof document.mozCancelFullScreen?document.mozFullScreen?document.mozCancelFullScreen():document.body.mozRequestFullScreen():"undefined"!=typeof document.webkitCancelFullScreen&&(document.webkitIsFullScreen?document.webkitCancelFullScreen():document.body.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT))},
|
||||
zipIt:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="plugins/zip-it/index.php?zip="+a+"&csrf="+top.ICEcoder.csrf},downloadFile:function(a){a=a.replace(/\//g,"|");top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/download.php?file="+a+"&csrf="+top.ICEcoder.csrf},chmod:function(a,b){a=a.replace(top.iceRoot,"");top.ICEcoder.showHide("hide",top.get("blackMask"));top.ICEcoder.serverQueue("add","lib/file-control-xhr.php?action=perms&perms="+
|
||||
b+"&csrf="+top.ICEcoder.csrf,a);top.ICEcoder.serverMessage("<b>chMod "+b+" on </b><br>"+a.replace(/\|/g,"/"))},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,f;d=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];a=d.substr(d.lastIndexOf("/")+1);f=a.substr(a.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;top.ICEcoder.previewWindowLoading=!0;top.ICEcoder.previewWindow=window.open(d,
|
||||
"previewWindow");-1<["md"].indexOf(f)?top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=!1;top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(c.getValue())}:top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindowLoading=!1;try{top.ICEcoder.doPesticide()}catch(a){}try{top.ICEcoder.doStatsJS("open")}catch(b){}}}},logout:function(){window.location=window.location+"?logout&csrf="+top.ICEcoder.csrf},message:function(a){alert(a)},ask:function(a){return confirm(a)},
|
||||
getInput:function(a,b){return prompt(a,b)},dataMessage:function(a){var b;b=top.ICEcoder.content.contentWindow.document.getElementById("dataMessage");b.style.display="block";b.innerHTML=a},update:function(){confirm(top.t["Please note for..."])?(top.ICEcoder.showHide("show",top.get("loadingMask")),window.location="lib/updater.php"):window.open("https://icecoder.net")},updated:function(){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<h1 style="color: #fff; cursor: default">Thanks for updating to v'+
|
||||
top.ICEcoder.versionNo+'!</h1><h2 style="color: #888; cursor: default">Click anywhere to continue using ICEcoder...</h2>'},xhrObj:function(){try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(d){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(f){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null},openBugReport:function(){var a;
|
||||
"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["You can start..."]);"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["Error cannot find..."]);"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message(top.t["No new errors..."]);"bugs"==top.ICEcoder.bugReportStatus&&(a=top.ICEcoder.openFiles.indexOf(top.ICEcoder.bugReportPath.replace(/\|/g,"/")),-1<a&&top.ICEcoder.closeTab(a+1,"dontSetPV","dontAsk"),top.ICEcoder.openFile(top.ICEcoder.bugReportPath),top.ICEcoder.bugFilesSizesSeen=
|
||||
top.ICEcoder.bugFilesSizesActual)},startBugChecking:function(){var a;0!==top.ICEcoder.bugFileCheckTimer?("undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt),top.ICEcoder.bugFilesSizesSeen=[],top.ICEcoder.bugFileCheckInt=setInterval(function(){a="lib/bug-files-check.php?";a+="files="+(""!==top.ICEcoder.bugFilePaths[0]?top.ICEcoder.bugFilePaths.join():"null").replace(/\//g,"|");a+="&filesSizesSeen=";if(top.ICEcoder.bugFilesSizesSeen.length!=top.ICEcoder.bugFilePaths.length)for(var b=
|
||||
0;b<top.ICEcoder.bugFilePaths.length;b++)top.ICEcoder.bugFilesSizesSeen[b]="null";a+=top.ICEcoder.bugFilesSizesSeen.join();a+="&maxLines="+top.ICEcoder.bugFileMaxLines;a+="&csrf="+top.ICEcoder.csrf;var c=top.ICEcoder.xhrObj();c.onreadystatechange=function(){if(4==c.readyState&&200==c.status){var a=JSON.parse(c.responseText);top.get("bugIcon").style.backgroundPosition="off"==a.result?"0 0":"ok"==a.result?"-32px 0":"bugs"==a.result?"-48px 0":"-16px 0";top.ICEcoder.bugReportStatus=a.result;"null"==top.ICEcoder.bugFilesSizesSeen[0]&&
|
||||
(top.ICEcoder.bugFilesSizesSeen=a.filesSizesSeen);top.ICEcoder.bugFilesSizesActual=a.filesSizesSeen;top.ICEcoder.bugReportPath=a.bugReportPath}};c.open("GET",a,!0);c.send()},parseInt(1E3*top.ICEcoder.bugFileCheckTimer,10)),top.ICEcoder.bugReportStatus="ok"):"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt)},xssClean:function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},printCode:function(){var a,
|
||||
b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=top.ICEcoder.filesFrame.contentWindow.frames.fileControl;b.window.document.body.innerHTML='<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre style="white-space: pre-wrap">'+top.ICEcoder.xssClean(a.getValue())+"</pre></body></html>";b.focus();b.print();a.focus()},indicateChanges:function(){var a;if(!top.ICEcoder.loadingFile){a="ICEcoder v "+top.ICEcoder.versionNo;
|
||||
for(var b=1;b<=top.ICEcoder.savedPoints.length;b++)if(top.ICEcoder.savedPoints[b-1]!=top.ICEcoder.getcMInstance(b).changeGeneration()){a+=" \u2744";break}top.document.title=a}},switchTab:function(a,b){var c,d;ICEcoder.selectedTab=a;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();if(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c){ICEcoder.switchMode();for(var f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].getWrapperElement().style.display=
|
||||
"none",ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]+"diff"].getWrapperElement().style.display="none";c.setOption("theme",top.ICEcoder.theme);d.setOption("theme",top.ICEcoder.theme+" diff");c.getWrapperElement().style.display="block";d.getWrapperElement().style.display="block";top.ICEcoder.splitPane&&top.ICEcoder.updateDiffs();b||setTimeout(function(){top.ICEcoder.focus()},4);c.refresh();d.refresh();ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.findMode=!1;ICEcoder.findReplace(top.get("find").value,
|
||||
!0,!1);top.ICEcoder.getCaretPosition();top.ICEcoder.updateCharDisplay();top.ICEcoder.updateByteDisplay()}},newTab:function(a){var b;ICEcoder.cMInstances.push(ICEcoder.nextcMInstance);ICEcoder.selectedTab=ICEcoder.cMInstances.length;ICEcoder.showHide("show",ICEcoder.content);ICEcoder.content.contentWindow.createNewCMInstance(ICEcoder.nextcMInstance);ICEcoder.setLayout();ICEcoder.thisFileFolderType="file";ICEcoder.thisFileFolderLink="/[NEW]";ICEcoder.openFile();b=ICEcoder.getcMInstance("new");ICEcoder.switchTab(ICEcoder.openFiles.length);
|
||||
b.removeLineClass(ICEcoder["cMActiveLinecM"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]],"background");ICEcoder["cMActiveLinecM"+ICEcoder.selectedTab]=b.addLineClass(0,"background","cm-s-activeLine");ICEcoder.nextcMInstance++;a&&top.ICEcoder.saveFile()},createNewTab:function(a){var b;top.ICEcoder.openFiles.push(top.ICEcoder.shortURL);top.get("tab"+top.ICEcoder.openFiles.length).style.display="inline-block";b=top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1];top.get("tab"+top.ICEcoder.openFiles.length).innerHTML=
|
||||
'<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+b.slice(b.lastIndexOf("/")).replace(/\//,"");top.get("tab"+top.ICEcoder.openFiles.length).title="/"+top.ICEcoder.openFiles[top.ICEcoder.openFiles.length-1].replace(/\//,
|
||||
"");top.ICEcoder.setTabWidths();top.ICEcoder.redoTabHighlight(top.ICEcoder.openFiles.length);top.ICEcoder.selectedTab=top.ICEcoder.openFiles.length;top.ICEcoder.savedPoints.push(0);a||top.ICEcoder.setPreviousFiles()},nextTab:function(){top.ICEcoder.switchTab(top.ICEcoder.selectedTab+1<=top.ICEcoder.openFiles.length?top.ICEcoder.selectedTab+1:1,"noFocus")},previousTab:function(){top.ICEcoder.switchTab(1<=top.ICEcoder.selectedTab-1?top.ICEcoder.selectedTab-1:top.ICEcoder.openFiles.length,"noFocus")},
|
||||
renameTab:function(a,b){var c;top.ICEcoder.openFiles[a-1]=b;c=top.ICEcoder.openFiles[a-1];top.get("tab"+a).innerHTML='<a nohref onClick="top.ICEcoder.closeTab(parseInt(this.parentNode.id.slice(3),10))"><img src="images/nav-close.gif" class="closeTab" onMouseOver="prevBG=this.style.backgroundColor;this.style.backgroundColor=\'#333\'; top.ICEcoder.overCloseLink=true" onMouseOut="this.style.backgroundColor=prevBG; top.ICEcoder.overCloseLink=false"></a> '+c.slice(c.lastIndexOf("/")).replace(/\//,"");
|
||||
top.get("tab"+a).title="/"+top.ICEcoder.openFiles[a-1].replace(/\//,"")},redoTabHighlight:function(a){for(var b,c,d=1;d<=ICEcoder.savedPoints.length;d++)top.get("tab"+d).childNodes[0]&&(top.get("tab"+d).childNodes[0].childNodes[0].style.backgroundColor=ICEcoder.savedPoints[d-1]!=top.ICEcoder.getcMInstance(d).changeGeneration()?"#b00":"transparent"),b=d==a?top.ICEcoder.tabFGselected:top.ICEcoder.tabFGnormalTab,"undefined"!=typeof top.ICEcoder.openFiles[d-1]&&"/[NEW]"!=top.ICEcoder.openFiles[d-1]&&
|
||||
(c=top.ICEcoder.filesFrame.contentWindow.document.getElementById(top.ICEcoder.openFiles[d-1].replace(/\//g,"|")))&&(c.style.backgroundColor=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen,c.style.color=d==a?top.ICEcoder.tabFGcurrent:top.ICEcoder.tabFGopenFile),top.get("tab"+d).style.color=b,top.get("tab"+d).style.background=d==a?top.ICEcoder.tabBGcurrent:top.ICEcoder.tabBGopen},closeTab:function(a,b,c){var d;a||(a=top.ICEcoder.selectedTab);ICEcoder.getcMInstance();ICEcoder.getcMdiffInstance();
|
||||
d=!0;c||ICEcoder.savedPoints[a-1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask(top.t["You have made..."]));if(d){c=top.ICEcoder.openFiles[a-1];for(d=a;d<ICEcoder.openFiles.length;d++)top.get("tab"+d).innerHTML=top.get("tab"+(d+1)).innerHTML,top.get("tab"+d).title=top.get("tab"+(d+1)).title,ICEcoder.openFiles[d-1]=ICEcoder.openFiles[d],ICEcoder.openFileMDTs[d-1]=ICEcoder.openFileMDTs[d];ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-1]].getWrapperElement().style.display=
|
||||
"none";ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[a-1]+"diff"].getWrapperElement().style.display="none";top.ICEcoder.cMInstances.splice(a-1,1);top.get("tab"+ICEcoder.openFiles.length).style.display="none";top.get("tab"+ICEcoder.openFiles.length).innerHTML="";top.get("tab"+ICEcoder.openFiles.length).title="";ICEcoder.openFiles.pop();ICEcoder.openFileMDTs.pop();ICEcoder.selectedTab==a&&(0<ICEcoder.openFiles.length?--ICEcoder.selectedTab:ICEcoder.selectedTab=0);0<ICEcoder.openFiles.length&&
|
||||
0==ICEcoder.selectedTab&&(ICEcoder.selectedTab=1);0==ICEcoder.openFiles.length?top.ICEcoder.fMIconVis("fMView",.3):(ICEcoder.switchMode(),ICEcoder.switchTab(ICEcoder.selectedTab));top.ICEcoder.savedPoints.splice(a-1,1);top.ICEcoder.redoTabHighlight(ICEcoder.selectedTab);top.ICEcoder.selectDeselectFile("deselect",top.ICEcoder.filesFrame.contentWindow.document.getElementById(c.replace(/\//g,"|")));b||top.ICEcoder.setPreviousFiles();top.ICEcoder.indicateChanges()}top.ICEcoder.canSwitchTabs=!1;top.ICEcoder.setTabWidths("posOnlyNewTab");
|
||||
setTimeout(function(){top.ICEcoder.canSwitchTabs=!0},100)},closeAllTabs:function(){if(0<top.ICEcoder.cMInstances.length&&ICEcoder.ask(top.t["Close all tabs"]))for(var a=top.ICEcoder.cMInstances.length;0<a;a--)top.ICEcoder.closeTab(a,1<a?!0:!1);top.ICEcoder.indicateChanges()},setTabWidths:function(a){var b,c,d,f,e;if(top.ICEcoder.ready){b=parseInt(top.ICEcoder.content.style.width,10)-53-22-10;c=b/top.ICEcoder.openFiles.length-18;d=-18;f=53;e=0;top.ICEcoder.tabLeftPos=[];for(var g=0;g<top.ICEcoder.openFiles.length;g++)a&&
|
||||
(g=top.ICEcoder.openFiles.length),d=168*top.ICEcoder.openFiles.length>b?parseInt(c*g,10)-parseInt(c*(g-1),10):150,f=0==g?53:parseInt(top.get("tab"+g).style.left,10),e=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=f+e+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(f+e);top.get("newTab").style.left=f+e+d+18+"px"}},tabDragStart:function(a){top.ICEcoder.draggingTab=a;top.ICEcoder.diffStartX=top.ICEcoder.mouseX;top.ICEcoder.tabDragMouseXStart=
|
||||
(top.ICEcoder.mouseX-(parseInt(top.ICEcoder.files.style.width,10)+53+18))%150;top.get("tab"+a).style.zIndex=2;for(var b=1;b<=top.ICEcoder.openFiles.length;b++)top.get("tab"+b).className=b!==a?"tab tabSlide":"tab tabDrag"},tabDragMove:function(){var a,b;a=parseInt(top.get("tab"+top.ICEcoder.openFiles.length).style.width,10)+18;top.ICEcoder.thisLeft=a=53<=top.ICEcoder.tabDragMouseX?top.ICEcoder.tabDragMouseX<=parseInt(top.get("newTab").style.left,10)-a?top.ICEcoder.tabDragMouseX:parseInt(top.get("newTab").style.left,
|
||||
10)-a:53;top.get("tab"+top.ICEcoder.draggingTab).style.left=a+"px";top.ICEcoder.dragTabNo=top.ICEcoder.draggingTab;for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.get("tab"+c).style.opacity=c==top.ICEcoder.draggingTab?1:.5,b=top.ICEcoder.tabLeftPos[c]?top.ICEcoder.tabLeftPos[c]-top.ICEcoder.tabLeftPos[c-1]:b,c!=top.ICEcoder.draggingTab&&(c<top.ICEcoder.draggingTab?top.get("tab"+c).style.left=a<=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]+b:top.ICEcoder.tabLeftPos[c-1]:top.get("tab"+
|
||||
c).style.left=a>=top.ICEcoder.tabLeftPos[c-1]?top.ICEcoder.tabLeftPos[c-1]-b:top.ICEcoder.tabLeftPos[c-1])},tabDragEnd:function(){var a,b;top.ICEcoder.setTabWidths();for(var c=1;c<=top.ICEcoder.openFiles.length;c++)top.ICEcoder.thisLeft>=top.ICEcoder.tabLeftPos[c-1]&&(a=top.ICEcoder.thisLeft==top.ICEcoder.tabLeftPos[0]?1:top.ICEcoder.dragTabNo>c?c+1:c),top.get("tab"+c).className="tab",top.get("tab"+c).style.opacity=1,c!=top.ICEcoder.dragTabNo?top.get("tab"+c).style.zIndex=1:setTimeout(function(){top.get("tab"+
|
||||
c).style.zIndex=1},150);if(top.ICEcoder.thisLeft&&!1!==top.ICEcoder.thisLeft){b=[];for(c=1;c<=top.ICEcoder.openFiles.length;c++)b.push(c);b.splice(top.ICEcoder.dragTabNo-1,1);b.splice(a-1,0,top.ICEcoder.dragTabNo);ICEcoder.sortTabs(b)}top.ICEcoder.setTabWidths();top.ICEcoder.draggingTab=!1;top.ICEcoder.thisLeft=!1},sortTabs:function(a){var b,c,d;b=[ICEcoder.savedPoints,ICEcoder.openFiles,ICEcoder.openFileMDTs,ICEcoder.cMInstances];c=[[],[],[],[]];for(var f=0;f<b.length;f++){for(var e=0;e<b[f].length;e++)c[f].push(b[f][a[e]-
|
||||
1]);b[f]=c[f]}for(f=0;f<a.length;f++)top.get("tab"+a[f]).id="tab"+(f+1)+".temp",top.ICEcoder.selectedTab==a[f]&&(d=f+1);for(f=0;f<a.length;f++)top.get("tab"+(f+1)+".temp").id="tab"+(f+1);top.get("tab"+d)&&(top.get("tab"+d).className="tab tabSlide");ICEcoder.savedPoints=b[0];ICEcoder.openFiles=b[1];ICEcoder.openFileMDTs=b[2];ICEcoder.cMInstances=b[3];top.ICEcoder.setTabWidths();top.ICEcoder.switchTab(d)},alphaTabs:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c,d,f;a=[];b=[];c=[];for(var e=
|
||||
0;e<top.ICEcoder.openFiles.length;e++)a.push(top.ICEcoder.openFiles[e].slice(top.ICEcoder.openFiles[e].lastIndexOf("/")+1)),b.push(top.ICEcoder.openFiles[e]),top.get("tab"+(e+1)).className="tab tabSlide";for(;0<a.length;){d=a[0];nextValueFull=b[0];for(e=f=0;e<a.length;e++)a[e]<d&&(d=a[e],nextValueFull=top.ICEcoder.openFiles[top.ICEcoder.openFiles.indexOf(b[e])],f=e);c.push(top.ICEcoder.openFiles.indexOf(nextValueFull)+1);a.splice(f,1);b.splice(f,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,
|
||||
b){var c,d;c=b.keyCode?b.keyCode:b.which?b.which:b.charCode;if(224==c||91==c||93==c)top.ICEcoder.cmdKey=!0;if(46==c&&"files"==a)return top.ICEcoder.deleteFiles(),!1;if(b.altKey)return d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1,"ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d?"content"==a?68==c?(top.ICEcoder.tagWrapper("div"),!1):83==c?(top.ICEcoder.tagWrapper("span"),!1):80==c?(top.ICEcoder.tagWrapper("p"),!1):65==c?(top.ICEcoder.tagWrapper("a"),!1):66==c?
|
||||
(top.ICEcoder.tagWrapper("b"),!1):73==c?(top.ICEcoder.tagWrapper("i"),!1):71==c?(top.ICEcoder.tagWrapper("strong"),!1):69==c?(top.ICEcoder.tagWrapper("em"),!1):49==c?(top.ICEcoder.tagWrapper("h1"),!1):50==c?(top.ICEcoder.tagWrapper("h2"),!1):51==c?(top.ICEcoder.tagWrapper("h3"),!1):56==c?(top.ICEcoder.tagWrapper("li"),!1):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):37==c?(top.filesFrame.contentWindow.focus(),!1):c:37==c?(top.filesFrame.contentWindow.focus(),!1):39==c?(top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
!0:!1),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c;if(13==c&&b.shiftKey)return top.ICEcoder.insertLineBefore(),!1;if(70==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return top.get("find").focus(),!1;if(71==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return top.get("goToLineNo").focus(),!1;if(73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.searchForSelected(),!1;if(39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a)return top.ICEcoder.nextTab(),!1;if(37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&
|
||||
"content"!=a)return top.ICEcoder.previousTab(),!1;if(38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("up"),!1;if(40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a)return top.ICEcoder.moveLines("down"),!1;if(107==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1;if(109==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return"content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1;
|
||||
if(83==c&&(b.ctrlKey||top.ICEcoder.cmdKey))return b.shiftKey?top.ICEcoder.saveFile("saveAs"):top.ICEcoder.saveFile(),!1;if(13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1])return top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]),!1;if(13==c&&"files"==a)return b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),
|
||||
top.ICEcoder.fmAction(b,"enter")),!1;if(38!=c&&40!=c&&37!=c&&39!=c||"files"!=a)return 79==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):74==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.jumpToDefinition(),!1):223==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.lockUnlockNav(),ICEcoder.changeFilesW(top.ICEcoder.lockedNav?"expand":"contract"),!1):190==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?
|
||||
(c=ICEcoder.getcMInstance(),d=ICEcoder.getcMdiffInstance(),c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c,d=c.getCursor().line,top.contentFrame.CodeMirror.doFold(-1<c.getLine(d).indexOf("{")?"brace":"xml",null,"+","-",!1)(c,d),!1):27==c&&"content"==a?(c=ICEcoder.getcMInstance(),d=ICEcoder.getcMdiffInstance(),c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c,1<c.getSelections().length?c.execCommand("singleSelection"):top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),
|
||||
!1):c;b.ctrlKey||top.ICEcoder.cmdKey||(0==top.ICEcoder.selectedFiles.length&&(top.ICEcoder.overFileFolder("folder","|"),top.ICEcoder.selectFileFolder("init")),top.ICEcoder.fmAction(b,38==c?"up":40==c?"down":37==c?"left":"right"));return!1},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();b=ICEcoder.getcMdiffInstance();a=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?b:a;b=a.getCursor().line;c=a.getLine(b).length-a.getLine(b).replace(/^\s\s*/,
|
||||
"").length;a=a.getLine(b).slice(c);"function"==a.slice(0,8)?top.ICEcoder.doSnippet("function","function VAR() {\nINDENT\tCURSOR\nINDENT}"):"if"==a.slice(0,2)?top.ICEcoder.doSnippet("if","if (CURSOR) {\nINDENT\t\nINDENT}"):"for"==a.slice(0,3)&&top.ICEcoder.doSnippet("for","for (var i=0; i<CURSOR; i++) {\nINDENT\t\nINDENT}")},doSnippet:function(a,b){var c,d,f,e,g,k;c=ICEcoder.getcMInstance();d=ICEcoder.getcMdiffInstance();c=-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?d:c;d=c.getCursor().line;
|
||||
if(-1<c.getLine(d).indexOf(a)){f=c.getLine(d);e=f.indexOf(a);f=f.slice(f.indexOf(a)+a.length+1);b=b.replace(/VAR/g,f);f=c.getLine(d).slice(0,e);e=c.getLine(d).length-c.getLine(d).replace(/^\s\s*/,"").length;e=c.getLine(d).slice(0,e);b=b.replace(/INDENT/g,e);f+=b;e=f.indexOf("CURSOR");g=0;k=d;for(i=0;i<f.length;i++)f.indexOf("\n",g)<f.indexOf("CURSOR")&&(g=f.indexOf("\n",g)+1,k+=1);c.replaceRange(f.replace("CURSOR",""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(k,e);top.ICEcoder.focus(-1<top.ICEcoder.editorFocusInstance.indexOf("diff")?
|
||||
!0:!1)}}};
|
||||
@@ -14,13 +14,13 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<link rel="stylesheet" type="text/css" href="ice-coder.css">
|
||||
<link rel="stylesheet" type="text/css" href="ice-coder.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="icon" type="image/png" href="../favicon.png">
|
||||
</head>
|
||||
|
||||
<body onLoad="<?php if (!isset($_GET["get"])) {$inputFocus = $ICEcoder["multiUser"] ? "username" : "password"; echo "document.settingsUpdate.".$inputFocus.".focus(); ";}; ?>if (document.getElementById('trialBarRemaining')) {setTimeout(function(){document.getElementById('trialBarRemaining').style.width = '<?php echo $tRemainingPerc*170;?>px';},500)}">
|
||||
<body style="background-color: #141414" onLoad="<?php if (!isset($_GET["get"])) {$inputFocus = $ICEcoder["multiUser"] ? "username" : "password"; echo "document.settingsUpdate.".$inputFocus.".focus(); ";}; ?>setTimeout(function(){document.getElementById('screenContainer').style.opacity=1},50);if (document.getElementById('trialBarRemaining')) {setTimeout(function(){document.getElementById('trialBarRemaining').style.width = '<?php echo $tRemainingPerc*170;?>px';},150)}">
|
||||
|
||||
<div class="screenContainer" style="background-color: #141414">
|
||||
<div class="screenContainer" id="screenContainer" style="background-color: #141414; opacity: 0; transition: opacity 0.1s ease-out">
|
||||
<div class="screenVCenter">
|
||||
<div class="screenCenter">
|
||||
<img src="../images/ice-coder.png" alt="ICEcoder">
|
||||
@@ -38,7 +38,7 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
|
||||
?>
|
||||
<span style="color: #fff"><h1>Thanks for trialling ICEcoder!</h1><b>Please donate on the website to continue using it.</b><br><br>
|
||||
<h2>Step 1: Donate</h2><br><br>
|
||||
<a href="https://icecoder.net/?display=trialDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate $5</a><br><br><br>
|
||||
<a href="https://icecoder.net/?display=trialDonateScreen" target="_blank" style="background: #097695; color: #fff; padding: 10px; text-decoration: none; font-size: 17px; font-weight: bold; border-radius: 4px; cursor: pointer">Donate now</a><br><br><br>
|
||||
<h2>Step 2: Enter email address & code</h2><br>
|
||||
<?php if (isset($_GET["success"]) && $_GET["success"]=="no") {echo "Sorry, that doesn't seem to be correct.<br>Please check your emailed details and try again.<br><br>";};?>
|
||||
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" value="Username" onfocus="origValue=\'Username\';if(this.value==origValue){this.value=\'\';};" onblur="if(this.value==\'\'){this.value=origValue;};" class="password"><br><br>'.PHP_EOL;};?>
|
||||
|
||||
@@ -15,7 +15,7 @@ if(isset($_GET['selectedFiles'])) {
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</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="multiple-results.css">
|
||||
<link rel="stylesheet" type="text/css" href="multiple-results.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="results" onLoad="top.get('loadingMask').style.visibility = 'hidden'">
|
||||
@@ -44,7 +44,7 @@ var resultsDisplay = "";
|
||||
var foundArray = [];
|
||||
foundInSelected = false;
|
||||
userTarget = top.document.findAndReplace.target.value;
|
||||
findText = top.findAndReplace.find.value.toLowerCase();
|
||||
findText = top.findAndReplace.find.value;
|
||||
<?php
|
||||
$findText = str_replace("ICEcoder:","",str_replace("'","\'",$_GET['find']));
|
||||
// Find in open docs?
|
||||
|
||||
@@ -193,7 +193,7 @@ function deletePlugin($dir) {
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> plugins manager</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="plugins-manager.css">
|
||||
<link rel="stylesheet" type="text/css" href="plugins-manager.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="pluginsManager">
|
||||
|
||||
@@ -17,7 +17,7 @@ if (!file_exists($fileName) || strpos(str_replace("\\","/",$fileName),$docRoot)
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties</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="properties.css">
|
||||
<link rel="stylesheet" type="text/css" href="properties.css?microtime=<?php echo microtime(true);?>">
|
||||
</head>
|
||||
|
||||
<body class="properties">
|
||||
|
||||
@@ -17,13 +17,30 @@ $context = stream_context_create(array('http'=>
|
||||
|
||||
// Start a session if we haven't already
|
||||
if(!isset($_SESSION)) {
|
||||
session_save_path(dirname(__FILE__).'/../tmp');
|
||||
@session_start();
|
||||
ini_set('session.use_cookies','1'); // Use cookies not URL parameters
|
||||
ini_set('session.use_only_cookies','1'); // Force use of cookies and nothing else
|
||||
ini_set('session.name','ICEcoder_Cookie'); // Set a seperate cookie session name
|
||||
ini_set('session.cookie_lifetime','0'); // Until the browser restarts by default
|
||||
ini_set('session.cookie_domain',''); // This domain only
|
||||
ini_set('session.cookie_path',str_replace($_SERVER['DOCUMENT_ROOT'],'',dirname(dirname(__FILE__)))); // ICEcoder path only
|
||||
ini_set('session.use_trans_sid','0'); // Ensure this insecure feature is disabled
|
||||
ini_set('session.hash_function','sha512'); // Use Sha512 for session
|
||||
ini_set('session.hash_bits_per_character','6'); // Specify hash scheme of 0-9,a-v,A-Z,-,,
|
||||
ini_set('session.use_strict_mode','1'); // Reject any session ID that was user provided and not generated by the session
|
||||
ini_set('session.httponly','1'); // Only allow http protocol (ie, not JS) access to the cookie
|
||||
ini_set('session.save_path',dirname(__FILE__).'/../tmp'); // Localise the session files to /tmp
|
||||
if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
|
||||
ini_set('session.cookie_secure','1'); // Only allows access to session ID when protocol is HTTPS, switched on under 'if https' condition
|
||||
}
|
||||
session_regenerate_id(true); // Create a new ID to help prevent fixation
|
||||
@session_start(); // Finally, start the session!
|
||||
}
|
||||
|
||||
// Set the language file
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['settings-common'];
|
||||
// Set the language file, if now possible
|
||||
if (isset($_SESSION['text'])) {
|
||||
$text = $_SESSION['text'];
|
||||
$t = $text['settings-common'];
|
||||
}
|
||||
|
||||
// Logout if that's the action we're taking
|
||||
if (isset($_GET['logout'])) {
|
||||
@@ -31,7 +48,8 @@ if (isset($_GET['logout'])) {
|
||||
$_SESSION['loggedIn']=false;
|
||||
$_SESSION['username']=false;
|
||||
session_destroy();
|
||||
header("Location: ".dirname(__FILE__)."/?loggedOut");
|
||||
header("Location: .");
|
||||
die("Logging you out...");
|
||||
}
|
||||
|
||||
// If magic quotes are still on (attempted to switch off in php.ini)
|
||||
@@ -131,31 +149,31 @@ function toUTF8noBOM($string,$message) {
|
||||
|
||||
// Polyfill for array_replace_recursive, which is in PHP 5.3+
|
||||
if (!function_exists('array_replace_recursive')) {
|
||||
function array_replace_recursive($base, $replacements) {
|
||||
foreach (array_slice(func_get_args(), 1) as $replacements) {
|
||||
$bref_stack = array(&$base);
|
||||
$head_stack = array($replacements);
|
||||
function array_replace_recursive($base, $replacements) {
|
||||
foreach (array_slice(func_get_args(), 1) as $replacements) {
|
||||
$bref_stack = array(&$base);
|
||||
$head_stack = array($replacements);
|
||||
|
||||
do {
|
||||
end($bref_stack);
|
||||
do {
|
||||
end($bref_stack);
|
||||
|
||||
$bref = &$bref_stack[key($bref_stack)];
|
||||
$head = array_pop($head_stack);
|
||||
$bref = &$bref_stack[key($bref_stack)];
|
||||
$head = array_pop($head_stack);
|
||||
|
||||
unset($bref_stack[key($bref_stack)]);
|
||||
unset($bref_stack[key($bref_stack)]);
|
||||
|
||||
foreach (array_keys($head) as $key) {
|
||||
if (isset($key, $bref) && is_array($bref[$key]) && is_array($head[$key])) {
|
||||
$bref_stack[] = &$bref[$key];
|
||||
$head_stack[] = $head[$key];
|
||||
} else {
|
||||
$bref[$key] = $head[$key];
|
||||
}
|
||||
}
|
||||
} while(count($head_stack));
|
||||
}
|
||||
foreach (array_keys($head) as $key) {
|
||||
if (isset($key, $bref) && is_array($bref[$key]) && is_array($head[$key])) {
|
||||
$bref_stack[] = &$bref[$key];
|
||||
$head_stack[] = $head[$key];
|
||||
} else {
|
||||
$bref[$key] = $head[$key];
|
||||
}
|
||||
}
|
||||
} while(count($head_stack));
|
||||
}
|
||||
|
||||
return $base;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -10,9 +10,9 @@ $t = $text['settings-screen'];
|
||||
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> settings screen</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="settings-screen.css">
|
||||
<link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css">
|
||||
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="settings-screen.css?microtime=<?php echo microtime(true);?>">
|
||||
<link rel="stylesheet" href="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror.css?microtime=<?php echo microtime(true);?>">
|
||||
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.CodeMirror {position: absolute; width: 409px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>}
|
||||
@@ -21,7 +21,7 @@ $t = $text['settings-screen'];
|
||||
.cm-tab {border-left-width: <?php echo $ICEcoder["visibleTabs"] ? "1px" : "0";?>; margin-left: <?php echo $ICEcoder["visibleTabs"] ? "-1px" : "0";?>; border-left-style: solid; border-left-color: rgba(255,255,255,0.2)}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="editor.css">
|
||||
<link rel="stylesheet" href="editor.css?microtime=<?php echo microtime(true);?>">
|
||||
<?php
|
||||
$themeArray = array();
|
||||
$handle = opendir('../'.$ICEcoder["codeMirrorDir"].'/theme/');
|
||||
@@ -32,7 +32,7 @@ while (false !== ($file = readdir($handle))) {
|
||||
}
|
||||
sort($themeArray);
|
||||
for ($i=0;$i<count($themeArray);$i++) {
|
||||
echo '<link rel="stylesheet" href="../'.$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css">'.PHP_EOL;
|
||||
echo '<link rel="stylesheet" href="../'.$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css?microtime='.microtime(true).'">'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
@@ -94,6 +94,7 @@ language <span class="info" title="Reload required after changing">[?]</span><br
|
||||
<option value="italian.php"<?php if($ICEcoder["languageUser"]=='italian.php') {echo " selected";};?>>Italiano</option>
|
||||
<option value="norwegian.php"<?php if($ICEcoder["languageUser"]=='norwegian.php') {echo " selected";};?>>Norsk</option>
|
||||
<option value="persian.php"<?php if($ICEcoder["languageUser"]=='persian.php') {echo " selected";};?>>فارسی</option>
|
||||
<option value="portuguese_brazilian.php"<?php if($ICEcoder["languageUser"]=='portuguese_brazilian.php') {echo " selected";};?>>Portugues(br)</option>
|
||||
Nederlands
|
||||
</select><br>
|
||||
<br>
|
||||
@@ -302,4 +303,4 @@ var validatePasswords = function() {
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -69,6 +69,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
|
||||
// Work out the theme to use now
|
||||
$ICEcoder["theme"]=="default" ? $themeURL = 'lib/editor.css' : $themeURL = $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';
|
||||
$themeURL .= "?microtime=".microtime(true);
|
||||
|
||||
// Do we need a file manager refresh?
|
||||
$refreshFM = $_POST['changedFileSettings']=="true" ? "true" : "false";
|
||||
|
||||
@@ -29,6 +29,31 @@ if (!file_exists(dirname(__FILE__)."/".$settingsFile) && $ICEcoderSettings['enab
|
||||
// Load user settings
|
||||
include(dirname(__FILE__)."/".$settingsFile);
|
||||
|
||||
// Remove any previous files that are no longer there
|
||||
$prevFiles = explode(",",$ICEcoderUserSettings['previousFiles']);
|
||||
$prevFilesAvail = "";
|
||||
for ($i=0; $i<count($prevFiles); $i++) {
|
||||
if (file_exists(str_replace("|","/",$prevFiles[$i]))) {
|
||||
$prevFilesAvail .= $prevFiles[$i].",";
|
||||
}
|
||||
}
|
||||
$prevFilesAvail = rtrim($prevFilesAvail,",");
|
||||
$ICEcoderUserSettings['previousFiles'] = $prevFilesAvail;
|
||||
|
||||
// Replace our config created date with the filemtime?
|
||||
if (basename($_SERVER['SCRIPT_NAME']) == "index.php" && $ICEcoderUserSettings['configCreateDate'] == 0) {
|
||||
$settingsContents = file_get_contents(dirname(__FILE__)."/".$settingsFile,false,$context);
|
||||
clearstatcache();
|
||||
$configfilemtime = filemtime(dirname(__FILE__)."/"."config___settings.php");
|
||||
$settingsContents = str_replace('"configCreateDate" => 0,','"configCreateDate" => '.$configfilemtime.',',$settingsContents);
|
||||
// Now update the config file
|
||||
$fh = fopen(dirname(__FILE__)."/".$settingsFile, 'w') or die("Can't update config file. Please set public write permissions on ".$settingsFile." and press refresh");
|
||||
fwrite($fh, $settingsContents);
|
||||
fclose($fh);
|
||||
// Set the new value in array
|
||||
$ICEcoderUserSettings['configCreateDate'] = $configfilemtime;
|
||||
}
|
||||
|
||||
// On mismatch of settings file to system, rename to .old and reload
|
||||
If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
|
||||
rename(dirname(__FILE__)."/".$settingsFile,dirname(__FILE__)."/".str_replace(".php",".old",$settingsFile));
|
||||
@@ -42,16 +67,10 @@ $ICEcoder = $ICEcoderSettings + $ICEcoderUserSettings;
|
||||
|
||||
// Include language file
|
||||
// Load base first as foundation
|
||||
if (strpos(str_replace("\\","/",realpath(dirname(__FILE__)."/../lang/".$ICEcoder['languageBase'])),str_replace("\\","/",realpath($ICEcoder['docRoot']))) !== 0) {
|
||||
die('Sorry, bad base language path');
|
||||
}
|
||||
if (strpos(str_replace("\\","/",realpath(dirname(__FILE__)."/../lang/".$ICEcoder['languageUser'])),str_replace("\\","/",realpath($ICEcoder['docRoot']))) !== 0) {
|
||||
die('Sorry, bad user language path');
|
||||
}
|
||||
include(dirname(__FILE__)."/../lang/".$ICEcoder['languageBase']);
|
||||
include(dirname(__FILE__)."/../lang/".basename($ICEcoder['languageBase']));
|
||||
$baseText = $text;
|
||||
// Load chosen language ontop to replace base
|
||||
include(dirname(__FILE__)."/../lang/".$ICEcoder['languageUser']);
|
||||
include(dirname(__FILE__)."/../lang/".basename($ICEcoder['languageUser']));
|
||||
$text = array_replace_recursive($baseText, $text);
|
||||
$_SESSION['text'] = $text;
|
||||
|
||||
@@ -60,7 +79,7 @@ if ((!$ICEcoder['loginRequired'] || $ICEcoder['demoMode']) && $ICEcoder['passwor
|
||||
$demoMode = $ICEcoder['demoMode'];
|
||||
|
||||
// Check if trial period has ended
|
||||
$tPeriod = 1209600;
|
||||
$tPeriod = 1296000-1;
|
||||
if (generateHash(strClean($ICEcoder['licenseEmail']),$ICEcoder['licenseCode'])!=$ICEcoder['licenseCode'] && $ICEcoder['configCreateDate'] > 0 && $ICEcoder['configCreateDate']+$tPeriod < time() && !isset($_GET['get']) && !isset($_POST['code'])) {
|
||||
if (file_exists('lib/login.php')) {
|
||||
header('Location: lib/login.php?get=code&csrf='.$_SESSION["csrf"]);
|
||||
@@ -72,7 +91,7 @@ if (generateHash(strClean($ICEcoder['licenseEmail']),$ICEcoder['licenseCode'])!=
|
||||
die('Redirecting to donate screen...');
|
||||
}
|
||||
$tRemaining = ($ICEcoder['configCreateDate']+$tPeriod)-time();
|
||||
if ($tRemaining > $tPeriod) {$tRemaining = $tPeriod;};
|
||||
if ($tRemaining > $tPeriod || $ICEcoder['configCreateDate'] == 0) {$tRemaining = $tPeriod;};
|
||||
$tRemainingPerc = number_format($tRemaining/$tPeriod,2);
|
||||
$tDaysRemaining = intval($tRemaining/(60*60*24));
|
||||
|
||||
@@ -186,10 +205,6 @@ if ((!$_SESSION['loggedIn'] || $ICEcoder["password"] == "") && !strpos($_SERVER[
|
||||
if ($ICEcoder["password"] == "" && isset($_POST['submit']) && (strpos($_POST['submit'],"set password")>-1)) {
|
||||
$password = generateHash(strClean($_POST['password']));
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
// Replace our config created date with the filemtime
|
||||
clearstatcache();
|
||||
$configfilemtime = filemtime("config___settings.php");
|
||||
$settingsContents = str_replace('"configCreateDate" => 0,','"configCreateDate" => '.$configfilemtime.',',$settingsContents);
|
||||
// Replace our empty password with the one submitted by user
|
||||
$settingsContents = str_replace('"password" => "",','"password" => "'.$password.'",',$settingsContents);
|
||||
// Also set the update checker preference
|
||||
|
||||
@@ -220,7 +220,7 @@ startUpdate();
|
||||
if ($updateDone) {
|
||||
echo 'Updated successfully!<br><br>';
|
||||
echo 'Restarting ICEcoder...';
|
||||
echo '<script>alert("'.$t['Update appears to...'].'");window.location = "../";</script>';
|
||||
echo '<script>alert("'.$t['Update appears to...'].'");window.location = "../?display=updated&csrf='.$_SESSION["csrf"].";</script>';
|
||||
} else {
|
||||
echo 'Something appears to have gone wrong :-/<br><br>';
|
||||
echo 'Please report bugs at <a href="https://github.com/mattpass/ICEcoder" style="color: #fff">https://github.com/mattpass/ICEcoder</a><br><br>';
|
||||
|
||||
@@ -8,7 +8,7 @@ Open file, update document, save file, highlight line, add tag wrappers, duplica
|
||||
<head>
|
||||
<title>ICEcoder Test Suite</title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<script src="object-watch.js"></script>
|
||||
<script src="object-watch.js?microtime=<?php echo microtime(true);?>"></script>
|
||||
</head>
|
||||
|
||||
<script>
|
||||
|
||||
4
tmp/index.php
Normal file
4
tmp/index.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
header("Location: ../");
|
||||
die();
|
||||
?>
|
||||
Reference in New Issue
Block a user