Compare commits

...

124 Commits
v4.1 ... v4.3

Author SHA1 Message Date
Matt Pass
7ef86360d8 Version 4.3 2014-09-26 15:32:28 +01:00
Matt Pass
746b133a9a Filetype identification fixes & improvements
Look to fileExt to determine the file type by extension rather than
string in fileName which is the path. This means .c isn't mistakenly
picked up in paths such as /httpdocs/mydomain.com/file.rb
Simplified code with 2 improved ternary statements
2014-09-26 14:38:59 +01:00
Matt Pass
c141fc2864 Selected text + tab = indent auto
Instead of single tabs
2014-09-26 12:44:06 +01:00
Matt Pass
cc5cd166be Only if no headers sent, set the 3 headers 2014-09-26 11:59:03 +01:00
Matt Pass
2409bc19c2 Compile Sass and LESS on save if plugins available 2014-09-24 12:28:59 +01:00
Matt Pass
297e482b11 Recursive only if githubDiff, no anim if > 50
Only include github.js if in githubDiff mode
Only do recursive dir loading if in gitHub diff mode
Move folderItems splitting out of loop to avoid unnecessary processing
showFiles now begins the process of displaying files - animated into
view (using setInterval) if less than 50 items, or shows immediately (by
setting showContent and skipping recursion) if more
showNextFile() is a function to actually display a file or if the end,
kick off the process of adding deleted files/dirs
2014-09-23 18:40:49 +01:00
Matt Pass
46c1bdce02 Fixes to allow new items to be created
Store original $file value in $fileOrig
rtrim [NEW] from the $file path as that is messing with realpath
checking
Move debugging alert and console.log line into the for loop and use
allFiles[$i]
If a local path and not the doc root or parent dir starts with the doc
root
Check on $fileOrig when saving as
2014-09-23 16:49:47 +01:00
Matt Pass
be74745318 Links added for info on 2 types of auth token 2014-09-18 18:08:05 +01:00
Matt Pass
cd2e2747c5 Max length of 50 chars added to title 2014-09-18 18:02:03 +01:00
Matt Pass
3a7e728871 No autocomplete on the GitHub auth input field 2014-09-18 17:51:14 +01:00
Matt Pass
3db00273dd Version 4.2 2014-09-18 16:09:10 +01:00
Matt Pass
e47b21ce80 Don't check paths if we're uploading 2014-09-18 16:07:39 +01:00
Matt Pass
7adefd1ff0 die() after header to stop going any further 2014-09-18 15:43:48 +01:00
Matt Pass
1276e894b5 File/folder message instead and go back 2014-09-18 15:40:03 +01:00
Matt Pass
9c90ffea43 Replace \ with / when comparing with $docRoot
Windows uses backslashes in realpath
2014-09-18 14:33:15 +01:00
Matt Pass
1ace4e4ed9 Need a greater timeout here
40ms wasn't enough to begin filling the list and so would report back
that there are no changes, when in fact, there are, just not shown yet
2014-09-18 14:16:00 +01:00
Matt Pass
cf8a214a24 Make all paths abs and check realpath on each 2014-09-18 13:02:40 +01:00
Matt Pass
24ea1b108f Establish realpath test begins with $docRoot or die
No need to str_replace ../, as that isn't real protection, use realpath
instead
Always turn into a real path (we'll only pass relative paths here
anyway), and change \ to / on Windows setups
Only if file exists and begins with the root path do anything, die
otherwise
2014-09-18 10:57:41 +01:00
Matt Pass
3b0a00af02 Need to establish full $file path first
Otherwise we won't have a valid fullpath to find $docRoot in
2014-09-18 10:47:57 +01:00
Matt Pass
2ad6f7fbc8 base64.js not needed
Only needed for basic auth and we are using oauth tokens
2014-09-18 09:27:24 +01:00
Matt Pass
54dd10b3bd Font family needed for textarea 2014-09-18 09:15:46 +01:00
Matt Pass
cc62871815 Add section for pulls, display message re v4.3 2014-09-18 09:01:11 +01:00
Matt Pass
72da926a4d Display ICEcoder at a 1.0 scale
Displays without scaling on tablets and phones then. Not that it's
tablet friendly, but maybe one day.
2014-09-17 15:03:25 +01:00
Matt Pass
d2f34c50df Merge pull request #455 from xoofoo-project/master
Update french language
2014-09-17 14:58:57 +01:00
Matt Pass
8454d918e8 Warn if using over non https connection 2014-09-17 14:18:28 +01:00
Matt Pass
048577270b die() so we go no further
Clients can ignore this and continue. All headers should be followed up
by a die().
2014-09-17 13:38:00 +01:00
Matt Pass
113e045f26 realpath file, result in error if !exist / !docroot 2014-09-17 13:35:00 +01:00
Matt Pass
9c35206e3b realpath the file and die if !exist or !$docRoot 2014-09-17 12:54:24 +01:00
Matt Pass
a807e598fe realpath $fileName, die if !exist or !$docRoot 2014-09-17 12:46:33 +01:00
Matt Pass
fbfd58b788 Update to match main JS file 2014-09-17 12:11:39 +01:00
Matt Pass
4314ca2917 Path fixes for add and delete actions
When adding files, location should be a slash if not set
Remove any initial double slashes
When removing files, location should be blank if not set. Then replace
iceRoot with a slash, before reducing double slashes at start, slashes
for pipes and tack together with file to make the targetElem, which is
what we end up looking for
2014-09-17 12:10:18 +01:00
Matt Pass
f3b89056ac Load screen, path removal, tweaks & error handling
Show loading screen on clicking Commit button
Committed filepaths need to have pipes replaced with slashes
Splice from diffPaths or deletedPaths array so we remove committed files
Hide Loading mask if we don't have more to commit
Only display alert message and toggle GitHub diff mode if we have no
diff or deleted paths left to deal with
Error message is an object, so inform user that we'll console.log that.
2014-09-17 12:06:56 +01:00
Matt Pass
d887eca03c Chaneg path scope & check excludedArray first
treePaths, diffPaths and deletedPaths now all namespaced to top level so
we can access from elsewhere
Check we have excludedArray first before looking at it's index. This is
to avoid issues when switching in and out of GitHub Diff mode.
2014-09-17 12:02:13 +01:00
Matt Pass
9ba08fbf48 Stop if running old version
Shouldn't do this and could be a security vuln.
2014-09-17 08:54:27 +01:00
Matt Pass
15fe43098f Cover local and remote files, but avoid LFI 2014-09-16 18:30:34 +01:00
Matt Pass
05de070294 Die if we have a realpath file vs doc root mismatch
Stops LFI attacks such as:

lib/file-control.php?action=load&file=/..././/..././/..././/..././/..././/..././etc|passwd&csrf=4c43835566ee4e2x4a455df75a66c47f
2014-09-16 18:12:06 +01:00
kris
024e943d9f Merge pull request #7 from mattpass/master
update 06-09-2014
2014-09-06 02:43:26 +02:00
Matt Pass
f82914207d $t needed in function to display text 2014-09-05 22:36:01 +01:00
Matt Pass
941801078c Updated to match main JS file 2014-09-05 22:22:28 +01:00
Matt Pass
296eeff33d Translations added for find/replace area in English 2014-09-05 22:21:31 +01:00
Matt Pass
0715782e3a For now stop using translations on find/replace
Using non English test for now is breaking functionality
To be looked into and fixed, then these translations can be re-enabled
2014-09-05 22:17:40 +01:00
Matt Pass
44aca5ad1b Need to use array_replace_recursive()
This is the function needed to overwrite $text array ontop of
$englishText, including nested arrays
2014-09-05 22:07:26 +01:00
Matt Pass
d24a2745ce Case change on function namee 2014-09-03 06:14:50 +01:00
Matt Pass
8da637c650 Remove new line at EOF 2014-09-03 06:12:38 +01:00
Matt Pass
b9be8cb70d Remove new line at EOF 2014-09-03 06:11:54 +01:00
Matt Pass
99a9c7ef80 Case change only on function name 2014-09-03 05:34:20 +01:00
Matt Pass
744cfbad16 Fix to language ref array item 2014-08-31 07:01:23 +01:00
kris
2db030c772 update french language 2014-08-30 12:44:46 +02:00
kris
a7e4c28b2f Merge pull request #6 from mattpass/master
update 29-08-2014
2014-08-30 11:12:02 +02:00
Matt Pass
7115b9e22c Updated to match main JS file 2014-08-29 19:31:49 +01:00
Matt Pass
4cb2ac98d3 Deleted files show up now
Excluded array paths have slashes not pipes
Don't add deleted files to diffPaths array also, keep them seperate
Can't use a for loop to add deleted files, only adds last reference as
happens before a tickover
Instead use a setInterval as a loop, with k as the counter instead of j
to avoid confusion
Check if it's not excluded dir/file as an outer if statement, with path
fix for root
3 cases set up for adding deleted dirs/files in a sub-dir, plus folder
or file in the root
Clear the interval when finished looping
2014-08-29 19:28:42 +01:00
Matt Pass
28881db771 Path reference fixes
Replace iceRoot with nothing on location
If we have no location, it should be a nothing to start with, not a
slash
Use this.childNodes[1].id instead of made up hardcoded ref
onClick event added also, wasn't there previously?!
2014-08-29 19:22:39 +01:00
Matt Pass
7791fe21f0 Merge pull request #454 from koseelg/master
Update norwegian.php
2014-08-29 15:45:45 +01:00
Matt Pass
73148eabed Removed unneeded setting of thatNode 2014-08-29 07:23:21 +01:00
Matt Pass
5f0d7a5a19 xssClean needs HTML context 2014-08-28 21:28:51 +01:00
Matt Pass
86b62d52a0 Remove extra closing bold tag 2014-08-28 20:50:52 +01:00
kris
6c656f3b8f French translation in progress 2014-08-27 19:43:03 +02:00
kris
eaf466c2ce Merge pull request #5 from mattpass/master
update 27-08-2014
2014-08-27 19:19:48 +02:00
Matt Pass
4efb9732a5 Updated to include new translations 2014-08-27 17:35:37 +01:00
koseelg
f80eacbd32 Update norwegian.php
Done cosmetic changes .....
2014-08-27 14:15:27 +02:00
Matt Pass
7cb52f4fc4 Persian language update 2014-08-27 09:39:20 +01:00
Matt Pass
06fba7c7cb Merge pull request #450 from koseelg/master
Create norwegian.php
2014-08-27 09:36:15 +01:00
Matt Pass
9499e98066 Adjusted size of commit screen shown 2014-08-27 09:20:26 +01:00
Matt Pass
c2ec4b0ae3 Commit action added
xssClean call needs "html" context
Commit action added, displays screen to allow user to input the commit
title and message
Gets content of files ready and puts into textareas with IDs to be
picked up after cleaning up filenames
Start a github object with JS and push to GitHub, running through files
until it's done them all, and displaying error message if there's a
problem. If all is OK though, it simulates a CTRL-click to deselect file
and remove from file manager list.
When done, it will state it is switching back and switch back
2014-08-27 09:20:24 +01:00
Matt Pass
ac3f3c4328 CSS file started for github.php
This file now has display also (for commit actions)
2014-08-27 09:20:22 +01:00
Matt Pass
6857dadec5 ctrlSim added, GitHub nav and actions
ctrlSim param available to simiulate a CTRL key
In githubDiff mode, show the number of selected files and update button
and text colours
gitHubAction function added to call the github.php file with that action
in the URL in the centre of screen
Function also added to show/hide GitHub nav
Removed old alert message as we're much closer to being finished now
2014-08-27 09:20:18 +01:00
Matt Pass
9619dce24f Classes added for GitHub nav 2014-08-27 09:20:16 +01:00
Matt Pass
f10909160a On load, hide or show the GitHub nav
Dependant on top.ICEcoder.githubDiff being true/false
2014-08-27 09:20:13 +01:00
Matt Pass
693b871456 Set auth token in session, add GitHub nav
If we have set an auth token in the settings, need to set the session
var
Add the extra nav for GitHub
2014-08-27 09:20:11 +01:00
Matt Pass
4612e5036d Exclude .git dir 2014-08-27 09:20:10 +01:00
kris
abbc92d319 Merge pull request #4 from mattpass/master
update 26-08-2014
2014-08-27 01:00:41 +02:00
koseelg
dec62a3380 Create norwegian.php 2014-08-26 09:31:28 +02:00
Matt Pass
80216b434d Merge pull request #447 from lzh370/master
Updated Chinese translation
2014-08-22 10:45:16 +01:00
lzh
95b5126227 An error search drop-down box
If these two values ​​are translated into Chinese, will lead to a
drop-down box to select the Replace option, it canceled the translation.
2014-08-22 16:57:22 +08:00
lzh
34b34bcc88 Updated Chinese translation 2014-08-22 15:42:28 +08:00
Matt Pass
e41cb4dc09 Comma missing after array 2014-08-22 08:07:37 +01:00
Matt Pass
a6b45171ab Merge pull request #445 from Olliiee/master
Created germna.php file
2014-08-22 07:57:53 +01:00
Oliver
32e05ea8ac Missed the header 2014-08-21 21:53:16 +02:00
Oliver
0bbc9347aa Added new messages
added new messages
fixed some typos
2014-08-21 21:52:27 +02:00
Matt Pass
f4894fa838 LI shortcut added
CTRL+Alt+8 shortcut for <li>
Remove old, unused h4-h6 shortcuts from array
Help screen is a little higher to allow for the new shortcut
Minified JS file brought up to date
2014-08-21 15:31:33 +01:00
Matt Pass
34074e5e64 Dutch language initial commit 2014-08-21 14:44:30 +01:00
Matt Pass
d5bca0c38a Merge pull request #443 from lzh370/master
Supplementary Chinese translation
2014-08-21 14:37:07 +01:00
Matt Pass
f96651b9e8 Load English first, then merge lang ontop
It's English ontop of English for now, but 2nd include can be changed in
the code here and soon to be set via the UI.
2014-08-21 14:30:43 +01:00
Matt Pass
0d4ca6a483 Final language replacement placeholders 2014-08-21 14:29:11 +01:00
Matt Pass
195ba788bb JS lang items used and print pre wrap fix 2014-08-21 14:25:57 +01:00
Matt Pass
f5d19d99d4 Get the ice-coder lang array into a JS array
So the /lib/ice-coder.js file can make use of it
2014-08-21 14:24:30 +01:00
Matt Pass
115169b16b alert & console.log the action and $file
Commented out, but useful for people to uncomment to see what's
happening if path issues etc
2014-08-21 14:22:44 +01:00
Matt Pass
90a58f0300 Final English text items 2014-08-21 14:21:05 +01:00
Oliver
4e3d73e8b9 Create germna.php file
Added german language file.
2014-08-21 14:38:10 +02:00
lzh
cdd38a88d2 Supplementary Traditional Chinese translation
Improved Simplified Chinese translation of individual errors.
2014-08-19 12:52:52 +08:00
lzh
bc9639dac2 Supplementary Chinese translation 2014-08-19 11:55:01 +08:00
Matt Pass
38b7de4b5c Merge pull request #440 from xoofoo-project/master
Update french language
2014-08-16 21:11:52 +01:00
kris
1ee215516b Update french language
Even more definitions translated in french
2014-08-11 01:32:06 +02:00
kris
92c4ec0223 Merge pull request #3 from mattpass/master
update 10-08-2014
2014-08-11 00:25:27 +02:00
Matt Pass
aab3c5a433 Merge pull request #439 from xoofoo-project/master
Update french language
2014-08-10 21:11:05 +01:00
Matt Pass
ee9e053bb9 Even more definitions added
About 70% done now
2014-08-10 21:08:00 +01:00
Matt Pass
21ab41e677 Placeholder vars added for more lang pieces 2014-08-10 21:07:42 +01:00
kris
2d76f1f7f3 Update french language
More definitions translated
2014-08-10 02:23:30 +02:00
kris
9cd6f8ee8a Merge pull request #2 from mattpass/master
update 09-08-2014
2014-08-10 01:36:10 +02:00
Matt Pass
b8f02708e0 Chinese (traditional) and Italian added 2014-08-08 09:37:23 +01:00
Matt Pass
d201e85d86 Placeholder vars added for lang pieces 2014-08-08 09:30:56 +01:00
Matt Pass
ec05132fa8 Make array available in session
Used by files that don't load settings.php
2014-08-08 09:29:19 +01:00
Matt Pass
664d8058b5 More definitions added
For bug-files-check and file-control files in /lib dir
2014-08-08 09:26:38 +01:00
Matt Pass
87450c0f78 Renamed to '-simplified' 2014-08-08 09:25:50 +01:00
Matt Pass
84d1402eef Initial translations 2014-08-07 06:38:42 +01:00
kris
6746e0bc52 Merge pull request #1 from mattpass/master
first update 06-08-2014
2014-08-06 14:12:14 +02:00
Matt Pass
a0bc6e8c31 Undo 2 changes that shouldn't be committed 2014-08-06 09:30:13 +01:00
Matt Pass
5de4cd657e Language system setup and English translations
Covering top level and login so far only
2014-08-06 09:26:50 +01:00
Matt Pass
230e8a0983 Break in echo needs a ; and continue with echo 2014-07-31 16:28:04 +01:00
Matt Pass
3d66db04ae Working with GitHub diff mode
Now an HTML type file, had no doctype, header etc previously. Now does
and also loads in 2 x JS files for GitHub API control
Gets full list of files, considers .gitignore files and gets an excluded
list
Always has a GET location now, so no need to consider
If in GitHub diff mode, for each file in our list get file contents and
put the name, SHA and type into 3 arrays
Work out GitHub repo path and set up JS arrays the same as PHP arrays
Then start a github object and begin examining tree for differences
recursively, adding to arrays and removing DOM elems from branch DIV as
needed
With that done, we need to cover the dirs not yet opened and if they
contain no changes, remove them
Finally, remove .gitignore excluded filrs
showFile function set up mostly as per previous code, but now also adds
files that are deleted (ie, to make them show up in the tree)
Error catching and helpful messages and redirections added such as when
you have no diffs or used up your GitHub API rate limit
2014-07-28 07:00:56 +01:00
Matt Pass
6a81152b05 GH token set flag, new functions and tweaks
githubAuthTokenSet flag added, false to begin with
Refreshing file manager now just reloads, not loads hardcoded URL
New function added to ask for GitHub auth token
If set, it auth's with that token and also passes through the place to
go next. Clears token value too for security.
On attempting to show the GitHub manager pane, if we have a token set,
great, show it, if not ask for the token
On toggling the GitHub diff mode, if we don't have the token set, ask
for it
githubAuthTokenSet param passed in to update flasg
2014-07-27 12:54:04 +01:00
Matt Pass
c988f76612 auth action added
We can now call an auth action along with the token and it will set our
flag
As a follow up, it continues what we were previously doing - showing
manager pane or toggling file display
Note: 2 x JS files can probably be removed for now. Was going to look
into auth token validation here, but until I do, they're not needed.
2014-07-27 12:49:39 +01:00
Matt Pass
cc152db8ba Semicolon moved, githubAuthTokenSet if value set
CSRF value ends with a ; as per all other settings (moved from other
line)
If we have a githubAuthToken value (ie, set in our config settings
file), update top.ICEcoder.githubAuthTokenSet to true so we don't ask
user for it to be set in our session
2014-07-27 12:46:47 +01:00
Matt Pass
6fedd41ced githubDiff mode flag and root loaded by get-branch
Session var used as flag to indicate github diff mode
Instead of now including get-branch.php after setting the | root
location, we now set the src on the fileControl iframe, which does the
loading of the branch as with all other subsequent branches loaded
2014-07-27 12:42:12 +01:00
Matt Pass
64c2cfa06f Viewport set for mobile devices
Means at least the login screen is mobile friendly, just the rest of
ICEcoder to do now! :)
2014-07-27 12:39:00 +01:00
Matt Pass
82c80a24b2 Tooltips now blue to stand out more
Were going a little unnoticed by users previously
2014-07-27 12:38:20 +01:00
Matt Pass
504e2e20fe githubAuthToken setting added
githubAuthToken added as new setting
passed into useNewSettings function to update githubAuthTokenSet flag to
true
2014-07-27 12:37:36 +01:00
Matt Pass
21b4c8bc12 Github auth token setting added
Editor preview not as high and other options shifted up
Github Auth Token setting added with notes on usage
2014-07-27 12:31:12 +01:00
Matt Pass
f6aff03fb9 Setting moved and githubAuthToken added
pluginPanelAligned setting moved to position where it is in rest of
ICEcoder
githubAuthToken setting added
2014-07-27 12:29:58 +01:00
Matt Pass
30561cc2ae github.js, base64.js and underscore.min.js added 2014-07-27 12:27:19 +01:00
Matt Pass
e8035c122c Old settings that aren't last line end with comma 2014-07-01 14:17:24 +01:00
Matt Pass
69aec81200 indicateChanges() on 4ms delay after a save
To update the character in the browser tab
2014-07-01 12:56:57 +01:00
Matt Pass
9b55729c91 Session ID added to output 2014-06-30 08:01:08 +01:00
Matt Pass
d4131f3238 Tested die() again and works now
Removes the Linux Dash plugin just fine now, so reincluding this code.
2014-06-27 13:39:42 +01:00
43 changed files with 5243 additions and 575 deletions

View File

@@ -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-1-browser-code-editor.png" alt="ICEcoder web IDE">
<img src="https://icecoder.net/images/icecoder-v4-3-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).

View File

@@ -1,6 +1,7 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
$t = $text['editor'];
?>
<!DOCTYPE html>
@@ -67,40 +68,40 @@ h2 {color: rgba(0,198,255,0.7)}
<body style="color: #fff; margin: 0" onKeyDown="return top.ICEcoder.interceptKeys('content', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
<?php if ($ICEcoder['demoMode']) {?>
<div class="demoArrow"><b>Click icons<br>for help &amp;<br>usage info</b></div>
<div class="demoArrow"><?php echo $t['Click icons for...'];?></div>
<?php ;}; ?>
<div style="display: none; margin: 32px 43px 0 43px; padding: 10px; width: 500px; font-family: arial; font-size: 10px; color: #ddd; background: #333" id="dataMessage"></div>
<div style="margin: 20px 43px 32px 43px; font-family: arial; font-size: 10px; color: #ddd">
<div style="float: left; width: 300px; margin-right: 50px">
<h2>server</h2>
<span class="heading">Server name, OS & IP:</span><br>
<h2><?php echo $t['server'];?></h2>
<span class="heading"><?php echo $t['Server name, OS...'];?></span><br>
<?php echo $_SERVER['SERVER_NAME']." &nbsp;&nbsp ".$_SERVER['SERVER_SOFTWARE']." &nbsp;&nbsp ".(isset($_SERVER['SERVER_ADDR'])?$_SERVER['SERVER_ADDR']:"Unknown");?><br><br>
<span class="heading">Root:</span><br>
<span class="heading"><?php echo $t['Root'];?></span><br>
<?php echo $docRoot;?><br><br>
<span class="heading">ICEcoder root:</span><br>
<span class="heading"><?php echo $t['ICEcoder root'];?></span><br>
<?php echo $docRoot.$iceRoot;?><br><br>
<span class="heading">PHP version:</span><br>
<span class="heading"><?php echo $t['PHP version'];?></span><br>
<?php echo phpversion();?><br><br>
<span class="heading">Date & time:</span><br>
<span class="heading"><?php echo $t['Date & time'];?></span><br>
<span id="serverDT"></span><br><br>
<h2>your device</h2>
<span class="heading">Browser:</span><br>
<h2><?php echo $t['your device'];?></h2>
<span class="heading"><?php echo $t['Browser'];?></span><br>
<?php echo xssClean($_SERVER['HTTP_USER_AGENT'],"html");?><br><br>
<span class="heading">Your IP:</span><br>
<span class="heading"><?php echo $t['Your IP'];?></span><br>
<?php echo $_SERVER['REMOTE_ADDR'];?><br><br>
</div>
<div style="float: left">
<h2>files</h2>
<span class="heading">Last 10 files opened:</span><br>
<h2><?php echo $t['files'];?></h2>
<span class="heading"><?php echo $t['Last 10 files...'];?></span><br>
<ul class="fileManager" style="margin-left: 0; line-height: 20px">
<?php
$last10FilesArray = explode(",",$ICEcoder["last10Files"]);
for ($i=0;$i<count($last10FilesArray);$i++) {
if ($ICEcoder["last10Files"]=="") {
echo '<div style="display: inline-block; margin-left: -39px; margin-top: -4px">[none]</div><br><br>';
echo '<div style="display: inline-block; margin-left: -39px; margin-top: -4px">'.$t['none'].'</div><br><br>';
} else {
$fileFolderName = str_replace("\\","/",$last10FilesArray[$i]);
// Get extension (prefix 'ext-' to prevent invalid classes from extensions that begin with numbers)
@@ -133,25 +134,26 @@ h2 {color: rgba(0,198,255,0.7)}
</script>
<?php if(is_dir('test') && !$ICEcoder['demoMode']) {?>
<div style="float: left; margin-right: 50px">
<h2>test suite</h2>
<span class="heading">Run unit tests:</span><br>
<a nohref onclick="top.ICEcoder.filesFrame.contentWindow.frames['testControl'].location.href = 'test'" style="color: #fff; cursor: pointer">Run unit tests</a><div id="unitTestResults"></div>
<h2><?php echo $t['test suite'];?></h2>
<span class="heading"><?php echo $t['Run unit tests'];?></span><br>
<a nohref onclick="top.ICEcoder.filesFrame.contentWindow.frames['testControl'].location.href = 'test'" style="color: #fff; cursor: pointer"><?php echo $t['Run unit tests'];?></a><div id="unitTestResults"></div>
</div>
<?php
;};
?>
<div style="float: left">
<h2>dev mode <?php echo $ICEcoder['devMode'] ? "on" : "off";?></h2>
<span class="heading">Status:</span><br>
Using <?php echo $ICEcoder['devMode'] ? "ice-coder.js" : "ice-coder.min.js";?> <a title="You can switch dev mode on/off
in lib/config__settings.php" style="cursor: pointer">[?]</a>
<h2><?php echo $t['dev mode'];?> <?php echo $ICEcoder['devMode'] ? "on" : "off";?></h2>
<span class="heading"><?php echo $t['Status'];?>:</span><br>
<?php echo $t['Using']?> <?php echo $ICEcoder['devMode'] ? "ice-coder.js" : "ice-coder.min.js";?> <a title="<?php echo $t['You can switch...'];?>" style="cursor: pointer">[?]</a>
</div>
<div style="clear: both"></div>
</div>
<script>
CodeMirror.keyMap.ICEcoder = {
// "Tab": "defaultTab", **Now used by Emmet**
"Tab": function(cm) {
return cm.somethingSelected() ? cm.execCommand("indentAuto") : CodeMirror.Pass // Falls through to default or Emmet plugin
},
"Shift-Tab": "indentLess",
"Ctrl-Space": "autocomplete",
"Ctrl-Up" : false,
@@ -230,7 +232,7 @@ function createNewCMInstance(num) {
top.ICEcoder.updateNestingIndicator();
if (top.ICEcoder.findMode) {
top.ICEcoder.results.splice(top.ICEcoder.findResult,1);
top.document.getElementById('results').innerHTML = top.ICEcoder.results.length + " results";
top.document.getElementById('results').innerHTML = top.ICEcoder.results.length + " <?php echo $t['results'];?>";
top.ICEcoder.findMode = false;
}
var filepath = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];

View File

@@ -1,6 +1,7 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
$t = $text['files'];
// Is our dir in the list of GitHub local paths?
$isGitHubRepoDir = in_array($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
@@ -17,25 +18,28 @@ $isGitHubRepoDir = in_array($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js" type="text/javascript"></script>
</head>
<body onDblClick="top.ICEcoder.openFile()" onKeyDown="return top.ICEcoder.interceptKeys('files', event);" onKeyUp="top.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
<body 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);">
<div title="Lock" onClick="top.ICEcoder.lockUnlockNav()" id="fmLock" class="lock"></div>
<div title="Refresh" onClick="top.ICEcoder.refreshFileManager()" class="refresh"></div>
<div title="<?php echo $t['Lock'];?>" onClick="top.ICEcoder.lockUnlockNav()" id="fmLock" class="lock"></div>
<div title="<?php echo $t['Refresh'];?>" onClick="top.ICEcoder.refreshFileManager()" class="refresh"></div>
<?php
$_SESSION['githubDiff'] = false;
if ($isGitHubRepoDir) {
$classExtra = !isset($_GET["githubDiff"]) || $_GET["githubDiff"] == "false" ? "Off" : "On";
if ($classExtra == "On") {
$_SESSION['githubDiff'] = true;
}
echo '<div title="GitHub" onClick="top.ICEcoder.githubDiffToggle()" class="github'.$classExtra.'"></div>';
}
?>
<ul class="fileManager">
<li class="pft-directory dirOpen"><a nohref title="/" onMouseOver="top.ICEcoder.overFileFolder('folder','/')" onMouseOut="top.ICEcoder.overFileFolder('folder','')" onClick="top.ICEcoder.openCloseDir(this)" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="|">/ <?php echo $iceRoot == "" ? "[ROOT]" : trim($iceRoot,"/");?></span> <span style="color: #888; font-size: 8px" id="|_perms"><?php echo $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3) : "";?></span></a></li><?php
$_GET['location'] = "|";
include("lib/get-branch.php");
<li class="pft-directory dirOpen"><a nohref title="/" onMouseOver="top.ICEcoder.overFileFolder('folder','/')" onMouseOut="top.ICEcoder.overFileFolder('folder','')" onClick="top.ICEcoder.openCloseDir(this)" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="|">/ <?php echo $iceRoot == "" ? $t['ROOT'] : trim($iceRoot,"/");?></span> <span style="color: #888; font-size: 8px" id="|_perms"><?php echo $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3) : "";?></span></a></li><?php
// tree file items generated by the iFrame 'fileControl' below which loads in the items at location=| (ie, the root)
?>
</ul>
<iframe name="fileControl" style="display: none"></iframe>
<iframe name="fileControl" src="lib/get-branch.php?location=|&csrf=<?php echo $_SESSION['csrf'];?>" style="display: none"></iframe>
<iframe name="testControl" style="display: none"></iframe>

165
index.php
View File

@@ -1,10 +1,12 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
$t = $text['index'];
// Check IP permissions
if (!in_array($_SERVER["REMOTE_ADDR"], $_SESSION['allowedIPs']) && !in_array("*", $_SESSION['allowedIPs'])) {
header('Location: /');
die("Sorry, not in allowed IPs list");
};
$updateMsg = '';
@@ -28,7 +30,7 @@ if ($ICEcoder["checkUpdates"]) {
$thisV = $ICEcoder["versionNo"];
if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;};
if ($thisV<$icv) {
$updateMsg = ";top.ICEcoder.dataMessage('<b>UPDATE INFO:</b> ICEcoder v ".$icv." now available. (Your version is v ".$ICEcoder["versionNo"].").<br><br><a onclick=\\'top.ICEcoder.update()\\' style=\\'color:#fff; background: #b00; padding: 5px; text-decoration: none; cursor: pointer\\'>Update now</a><br><br>".$icvI."');";
$updateMsg = ";top.ICEcoder.dataMessage('<b>".$t['UPDATE INFO'].":</b> ICEcoder v ".$icv." ".$t['now available'].". (".$t['Your version is']." v ".$ICEcoder["versionNo"].").<br><br><a onclick=\\'top.ICEcoder.update()\\' style=\\'color:#fff; background: #b00; padding: 5px; text-decoration: none; cursor: pointer\\'>".$t['Update now']."</a><br><br>".$icvI."');";
}
}
@@ -40,6 +42,7 @@ $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">
<link rel="icon" type="image/png" href="favicon.png">
<script>
@@ -48,10 +51,25 @@ iceRoot = "<?php echo $ICEcoder['root']; ?>";
window.onbeforeunload = function() {
for(var i=1;i<=ICEcoder.savedPoints.length;i++) {
if (ICEcoder.savedPoints[i-1]!=top.ICEcoder.getcMInstance(i).changeGeneration()) {
return "You have some unsaved changes.";
return "<?php echo $t['You have some...'];?>.";
}
}
}
t = {
<?php
// Load the lang array for what's in the JS file
$t = $text['ice-coder'];
$tOutput = "";
foreach ($t as $key => $value) {
$tOutput .= '"'.$key.'" : "'.$value.'",'.PHP_EOL;
}
echo rtrim($tOutput,",".PHP_EOL).PHP_EOL;
// Back to the lang array for index
$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>
@@ -79,9 +97,13 @@ window.onbeforeunload = function() {
"top.ICEcoder.autoComplete = '".$ICEcoder["autoComplete"]."';".
"top.ICEcoder.bugFilePaths = ['".implode("','",$ICEcoder["bugFilePaths"])."'];".
"top.ICEcoder.bugFileCheckTimer = ".$ICEcoder["bugFileCheckTimer"].";".
"top.ICEcoder.bugFileMaxLines = ".$ICEcoder["bugFileMaxLines"].";".
"top.ICEcoder.csrf = '".$_SESSION["csrf"]."'";
?>;ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
"top.ICEcoder.bugFileMaxLines = ".$ICEcoder["bugFileMaxLines"].";";
if($ICEcoder["githubAuthToken"] != "") {
$_SESSION['githubAuthToken'] = $ICEcoder["githubAuthToken"];
echo "top.ICEcoder.githubAuthTokenSet = true;";
}
echo "top.ICEcoder.csrf = '".$_SESSION["csrf"]."';";
?>ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
<div id="blackMask" class="blackMask" onClick="if (!ICEcoder.overPopup) {ICEcoder.showHide('hide',this)}" onContextMenu="return false">
<div class="popupVCenter">
@@ -93,7 +115,7 @@ window.onbeforeunload = function() {
<div class="popupVCenter">
<div class="popup">
<div class="spinner"></div>
working...
<?php echo $t['working'];?>...
</div>
</div>
</div>
@@ -101,7 +123,7 @@ window.onbeforeunload = function() {
<div id="plugins" class="plugins" style="<?php echo $ICEcoder["pluginPanelAligned"];?>: 0" onMouseOver="top.ICEcoder.showHidePlugins('show')" onMouseOut="top.ICEcoder.showHidePlugins('hide')" onClick="top.ICEcoder.showHidePlugins('hide')">
<div style="padding: 15px">
<a nohref onClick="top.ICEcoder.showColorPicker(top.document.getElementById('color') ? top.document.getElementById('color').value : '#123456')" title="Farbtastic
Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Color Picker"></a><br><br>
<?php echo $t['Color picker'];?>"><img src="images/color-picker.png" style="cursor: pointer" alt="Color Picker"></a><br><br>
<div id="pluginsOptional"><?php echo $pluginsDisplay; ?></div>
<a nohref onclick="top.ICEcoder.pluginsManager()" title="Plugins Manager" style="color: #fff; cursor: pointer">+ / -</a>
</div>
@@ -109,10 +131,10 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<div id="fileMenu" class="fileMenu" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract');top.ICEcoder.hideFileMenu()" style="opacity: 0" onContextMenu="return false">
<span id="folderMenuItems">
<a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()">New File</a>
<a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()">New Folder</a>
<a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['New File'];?></a>
<a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['New Folder'];?></a>
<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()">Upload File(s)</a>
<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">
<input type="hidden" name="folder" id="uploadDir" value="/">
@@ -121,17 +143,17 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
</div>
<a href="javascript:top.ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()" id="fmMenuPasteOption" style="display: none">Paste</a>
<a href="javascript:top.ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()" id="fmMenuPasteOption" style="display: none"><?php echo $t['Paste'];?></a>
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
</span>
<a href="javascript:top.ICEcoder.openFilesFromList(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Open</a>
<a href="javascript:top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Copy</a>
<a href="javascript:top.ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Duplicate</a>
<a href="javascript:top.ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()">Delete</a>
<a href="javascript:top.ICEcoder.openFilesFromList(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Open'];?></a>
<a href="javascript:top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Copy'];?></a>
<a href="javascript:top.ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Duplicate'];?></a>
<a href="javascript:top.ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Delete'];?></a>
<span id="singleFileMenuItems">
<a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Rename</a>
<a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Rename'];?></a>
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
<a nohref onClick="window.open(iceRoot + top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'))" onMouseOver="ICEcoder.showFileMenu()" style="cursor: pointer">View Webpage</a>
<a nohref onClick="window.open(iceRoot + top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'))" onMouseOver="ICEcoder.showFileMenu()" style="cursor: pointer"><?php echo $t['View Webpage'];?></a>
</span>
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
<?php
@@ -139,9 +161,9 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
echo '<a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a>'.PHP_EOL;
};
?>
<a href="javascript:top.ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Download</a>
<a href="javascript:top.ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Download'];?></a>
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Properties</a>
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Properties'];?></a>
</div>
<div id="header" class="header" onContextMenu="return false"></div>
@@ -149,44 +171,49 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<div id="files" class="files" onMouseOver="ICEcoder.changeFilesW('expand')" onMouseOut="ICEcoder.changeFilesW('contract'); top.ICEcoder.hideFileMenu();" onContextMenu="return false">
<div id="fileNav" class="fileNav">
<ul>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsFile')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsFile')}" id="optionsFileNav">File</a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsEdit')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsEdit')}" id="optionsEditNav">Edit</a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsRemote')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsRemote')}" id="optionsRemoteNav">Remote</a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsHelp')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsHelp')}" id="optionsHelpNav">Help</a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsFile')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsFile')}" id="optionsFileNav"><?php echo $t['File'];?></a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsEdit')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsEdit')}" id="optionsEditNav"><?php echo $t['Edit'];?></a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsRemote')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsRemote')}" id="optionsRemoteNav"><?php echo $t['Remote'];?></a></li>
<li><a nohref onclick="top.ICEcoder.canShowFMNav=true;top.ICEcoder.showHideFileNav('show','optionsHelp')" onmouseover="if(top.ICEcoder.canShowFMNav) {top.ICEcoder.showHideFileNav('show','optionsHelp')}" id="optionsHelpNav"><?php echo $t['Help'];?></a></li>
</ul>
</div>
<div id="githubNav" class="githubNav">
<div class="commit" id="githubNavCommit" onclick="top.ICEcoder.githubAction('commit')">Commit</div>
<div class="selected" id="githubNavSelectedCount">Selected: 0</div>
<div class="pull" id="githubNavPull" onclick="top.ICEcoder.githubAction('pull')">Pull</div>
</div>
<div class="options" id="fileOptions">
<div id="optionsFile" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
<ul>
<li><a nohref onClick="ICEcoder.newFile()">New File...</a></li>
<li><a nohref onClick="ICEcoder.newFolder()">New Folder...</a></li>
<li><a nohref onClick="ICEcoder.openPrompt()">Open...</a></li>
<li><a nohref onClick="ICEcoder.saveFile()">Save</a></li>
<li><a nohref onclick="ICEcoder.saveFile('saveAs')">Save As...</a></li>
<li><a nohref onclick="ICEcoder.openPreviewWindow()">Live Preview</a></li>
<li><a nohref onclick="ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Download</a></li>
<li><a nohref onclick="ICEcoder.copyFiles(top.ICEcoder.selectedFiles)">Copy</a></li>
<li><a nohref onclick="ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Paste</a></li>
<li><a nohref onclick="ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)">Delete</a></li>
<li><a nohref onclick="ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)">Duplicate</a></li>
<li><a nohref onclick="ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Rename</a></li>
<li><a nohref onclick="ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Upload...</a></li>
<li><a nohref onclick="ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Zip</a></li>
<li><a nohref onclick="ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])">Properties...</a></li>
<li><a nohref onClick="ICEcoder.printCode()">Print...</a></li>
<li><a nohref onClick="ICEcoder.fullScreenSwitcher()">Fullscreen toggle</a></li>
<li><a nohref onClick="ICEcoder.logout()">Logout</a></li>
<li><a nohref onClick="ICEcoder.newFile()"><?php echo $t['New File'];?>...</a></li>
<li><a nohref onClick="ICEcoder.newFolder()"><?php echo $t['New Folder'];?>...</a></li>
<li><a nohref onClick="ICEcoder.openPrompt()"><?php echo $t['Open'];?>...</a></li>
<li><a nohref onClick="ICEcoder.saveFile()"><?php echo $t['Save'];?></a></li>
<li><a nohref onclick="ICEcoder.saveFile('saveAs')"><?php echo $t['Save As'];?>...</a></li>
<li><a nohref onclick="ICEcoder.openPreviewWindow()"><?php echo $t['Live Preview'];?></a></li>
<li><a nohref onclick="ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Download'];?></a></li>
<li><a nohref onclick="ICEcoder.copyFiles(top.ICEcoder.selectedFiles)"><?php echo $t['Copy'];?></a></li>
<li><a nohref onclick="ICEcoder.pasteFiles(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Paste'];?></a></li>
<li><a nohref onclick="ICEcoder.deleteFiles(top.ICEcoder.selectedFiles)"><?php echo $t['Delete'];?></a></li>
<li><a nohref onclick="ICEcoder.duplicateFiles(top.ICEcoder.selectedFiles)"><?php echo $t['Duplicate'];?></a></li>
<li><a nohref onclick="ICEcoder.renameFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Rename'];?></a></li>
<li><a nohref onclick="ICEcoder.uploadFilesSelect(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Upload'];?>...</a></li>
<li><a nohref onclick="ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Zip'];?></a></li>
<li><a nohref onclick="ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])"><?php echo $t['Properties'];?>...</a></li>
<li><a nohref onClick="ICEcoder.printCode()"><?php echo $t['Print'];?>...</a></li>
<li><a nohref onClick="ICEcoder.fullScreenSwitcher()"><?php echo $t['Fullscreen toggle'];?></a></li>
<li><a nohref onClick="ICEcoder.logout()"><?php echo $t['Logout'];?></a></li>
</ul>
</div>
<div id="optionsEdit" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
<ul>
<li><a nohref onclick="ICEcoder.undo()">Undo</a></li>
<li><a nohref onclick="ICEcoder.redo()">Redo</a></li>
<li><a nohref onclick="ICEcoder.indent('more')">Indent more</a></li>
<li><a nohref onclick="ICEcoder.indent('less')">Indent less</a></li>
<li><a nohref onclick="ICEcoder.autocomplete()">Autocomplete</a></li>
<li><a nohref onclick="ICEcoder.lineCommentToggle()">Comment/Uncomment</a></li>
<li><a nohref onclick="ICEcoder.jumpToDefinition()">Jump to Definition</a></li>
<li><a nohref onclick="ICEcoder.undo()"><?php echo $t['Undo'];?></a></li>
<li><a nohref onclick="ICEcoder.redo()"><?php echo $t['Redo'];?></a></li>
<li><a nohref onclick="ICEcoder.indent('more')"><?php echo $t['Indent more'];?></a></li>
<li><a nohref onclick="ICEcoder.indent('less')"><?php echo $t['Indent less'];?></a></li>
<li><a nohref onclick="ICEcoder.autocomplete()"><?php echo $t['Autocomplete'];?></a></li>
<li><a nohref onclick="ICEcoder.lineCommentToggle()"><?php echo $t['Comment/Uncomment'];?></a></li>
<li><a nohref onclick="ICEcoder.jumpToDefinition()"><?php echo $t['Jump to Definition'];?></a></li>
</ul>
</div>
<div id="optionsRemote" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
@@ -202,11 +229,11 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
</div>
<div id="optionsHelp" class="optionsList" onmouseover="top.ICEcoder.showHideFileNav('show',this.id)" onmouseout="top.ICEcoder.showHideFileNav('hide',this.id);top.ICEcoder.canShowFMNav=false">
<ul>
<li><a nohref onclick="ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>')">Manual</a></li>
<li><a nohref onClick="ICEcoder.helpScreen()">Shortcuts</a></li>
<li><a nohref onClick="ICEcoder.settingsScreen()">Settings</a></li>
<li><a nohref onclick="ICEcoder.searchForSelected()">Search for selected</a></li>
<li><a href="https://icecoder.net" target="_blank">ICEcoder website</a></li>
<li><a nohref onclick="ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>')"><?php echo $t['Manual'];?></a></li>
<li><a nohref onClick="ICEcoder.helpScreen()"><?php echo $t['Shortcuts'];?></a></li>
<li><a nohref onClick="ICEcoder.settingsScreen()"><?php echo $t['Settings'];?></a></li>
<li><a nohref onclick="ICEcoder.searchForSelected()"><?php echo $t['Search for selected'];?></a></li>
<li><a href="https://icecoder.net" target="_blank">ICEcoder <?php echo $t['website'];?></a></li>
</ul>
</div>
</div>
@@ -216,8 +243,8 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<div id="editor" class="editor">
<div id="tabsBar" class="tabsBar" onContextMenu="return false">
<a nohref onClick="top.ICEcoder.closeAllTabs()"><img src="images/nav-close-all.gif" class="closeAllTabs" title="Close all tabs"></a>
<a nohref onClick="top.ICEcoder.alphaTabs()"><img src="images/nav-alpha.png" class="alphaTabs" title="Alphabetize tabs"></a>
<a nohref onClick="top.ICEcoder.closeAllTabs()"><img src="images/nav-close-all.gif" class="closeAllTabs" title="<?php echo $t['Close all tabs'];?>"></a>
<a nohref onClick="top.ICEcoder.alphaTabs()"><img src="images/nav-alpha.png" class="alphaTabs" title="<?php echo $t['Alphabetize tabs'];?>"></a>
<?php
for ($i=1;$i<=100;$i++) {
echo '<div id="tab'.$i.'" class="tab" onMouseDown="ICEcoder.canSwitchTabs ? ICEcoder.switchTab(parseInt(this.id.slice(3),10)) : ICEcoder.canSwitchTabs=true; thisColor=top.ICEcoder.tabFGselected; if (!top.ICEcoder.overCloseLink) {ICEcoder.tabDragStart(parseInt(this.id.slice(3),10))}; if (event.button==1) {ICEcoder.closeTab(parseInt(this.id.slice(3),10)); return false};" onMouseOver="thisColor=this.style.color;this.style.color=top.ICEcoder.tabFGselected" onMouseOut="this.style.color=thisColor"></div>';
@@ -227,20 +254,20 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<div id="findBar" class="findBar" onContextMenu="return false">
<form name="findAndReplace" onSubmit="ICEcoder.findReplace(top.document.getElementById('find').value,false,true);return false">
<div class="findReplace">
<div class="findText">Find</div>
<div class="findText"><?php echo $t['Find'];?></div>
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false)">
<div class="selectWrapper" style="width: 41px">
<select name="connector" onChange="ICEcoder.findReplaceOptions()" style="width: 40px; margin-top: 4px">
<option>in</option>
<option>and</option>
<option><?php echo $t['in'];?></option>
<option><?php echo $t['and'];?></option>
</select>
</div>
<div class="replaceText" id="rText" style="display: none">
<div class="selectWrapper" style="width: 75px; overflow: visible">
<select name="replaceAction" style="width: 72px; margin-top: -2px">
<option>replace</option>
<option>replace all</option>
<option><?php echo $t['replace'];?></option>
<option><?php echo $t['replace all'];?></option>
</select>
</div>
with
@@ -249,10 +276,10 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<div class="targetText" id="rTarget" style="display: none">in</div>
<div class="selectWrapper" style="width: 104px">
<select name="target" onChange="ICEcoder.updateResultsDisplay(this.value=='this document' ? 'show' : 'hide')" style="width: 101px; margin-top: 4px; margin-left: 2px">
<option>this document</option>
<option>open documents</option>
<option>all files</option>
<option>all filenames</option>
<option><?php echo $t['this document'];?></option>
<option><?php echo $t['open documents'];?></option>
<option><?php echo $t['all files'];?></option>
<option><?php echo $t['all filenames'];?></option>
</select>
</div>
<input type="submit" name="submit" value="&gt;&gt;" class="submit">
@@ -261,13 +288,13 @@ Color picker"><img src="images/color-picker.png" style="cursor: pointer" alt="Co
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
<form onSubmit="return ICEcoder.goToLine()">
<div class="codeAssist" title="Turn on/off JS Hint &amp; CSS color previews">
<div class="codeAssist" title="<?php echo $t['Turn on/off...'];?>">
<input type="checkbox" name="codeAssist" id="codeAssist" class="codeAssistCheckbox" <?php if ($ICEcoder['codeAssist']) {echo 'checked ';};?>>
<span class="codeAssistDisplay" id="codeAssistDisplay" style="background-position: <?php echo $ICEcoder['codeAssist'] ? "0" : "-16";?> 0" onClick="top.ICEcoder.codeAssistToggle()"></span> Code Assist
<span class="codeAssistDisplay" id="codeAssistDisplay" style="background-position: <?php echo $ICEcoder['codeAssist'] ? "0" : "-16";?> 0" onClick="top.ICEcoder.codeAssistToggle()"></span> <?php echo $t['Code Assist'];?>
</div>
<div class="goLine">Go to Line <input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">
<div class="view" title="View" onClick="top.ICEcoder.openPreviewWindow()" id="fMView"></div>
<div class="bug" title="Bug reporting not active" onClick="top.ICEcoder.openBugReport()" id="bugIcon"></div>
<div class="goLine"><?php echo $t['Go to Line'];?> <input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">
<div class="view" title="<?php echo $t['View'];?>" onClick="top.ICEcoder.openPreviewWindow()" id="fMView"></div>
<div class="bug" title="<?php echo $t['Bug reporting not active'];?>" onClick="top.ICEcoder.openBugReport()" id="bugIcon"></div>
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
</div>

425
lang/chinese-simplified.php Normal file
View File

@@ -0,0 +1,425 @@
<?php
// Chinese language translation
// by: @lzh370 (GitHub)
// lzh370@qq.com
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>点击图标<br>求助 &amp;<br>使用信息</b>",
"server" => "服务器",
"Server name, OS..." => "服务器名称, OS & IP:",
"Root" => "根目录:",
"ICEcoder root" => "ICEcoder 根目录:",
"PHP version" => "PHP 版本:",
"Date & time" => "日期 & 时间:",
"your device" => "你的设备",
"Browser" => "浏览器:",
"Your IP" => "你的 IP:",
"files" => "文件",
"Last 10 files..." => "最后10个打开的文件:",
"none" => "[none]",
"test suite" => "测试套件",
"Run unit tests" => "运行单元测试",
"dev mode" => "开发模式",
"Status" => "状态",
"Using" => "使用",
"You can switch..." => "你可以在 lib/config__settings.php 中设置开发模式开关",
"results" => "结果"
),
"files" =>
array(
"Lock" => "锁定",
"Refresh" => "刷新",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "更新信息",
"now available" => "现在可以",
"Your version is" => "你的版本是",
"Update now" => "现在更新",
"You have some..." => "你有一些未保存的更改",
"working" => "载入中",
"Color picker" => "颜色选择器",
"New File" => "新建文件",
"New Folder" => "新建文件夹",
"Upload File(s)" => "上传文件",
"Paste" => "粘贴",
"Open" => "打开",
"Copy" => "复制",
"Duplicate" => "副本",
"Delete" => "删除",
"Rename" => "重命名",
"View Webpage" => "预览网页",
"Download" => "下载",
"Properties" => "属性",
"File" => "文件",
"Edit" => "编辑",
"Remote" => "远程",
"Help" => "帮助",
"Save" => "保存",
"Save As" => "另存为",
"Live Preview" => "实时预览",
"Upload" => "上传",
"Zip" => "压缩",
"Print" => "打印",
"Fullscreen toggle" => "全屏切换",
"Logout" => "退出",
"Undo" => "撤销",
"Redo" => "重做",
"Indent more" => "增加缩进",
"Indent less" => "减少缩进",
"Autocomplete" => "自动完成",
"Comment/Uncomment" => "注释 / 清除注释",
"Jump to Definition" => "跳转至指定行",
"Manual" => "手册",
"Shortcuts" => "快捷键",
"Settings" => "设置",
"Search for selected" => "搜索选择",
"website" => "网站",
"Close all tabs" => "关闭所有选项卡",
"Alphabetize tabs" => "按字母顺序排列的选项卡",
// "Find" => "搜索",
// "in" => "in",
// "and" => "and",
// "replace" => "替换",
// "replace all" => "替换所有",
// "this document" => "当前文件",
// "open documents" => "打开的文件",
// "all files" => "所有文件",
// "all filenames" => "所有文件名",
"Turn on/off..." => "开启/关闭代码辅助",
"Code Assist" => "代码辅助",
"Go to Line" => "转到行",
"View" => "预览",
"Bug reporting not active" => "错误报告没有激活"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "搜索到:"
),
"file-control" =>
array(
"Sorry" => "抱歉",
"does not seem..." => "服务器上不存在",
"Sorry, could not..." => "抱歉, 不能得到的内容",
"Sorry, cannot create..." => "抱歉, 不能创建文件夹",
"Sorry, cannot copy" => "抱歉, 不能复制",
"into" => "",
"Uploaded file(s) OK" => "上传文件完成",
"Sorry, cannot upload" => "抱歉, 不能上传",
"Sorry, cannot upload..." => "抱歉, 在演示模式不能上传文件",
"Sorry, cannot rename" => "抱歉, 不能重命名",
"Maybe public write..." => "也许父文件夹也需要写入权限?",
"Sorry, cannot move" => "抱歉, 不能移动",
"Sorry, cannot save" => "抱歉, 不能保存",
"Sorry, cannot replace..." => "抱歉, 目标不能替换文本",
"Sorry, cannot change..." => "抱歉, 目标不能更改权限",
"Sorry, cannot delete..." => "抱歉, 不能删除根级别ROOT",
"Sorry, cannot delete" => "抱歉, 不能删除",
"Sorry, this file..." => "抱歉, 此文件已更改, 不能保存",
"Reload this file..." => "重新加载该文件, 你的版本复制到一个新文件?",
"There was a..." => "这些代码还没有完全准备好. 所以 ICEcoder 需要再次重新加载.",
"displayed at" => "显示在",
"Enter filename to..." => "输入文件名并保存到",
"That file exists..." => "该文件已存在, 要覆盖吗?",
"Saving" => "正在保存"
),
"get-branch" =>
array(
"There are no..." => "本地文件与 GitHub repo 没有明显差异. 切换回普通模式?",
"Sorry, there was..." => "抱歉, 这里有一个错误, 代码:",
"Your local folder..." => "你的本地文件夹是空的, 你是否想克隆"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "抱歉, 不能创建目录到",
"Cannot update config..." => "不能更新配置文件. 请对",
"and try again" => "增加写入权限, 并再次尝试",
"saving github paths" => "正在保存 github 路径...",
"github paths" => "github 路径",
"Choose existing path" => "选择现有路径",
"Local path" => "本地路径",
"Remote GitHub path" => "远程 GitHub 路径",
"Choose" => "选择",
"Set local and..." => "设置本地路径和远程路径需要去除空格",
"Update" => "更新",
"Add new path" => "增加新路径",
"Add" => "增加",
"Usage Info" => "使用方法:",
"Enter relative local..." => "输入本地相对路径 (/server/myfiles) 和 GitHub 绝对路径 (https://github.com/user/repo 或 https://github.com/user/repo/tree/branch 各分支), 按照示例. 完成后你就建立了这两个地点的源路径, 它是成对数存在.",
"You can then..." => "你可以选择一个路径作为 ICEcoder 的根路径.",
"The file manager..." => "文件管理器右侧会显示一个新的GitHub图标, 您可以点击执行, 会自动校验并显示本地与github源之间的差异. 这些差别可以被提交并推送到在GitHub上的远程路径或克隆到你的本地路径, 用来同步您的文件.",
"If you want..." => "如果你想设置的另一个根路径, 可以在 帮助 > 设置窗口 中进行设置."
),
"github" =>
array(
"Sorry, you do..." => "抱歉, 您的服务器没有启用 OpenSSL 的 PHP 实例, 所以 https 目前不可用. GitHub 的数据传输必须要用 https 连接, 请修改 php.ini 设置, 重启你的服务器并重新尝试"
),
"headers" =>
array(
"Bad CSRF token..." => "错误的 CSRF token. 请在 https://github.com/mattpass/ICEcoder 报告错误信息, 以便我们修复它."
),
"help" =>
array(
"shortcuts" => "快捷键",
"Within document" => "文档",
"On Tabs" => "选项卡",
"Within file manager" => "文件管理器",
"Anywhere" => "其他",
"Space" => "空格",
"Click" => "单击",
"or" => "",
"Left click" => "左键单击",
"Middle click" => "中键单击",
"Double click tap..." => "双击 / 点击 (移动端)",
"Right click" => "右键单击",
"Middle scrollwheel" => "中间滚轮滚动",
"Drag" => "拖动",
"Autocomplete add snippet" => "自动完成 / 添加片段",
"Multiple select" => "多选",
"Move line up" => "向上移动行",
"Move line down" => "向下移动行",
"Duplicate lines" => "复制行",
"Remove lines" => "删除行",
"Insert line before" => "前插入行",
"Insert line after" => "后插入行",
"Search for selected" => "搜索选择",
"Jump to definition" => "跳转到 / 跳转回",
"Comment uncomment" => "注释 / 清除注释",
"Insert tab indent" => "插入tab / 插入选择",
"Wrap with div" => "封装 &lt;div&gt;",
"Wrap with span" => "封装 &lt;span&gt;",
"Wrap unwrap p" => "封装 / 撤销封装 &lt;p&gt;",
"Wrap unwrap a" => "封装 / 撤销封装 &lt;a&gt;",
"Wrap unwrap b" => "封装 / 撤销封装 &lt;b&gt;",
"Wrap unwrap i" => "封装 / 撤销封装 &lt;i&gt;",
"Wrap unwrap strong" => "封装 / 撤销封装 &lt;strong&gt;",
"Wrap unwrap em" => "封装 / 撤销封装 &lt;em&gt;",
"Wrap unwrap li" => "封装 / 撤销封装 &lt;li&gt;",
"Wrap unwrap h1..." => "封装 / 撤销封装 &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "换行 &lt;br&gt;",
"Close tab" => "关闭选项卡",
"Select file folder" => "选择文件 / 文件夹",
"Open file" => "打开文件",
"Range select" => "范围选择",
"Options for selected" => "所选的选项",
"Delete selected" => "删除已选",
"Next previous tab" => "下一个 / 上一个 选项卡",
"Next tab" => "下一个选项卡",
"Previous tab" => "上一个选项卡",
"New tab" => "新建选项卡",
"Close current tab" => "关闭当前选项卡",
"Open file prompt" => "打开文件的提示",
"Find" => "搜索",
"Focus on Go..." => "光标定位到转到行的输入框",
"Save" => "保存",
"Save as" => "另存为...",
"View webpage" => "预览网页",
"Contract expand file..." => "收缩 / 扩展文件管理器",
"Fold unfold current..." => "折叠 / 展开当前行",
"Refocus on document" => "光标重新聚焦于文档",
"Cancel tasks" => "取消任务"
),
"ice-coder" =>
array(
"No text selected..." => "搜索中没有选中的文本",
"Creating Folder" => "正在创建文件夹",
"Sorry you can..." => "抱歉, 只能同时打开100个文件!",
"Opening File" => "正在打开文件",
"Enter relative file..." => "输入本地相对路径 (前缀 /) 或远程 URL",
"Getting" => "正在获取",
"Please enter the..." => "请输入新的名称为",
"Renaming to" => "正在重命名",
"Moving to" => "正在移动到",
"Deleting File" => "正在删除文件",
"Pasting File" => "正在粘贴文件",
"Sorry cannot paste..." => "抱歉, 无法粘贴到根路径",
"Nothing to paste..." => "粘贴失败, 请先复制一个文件 / 文件夹!",
"Replacing text in" => "正在替换文本",
"Cancelled tasks" => "取消任务",
"Open previous files" => "打开以前的文件?",
"Please enter your..." => "请输入您的 GitHub token (允许使用个人令牌或客户端令牌). 可以查看 Github Auth Token 的帮助 > 更多信息在设置窗口",
"This will compare..." => "将比较和显示你的本地目录和 GitHub repo 之间的差异. 确定吗?",
"Please note for..." => "请注意: 需要更新才能正常工作, 你需要为所有 ICEcoder 文件和文件夹设置写入和删除权限. 如果您需要恢复 ICEcoder 到这个版本, 你可以在 /tmp 目录找到它们. 点击 OK 继续使用自动升级或点击 cancel 访问 ICEcoder 网站, 您也可以到 grab 的项目首页下载 zip 来进行手动更新.",
"You can start..." => "你可以在 帮助 > 设置中启动错误报告",
"Error cannot find..." => "错误: 无法找到/进入错误文件路径",
"No new errors..." => "没有新的错误被找到",
"You have made..." => "您已做的更改未保存。您确定要关闭它而不保存吗?",
"Close all tabs" => "是否关闭所有选项卡?"
),
"login" =>
array(
"set password" => "设置密码",
"login" => "登陆",
"To disable registration..." => "要禁用注册模式, 请打开设置或打开文件 lib/config___settings.php 并更改 enableRegistration 为 false , 并重新载入本页面",
"Registration mode enabled" => "注册模式已启用",
"auto-check for updates" => "自动检测更新",
"To put into..." => "要禁用多用户模式, 请打开设置或打开文件 lib/config___settings.php 并更改 multiUser 为 true , 并重新载入本页面",
"multi-user" => "多用户"
),
"multiple-results" =>
array(
"rename all" => "重命名所有",
"replace all" => "全部替换",
"document" => "文档",
"Found" => "找到",
"times" => "时间",
"replace" => "替换",
"file folder" => "文件/文件夹",
"rename to" => "重命名为",
"rename" => "重命名",
"file" => "文件",
"No matches found" => "没有找到匹配",
"selected" => "选择",
"found in" => "查询结果在",
"Replaced" => "已替换"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder 需要重新加载,这个插件才可以使用。现在刷新吗?",
"saving plugins" => "正在保存插件...",
"Cannot update config..." => "不能更新配置文件. 请为",
"and try again" => "设置写入权限并刷新重试",
"couldnt delete dir" => "不能删除目录",
"couldnt delete file" => "不能删除文件",
"plugins" => "插件",
"Guide to writing..." => "编写插件指南",
"Manage Installed" => "管理已安装",
"URL" => "URL",
"Target" => "目标",
"Timer" => "定时器",
"Update" => "更新",
"Install" => "安装",
"Uninstall" => "卸载",
"Reload after install..." => "安装后需要刷新"
),
"properties" =>
array(
"properties" => "属性",
"Size" => "尺寸",
"Modified" => "修改",
"Last access" => "最近访问",
"Type" => "类型",
"Readable Writeable" => "可读 / 可写",
"Relative path" => "相对路径",
"Absolute path" => "绝对路径",
"Contains" => "包含",
"Permissions" => "权限",
"Owner" => "所有者",
"Group" => "",
"Public" => "公众",
"Read" => "读取",
"Write" => "写入",
"Execute" => "执行",
"Change to" => "更改为",
"update" => "更新"
),
"settings-common" =>
array(
"Your document does..." => "你的文档不是UTF-8编码, 它将被转换"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "不能更新配置文件. 请为",
"and try again" => "增加写入权限并再次尝试"
),
"settings-screen" =>
array(
"settings" => "设置",
"version" => "版本",
"website" => "网站",
"git" => "git",
"codemirror dir" => "codemirror 目录",
"codemirror version" => "codemirror 版本",
"file manager root" => "文件管理器的根目录ROOT",
"Free to use..." => "您可以自由使用它, 无论商业与否, 只需让我知道有任何很酷的使用或有定制的:)同样我们无任何责任和任何担保, 使用所有的责任是你的. 很多个人和公司为 ICEcoder 作出过贡献, 在此篇幅有限无法一一列举, 请访问贡献者详细列表",
"functionality" => "功能",
"check for updates..." => "启动时检查更新",
"auto open last..." => "启动时自动载入最后打开的文件",
"when finding in..." => "在查找文件时, 排除",
"assisting" => "辅助",
"code assist" => "代码辅助",
"visible tabs" => "缩进线可见",
"locked nav" => "锁定导航",
"tag wrapper command" => "标签封装命令",
"auto-complete on" => "打开自动完成",
"security" => "安全",
"new password" => "新密码",
"8 chars min" => "最少8个字符",
"confirm password" => "确认密码",
"banned files/folders" => "禁止文件 / 文件夹",
"banned paths" => "禁止路径",
"ip addresses" => "ip 地址",
"Slash prefixed comma..." => "斜线前缀, 以半角逗号分隔",
"Comma delimited" => "以半角逗号分隔",
"style" => "样式",
"theme" => "主题",
"line wrapping" => "换行",
"indent type" => "缩进类型",
"indent size" => "缩进大小",
"font size" => "字体大小",
"layout" => "布局",
"plugin panel aligned" => "插件板对齐",
"file manager" => "文件管理器",
"root" => "root",
"Slash prefixed" => "斜线前缀",
"bug reporting" => "错误报告",
"check in files" => "检查文件",
"every" => "任何",
"secs getting last" => "秒, 最后得到",
"lines" => "",
"multi-user" => "多用户",
"Make sure you..." => "确保你没有把自己锁了",
"Registration" => "启用注册",
"auth token" => "auth token",
"Required to get..." => "如需要得到差异列表, 提交您 GitHub 上托管的 repo 等. 如果你还没有一个, 您可以使用:".PHP_EOL.PHP_EOL.
"- 个人访问令牌 (https://help.github.com/articles/creating-an-access-token-for-command-line-use), 或".PHP_EOL.
"- 完整的客户端/机密双令牌 (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"我们不建议您在此处设置您的令牌, 更安全的方式是当ICEcoder要求输入时将其只保存在会话中.".PHP_EOL.PHP_EOL.
"然而, 如果你在一个值得信赖和安全的环境中工作, 把它设置在这里是更有效的.",
"Sorry cannot commit..." => "抱歉, 设置不能在演示模式下提交",
"update" => "更新"
),
"settings-update" =>
array(
"Cannot update config..." => "不能更新配置文件. 请为",
"and try again" => " 增加写入权限并重新尝试",
"and press refresh" => "增加写入权限并刷新"
),
"updater" =>
array(
"Update appears to..." => "更新似乎是成功的"
)
);
?>

View File

@@ -0,0 +1,425 @@
<?php
// Traditional Chinese language translation
// by: @lzh370 (GitHub)
// lzh370@qq.com
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>點擊圖標<br>求助 &amp;<br>實用信息</b>",
"server" => "伺服器",
"Server name, OS..." => "伺服器名稱, OS & IP:",
"Root" => "根目錄:",
"ICEcoder root" => "ICEcoder 根目錄:",
"PHP version" => "PHP 版本:",
"Date & time" => "日期 & 時間:",
"your device" => "你的設備",
"Browser" => "瀏覽器:",
"Your IP" => "你的 IP:",
"files" => "文件",
"Last 10 files..." => "最後10個打開的文件:",
"none" => "[none]",
"test suite" => "測試套件",
"Run unit tests" => "運行單元測試",
"dev mode" => "開發模式",
"Status" => "狀態",
"Using" => "使用",
"You can switch..." => "你可以在 lib/config__settings.php 中設置開發模式開關",
"results" => "結果"
),
"files" =>
array(
"Lock" => "鎖定",
"Refresh" => "刷新",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "更新信息",
"now available" => "現在可以",
"Your version is" => "你的版本是",
"Update now" => "現在更新",
"You have some..." => "你有一些未保存的更改",
"working" => "裝載中",
"Color picker" => "顔色選擇器",
"New File" => "新建文件",
"New Folder" => "新建文件夾",
"Upload File(s)" => "上傳文件",
"Paste" => "粘貼",
"Open" => "打開",
"Copy" => "複製",
"Duplicate" => "副本",
"Delete" => "刪除",
"Rename" => "重命名",
"View Webpage" => "預覽網頁",
"Download" => "下載",
"Properties" => "屬性",
"File" => "文件",
"Edit" => "編輯",
"Remote" => "遠程",
"Help" => "幫助",
"Save" => "保存",
"Save As" => "另存爲",
"Live Preview" => "實時預覽",
"Upload" => "上傳",
"Zip" => "壓縮",
"Print" => "打印",
"Fullscreen toggle" => "全屏切換",
"Logout" => "登出",
"Undo" => "撤銷",
"Redo" => "重做",
"Indent more" => "增加縮進",
"Indent less" => "减少縮進",
"Autocomplete" => "自動完成",
"Comment/Uncomment" => "注釋 / 清除注釋",
"Jump to Definition" => "跳轉指定行",
"Manual" => "手冊",
"Shortcuts" => "快捷鍵",
"Settings" => "選項",
"Search for selected" => "搜索選項",
"website" => "網站",
"Close all tabs" => "關閉所有選項卡",
"Alphabetize tabs" => "按字母順序排序選項卡",
// "Find" => "檢索",
// "in" => "in",
// "and" => "and",
// "replace" => "替換",
// "replace all" => "替換所有",
// "this document" => "當前文件",
// "open documents" => "打開的文件",
// "all files" => "所有文件",
// "all filenames" => "所有文件名",
"Turn on/off..." => "開啓/關閉代碼輔助",
"Code Assist" => "代碼輔助",
"Go to Line" => "轉到行",
"View" => "預覽",
"Bug reporting not active" => "錯誤報告沒有激活"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "檢索到:"
),
"file-control" =>
array(
"Sorry" => "抱歉",
"does not seem..." => "服務器上不存在",
"Sorry, could not..." => "抱歉, 不能獲取内容",
"Sorry, cannot create..." => "抱歉, 不能創建文件夾",
"Sorry, cannot copy" => "抱歉, 不能複製",
"into" => "",
"Uploaded file(s) OK" => "上傳文件完成",
"Sorry, cannot upload" => "抱歉, 不能上傳",
"Sorry, cannot upload..." => "抱歉, 演示模式不允許上傳文件",
"Sorry, cannot rename" => "抱歉, 不能重命名",
"Maybe public write..." => "也許父文件夾也需要寫入權限?",
"Sorry, cannot move" => "抱歉, 不能移動",
"Sorry, cannot save" => "抱歉, 不能保存",
"Sorry, cannot replace..." => "抱歉, 目標不能替換文本",
"Sorry, cannot change..." => "抱歉, 目標不能更改權限",
"Sorry, cannot delete..." => "抱歉, 不能刪除根級別ROOT",
"Sorry, cannot delete" => "抱歉, 不能刪除",
"Sorry, this file..." => "抱歉, 此文件已更改, 不能保存",
"Reload this file..." => "重新加載該文件, 你的版本複製到一個新文件?",
"There was a..." => "這些代碼還沒有準備好. 因此 ICEcoder 需要重新加載.",
"displayed at" => "顯示在",
"Enter filename to..." => "輸入文件名并保存到",
"That file exists..." => "該文件已存在, 要覆蓋嗎?",
"Saving" => "正在保存"
),
"get-branch" =>
array(
"There are no..." => "本地文件與 GitHub repo 沒有明顯差異. 切換回普通模式?",
"Sorry, there was..." => "抱歉, 這裏有一個錯誤, 代碼:",
"Your local folder..." => "你的本地文件夾是空的, 你是否想克隆"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "抱歉, 不能創建目錄到",
"Cannot update config..." => "不能更新配置文件. 請對",
"and try again" => "增加寫入權限, 并再次嘗試",
"saving github paths" => "正在保存 github 路徑...",
"github paths" => "github 路徑",
"Choose existing path" => "選擇現有路徑",
"Local path" => "本地路徑",
"Remote GitHub path" => "遠程 GitHub 路徑",
"Choose" => "選擇",
"Set local and..." => "設置本地路徑和遠程路徑需要去除空格",
"Update" => "更新",
"Add new path" => "增加新路徑",
"Add" => "增加",
"Usage Info" => "使用方法",
"Enter relative local..." => "輸入本地相對路徑 (/server/myfiles) 和 GitHub 絕對路徑 (https://github.com/user/repo 或 https://github.com/user/repo/tree/branch 各分隻), 按照示例. 完成后你就建立了這兩個源路徑, 它應該成對數存在.",
"You can then..." => "你可以選擇一個路徑作爲 ICEcoder 的根路徑.",
"The file manager..." => "文件管理器右側會顯示一個新的GitHub圖標, 您可以點擊執行, 會自動校驗并顯示本地與github源之間的差異. 這些差異可以提交和推送到GitHub上的遠程路徑或克隆到您的本地路徑, 用來同步您的文檔.",
"If you want..." => "如果您想設置一個根路徑, 可以在 幫助 > 設置窗口 中進行設置."
),
"github" =>
array(
"Sorry, you do..." => "抱歉, 您的服務器沒有啓用 OpenSSL 的 PHP 實例, 因此 https 目前不可用. GitHub 的數據傳輸必須要用 https 連接, 請修改 php.ini 設置, 重啓您的服務器并重新嘗試"
),
"headers" =>
array(
"Bad CSRF token..." => "錯誤的 CSRF token. 請在 https://github.com/mattpass/ICEcoder 報告錯誤信息, 以便我們修復它."
),
"help" =>
array(
"shortcuts" => "快捷鍵",
"Within document" => "文檔",
"On Tabs" => "選項卡",
"Within file manager" => "文件管理器",
"Anywhere" => "其他",
"Space" => "空格",
"Click" => "單擊",
"or" => "",
"Left click" => "左鍵單擊",
"Middle click" => "中鍵單擊",
"Double click tap..." => "雙擊 / 手指點擊 (移動端)",
"Right click" => "右鍵單擊",
"Middle scrollwheel" => "中間滾輪滾動",
"Drag" => "拖動",
"Autocomplete add snippet" => "自動完成 / 添加片段",
"Multiple select" => "多選",
"Move line up" => "向上移動行",
"Move line down" => "向下移動行",
"Duplicate lines" => "復制行",
"Remove lines" => "刪除行",
"Insert line before" => "前插入行",
"Insert line after" => "后插入行",
"Search for selected" => "搜索選擇",
"Jump to definition" => "跳轉到 / 跳轉回",
"Comment uncomment" => "注釋 / 清楚注釋",
"Insert tab indent" => "插入tab / 插入選擇",
"Wrap with div" => "封裝 &lt;div&gt;",
"Wrap with span" => "封裝 &lt;span&gt;",
"Wrap unwrap p" => "封裝 / 撤銷封裝 &lt;p&gt;",
"Wrap unwrap a" => "封裝 / 撤銷封裝 &lt;a&gt;",
"Wrap unwrap b" => "封裝 / 撤銷封裝 &lt;b&gt;",
"Wrap unwrap i" => "封裝 / 撤銷封裝 &lt;i&gt;",
"Wrap unwrap strong" => "封裝 / 撤銷封裝 &lt;strong&gt;",
"Wrap unwrap em" => "封裝 / 撤銷封裝 &lt;em&gt;",
"Wrap unwrap li" => "封装 / 撤销封装 &lt;li&gt;",
"Wrap unwrap h1..." => "封裝 / 撤銷封裝 &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "換行 &lt;br&gt;",
"Close tab" => "關閉選項卡",
"Select file folder" => "選擇文件 / 文件夾",
"Open file" => "打開文件",
"Range select" => "範圍選擇",
"Options for selected" => "所選的選項",
"Delete selected" => "刪除已選",
"Next previous tab" => "下一個 / 上一個 選項卡",
"Next tab" => "下一個選項卡",
"Previous tab" => "上一個選項卡",
"New tab" => "新建選項卡",
"Close current tab" => "關閉當前選項卡",
"Open file prompt" => "打開文件的提示",
"Find" => "檢索",
"Focus on Go..." => "光標定位到轉到行的輸入框",
"Save" => "保存",
"Save as" => "另存爲...",
"View webpage" => "預覽網頁",
"Contract expand file..." => "收縮 / 擴展文件管理器",
"Fold unfold current..." => "摺叠 / 展開當前行",
"Refocus on document" => "光標重新聚焦到文檔",
"Cancel tasks" => "取消任务"
),
"ice-coder" =>
array(
"No text selected..." => "搜索中沒有選中的文件",
"Creating Folder" => "正在創建文件夾",
"Sorry you can..." => "抱歉, 衹能同時打開100個文件!",
"Opening File" => "正在打開文件",
"Enter relative file..." => "輸入本地相對路徑 (前綴 /) 或遠程 URL",
"Getting" => "正在獲取",
"Please enter the..." => "請輸入新的名稱爲",
"Renaming to" => "正在重命名",
"Moving to" => "正在移動到",
"Deleting File" => "正在刪除文件",
"Pasting File" => "正在粘貼文件",
"Sorry cannot paste..." => "抱歉, 無法粘貼到根路徑",
"Nothing to paste..." => "粘貼失敗, 請先複製一個文件 / 文件夾!",
"Replacing text in" => "正在替換文本",
"Cancelled tasks" => "取消任務",
"Open previous files" => "打開以前的文件?",
"Please enter your..." => "請輸入您的 GitHub token (允許使用個人令牌或客戶端令牌). 可以查看 Github Auth Token 的幫助 > 更多信息在 幫助 > 設置窗口",
"This will compare..." => "將比較和顯示您的本地目錄和 GitHub repo 之間的差異. 確定嗎?",
"Please note for..." => "請注意: 需要更新才能工作, 您需要爲所有 ICEcoder 文件和文件夾設置寫如何刪除權限. 如果您需要恢復 ICEcoder 到這個版本, 您可以在 /tmp 目錄找到它們. 點擊 OK 繼續使用自動升級或點擊 cancel 訪問 ICEcoder 官方網站, 您也可以到 GitHub 的項目首頁下載 zip 來手動進行更新.",
"You can start..." => "您可以在 幫助 > 設置中啓動錯誤報告",
"Error cannot find..." => "錯誤: 無法找到和進入錯誤日志文件路徑",
"No new errors..." => "沒有新的錯誤被找到",
"You have made..." => "您已做的更改未保存。您確定要關閉它而不保存嗎?",
"Close all tabs" => "是否關閉所有選項卡?"
),
"login" =>
array(
"set password" => "設置密碼",
"login" => "登錄",
"To disable registration..." => "要禁用注冊模式, 請進入選項或打開文件 lib/config___settings.php 并更改 enableRegistration 爲 false , 并重新載入本頁面",
"Registration mode enabled" => "注冊模式已啓用",
"auto-check for updates" => "自動檢測更新",
"To put into..." => "要禁用多用戶模式, 請進入選項或打開文件 lib/config___settings.php 并更改 multiUser 爲 true , 并重新載入本頁面",
"multi-user" => "多用戶"
),
"multiple-results" =>
array(
"rename all" => "重命名所有",
"replace all" => "全部替換",
"document" => "文檔",
"Found" => "找到",
"times" => "時間",
"replace" => "替換",
"file folder" => "文件 / 文件夾",
"rename to" => "重命名爲",
"rename" => "重命名",
"file" => "文件",
"No matches found" => "沒有找到匹配",
"selected" => "選擇",
"found in" => "查詢結果在",
"Replaced" => "已替換"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder 需要重新加載, 這個插件才可以使用。現在刷新嗎?",
"saving plugins" => "正在保存插件...",
"Cannot update config..." => "不能更新配置文件. 請爲",
"and try again" => "設置寫入權限并刷新重試",
"couldnt delete dir" => "不能刪除目錄",
"couldnt delete file" => "不能刪除文件",
"plugins" => "插件",
"Guide to writing..." => "編寫插件指南",
"Manage Installed" => "管理已安裝",
"URL" => "URL",
"Target" => "目標",
"Timer" => "定時器",
"Update" => "更新",
"Install" => "安裝",
"Uninstall" => "卸載",
"Reload after install..." => "安裝后需要刷新"
),
"properties" =>
array(
"properties" => "屬性",
"Size" => "尺寸",
"Modified" => "修改",
"Last access" => "最近訪問",
"Type" => "類型",
"Readable Writeable" => "可讀 / 可寫",
"Relative path" => "相對路徑",
"Absolute path" => "絕對路徑",
"Contains" => "包含",
"Permissions" => "權限",
"Owner" => "所有者",
"Group" => "",
"Public" => "公衆",
"Read" => "讀取",
"Write" => "寫入",
"Execute" => "執行",
"Change to" => "更改爲",
"update" => "更新"
),
"settings-common" =>
array(
"Your document does..." => "你的文檔不是 UTF-8 編碼, 它將被轉換"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "不能更新配置文件. 請爲",
"and try again" => "增加寫入權限并再次嘗試"
),
"settings-screen" =>
array(
"settings" => "設置",
"version" => "版本",
"website" => "網站",
"git" => "git",
"codemirror dir" => "codemirror 目錄",
"codemirror version" => "codemirror 版本",
"file manager root" => "文件管理器的根目錄 ROOT",
"Free to use..." => "您可以免費使用它, 無論商業與否, 衹需讓我知道任何很酷的或有定製的:)同樣我們無任何責任和任何擔保, 使用所有的責任都是你的. 很多個人和公司爲 ICEcoder 作出過貢獻, 在此篇幅有限無法一一列舉, 請訪問貢獻者詳細列表",
"functionality" => "功能",
"check for updates..." => "啓動時檢查更新",
"auto open last..." => "啓動時自動載入最后打開的文件",
"when finding in..." => "在查找文件時, 排除",
"assisting" => "輔助",
"code assist" => "代碼輔助",
"visible tabs" => "縮進綫可見",
"locked nav" => "鎖定導航",
"tag wrapper command" => "標簽封裝命令",
"auto-complete on" => "打開自動完成",
"security" => "安全",
"new password" => "新密碼",
"8 chars min" => "至少8個字符",
"confirm password" => "確認密碼",
"banned files/folders" => "禁止文件 / 文件夾",
"banned paths" => "禁止路徑",
"ip addresses" => "ip 地址",
"Slash prefixed comma..." => "斜綫前綴, 以半角逗號分隔",
"Comma delimited" => "以半角逗號分隔",
"style" => "樣式",
"theme" => "主題",
"line wrapping" => "換行",
"indent type" => "縮進類型",
"indent size" => "縮進大小",
"font size" => "字體大小",
"layout" => "佈局",
"plugin panel aligned" => "插件版對齊",
"file manager" => "文件管理器",
"root" => "root",
"Slash prefixed" => "斜綫前綴",
"bug reporting" => "報告錯誤",
"check in files" => "檢查文件",
"every" => "任何",
"secs getting last" => "秒, 最後得到",
"lines" => "",
"multi-user" => "多用戶",
"Make sure you..." => "確保你沒有把自己鎖了",
"Registration" => "啓用注冊",
"auth token" => "auth token",
"Required to get..." => "如需要得到差異列表, 提交您 GitHub 上托管的 repo 等. 如果你還沒有一個, 你可以使用:".PHP_EOL.PHP_EOL.
"- 個人令牌訪問 (https://help.github.com/articles/creating-an-access-token-for-command-line-use), 或".PHP_EOL.
"- 完整的客戶端/機密雙令牌 (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"我們不建議您在此處設置令牌, 更安全的方式是當 ICEcoder 要求輸入時將其隻保存在會話中.".PHP_EOL.PHP_EOL.
"然而, 如果你在一個信賴和安全的環境下工作, 把它設置在這裏是更有效的.",
"Sorry cannot commit..." => "抱歉, 在演示模式下不能提交設置",
"update" => "更新"
),
"settings-update" =>
array(
"Cannot update config..." => "不能更新配置文件. 請爲",
"and try again" => " 增加寫入權限并重新嘗試",
"and press refresh" => " 增加寫入權限并重新嘗試"
),
"updater" =>
array(
"Update appears to..." => "更新似乎是成功的"
)
);
?>

427
lang/dutch.php Normal file
View File

@@ -0,0 +1,427 @@
<?php
// Dutch language translation
// Door: Julian Kaagman
@dutchwaters (GitHub)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
// Special chars: http://www.ascii.cl/htmlcodes.htm
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<strong>Klik op de icoontjes<br>voor hulp &amp;<br>gebruiks info</strong>",
"server" => "server",
"Server name, OS..." => "Server naam, besturingssysteem & IP:",
"Root" => "Root:",
"ICEcoder root" => "ICEcoder root:",
"PHP version" => "PHP versie:",
"Date & time" => "Datum & tijd:",
"your device" => "Uw apparaat",
"Browser" => "Browser:",
"Your IP" => "Uw IP:",
"files" => "bestanden",
"Last 10 files..." => "Laatste 10 geopende bestanden:",
"none" => "[none]",
"test suite" => "test suite",
"Run unit tests" => "Voer unit tests uit",
"dev mode" => "Ontwikkelaars modus",
"Status" => "Status",
"Using" => "Gebruikt",
"You can switch..." => "U kunt de ontwikkelaars modus aan/uit zetten
in lib/config__settings.php",
"results" => "resultaten"
),
"files" =>
array(
"Lock" => "Vergrendelen",
"Refresh" => "Vernieuwen",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "UPDATE INFO",
"now available" => "nu beschikbaar",
"Your version is" => "Uw versie is",
"Update now" => "Nu updaten",
"You have some..." => "Er zijn wijzigingen die niet opgeslagen zijn",
"working" => "bezig",
"Color picker" => "Kleuren kiezer",
"New File" => "Nieuw bestand",
"New Folder" => "Nieuwe map",
"Upload File(s)" => "Upload bestand(en)",
"Paste" => "Plakken",
"Open" => "Open",
"Copy" => "Kopi&euml;ren",
"Duplicate" => "Dupliceren",
"Delete" => "Verwijderen",
"Rename" => "Hernoemen",
"View Webpage" => "Bekijk webpagina",
"Download" => "Download",
"Properties" => "Eigenschappen",
"File" => "Bestand",
"Edit" => "Bewerken",
"Remote" => "Extern",
"Help" => "Help",
"Save" => "Opslaan",
"Save As" => "Opslaan als",
"Live Preview" => "Voorbeeld",
"Upload" => "Upload",
"Zip" => "Zip",
"Print" => "Print",
"Fullscreen toggle" => "Schakelen volledig scherm",
"Logout" => "Uitloggen",
"Undo" => "Ongedaan maken",
"Redo" => "Opnieuw",
"Indent more" => "Rechts inspringen",
"Indent less" => "Links verspringen",
"Autocomplete" => "Automatisch aanvullen",
"Comment/Uncomment" => "Commentaar maken",
"Jump to Definition" => "Spring naar definitie",
"Manual" => "Handleiding",
"Shortcuts" => "Snelkoppeling",
"Settings" => "Opties",
"Search for selected" => "Zoek naar geselecteerd",
"website" => "website",
"Close all tabs" => "Sluit alle tabbladen",
"Alphabetize tabs" => "Sorteer tabbladen",
// "Find" => "Zoek",
// "in" => "in",
// "and" => "en",
// "replace" => "vervangen",
// "replace all" => "alles vervangen",
// "this document" => "dit document",
// "open documents" => "open documenten",
// "all files" => "alle bestanden",
// "all filenames" => "alle bestandsnamen",
"Turn on/off..." => "Schakel codehulp aan/uit",
"Code Assist" => "Codehulp",
"Go to Line" => "Ga naar regel",
"View" => "Beeld",
"Bug reporting not active" => "Bug rapportage niet actief"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "Gevonden in:"
),
"file-control" =>
array(
"Sorry" => "Sorry",
"does not seem..." => "bestaat niet op de server",
"Sorry, could not..." => "Sorry, kan geen gegevens ophalen van",
"Sorry, cannot create..." => "Sorry, kan geen map aanmaken op",
"Sorry, cannot copy" => "Sorry, kan niet het volgende niet kopi&euml;ren",
"into" => "naar",
"Uploaded file(s) OK" => "Ge&uuml;ploade bestand(en)",
"Sorry, cannot upload" => "Sorry, kan niet uploaden",
"Sorry, cannot upload..." => "Sorry, kan niet uploaden in de demo modus",
"Sorry, cannot rename" => "Sorry, kan niet hernoemen",
"Maybe public write..." => "Misschien zijn er publieke schrijfrechten nodig voor deze, of de bovenliggende map?",
"Sorry, cannot move" => "Sorry, kan niet worden verplaatst",
"Sorry, cannot save" => "Sorry, kan niet opslaan",
"Sorry, cannot replace..." => "Sorry, Kan geen tekst vervangen in",
"Sorry, cannot change..." => "Sorry, kan de rechten niet wijzigen voor",
"Sorry, cannot delete..." => "Sorry, kan de root level niet verwijderen",
"Sorry, cannot delete" => "Sorry, kan niet verwijderd worden",
"Sorry, this file..." => "Sorry, het bestand is gewijzigd, maar kan niet worden opgeslagen",
"Reload this file..." => "Vernieuw dit bestand en kopieer de huidige versie naar een nieuw bestand?",
"There was a..." => "Er was een technisch probleem, mogelijk was er iets niet gereed. ICEcodeer heeft bestandsbeheer opnieuw geladen.",
"displayed at" => "weergegeven op",
"Enter filename to..." => "Voer een bestandsnaam in om het op te slaan op",
"That file exists..." => "Dit bestand bestaat al, overschrijven?",
"Saving" => "Opslaan"
),
"get-branch" =>
array(
"There are no..." => "Er zijn geen verschillen aangetroffen tussen de lokale en de Github repo. Wilt u terug schakelen naar de normale modus?",
"Sorry, there was..." => "Sorry, er is een fout opgetreden, foutcode:",
"Your local folder..." => "Uw lokale map is leeg, wilt u de inhoud klonen"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "Sorry, kan geen map aanmaken op",
"Cannot update config..." => "Kan het configuratie bestand niet updaten. Zet alstublieft eerst publieke schrijfrechten aan",
"and try again" => "en probeer het opnieuw",
"saving github paths" => "opslaan Github paden...",
"github paths" => "Github paden",
"Choose existing path" => "Kies een bestaand pad",
"Local path" => "Lokaal pad",
"Remote GitHub path" => "Extern Github pad",
"Choose" => "Kies",
"Set local and..." => "Maak het lokale en externe pad leeg, om te verwijderen",
"Update" => "Update",
"Add new path" => "Nieuw pad toevoegen",
"Add" => "Toevoegen",
"Usage Info" => "Gebruiks Info:",
"Enter relative local..." => "Voer relatieve lokale paden (bv /server/mijnbestanden) en absolute Github paden (bv https://github.com/user/repo of https://github.com/user/repo/tree/branch voor vertakkingen (branches)), zoals het voorbeeld. Als je dit doet worden de bron paden op beide locaties gevestigd als een paar.",
"You can then..." => "You can then choose a path pair and this then becomes your new root path in ICEcoder.",
"The file manager..." => "The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.",
"If you want..." => "If you want to set another root path, this can be done in the Settings screen."
),
"github" =>
array(
"Sorry, you do..." => "Sorry, you do not appear to have OpenSSL loaded on your PHP instance, so https is not available. This is required for GitHub data transfer, please amend php.ini settings, restart your server and try again"
),
"headers" =>
array(
"Bad CSRF token..." => "Foute CSRF token. Graag de fout informatie delen op https://github.com/mattpass/ICEcoder zodat het kan worden opgelost."
),
"help" =>
array(
"shortcuts" => "snelkoppelingen",
"Within document" => "Binnen het document",
"On Tabs" => "Op Tabs",
"Within file manager" => "Binnen bestandsbeheer",
"Anywhere" => "Overal",
"Space" => "Spatie",
"Click" => "Klik",
"or" => "of",
"Left click" => "Linker muisklik",
"Middle click" => "Middelste muisklik",
"Double click tap..." => "Dubbel klikken / tap (mobiele apparatuur)",
"Right click" => "Rechter muisklik",
"Middle scrollwheel" => "Midden scrollwiel",
"Drag" => "Slepen",
"Autocomplete add snippet" => "Aanvullen / toevoegen snippet",
"Multiple select" => "Multi selecteren",
"Move line up" => "Verplaats regel omhoog",
"Move line down" => "Verplaats regel omlaag",
"Duplicate lines" => "Kopieer regel(s)",
"Remove lines" => "Verwijder regel(s)",
"Insert line before" => "Regel invoegen voor",
"Insert line after" => "Regel invoegen na",
"Search for selected" => "Zoek naar geselecteerd",
"Jump to definition" => "Spring naar definitie / spring terug",
"Comment uncomment" => "Commentaar (ongedaan) maken",
"Insert tab indent" => "Invoegen tab / verspringen geselecteerd",
"Wrap with div" => "Omhullen met &lt;div&gt;",
"Wrap with span" => "Omhullen met &lt;span&gt;",
"Wrap unwrap p" => "Omhullen / onthullen met &lt;p&gt;",
"Wrap unwrap a" => "Omhullen / onthullen met &lt;a&gt;",
"Wrap unwrap b" => "Omhullen / onthullen met &lt;b&gt;",
"Wrap unwrap i" => "Omhullen / onthullen met &lt;i&gt;",
"Wrap unwrap strong" => "Omhullen / onthullen met &lt;strong&gt;",
"Wrap unwrap em" => "Omhullen / onthullen met &lt;em&gt;",
"Wrap unwrap li" => "Omhullen / onthullen met &lt;li&gt;",
"Wrap unwrap h1..." => "Omhullen / onthullen met &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "Eindig regel met &lt;br&gt;",
"Close tab" => "Sluit tab",
"Select file folder" => "Selecteer bestand / map",
"Open file" => "Open bestand",
"Range select" => "Selecteer bereik",
"Options for selected" => "Opties voor geselecteerd",
"Delete selected" => "Verwijder geselecteerde",
"Next previous tab" => "Volgende / vorige tab",
"Next tab" => "Volgende tab",
"Previous tab" => "Vorige tab",
"New tab" => "Nieuw tab",
"Close current tab" => "Sluit huidige tab",
"Open file prompt" => "Open bestands prompt",
"Find" => "Zoek",
"Focus on Go..." => "Focus op ga naar regel invoer",
"Save" => "Opslaan",
"Save as" => "Opslaan als...",
"View webpage" => "Bekijk webpagina",
"Contract expand file..." => "Inklappen / uitklappen bestandsbeheer",
"Fold unfold current..." => "Vouwen / uitvouwen huidige regel",
"Refocus on document" => "Herfocus op document",
"Cancel tasks" => "Annuleer taken"
),
"ice-coder" =>
array(
"No text selected..." => "Geen tekst geselecteerd om te zoeken",
"Creating Folder" => "Aanmaken map",
"Sorry you can..." => "Sorry, je kan maximaal 100 bestanden open hebben staan!",
"Opening File" => "Openen bestand",
"Enter relative file..." => "Geef relatieve bestands pad (voorafgaand door een slash) of een externe URL",
"Getting" => "Ophalen",
"Please enter the..." => "Voer de nieuwe naam in voor",
"Renaming to" => "Hernoemen naar",
"Moving to" => "Verplaatsen naar",
"Deleting File" => "Bestand verwijderen",
"Pasting File" => "Bestand plakken",
"Sorry cannot paste..." => "Sorry, kan niet de gehele root plakken",
"Nothing to paste..." => "Er is niets om te plakken, kopieer eerst een bestand of map!",
"Replacing text in" => "Wijzig de tekst in",
"Cancelled tasks" => "Geannuleerde taken",
"Open previous files" => "Open voorgaande bestand(en)?",
"Please enter your..." => "Please enter your GitHub token (either personal access token or client/secret pair token). See tooltip next to Github Auth Token on Help > Settings screen for more info",
"This will compare..." => "This will compare and show a diff view between your local dir and the repo. OK?",
"Please note for..." => "Let op: om de update goed te laten doorvoeren, moet je schrijfrechten hebben op alle bestanden en mappen van ICEcoder. Moet je deze versie van ICEcoder herstellen, dan vind je die in de map /tmp. Klik op ok om door te gaan met automatisch updaten, of druk op annuleren om af te breken. Voor een handmatige update kun je het zip bestand van de ICEcoder website downloaden.",
"You can start..." => "U kunt bug rapporteren aanzetten in: Help > Settings",
"Error cannot find..." => "Fout: kan geen toegang krijgen of de bestands paden vinden",
"No new errors..." => "Geen nieuwe fouten gevonden",
"You have made..." => "Er zijn wijzigingen aangetroffen. Wilt u verder gaan zonder op te slaan?",
"Close all tabs" => "Sluit alle tabbladen?"
),
"login" =>
array(
"set password" => "sla wachtwoord op",
"login" => "login",
"To disable registration..." => "Om de registratie modus uit te zetten, open het menu opties of open lib/config___settings.php en wijzig enableRegistration naar false",
"Registration mode enabled" => "Registratie modus aan",
"auto-check for updates" => "automatisch controleren op updates",
"To put into..." => "Om de multi-user modus te gebruiken, open het menu opties of open lib/config___settings.php en verander multiUser naar true",
"multi-user" => "multi-user"
),
"multiple-results" =>
array(
"rename all" => "hernoem alles",
"replace all" => "vervang alles",
"document" => "document",
"Found" => "Gevonden",
"times" => "keer",
"replace" => "vervang",
"file folder" => "bestand/map",
"rename to" => "hernoemen naar",
"rename" => "hernoemen",
"file" => "bestand",
"No matches found" => "Geen overeenkomsten gevonden",
"selected" => "geselecteerd",
"found in" => "gevonden in",
"Replaced" => "Vervangen"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder moet opnieuw worden geladen om deze plug-in te gebruiken. Nu opnieuw laden?",
"saving plugins" => "opslaan plug-ins...",
"Cannot update config..." => "Kan het configuratie bestand niet updaten. Zet alstublieft eerst publieke schrijfrechten aan",
"and try again" => "en probeer het opnieuw",
"couldnt delete dir" => "kan de map niet verwijderen",
"couldnt delete file" => "kan bestand niet verwijderen",
"plugins" => "plug-ins",
"Guide to writing..." => "Gids om plug-ins te schrijven",
"Manage Installed" => "Beheer ge&Iuml;nstalleerd",
"URL" => "URL",
"Target" => "Doel",
"Timer" => "Timer",
"Update" => "Update",
"Install" => "Installeren",
"Uninstall" => "De&Iuml;nstalleren",
"Reload after install..." => "Opnieuw laden na installatie vereist"
),
"properties" =>
array(
"properties" => "eigenschappen",
"Size" => "Groote",
"Modified" => "Aangepast",
"Last access" => "Laatst geopend",
"Type" => "Type",
"Readable Writeable" => "Leesbaar / Schrijfbaar",
"Relative path" => "Relatief pad",
"Absolute path" => "Absoluut pad",
"Contains" => "Bevat",
"Permissions" => "Rechten",
"Owner" => "Eigenaar",
"Group" => "Groep",
"Public" => "Publiek",
"Read" => "Lezen",
"Write" => "Schrijven",
"Execute" => "Uitvoeren",
"Change to" => "Veranderen naar",
"update" => "update"
),
"settings-common" =>
array(
"Your document does..." => "Het bleek dat uw bestand niet gebruik maakte van UTF-8 codering, dus is het geconverteerd"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "Kan het configuratie bestand niet updaten. Zet alstublieft eerst publieke schrijfrechten aan",
"and try again" => "en probeer het opnieuw"
),
"settings-screen" =>
array(
"settings" => "instellingen",
"version" => "versie",
"website" => "website",
"git" => "git",
"codemirror dir" => "codemirror dir",
"codemirror version" => "codemirror versie",
"file manager root" => "bestandsbeheer root",
"Free to use..." => "Vrij voor eigen gebruik, commercieel of persoonlijk. :)<br><br>Wij zijn niet aansprakelijk en bieden geen garantie, gebruik op eigen risico.<br><br>Een hoop fantastische mensen, en bedrijven hebben meegeholpen aan de ontwikkeling van ICEcoder waarvoor bedankt. Zie wie er allemaal heeft bijgedragen op",
"functionality" => "functionaliteit",
"check for updates..." => "check voor updates bij laden",
"auto open last..." => "automatisch openen laatst geopende bestanden na inloggen",
"when finding in..." => "when finding in files, exclude",
"assisting" => "assisteren",
"code assist" => "codehulp",
"visible tabs" => "zichtbare tabs",
"locked nav" => "vergrendelde nav",
"tag wrapper command" => "tag wrapper command",
"auto-complete on" => "automatisch aanvullen",
"security" => "beveiliging",
"new password" => "nieuw wachtwoord",
"8 chars min" => "minimaal 8 tekens",
"confirm password" => "herhaal wachtwoord",
"banned files/folders" => "uitgesloten bestanden/mappen",
"banned paths" => "uitgesloten paden",
"ip addresses" => "ip adressen",
"Slash prefixed comma..." => "Slash prefixed, komma gescheiden",
"Comma delimited" => "komma gescheiden",
"style" => "style",
"theme" => "thema",
"line wrapping" => "regel omslag",
"indent type" => "inspring type",
"indent size" => "inspring size",
"font size" => "lettergrootte",
"layout" => "lay-out",
"plugin panel aligned" => "plug-in paneel positie",
"file manager" => "bestandsbeheer",
"root" => "root",
"Slash prefixed" => "Slash prefixed",
"bug reporting" => "bug rapportage",
"check in files" => "check in bestanden",
"every" => "elke",
"secs getting last" => "seconde, verstuur laatste",
"lines" => "regels",
"multi-user" => "multi-user",
"Make sure you..." => "Zorg ervoor dat je niet jezelf buitensluit",
"Registration" => "Registratie",
"auth token" => "auth token",
"Required to get..." => "Required to get diffs, commit to your GitHub hosted repo etc. If you do not have one, you can use a:".PHP_EOL.PHP_EOL.
"- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"It is not recommended you set your token here however and is more secure to enter it when requested by ICEcoder as that will keep it in session only.".PHP_EOL.PHP_EOL.
"However, if you work in a trusted and secure environment, it is more efficient to set it here.",
"Sorry cannot commit..." => "Sorry, cannot commit settings in demo mode",
"update" => "update"
),
"settings-update" =>
array(
"Cannot update config..." => "Kan het configuratie bestand niet updaten. Zet alstublieft eerst publieke schrijfrechten aan",
"and try again" => "probeer het opnieuw",
"and press refresh" => "en druk vernieuwen"
),
"updater" =>
array(
"Update appears to..." => "Update lijkt succesvol te zijn verlopen"
)
);
?>

434
lang/english.php Normal file
View File

@@ -0,0 +1,434 @@
<?php
// English language translation
// by: @mattpass (GitHub)
// @mattpass (Twitter)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>Click icons<br>for help &amp;<br>usage info</b>",
"server" => "server",
"Server name, OS..." => "Server name, OS & IP:",
"Root" => "Root:",
"ICEcoder root" => "ICEcoder root:",
"PHP version" => "PHP version:",
"Date & time" => "Date & time:",
"your device" => "your device",
"Browser" => "Browser:",
"Your IP" => "Your IP:",
"files" => "files",
"Last 10 files..." => "Last 10 files opened:",
"none" => "[none]",
"test suite" => "test suite",
"Run unit tests" => "Run unit tests",
"dev mode" => "dev mode",
"Status" => "Status",
"Using" => "Using",
"You can switch..." => "You can switch dev mode on/off in lib/config__settings.php",
"results" => "results"
),
"files" =>
array(
"Lock" => "Lock",
"Refresh" => "Refresh",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "UPDATE INFO",
"now available" => "now available",
"Your version is" => "Your version is",
"Update now" => "Update now",
"You have some..." => "You have some unsaved changes",
"working" => "working",
"Color picker" => "Color picker",
"New File" => "New File",
"New Folder" => "New Folder",
"Upload File(s)" => "Upload File(s)",
"Paste" => "Paste",
"Open" => "Open",
"Copy" => "Copy",
"Duplicate" => "Duplicate",
"Delete" => "Delete",
"Rename" => "Rename",
"View Webpage" => "View Webpage",
"Download" => "Download",
"Properties" => "Properties",
"File" => "File",
"Edit" => "Edit",
"Remote" => "Remote",
"Help" => "Help",
"Save" => "Save",
"Save As" => "Save As",
"Live Preview" => "Live Preview",
"Upload" => "Upload",
"Zip" => "Zip",
"Print" => "Print",
"Fullscreen toggle" => "Fullscreen toggle",
"Logout" => "Logout",
"Undo" => "Undo",
"Redo" => "Redo",
"Indent more" => "Indent more",
"Indent less" => "Indent less",
"Autocomplete" => "Autocomplete",
"Comment/Uncomment" => "Comment/Uncomment",
"Jump to Definition" => "Jump to Definition",
"Manual" => "Manual",
"Shortcuts" => "Shortcuts",
"Settings" => "Settings",
"Search for selected" => "Search for selected",
"website" => "website",
"Close all tabs" => "Close all tabs",
"Alphabetize tabs" => "Alphabetize tabs",
"Find" => "Find",
"in" => "in",
"and" => "and",
"replace" => "replace",
"replace all" => "replace all",
"this document" => "this document",
"open documents" => "open documents",
"all files" => "all files",
"all filenames" => "all filenames",
"Turn on/off..." => "Turn on/off code assist",
"Code Assist" => "Code Assist",
"Go to Line" => "Go to Line",
"View" => "View",
"Bug reporting not active" => "Bug reporting not active"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "Found in:"
),
"file-control" =>
array(
"Sorry" => "Sorry",
"does not seem..." => "does not seem to exist on the server",
"Sorry, could not..." => "Sorry, could not get contents of",
"Sorry, cannot create..." => "Sorry, cannot create folder at",
"Sorry, cannot copy" => "Sorry, cannot copy",
"into" => "into",
"Uploaded file(s) OK" => "Uploaded file(s) OK",
"Sorry, cannot upload" => "Sorry, cannot upload",
"Sorry, cannot upload..." => "Sorry, cannot upload whilst in demo mode",
"Sorry, cannot rename" => "Sorry, cannot rename",
"Maybe public write..." => "Maybe public write permissions needed on this or parent folder?",
"Sorry, cannot move" => "Sorry, cannot move",
"Sorry, cannot save" => "Sorry, cannot save",
"Sorry, cannot replace..." => "Sorry, cannot replace text in",
"Sorry, cannot change..." => "Sorry, cannot change permissions on",
"Sorry, cannot delete..." => "Sorry, cannot delete the root level",
"Sorry, cannot delete" => "Sorry, cannot delete",
"Sorry, this file..." => "Sorry, this file has changed, cannot save",
"Reload this file..." => "Reload this file and copy your version to a new document?",
"There was a..." => "There was a tech hiccup, likely something was not quite ready. So ICEcoder reloaded its file control again.",
"displayed at" => "displayed at",
"Enter filename to..." => "Enter filename to save at",
"That file exists..." => "That file exists already, overwrite?",
"Saving" => "Saving"
),
"get-branch" =>
array(
"There are no..." => "There are no differences between the local and GitHub repo. Switch back to regular mode?",
"Sorry, there was..." => "Sorry, there was an error, code:",
"Your local folder..." => "Your local folder is empty, would you like to clone"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "Sorry, cannot create folder at",
"Cannot update config..." => "Cannot update config file. Please set public write permissions on",
"and try again" => "and try again",
"saving github paths" => "saving github paths...",
"github paths" => "github paths",
"Choose existing path" => "Choose existing path",
"Local path" => "Local path",
"Remote GitHub path" => "Remote GitHub path",
"Choose" => "Choose",
"Set local and..." => "Set local and remote path to blank to remove",
"Update" => "Update",
"Add new path" => "Add new path",
"Add" => "Add",
"Usage Info" => "Usage Info:",
"Enter relative local..." => "Enter relative local paths (eg /server/myfiles) and absolute GitHub paths (eg https://github.com/user/repo or https://github.com/user/repo/tree/branch for branches), as per the examples. With this done you have established the source paths at both locations, as a pair.",
"You can then..." => "You can then choose a path pair and this then becomes your new root path in ICEcoder.",
"The file manager..." => "The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.",
"If you want..." => "If you want to set another root path, this can be done in the Settings screen."
),
"github" =>
array(
"Sorry, you do..." => "Sorry, you do not appear to have OpenSSL loaded on your PHP instance, so https is not available. This is required for GitHub data transfer, please amend php.ini settings, restart your server and try again"
),
"headers" =>
array(
"Bad CSRF token..." => "Bad CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed."
),
"help" =>
array(
"shortcuts" => "shortcuts",
"Within document" => "Within document",
"On Tabs" => "On Tabs",
"Within file manager" => "Within file manager",
"Anywhere" => "Anywhere",
"Space" => "Space",
"Click" => "Click",
"or" => "or",
"Left click" => "Left click",
"Middle click" => "Middle click",
"Double click tap..." => "Double click / tap (mobile)",
"Right click" => "Right click",
"Middle scrollwheel" => "Middle scrollwheel",
"Drag" => "Drag",
"Autocomplete add snippet" => "Autocomplete / add snippet",
"Multiple select" => "Multiple select",
"Move line up" => "Move line up",
"Move line down" => "Move line down",
"Duplicate lines" => "Duplicate line(s)",
"Remove lines" => "Remove line(s)",
"Insert line before" => "Insert line before",
"Insert line after" => "Insert line after",
"Search for selected" => "Search for selected",
"Jump to definition" => "Jump to definition / jump back",
"Comment uncomment" => "Comment / uncomment",
"Insert tab indent" => "Insert tab / indent selected",
"Wrap with div" => "Wrap with &lt;div&gt;",
"Wrap with span" => "Wrap with &lt;span&gt;",
"Wrap unwrap p" => "Wrap / unwrap with &lt;p&gt;",
"Wrap unwrap a" => "Wrap / unwrap with &lt;a&gt;",
"Wrap unwrap b" => "Wrap / unwrap with &lt;b&gt;",
"Wrap unwrap i" => "Wrap / unwrap with &lt;i&gt;",
"Wrap unwrap strong" => "Wrap / unwrap with &lt;strong&gt;",
"Wrap unwrap em" => "Wrap / unwrap with &lt;em&gt;",
"Wrap unwrap li" => "Wrap / unwrap with &lt;li&gt;",
"Wrap unwrap h1..." => "Wrap / unwrap with &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "End line with &lt;br&gt;",
"Close tab" => "Close tab",
"Select file folder" => "Select file / folder",
"Open file" => "Open file",
"Range select" => "Range select",
"Options for selected" => "Options for selected",
"Delete selected" => "Delete selected",
"Next previous tab" => "Next / previous tab",
"Next tab" => "Next tab",
"Previous tab" => "Previous tab",
"New tab" => "New tab",
"Close current tab" => "Close current tab",
"Open file prompt" => "Open file prompt",
"Find" => "Find",
"Focus on Go..." => "Focus on Go to line input",
"Save" => "Save",
"Save as" => "Save as...",
"View webpage" => "View webpage",
"Contract expand file..." => "Contract / expand file manager",
"Fold unfold current..." => "Fold / unfold current line",
"Refocus on document" => "Refocus on document",
"Cancel tasks" => "Cancel tasks"
),
"ice-coder" =>
array(
"No text selected..." => "No text selected to search on",
"all files" => "all files",
"all filenames" => "all filenames",
"selected files" => "selected files",
"selected filenames" => "selected filenames",
"Creating Folder" => "Creating Folder",
"Sorry you can..." => "Sorry, you can only have 100 files open at a time!",
"Opening File" => "Opening File",
"Enter relative file..." => "Enter relative file path (prefixed with /) or remote URL",
"Getting" => "Getting",
"Please enter the..." => "Please enter the new name for",
"Renaming to" => "Renaming to",
"Moving to" => "Moving to",
"Deleting File" => "Deleting File",
"Pasting File" => "Pasting File",
"Sorry cannot paste..." => "Sorry, cannot paste a whole root",
"Nothing to paste..." => "Nothing to paste, copy a file/folder first!",
"and" => "and",
"this document" => "this document",
"replace" => "replace",
"replace all" => "replace all",
"file" => "file",
"Replacing text in" => "Replacing text in",
"Cancelled tasks" => "Cancelled tasks",
"Open previous files" => "Open previous files?",
"Please enter your..." => "Please enter your GitHub token (either personal access token or client/secret pair token). See tooltip next to Github Auth Token on Help > Settings screen for more info",
"This will compare..." => "This will compare and show a diff view between your local dir and the repo. OK?",
"Please note for..." => "Please note: for updating to work properly, you need to have write/delete access on all ICEcoder dirs & files. If you need to recover this version of ICEcoder for any reason, you'll find it in the /tmp dir. Click OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually.",
"You can start..." => "You can start bug reporting in Help > Settings",
"Error cannot find..." => "Error: cannot find/access the error file paths",
"No new errors..." => "No new errors found",
"You have made..." => "You have made changes. Are you sure you want to close without saving?",
"Close all tabs" => "Close all tabs?"
),
"login" =>
array(
"set password" => "set password",
"login" => "login",
"To disable registration..." => "To disable registration mode, open the settings menu or open lib/config___settings.php and change enableRegistration to false then reload this page",
"Registration mode enabled" => "Registration mode enabled",
"auto-check for updates" => "auto-check for updates",
"To put into..." => "To put into multi-user mode, open the settings menu or open lib/config___settings.php and change multiUser to true then reload this page",
"multi-user" => "multi-user"
),
"multiple-results" =>
array(
"rename all" => "rename all",
"replace all" => "replace all",
"document" => "document",
"Found" => "Found",
"times" => "times",
"replace" => "replace",
"file folder" => "file/folder",
"rename to" => "rename to",
"rename" => "rename",
"file" => "file",
"No matches found" => "No matches found",
"selected" => "selected",
"found in" => "found in",
"Replaced" => "Replaced"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder needs to reload to make this plugin usable. Reload now?",
"saving plugins" => "saving plugins...",
"Cannot update config..." => "Cannot update config file. Please set public write permissions on",
"and try again" => "and try again",
"couldnt delete dir" => "could not delete dir",
"couldnt delete file" => "could not delete file",
"plugins" => "plugins",
"Guide to writing..." => "Guide to writing plugins",
"Manage Installed" => "Manage Installed",
"URL" => "URL",
"Target" => "Target",
"Timer" => "Timer",
"Update" => "Update",
"Install" => "Install",
"Uninstall" => "Uninstall",
"Reload after install..." => "Reload after install required"
),
"properties" =>
array(
"properties" => "properties",
"Size" => "Size",
"Modified" => "Modified",
"Last access" => "Last access",
"Type" => "Type",
"Readable Writeable" => "Readable / Writeable",
"Relative path" => "Relative path",
"Absolute path" => "Absolute path",
"Contains" => "Contains",
"Permissions" => "Permissions",
"Owner" => "Owner",
"Group" => "Group",
"Public" => "Public",
"Read" => "Read",
"Write" => "Write",
"Execute" => "Execute",
"Change to" => "Change to",
"update" => "update"
),
"settings-common" =>
array(
"Your document does..." => "Your document does not appear to be in UTF-8 encoding so has been converted"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "Cannot update config file. Please set public write permissions on",
"and try again" => "and try again"
),
"settings-screen" =>
array(
"settings" => "settings",
"version" => "version",
"website" => "website",
"git" => "git",
"codemirror dir" => "codemirror dir",
"codemirror version" => "codemirror version",
"file manager root" => "file manager root",
"Free to use..." => "Free to use it for your own purposes, commercial or not, just let me know of any cool uses or customisations. :)<br><br>No warranty or liability accepted for anything, all responsibility of use is your own.<br><br>A lot of fantastic people and companies have helped build ICEcoder and there is too many to thank here. Please see the full list at",
"functionality" => "functionality",
"check for updates..." => "check for updates on load",
"auto open last..." => "auto open last files on login",
"when finding in..." => "when finding in files, exclude",
"assisting" => "assisting",
"code assist" => "code assist",
"visible tabs" => "visible tabs",
"locked nav" => "locked nav",
"tag wrapper command" => "tag wrapper command",
"auto-complete on" => "auto-complete on",
"security" => "security",
"new password" => "new password",
"8 chars min" => "8 chars min",
"confirm password" => "confirm password",
"banned files/folders" => "banned files/folders",
"banned paths" => "banned paths",
"ip addresses" => "ip addresses",
"Slash prefixed comma..." => "Slash prefixed, comma delimited",
"Comma delimited" => "Comma delimited",
"style" => "style",
"theme" => "theme",
"line wrapping" => "line wrapping",
"indent type" => "indent type",
"indent size" => "indent size",
"font size" => "font size",
"layout" => "layout",
"plugin panel aligned" => "plugin panel aligned",
"file manager" => "file manager",
"root" => "root",
"Slash prefixed" => "Slash prefixed",
"bug reporting" => "bug reporting",
"check in files" => "check in files",
"every" => "every",
"secs getting last" => "secs, getting last",
"lines" => "lines",
"multi-user" => "multi-user",
"Make sure you..." => "Make sure you do not lock yourself out",
"Registration" => "Registration",
"auth token" => "auth token",
"Required to get..." => "Required to get diffs, commit to your GitHub hosted repo etc. If you do not have one, you can use a:".PHP_EOL.PHP_EOL.
"- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"It is not recommended you set your token here however and is more secure to enter it when requested by ICEcoder as that will keep it in session only.".PHP_EOL.PHP_EOL.
"However, if you work in a trusted and secure environment, it is more efficient to set it here.",
"Sorry cannot commit..." => "Sorry, cannot commit settings in demo mode",
"update" => "update"
),
"settings-update" =>
array(
"Cannot update config..." => "Cannot update config file. Please set public write permissions on",
"and try again" => "and try again",
"and press refresh" => "and press refresh"
),
"updater" =>
array(
"Update appears to..." => "Update appears to be successful"
)
);
?>

423
lang/french.php Normal file
View File

@@ -0,0 +1,423 @@
<?php
// French language translation
// par: @krisxoofoo (GitHub)
// @kris_fr Twitter)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>Cliquez sur les ic&ocirc;nes<br>pour l&apos;aide &amp;<br>et infos d&apos;utilisation</b>",
"server" => "Serveur",
"Server name, OS..." => "Nom du serveur, OS & IP :",
"Root" => "Racine :",
"ICEcoder root" => "Racine d&apos;ICEcoder :",
"PHP version" => "Version PHP :",
"Date & time" => "Date & heure :",
"your device" => "Votre &eacute;quipement",
"Browser" => "Navigateur :",
"Your IP" => "Votre IP :",
"files" => "Fichiers",
"Last 10 files..." => "10 derniers fichiers ouverts :",
"none" => "[aucun]",
"test suite" => "Suite de test",
"Run unit tests" => "Lancer les tests unit",
"dev mode" => "Mode dev",
"Status" => "Statuts",
"Using" => "Utilise",
"You can switch..." => "Vous pouvez basculer le mode dev on/off
dans lib/config__settings.php",
"results" => "r&eacute;sultats"
),
"files" =>
array(
"Lock" => "Verrouiller",
"Refresh" => "Rafra&icirc;chir",
"ROOT" => "[RACINE]"
),
"index" =>
array(
"UPDATE INFO" => "INFO DE MISE A JOUR",
"now available" => "actuellement disponible",
"Your version is" => "Votre version est la",
"Update now" => "Mettre &agrave; jour maintenant",
"You have some..." => "Vous avez quelques changements non sauvegard&eacute;s",
"working" => "en progression",
"Color picker" => "S&eacute;lecteur de couleur",
"New File" => "Nouveau fichier",
"New Folder" => "Nouveau dossier",
"Upload File(s)" => "T&eacute;l&eacute;charger le(s) Fichier(s)",
"Paste" => "Coller",
"Open" => "Ouvrir",
"Copy" => "Copier",
"Duplicate" => "Dupliquer",
"Delete" => "Effacer",
"Rename" => "Renommer",
"View Webpage" => "Afficher la page web",
"Download" => "T&eacute;l&eacute;charger",
"Properties" => "Propri&eacute;t&eacute;s",
"File" => "Fichier",
"Edit" => "Editer",
"Remote" => "Distant",
"Help" => "Aide",
"Save" => "Enregistrer",
"Save As" => "Enregistrer sous",
"Live Preview" => "Pr&eacute;visualisation",
"Upload" => "T&eacute;l&eacute;charger",
"Zip" => "Compresser",
"Print" => "Imprimer",
"Fullscreen toggle" => "Basculer en mode plein &eacute;cran",
"Logout" => "D&eacute;connexion",
"Undo" => "Annuler",
"Redo" => "Refaire",
"Indent more" => "Plus d&apos;indentation",
"Indent less" => "Moins d&apos;indentation",
"Autocomplete" => "Autocompl&eacute;tion",
"Comment/Uncomment" => "Commenter/D&eacute;commenter",
"Jump to Definition" => "Aller &agrave; la D&eacute;finition",
"Manual" => "Manuel",
"Shortcuts" => "Raccourcis",
"Settings" => "Pr&eacute;f&eacute;rences",
"Search for selected" => "Rechercher pour la s&eacute;lection",
"website" => "Site internet",
"Close all tabs" => "Fermer les onglets",
"Alphabetize tabs" => "Onglets par ordre alphab&eacute;tique",
// "Find" => "Chercher",
// "in" => "dans",
// "and" => "et",
// "replace" => "remplacer",
// "replace all" => "remplacer tout",
// "this document" => "ce document",
// "open documents" => "les documents ouverts",
// "all files" => "tous les fichiers",
// "all filenames" => "tous les noms de fichiers",
"Turn on/off..." => "Basculer on/off l&apos;assistance au code",
"Code Assist" => "Assistance au Code",
"Go to Line" => "Aller &agrave; la ligne",
"View" => "Afficher",
"Bug reporting not active" => "Le signalement de dysfonctionnement n&apos;est pas actif"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "Trouv&eacute; dans :"
),
"file-control" =>
array(
"Sorry" => "D&eacute;sol&eacute;",
"does not seem..." => "ne semble pas exister sur le serveur",
"Sorry, could not..." => "D&eacute;sol&eacute;, impossibilit&eacute; de r&eacute;cup&eacute;rer le contenu de",
"Sorry, cannot create..." => "D&eacute;sol&eacute;, impossibilit&eacute; de cr&eacute;er le dossier sur",
"Sorry, cannot copy" => "D&eacute;sol&eacute;, impossibilit&eacute; de copier",
"into" => "dans",
"Uploaded file(s) OK" => "T&eacute;l&eacute;chargement du (des) fichier(s) r&eacute;ussi(s)",
"Sorry, cannot upload" => "D&eacute;sol&eacute;, impossibilit&eacute; de t&eacute;l&eacute;charger",
"Sorry, cannot upload..." => "D&eacute;sol&eacute;, impossibilit&eacute; de t&eacute;l&eacute;charger en mode d&eacute;mo",
"Sorry, cannot rename" => "D&eacute;sol&eacute;, impossibilit&eacute; de renommer",
"Maybe public write..." => " Peut-&ecirc;tre que les permissions d&apos;&eacute;criture publique sont n&eacute;cessaires sur ce dossier ou son r&eacute;pertoire ?",
"Sorry, cannot move" => "D&eacute;sol&eacute;, impossibilit&eacute; de d&eacute;placer",
"Sorry, cannot save" => "D&eacute;sol&eacute;, impossibilit&eacute; de sauvegarder",
"Sorry, cannot replace..." => "D&eacute;sol&eacute;, impossibilit&eacute; de remplacer le texte dans ",
"Sorry, cannot change..." => "D&eacute;sol&eacute;, impossibilit&eacute; de changer les permissions sur",
"Sorry, cannot delete..." => "D&eacute;sol&eacute;, imossibilit&eacute; de supprimer le dossier racine",
"Sorry, cannot delete" => "D&eacute;sol&eacute;, impossibilit&eacute; d&apos;effacer",
"Sorry, this file..." => "D&eacute;sol&eacute;, le fichier a &eacute;t&eacute; modifi&eacute;, impossibilit&eacute; de sauvegarder",
"Reload this file..." => "Recharger le fichier, et copier votre version dans un nouveau document ?",
"There was a..." => "Un probl&egrave;me technique a &eacute;t&eacute; rencontr&eacute;, probablement quelque chose qui n&apos;&eacute;tait pas tout &agrave; fait pr&ecirc;t. ICEcoder a donc relanc&eacute; &agrave; nouveau son contr&ocirc;le de fichier.",
"displayed at" => "affich&eacute; sur",
"Enter filename to..." => "Saisissez le nom du fichier &agrave; enregistrer sur",
"That file exists..." => "Ce fichier existe d&eacute;j&agrave;, voulez vous l&apos;&eacute;craser ?",
"Saving" => "Sauvegard&eacute;"
),
"get-branch" =>
array(
"There are no..." => "Il n&apos;y a pas de diff&eacute;rences entre le repo local et celui de GitHub. Revenir en mode normal ?",
"Sorry, there was..." => "D&eacute;sol&eacute;, il y avait une erreur, le code :",
"Your local folder..." => " Votre dossier local est vide, voulez-vous le cloner ?"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "D&eacute;sol&eacute;, impossible de cr&eacute;er un dossier dans",
"Cannot update config..." => "Impossibilit&eacute; de mettre &agrave; jour le fichier de configuration. Veuillez v&eacute;rifier les permissions d&apos;&eacute;criture.",
"and try again" => "et essayez de nouveau",
"saving github paths" => "chemins github sauvegard&eacute;s ...",
"github paths" => "chemins github",
"Choose existing path" => "Choisis le chemin existant",
"Local path" => "Chemin local",
"Remote GitHub path" => "Chemin distant GitHub",
"Choose" => "Choisir",
"Set local and..." => "D&eacute;finir le chemin d&apos;acc&egrave;s local et distant &agrave; blanc pour le retirer ",
"Update" => "Mise &agrave; jour",
"Add new path" => "Ajouter un nouveau chemin",
"Add" => "Ajouter",
"Usage Info" => "Info d&apos;utilisation :",
"Enter relative local..." => "Entrez les chemins relatifs locaux (par exemple / serveur / mesfichiers) et les chemins absolus GitHub (par exemple https://github.com/user/repo ou https://github.com/user/repo/tree/branch pour les branches). Avec ceci, vous aurez &eacute;tabli les chemins source sur les deux sites, comme une paire.",
"You can then..." => "Vous pouvez ensuite choisir une paire de chemin, et cela devient alors votre nouveau chemin d&apos;acc&egrave;s racine dans ICEcoder.",
"The file manager..." => "Le gestionnaire de fichiers affiche alors une nouvelle ic&ocirc;ne GitHub, que vous pouvez cliquer dessus pour ex&eacute;cuter et afficher une v&eacute;rification des diff&eacute;rences entre les 2 sources. Ces diff&eacute;rences peuvent &ecirc;tre vers&eacute;es et bascul&eacute;es dans le projet distant GitHub ou clon&eacute;es sur votre version locale du projet, afin de synchroniser vos fichiers.",
"If you want..." => " Si vous souhaitez d&eacute;finir un autre chemin d&apos;acc&egrave;s &agrave; la racine, cela peut &ecirc;tre fait dans l&apos;&eacute;cran des param&egrave;tres."
),
"github" =>
array(
"Sorry, you do..." => "D&eacute;sol&eacute;, vous ne semblez pas avoir OpenSSL charg&eacute; sur votre instance de PHP, https n&apos;est donc pas disponible. Cela est n&eacute;cessaire pour le transfert de donn&eacute;es GitHub, veuillez modifier les param&egrave;tres du fichier php.ini, red&eacute;marrez votre serveur et essayez &agrave; nouveau."
),
"headers" =>
array(
"Bad CSRF token..." => "Mauvais jeton CSRF. S&apos;il vous pla&icirc;t, envoyer un rapport de l&apos;erreur &agrave; https://github.com/mattpass/ICEcoder si vous d&eacute;sirez qu&apos;il soit corrig&eacute;."
),
"help" =>
array(
"shortcuts" => "raccourcis",
"Within document" => "Dans un fichier",
"On Tabs" => "Dans les onglets",
"Within file manager" => "Dans le gestionnaire de fichiers",
"Anywhere" => "N&apos;importe o&ugrave;",
"Space" => "Espace",
"Click" => "Clic",
"or" => "ou",
"Left click" => "Clic gauche",
"Middle click" => "Clic du milieu",
"Double click tap..." => "Double clic / touche (mobile)",
"Right click" => "Clic droit",
"Middle scrollwheel" => "Roulette du milieu",
"Drag" => "Glisser",
"Autocomplete add snippet" => "Saisie semi-automatique / ajouter un extrait",
"Multiple select" => "S&eacute;lection multiple",
"Move line up" => "Aller &agrave; la ligne sup&eacute;rieure",
"Move line down" => "Aller &agrave; la ligne inf&eacute;rieure",
"Duplicate lines" => "Dupliquer la(les) ligne(s)",
"Remove lines" => "Supprimer la(les) ligne(s)",
"Insert line before" => "Ins&eacute;rer un ligne avant",
"Insert line after" => "Ins&eacute;rer une ligne apr&egrave;s",
"Search for selected" => "Rechercher pour la s&eacute;lection",
"Jump to definition" => "Aller &agrave; la d&eacute;finition / revenir en arri&egrave;re",
"Comment uncomment" => "Commenter / D&eacute;commenter",
"Insert tab indent" => "Ins&eacute;rer un tableau / indent selected",
"Wrap with div" => "Plier avec &lt;div&gt;",
"Wrap with span" => "Plier avec &lt;span&gt;",
"Wrap unwrap p" => "Plier / d&eacute;plier avec &lt;p&gt;",
"Wrap unwrap a" => "Plier / d&eacute;plier avec &lt;a&gt;",
"Wrap unwrap b" => "Plier / d&eacute;plier avec &lt;b&gt;",
"Wrap unwrap i" => "Plier / d&eacute;plier avec &lt;i&gt;",
"Wrap unwrap strong" => "Plier / d&eacute;plier avec &lt;strong&gt;",
"Wrap unwrap em" => "Plier / d&eacute;plier avec &lt;em&gt;",
"Wrap unwrap h1..." => "Plier / d&eacute;plier avec &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "Fin de ligne avec &lt;br&gt;",
"Close tab" => "Fermer l&apos;onglet",
"Select file folder" => "S&eacute;lectionner fichier / dossier",
"Open file" => "Ouvrir le fichier",
"Range select" => "S&eacute;lection de la plage",
"Options for selected" => "Options pour s&eacute;lectionner",
"Delete selected" => "Suppression de la s&eacute;lection",
"Next previous tab" => "Onglet suivant / pr&eacute;c&eacute;dent",
"Next tab" => "Onglet suivant",
"Previous tab" => "Onglet pr&eacute;c&eacute;dent",
"New tab" => "Nouvel onglet",
"Close current tab" => "Fermer l&apos;onglet courant",
"Open file prompt" => "Ouvrir une invite de fichier",
"Find" => "Chercher",
"Focus on Go..." => " Focus sur le d&eacute;but de ligne",
"Save" => "Enregistrer",
"Save as" => "Enregistrer sous...",
"View webpage" => "Afficher la page web",
"Contract expand file..." => "R&eacute;duire / agrandir le gestionnaire de fichiers",
"Fold unfold current..." => "Plier / d&eacute;plier la ligne courante",
"Refocus on document" => "Revenir sur le document",
"Cancel tasks" => "Quitter les tâches"
),
"ice-coder" =>
array(
"No text selected..." => "Aucun texte s&eacute;lectionn&eacute; pour la recherche sur",
"Creating Folder" => "r&eacute;ation de dossier",
"Sorry you can..." => "D&eacute;sol&eacute;, vous ne pouvez pas avoir plus de 100 fichiers ouverts en m&ecirc;me temps !",
"Opening File" => "Ouverture de fichier",
"Enter relative file..." => "Entrez le chemin relatif du fichier (pr&eacute;fix&eacute; avec un /) ou l&apos;URL distante",
"Getting" => "Obtention",
"Please enter the..." => "S&apos;il vous plait, saisissez le nouveau nom pour",
"Renaming to" => "Renomm&eacute; en",
"Moving to" => "D&eacute;plac&eacute; vers",
"Deleting File" => "Suppression fichier",
"Pasting File" => "Collage fichier",
"Sorry cannot paste..." => "D&eacute;sol&eacute;, il n&apos;est pas possible de coller une racine",
"Nothing to paste..." => "Rien &agrave; coller, copiez un fichier/dossier en premier !",
"Replacing text in" => "Remplacement de texte dans",
"Cancelled tasks" => "Tâches annul&eacute;s",
"Open previous files" => "Ouvrir les fichiers pr&eacute;c&eacute;dents ?",
"Please enter your..." => "S&apos;il vous pla&icirc;t entrez votre token GitHub (soit l&apos;acc&egrave;s par token personnel ou le token client / paire secr&egrave;te). Voir l&apos;info-bulle &agrave; c&ocirc;t&eacute; de Github Auth Token sur &eacute;cran Aide> Param&egrave;tres pour plus d&apos;infos",
"This will compare..." => "Ceci compare et montre une vue des diff&eacute;rences entre votre r&eacute;pertoire local et le repo. D&apos;accord ?",
"Please note for..." => "S&apos;il vous pla&icirc;t, noter : la mise &agrave; jour fonctionne correctement, vous devez avoir les permissions d&apos;&eacute;criture / suppression &agrave; tous les r&eacute;pertoires et fichiers d&apos;ICEcoder. Si vous avez besoin de r&eacute;cup&eacute;rer cette version d&apos;ICEcoder pour une raison quelconque, vous la trouverez dans le r&eacute;pertoire / tmp. Cliquez sur OK pour proc&eacute;der &agrave; une mise &agrave; jour automatique, ou annuler et visiter le site d&apos;ICEcoder de sorte que vous pouvez r&eacute;cup&eacute;rer le fichier zip et mettre &agrave; jour manuellement.",
"You can start..." => "Vous pouvez reporter un dysfonctionnement dans Aide > Pr&eacute;f&eacute;rences",
"Error cannot find..." => "Erreur : ne peut pas trouver / acc&eacute;der aux chemins des fichiers d&apos;erreur",
"No new errors..." => "Aucune nouvelle erreur trouv&eacute;e",
"You have made..." => "Vous avez r&eacute;alis&eacute; des modifications. Etes vous sûr(e) de d&eacute;sirer quitter sans sauvegarder ?",
"Close all tabs" => "Fermer tous les onglets?"
),
"login" =>
array(
"set password" => "D&eacute;finir un mot de passe",
"login" => "Connexion",
"To disable registration..."=> "Pour d&eacute;sactiver le mode &apos;enregsitrement&apos;, ouvrir le menu des pr&eacute;f&eacute;rences ou le fichier lib/config___settings.php et modifier enableRegistration &agrave; &apos;false&apos;, puis recharger cette page",
"Registration mode enabled" => "Mode Enregistrement activ&eacute;",
"auto-check for updates" => "V&eacute;rification automatique des mises &agrave; jour",
"To put into..." => "Pour passer en mode &apos;multi-utilisateur&apos;, ouvrir le menu des pref&eacute;rences ou le ifchier lib/config___settings.php et modifier multiUser &agrave; &apos;true&apos;, puis recharger cette page",
"multi-user" => "Multi-utilisateur"
),
"multiple-results" =>
array(
"rename all" => "Tout renommer",
"replace all" => "Tout remplacer",
"document" => "document",
"Found" => "trouv&eacute;",
"times" => "date",
"replace" => "remplacer",
"file folder" => "fichier/dossier",
"rename to" => "renommer en",
"rename" => "renommer",
"file" => "fichier",
"No matches found" => "Aucun r&eacute;sultat de trouver",
"selected" => "s&eacute;lectionn&eacute;",
"found in" => "trouv&eacute; dans",
"Replaced" => "Remplac&eacute;"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder a besoin d&apos;&ecirc;tre recharg&eacute; pour rendre ce plugin utilisable. Le faire maintenant ?",
"saving plugins" => "sauvegarde des plugins ...",
"Cannot update config..." => "Impossibilit&eacute; de mettre &agrave; jour le fichier de configuration. V&eacute;rifiez les permissions d&apos;&eacute;criture",
"and try again" => "et essayez de nouveau",
"couldnt delete dir" => "ne peut pas effacer le dossier",
"couldnt delete file" => "ne peut pas effacer le fichier",
"plugins" => "plugins",
"Guide to writing..." => "Guide pour &eacute;crire des plugins",
"Manage Installed" => "Gestionnaire install&eacute;",
"URL" => "URL",
"Target" => "Cible",
"Timer" => "Compteur",
"Update" => "Mise &agrave; jour",
"Install" => "Installation",
"Uninstall" => "D&eacute;sinstallation",
"Reload after install..." => "Une reconnexion est n&eacute;cessaire apr&egrave;s l&apos;installation"
),
"properties" =>
array(
"properties" => "propri&eacute;t&eacute;s",
"Size" => "Taille",
"Modified" => "Derni&egrave;re modification",
"Last access" => "Dernier acc&egrave;s",
"Type" => "Type",
"Readable Writeable" => "Lisible / Inscriptible",
"Relative path" => "Chemin relatif",
"Absolute path" => "Chemin absolute",
"Contains" => "Contenu",
"Permissions" => "Permissions",
"Owner" => "Propri&eacute;taire",
"Group" => "Groupe",
"Public" => "Public",
"Read" => "Lire",
"Write" => "Ecrire",
"Execute" => "Ex&eacute;cuter",
"Change to" => "Modifier en",
"update" => "mise &agrave; jour"
),
"settings-common" =>
array(
"Your document does..." => "Votre document ne semble pas &ecirc;tre en UTF-8 et a donc &eacute;t&eacute; converti"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "Impossibilit&eacute; de mettre &agrave; jour le fichier de configuration. V&eacute;rifiez les permissions d&apos;&eacute;criture sur celui-ci",
"and try again" => "et essayez de nouveau"
),
"settings-screen" =>
array(
"settings" => "pr&eacute;f&eacute;rences",
"version" => "version",
"website" => "Site internet",
"git" => "git",
"codemirror dir" => "chemin de codemirror",
"codemirror version" => "version de codemirror ",
"file manager root" => "racine du gestionnaire de fichiers",
"Free to use..." => "Libre de l&apos;utiliser pour vos propres fins, commerciales ou non, faites moi juste savoir de toute utilisation sympa ou personnalisations. :)<br><br>Aucune garantie ou responsabilit&eacute; est accept&eacute;es de notre part, toute responsabilit&eacute; d&apos;utilisation est de votre ressort.<br><br>De nombreuses personnes fantastiques et d&apos;entreprises ont contribu&eacute; &agrave; r&eacute;aliser ICEcoder et il est important de les remercier ici. S&apos;il vous pla&icirc;t, parcourez la liste compl&egrave;te sur",
"functionality" => "fonctionnalit&eacute;s",
"check for updates..." => "V&eacute;rifier les mises &agrave; jour",
"auto open last..." => "affichage des derniers fichiers",
"when finding in..." => "extension à exclure des recherches",
"assisting" => "assistant",
"code assist" => "Assistance de code",
"visible tabs" => "onglets visibles",
"locked nav" => "navigation v&eacute;rouill&eacute;e",
"tag wrapper command" => "commande de tag",
"auto-complete on" => "auto-complétion sur",
"security" => "s&eacute;curit&eacute;",
"new password" => "nouveau mot de passe",
"8 chars min" => "8 caract&egrave;res minimum",
"confirm password" => "confirmation du mot de passe",
"banned files/folders" => "fichiers/dossiers bannis",
"banned paths" => "chemins bannis",
"ip addresses" => "adresses ip",
"Slash prefixed comma..."=> "Slash pr&eacute;fix&eacute;, s&eacute;par&eacute;es par des virgules",
"Comma delimited" => "D&eacute;limit&eacute; par des virgules",
"style" => "style",
"theme" => "th&egrave;me",
"line wrapping" => "retour &agrave; la ligne",
"indent type" => "indent type",
"indent size" => "indent size",
"font size" => "font size",
"layout" => "disposition",
"plugin panel aligned" => "panneau des plugins align&eacute;",
"file manager" => "gestionnaire de fichiers",
"root" => "racine",
"Slash prefixed" => "Slash pr&eacute;fix&eacute;",
"bug reporting" => "Rapport de dysfonctionnement",
"check in files" => "v&eacute;rifier dans les fichiers",
"every" => "chaque",
"secs getting last" => "secondes, obtenir le dernier",
"lines" => "lignes",
"multi-user" => "multi-utilisateurs",
"Make sure you..." => "Assurez-vous que vous ne vous bloquez pas sur",
"Registration" => "Enregistrement",
"auth token" => "auth token",
"Required to get..." => "N&eacute;cessaire pour obtenir les diffs, proc&eacute;der &agrave; un commit sur votre projet sous GitHub. Si vous n&apos;en avez pas, vous pouvez utiliser un :".PHP_EOL.PHP_EOL.
"- jeton/token d&apos;acc&egrave;s personel (https://help.github.com/articles/creating-an-access-token-for-command-line-use), ou un jeton/token ".PHP_EOL.
" client/paire secr&egrave;te (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"Il n&apos;est pas recommand&eacute; de d&eacute;finir votre jeton ici, cependant, il est plus sûr de l&apos;entrer &agrave; la demande d&apos;ICEcoder car cela le garde uniquement en session.".PHP_EOL.PHP_EOL.
"Cependant, si vous travaillez dans un environnement fiable et s&eacute;curis&eacute;, il est plus efficace de le mettre ici.",
"Sorry cannot commit..." => "D&eacute;sol&eacute;, vous ne pouvez pas modifier les pr&eacute;f&eacute;rences en mode de d&eacute;monstration",
"update" => "Mise &agrave; jour"
),
"settings-update" =>
array(
"Cannot update config..." => "Impossibilit&eacute; de mettre &agrave; jour le fichier de configuration. V&eacute;rifiez les permissions d&apos;&eacute;criture sur celui-ci",
"and try again" => "et essayez de nouveau",
"and press refresh" => "et pressez le rafra&icirc;chissement de la page"
),
"updater" =>
array(
"Update appears to..." => "La mise &agrave; jour semble s&apos;&ecirc;tre r&eacute;alis&eacute;e avec succ&egrave;s"
)
);
?>

396
lang/german.php Normal file
View File

@@ -0,0 +1,396 @@
<?php
// German language translation
// by: @olliiee (GitHub)
// @trolliusgigant (Twitter)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>Klick auf das Icon<br>f&uuml;r Hilfe &amp;<br>Anwendungsbeispielen</b>",
"server" => "Server",
"Server name, OS..." => "Servername, OS & IP:",
"Root" => "Root:",
"ICEcoder root" => "ICEcoder root:",
"PHP version" => "PHP Version:",
"Date & time" => "Datum & Uhrzeit:",
"your device" => "Dein Gerät",
"Browser" => "Browser:",
"Your IP" => "Deine IP:",
"files" => "Dateien",
"Last 10 files..." => "Die letzten 10 ge&ouml;ffneten Dateien:",
"none" => "[nichts]",
"test suite" => "Test Suite",
"Run unit tests" => "Unittest starten",
"dev mode" => "Entwicklermodus",
"Status" => "Status",
"Using" => "Verwenden",
"You can switch..." => "Du kannst den Entwicklermodus in der in lib/config__settings.php ein- und ausschateln",
"results" => "Ergebnis"
),
"files" =>
array(
"Lock" => "Sperren",
"Refresh" => "Erneueren",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "Update Infos",
"now available" => "jetzt verf&uuml;gbar",
"Your version is" => "Deine Version ist",
"Update now" => "Aktualisiere jetzt",
"You have some..." => "Du hast einige nicht gespeicherete Datein",
"working" => "arbeite",
"Color picker" => "Farbauswahl",
"New File" => "Neue Datei",
"New Folder" => "Neuer Ordner",
"Upload File(s)" => "Dateie(n) hochladen",
"Paste" => "Einf&uuml;gen",
"Open" => "&Ouml;ffnen",
"Copy" => "Kopiere",
"Duplicate" => "Duplizieren",
"Delete" => "L&ouml;schen",
"Rename" => "Umbenennen",
"View Webpage" => "Webseite anzeigen",
"Download" => "Herunterladen",
"Properties" => "Einstellungen",
"File" => "Datei",
"Edit" => "Editieren",
"Remote" => "Fernzugriff",
"Help" => "Hilfe",
"Save" => "Speichern",
"Save As" => "Speichern als",
"Live Preview" => "Live Vorschau",
"Upload" => "Hochladen",
"Zip" => "Zip",
"Print" => "Drucken",
"Fullscreen toggle" => "Vollbildmodus wechseln",
"Logout" => "Ausloggen",
"Undo" => "R&uuml;ckg&auml;ngig",
"Redo" => "Wiederherstellen",
"Indent more" => "Einzug vergr&ouml;&szlig;ern",
"Indent less" => "Einzug verkleinern",
"Autocomplete" => "Auto vervollst&auml;ndigen",
"Comment/Uncomment" => "Kommentieren/Auskommentieren",
"Jump to Definition" => "Springe zur Definition",
"Manual" => "Anleitung",
"Shortcuts" => "Schnellzugriffe",
"Settings" => "Einstellungen",
"Search for selected" => "Nach selektiertem suchen",
"website" => "Website",
"Close all tabs" => "Alle Tabs schlie&szlig;en",
"Alphabetize tabs" => "Tabs alphabetisch sortieren",
// "Find" => "Finden",
// "in" => "in",
// "and" => "und",
// "replace" => "ersetzen",
// "replace all" => "alle ersetzen",
// "this document" => "dieses Dokument",
// "open documents" => "ge&ouml;ffnete Dokumente",
// "all files" => "Alle Dateien",
// "all filenames" => "Alle Dateinamen",
"Turn on/off..." => "Codeassistenten ein- ausschalten",
"Code Assist" => "Codeassistent",
"Go to Line" => "Geh zur Zeile",
"View" => "Anzeigen",
"Bug reporting not active" => "Fehlermeldungen sind nicht aktiv"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "Gefunden in:"
),
"file-control" =>
array(
"Sorry" => "Entschuldigung",
"does not seem..." => "Es scheint auf dem Server nicht zu existieren",
"Sorry, could not..." => "Entschuldigung, kann den Inhalte von",
"Sorry, cannot create..." => "Entschuldigung, kann den Ordner nicht erstellen in",
"Sorry, cannot copy" => "Entschuldigung, kann nicht kopieren",
"into" => "in",
"Uploaded file(s) OK" => "Hoch geladene Datei(n) OK",
"Sorry, cannot upload" => "Entschuldigung, kann nicht hochladen",
"Sorry, cannot upload..." => "Entschuldigung, kann solange nicht hochladen, solange der Demo Modus aktiv ist",
"Sorry, cannot rename" => "Entschuldigung, kann nicht umbenennen",
"Maybe public write..." => "Vielleicht fehlen Schreibrechte auf dem &uuml;bergeordneten Ordner?",
"Sorry, cannot move" => "Entschuldigung, kann nicht verschieben",
"Sorry, cannot save" => "Entschuldigung, kann nicht speichern",
"Sorry, cannot replace..." => "Entschuldigung, kann den Text nicht ersetzen",
"Sorry, cannot change..." => "Entschuldigung, kann die Berechtigung nicht &auml;ndern f&uuml;r",
"Sorry, cannot delete..." => "Entschuldigung, kann das Hauptverzeichnis nicht l&ouml;schen",
"Sorry, cannot delete" => "Entschuldigung, kann nicht l&ouml;schen",
"Sorry, this file..." => "Entschuldigung, die Datei wurde ge&auml;ndert, kann nicht speichern",
"Reload this file..." => "Soll die Datei mit deiner neueren Version neu geladen werden?",
"There was a..." => "Irgend was ist schief gelaufen. ICEcoder l&auml;dt einfach noch mal neu.",
"displayed at" => "angezeigt bei",
"Enter filename to..." => "Dateinamen eingeben um es zu speichern",
"That file exists..." => "Die Datei existiert bereits, &uuml;berschreiben?",
"Saving" => "Speichere"
),
"get-branch" =>
array(
"There are no..." => "Es gibt keinen Unterschied zwischen der lokalen Datei und dem im GitHub Repo. Zur&uuml;ck zum regul&auml;ren Modus?",
"Sorry, there was..." => "Entschuldigung, es ist ein Fehler aufgetreten. Fehlercode:",
"Your local folder..." => "Dein lokales Verzeichnis ist leer, soll es geklont werden"
),
"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",
"and try again" => "und versuch es noch einmal",
"saving github paths" => "Speichere GitHub Pfad ...",
"github paths" => "GitHub Pfad",
"Choose existing path" => "W&auml;hle existierenden Pfad",
"Local path" => "Lokaler Pfad",
"Remote GitHub path" => "Ferner GitHub Pfad",
"Choose" => "Wh&auml;hle",
"Set local and..." => "L&ouml;sch lokalen und fernen Pfad",
"Update" => "Aktualisieren",
"Add new path" => "Neuen Pfad hinzuf&uuml;gen",
"Add" => "Hinfzuf&uuml;gen",
"Usage Info" => "Infos zur Verwendung:",
"Enter relative local..." => "Gib den relativen, lokalen Pfad (z.B. /server/meineDateien) und absoluten GitHub Pfad (z.B. https://github.com/user/repo oder https://github.com/user/repo/tree/branch f&uuml;r branches), wie im Beispiel an. Dadurch werden die entsprechenden Quellverzeichnisse als Paar angelegt.",
"You can then..." => "Du kannst ein Paar ausw&auml;hlenn, welches als neues Root Verzeichnis in ICECoder festgelegt wird.",
"The file manager..." => "Im Dateimanager erscheint ein GitHub Icon. Durch einen Klick auf das Icon, werden die Unterschiede zwischen beiden Versionen angezeigt. Diese Unterschiede können committed und zum GitHub Repo gepusht, oder zum lokale Pfad geklont werden.",
"If you want..." => "Soll ein weiterers Hauptverzeichnis gesetzt werden, kann dies in den Einstellungen vorgenommen werden."
),
"github" =>
array(
"Sorry, you do..." => "Es scheint so, als sei OpenSSL nicht mit PHP geladen worden, dadurch steht https nicht zur verf&uuml;gung. Dies wird jedoch f&uuml;r den Datentransfer zu GitHub ben&ouml;tigt. Bitte die PHP.ini entsprechend anpassen und neu starten."
),
"headers" =>
array(
"Bad CSRF token..." => "Fehlerhafter CSRF Token. Bitte den Fehler an https://github.com/mattpass/ICEcoder damit das Problem gel&ouml;st werden kann."
),
"help" =>
array(
"shortcuts" => "shortcuts",
"Within document" => "Innerhalb des Dokuments",
"On Tabs" => "Ge&ouml;ffnete Tabs",
"Within file manager" => "Innerhalb des Dateimanagers",
"Anywhere" => "&Uuml;berall",
"Space" => "Leerzeichen",
"Click" => "Klick",
"or" => "oder",
"Left click" => "Linksklick",
"Middle click" => "mittlerer Klick",
"Double click tap..." => "Doppelklick / Tap (Mobile)",
"Right click" => "Rechtsklick",
"Middle scrollwheel" => "mittleres Mausrad",
"Drag" => "Ziehen",
"Autocomplete add snippet" => "Autocomplete / snippet hinzuf&uuml;gen",
"Multiple select" => "Mehrfachauswahl",
"Move line up" => "Zeile h&ouml;her",
"Move line down" => "Zeile runter",
"Duplicate lines" => "Zeile(n) duplizieren",
"Remove lines" => "Zeile(n) entfernen",
"Insert line before" => "Zeile vorher einf&uuml;gen",
"Insert line after" => "Zeile danach ein&uuml;gen",
"Search for selected" => "Nach dem gesuchten ausw&auml;hlen",
"Jump to definition" => "Zur Definition springen / zur&uml;ck springen",
"Comment uncomment" => "Kommentieren / Auskommentieren",
"Insert tab indent" => "Tab einf&uuml;gen / Gedankenstrich selektiert",
"Wrap with div" => "Mit &lt;div&gt; umschlie&szlig;en",
"Wrap with span" => "Mit &lt;span&gt; umschlie&szlig;en",
"Wrap unwrap p" => "Umschlie&szlig;en / unwrap with &lt;p&gt;",
"Wrap unwrap a" => "Umschlie&szlig;en / Mit &lt;a&gt; auschlie&szlig;en",
"Wrap unwrap b" => "Umschlie&szlig;en / Mit &lt;b&gt; auschlie&szlig;en",
"Wrap unwrap i" => "Umschlie&szlig;en / Mit &lt;i&gt; auschlie&szlig;en",
"Wrap unwrap strong" => "Umschlie&szlig;en / Mit &lt;strong&gt; auschlie&szlig;en",
"Wrap unwrap em" => "Umschlie&szlig;en / Mit &lt;em&gt; auschlie&szlig;en",
"Wrap unwrap h1..." => "Umschlie&szlig;en / Mit &lt;h1&gt; - &lt;h3&gt; auschlie&szlig;en",
"End line with..." => "Zeile abschlie&szlig; mit &lt;br&gt;",
"Close tab" => "Tab schlie&szlig;en",
"Select file folder" => "Datei / Verzeichnis aus&auml;hlen",
"Open file" => "Datei &ouml;ffnen",
"Range select" => "Bereich ausw&auml;hlen",
"Options for selected" => "Optionen f&uuml;r ausgew&auml;hlte",
"Delete selected" => "Ausgew&auml;hlte l&ouml;schen",
"Next previous tab" => "N&auml;chster / Vorheriger Tab",
"Next tab" => "N&auml;chster Tab",
"Previous tab" => "Vorheriger Tab",
"New tab" => "Neuer Tab",
"Close current tab" => "Aktuellen Tab schlie&szlig;en",
"Open file prompt" => "Datei &ouml;ffnen Dialog anzeigen",
"Find" => "Finden",
"Focus on Go..." => "Fokus auf Gehe zu Zeile Feld setzen",
"Save" => "Speichern",
"Save as" => "Speichern als ...",
"View webpage" => "Webseite anzeigen",
"Contract expand file..." => "Alle Dateien / Verzeichnisse anzeigen",
"Fold unfold current..." => "Aktuelle Zeile einklappen",
"Refocus on document" => "Erneut den Fokus auf das Dokument setzen",
"Cancel tasks" => "Vorgang abbrechen"
),
"login" =>
array(
"set password" => "Passwort setzen",
"login" => "Login",
"To disable registration..." => "Um den Registrierungsmodus zu deaktivieren, &ouml;ffne im Men&uuml; die Einstellungen oder die Datein lib/config___settings.php und setze unter enableRegistration auf false, danach lade die Seite erneut.",
"Registration mode enabled" => "Registrierungsmodus aktiviert",
"auto-check for updates" => "Automatisch nach Update suchen",
"To put into..." => "Um den Mehrbenutzermodus zu aktivieren, &ouml;ffne im Men&uuml; die Einstellungen oder die Datein lib/config___settings.php und setze unter multiUser auf true, danach lade die Seite erneut",
"multi-user" => "Mehrbenutzermodus"
),
"multiple-results" =>
array(
"rename all" => "Alle umbenennen",
"replace all" => "Alle ersetzen",
"document" => "Dokument",
"Found" => "Gefunden",
"times" => "",
"replace" => "ersetzen",
"file folder" => "Datei/Verzeichnis",
"rename to" => "Umbenennen nach",
"rename" => "Umbenennen",
"file" => "Datei",
"No matches found" => "Nichts gefunden",
"selected" => "Ausgew&auml;hlte",
"found in" => "Gefunden in",
"Replaced" => "Ersetzen"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder muss neu geladen werden, damit das Plugin genutzt werden kann. Jetzt neu laden?",
"saving plugins" => "speicher 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&ouml;schen",
"couldnt delete file" => "kann Datei nicht l&ouml;schen",
"plugins" => "Plugins",
"Guide to writing..." => "Anleitung zum erstellen von Plugins",
"Manage Installed" => "Gef&uuml;hrte Installtion",
"URL" => "URL",
"Target" => "Ziel",
"Timer" => "Timer",
"Update" => "Update",
"Install" => "Installieren",
"Uninstall" => "Deinstallieren",
"Reload after install..." => "Neuladen nach der Installation erforderlich"
),
"properties" =>
array(
"properties" => "Eigenschaften",
"Size" => "Gr&ouml;&szlig;e",
"Modified" => "Ver&auml;ndert",
"Last access" => "Letzter Zugriff",
"Type" => "Typ",
"Readable Writeable" => "Lesbar / Schreibbar",
"Relative path" => "Relativer Pfad",
"Absolute path" => "Absoluter Pfad",
"Contains" => "Beinhaltet",
"Permissions" => "Berechtigungen",
"Owner" => "Besitzer",
"Group" => "Gruppe",
"Public" => "&Ouml;ffentlich",
"Read" => "Lesen",
"Write" => "Schreiben",
"Execute" => "Ausf&uuml;hren",
"Change to" => "&Auml;ndern um",
"update" => "aktualisieren"
),
"settings-common" =>
array(
"Your document does..." => "Das Dokument scheint nicht in UTF-8 codiert zu sein, darum wurde es angepasst"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "Kann Konfigurationsdatei nicht aktualisieren. Bitte Schreibrechte vergeben",
"and try again" => "und versuch es noch mal"
),
"settings-screen" =>
array(
"settings" => "Einstellungen",
"version" => "Version",
"website" => "Website",
"git" => "git",
"codemirror dir" => "gespiegeltes Verzeichnis",
"codemirror version" => "gespiegelte Version",
"file manager root" => "Grundverzeichnis vom Dateimanager",
"Free to use..." => "Kostenfrei nutzbar, kommerziell oder nicht. Gebt mir Bescheid &uuml;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&auml;ndige Liste gibt es unter",
"functionality" => "Funktionalit&auml;t",
"check for updates..." => "Bei jedem Ladem nach Updates suchen",
"auto open last..." => "Lade automatisch alle zuletzt ge&ouml;ffneten Datein beim Login",
"when finding in..." => "bei der Suche in Dateien ausschlie&szlig;en",
"assisting" => "assestieren",
"code assist" => "Codeassistent",
"visible tabs" => "sichtbare Tabs",
"locked nav" => "gesperrte Navigation",
"tag wrapper command" => "Tag f&uuml;r Wrapper Kommando setzen",
"auto-complete on" => "auto-complete an",
"security" => "Sicherheit",
"new password" => "neues Passwort",
"8 chars min" => "8 Zeichen mindestens",
"confirm password" => "Passwort best&auml;tigen",
"banned files/folders" => "verbannte Dateien/Verzeichnisse",
"banned paths" => "verbannte Verzeichnisse",
"ip addresses" => "IP Adressen",
"Slash prefixed comma..." => "Schr&auml;gstrich vorangestellt, durch Komma getrennt",
"Comma delimited" => "Komma getrennt",
"style" => "Style",
"theme" => "Theme",
"line wrapping" => "Zeilenumbruch",
"indent type" => "Gedankenstrich Typ",
"indent size" => "Gr&ouml;&szlig;e Gedankenstrich",
"font size" => "Schriftgr&ouml;&szlig;e",
"layout" => "Layout",
"plugin panel aligned" => "Plugin-Panel ausgerichtet",
"file manager" => "Dateimanager",
"root" => "Stamm",
"Slash prefixed" => "Schr&auml;gstrich vorangestellt",
"bug reporting" => "Fehlermeldung",
"check in files" => "Dateien einchecken",
"every" => "jeden",
"secs getting last" => "Sekunden, immer zuletzt",
"lines" => "Zeilen",
"multi-user" => "Mehrbenutzer",
"Make sure you..." => "Sei sicher, dass du dich nicht selber aussperrst",
"Registration" => "Registrieren",
"auth token" => "Authetifizierungs-Token",
"Required to get..." => "Notwendig f&uuml;r diffs, commits des bei GitHub gehosteten Repository usw.. Wenn du keinen hast, kannst du einen:".PHP_EOL.PHP_EOL.
"- pers&ouml;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.
"Es ist nicht zu empfehlen den Token hier zu speichern, sondern wenn ICEcoder dazu auffordert. Dadurch gilt der Token immer nur pro Sitzung.".PHP_EOL.PHP_EOL.
"Jedoch, wenn du in einer sicheren und vertrauensvollen Umgebung (privater PC, Laptop, ..) arbeitest, ist es Sinnvoll ihn hier einzugeben.",
"Sorry cannot commit..." => "Entschuldigung, kann Einstellungen im Demo-Modus nicht &uuml;bernehmen",
"update" => "aktualisieren"
),
"settings-update" =>
array(
"Cannot update config..." => "Kann Konfigurationsdatei nicht aktualisieren. Bitte Schreibrechte vergeben",
"and try again" => "und versuch es noch einmal",
"and press refresh" => "und dr&uuml;ck Neu laden"
),
"updater" =>
array(
"Update appears to..." => "Update scheint erolgreich gelaufen zu sein"
)
);
?>

121
lang/italian.php Normal file
View File

@@ -0,0 +1,121 @@
<?php
// Italian language translation
// by: @luciorota (GitHub)
// @luciorota (lucio.rota@gmail.com)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>Clicca le icone<br>per l&#39;aiuto &amp;<br>la guida</b>",
"server" => "server",
"Server name, OS..." => "Nome server, Sistema operativo e indirizzo IP...",
"Root" => "Root:",
"ICEcoder root" => "ICEcoder root:",
"PHP version" => "Versione PHP:",
"Date & time" => "Data & ora:",
"your device" => "dispositivo in uso",
"Browser" => "Browser:",
"Your IP" => "Indirizzo IP:",
"files" => "file",
"Last 10 files..." => "Ultimi 10 file aperti:",
"none" => "[nessuno]",
"test suite" => "prova suite",
"Run unit tests" => "Eseguire i test di unità",
"dev mode" => "modalit&agrave; sviluppo",
"Status" => "Stato",
"Using" => "Utilizzo",
"You can switch..." => "&Egrave; possibile attivare/disattivare la modalit&agrave; sviluppo nel file lib/config__settings.php",
"results" => "risultati"
),
"files" =>
array(
"Lock" => "Blocca",
"Refresh" => "Aggiorna",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "INFORMAZIONI AGGIORNAMENTO",
"now available" => "disponibile ora",
"Your version is" => "La tua versione &egrave;",
"Update now" => "Aggiorna ora",
"You have some..." => "Ci sono modifiche non salvate",
"working" => "working",
"Color picker" => "Selettore colore",
"New File" => "Nuovo file",
"New Folder" => "Nuova cartella",
"Upload File(s)" => "Carica File",
"Paste" => "Incolla",
"Open" => "Apri",
"Copy" => "Copia",
"Duplicate" => "Duplica",
"Delete" => "Elimina",
"Rename" => "Rinomina",
"View Webpage" => "Visualizza la pagina Web",
"Download" => "Scarica",
"Properties" => "Propiet&agrave;",
"File" => "File",
"Edit" => "Modifica",
"Remote" => "Remoto",
"Help" => "Aiuto",
"Save" => "Salva",
"Save As" => "Salva come...",
"Live Preview" => "Anteprima",
"Upload" => "Carica",
"Zip" => "Comprimi...",
"Print" => "Stampa",
"Fullscreen toggle" => "Modo schermo pieno",
"Logout" => "Logout",
"Undo" => "Annulla",
"Redo" => "Riesegui",
"Indent more" => "Aumenta rientro",
"Indent less" => "Riduci rientro",
"Autocomplete" => "Autocompleta",
"Comment/Uncomment" => "Commenta/Rimuovere il commento",
"Jump to Definition" => "Vai alla Definizione",
"Manual" => "Manuale",
"Shortcuts" => "Scorciatorie",
"Settings" => "Configurazione",
"Search for selected" => "Cerca selezionato",
"website" => "sito web",
"Close all tabs" => "Chiudi tutte le schede",
"Alphabetize tabs" => "Ordina schede",
// "Find" => "Trova",
// "in" => "in",
// "and" => "e",
// "replace" => "sostituisci",
// "replace all" => "sostituisci tutto",
// "this document" => "questo documento",
// "open documents" => "apri documenti",
// "all files" => "tutti i file",
// "all filenames" => "titti i nomi",
"Turn on/off..." => "Attiva/disattiva code assist",
"Code Assist" => "Code Assist",
"Go to Line" => "Vai alla riga",
"View" => "Visualizza",
"Bug reporting not active" => "Segnalazione bug non attiva"
),
// /LIB
"login" =>
array(
"set password" => "imposta password",
"login" => "login",
"To disable registration..." => "Per disabilitare la Modalit&agrave; registrazione, utilizza il menu di configurazione oppure apri il file lib/config___settings.php, modifica enableRegistration a false e ricarica questa pagina",
"Registration mode enabled" => "Modalit&agrave; registrazione attivata",
"auto-check for updates" => "verifica automaticamente per aggiornamenti",
"To put into..." => "Per attivare la Modalit&agrave; multi-utente, utilizza il menu di configurazione oppure apri il file lib/config___settings.php, modifica multiUser a true e ricarica questa pagina",
"multi-user" => "multi-utente"
)
);
?>

425
lang/norwegian.php Normal file
View File

@@ -0,0 +1,425 @@
<?php
// Norwegian language translation
// by: @koseelg (GitHub)
// @koseelg (Twitter)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>Klikk p&aring; ikoner<br>for hjelp &amp;<br>bruk av info</b>",
"server" => "server",
"Server name, OS..." => "Server navn, OS & IP:",
"Root" => "Root:",
"ICEcoder root" => "ICEcoder root:",
"PHP version" => "PHP versjon:",
"Date & time" => "Dato & tid:",
"your device" => "din enhet",
"Browser" => "Nettleser:",
"Your IP" => "Din IP:",
"files" => "filer",
"Last 10 files..." => "Siste 10 &aring;pne filer:",
"none" => "[none]",
"test suite" => "test suite",
"Run unit tests" => "Kj&oslash; unit tests",
"dev mode" => "utvikler modus",
"Status" => "Status",
"Using" => "Brukes",
"You can switch..." => "Du kan sl&aring; utvikler modus p&aring;/av i lib/config__settings.php",
"results" => "resultater"
),
"files" =>
array(
"Lock" => "Steng",
"Refresh" => "Last igjen",
"ROOT" => "[ROOT]"
),
"index" =>
array(
"UPDATE INFO" => "UPDATE INFO",
"now available" => "N&aring; tilgjengelig",
"Your version is" => "Din versjon er",
"Update now" => "Oppdater n&aring;",
"You have some..." => "Du har noe ulagrede endringer",
"working" => "arbeider",
"Color picker" => "Fargevelger",
"New File" => "Ny Fil",
"New Folder" => "Ny Mappe",
"Upload File(s)" => "Last opp Fil(er)",
"Paste" => "Lim inn",
"Open" => "&Aring;pne",
"Copy" => "Kopier",
"Duplicate" => "Duplikat",
"Delete" => "Slett",
"Rename" => "Gi annet navn",
"View Webpage" => "Vis Webside",
"Download" => "Last ned",
"Properties" => "Egenskaper",
"File" => "Fil",
"Edit" => "Redigere",
"Remote" => "Ekstern",
"Help" => "Hjelp",
"Save" => "Lagre",
"Save As" => "Lagre Som",
"Live Preview" => "Direkte Forh&aring;ndsvisning",
"Upload" => "Last opp",
"Zip" => "Zip",
"Print" => "Skriv ut",
"Fullscreen toggle" => "Fullskjerm svitsj",
"Logout" => "Loggut",
"Undo" => "Angre",
"Redo" => "Gjenta",
"Indent more" => "St&oslash;rre innrykk",
"Indent less" => "Mindre innrykk",
"Autocomplete" => "Autokomplettere",
"Comment/Uncomment" => "Kommentar/Fjern Kommentar",
"Jump to Definition" => "Hopp til Definisjon",
"Manual" => "Manual",
"Shortcuts" => "Snarveier",
"Settings" => "Innstillinger",
"Search for selected" => "S&oslash;k for utvalgte",
"website" => "webside",
"Close all tabs" => "Lukk alle faner",
"Alphabetize tabs" => "Ordne faner alfabetisk",
// "Find" => "Finn",
// "in" => "i",
// "and" => "og",
// "replace" => "erstatt",
// "replace all" => "erstatt alt",
// "this document" => "dette dokumentet",
// "open documents" => "&aring;pne dokumenter",
// "all files" => "alle filer",
// "all filenames" => "alle filenavn",
"Turn on/off..." => "Svitsj p&aring;/av kode assistenten",
"Code Assist" => "Kode Assistenten",
"Go to Line" => "G&aring; til Linje",
"View" => "Vis",
"Bug reporting not active" => "Bug rapportering ikke aktiv"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "Funnet i:"
),
"file-control" =>
array(
"Sorry" => "Beklager",
"does not seem..." => "synes ikke &aring; eksistere p&aring; serveren",
"Sorry, could not..." => "Beklager, kunne ikke f&aring; innholdet i",
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe p&aring;",
"Sorry, cannot copy" => "Beklager, kan ikke kopiere",
"into" => "inn",
"Uploaded file(s) OK" => "Opplastete fil(er) OK",
"Sorry, cannot upload" => "Beklager, kan ikke laste opp",
"Sorry, cannot upload..." => "Beklager, kan ikke laste opp i demo-modus",
"Sorry, cannot rename" => "Beklager, kan ikke endre navn",
"Maybe public write..." => "Kanskje det trengs offentlige skriverettigheter p&aring; denne, eller overordnede mappen?",
"Sorry, cannot move" => "Beklager, kan ikke flytte",
"Sorry, cannot save" => "Beklager, kan ikke lagre",
"Sorry, cannot replace..." => "Beklager, kan ikke erstatte tekst i",
"Sorry, cannot change..." => "Beklager, kan ikke endre tillatelser p&aring;",
"Sorry, cannot delete..." => "Beklager, kan ikke slette rotniv&aring;",
"Sorry, cannot delete" => "Beklager, kan ikke slette",
"Sorry, this file..." => "Beklager, denne filen er endret, kan ikke lagre",
"Reload this file..." => "Skal denne filen lastes igjen og kopieres denne versjon til et nytt dokument?",
"There was a..." => "Dette var en teknisk hikke, sannsynligvis var noe ikke helt klar. S&aring; ICEcoder laster sin kontroll fil p&aring; nytt.",
"displayed at" => "vises p&aring;",
"Enter filename to..." => "Skriv inn filnavnet for &aring; lagre p&aring;",
"That file exists..." => "Denne filen eksisterer allerede, skriv over?",
"Saving" => "Lagring"
),
"get-branch" =>
array(
"There are no..." => "Det er ingen forskjeller mellom det lokale og GitHub lagringssted. G&aring; tilbake til vanlig modus?",
"Sorry, there was..." => "Beklager, det var en feil, kode:",
"Your local folder..." => "Din lokale mappe er tom, &oslash;nsker du &aring; klone"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "Beklager, kan ikke opprette mappe p&aring;",
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
"and try again" => "og pr&oslash;v igjen",
"saving github paths" => "lagre GitHub stier...",
"github paths" => "github stier",
"Choose existing path" => "Velg eksisterende sti",
"Local path" => "Lokal sti",
"Remote GitHub path" => "Ekstern GitHub sti",
"Choose" => "Velg",
"Set local and..." => "Sett lokal og ekstern sti til tomt, for &aring; fjerne",
"Update" => "Oppdater",
"Add new path" => "Legg til ny sti",
"Add" => "Legg til",
"Usage Info" => "Bruksinfo:",
"Enter relative local..." => "Oppgi relative lokale stier (f.e. /server/myfiles) og absolutte GitHub stier (f.e. https://github.com/user/repo eller https://github.com/user/repo/tree/branch for grener), som eksemplene. Med dette har du etablert kildestier p&aring; begge steder, som et par.",
"You can then..." => "Du kan deretter velge en sti par og dette blir da den nye rot stien i ICEcoder.",
"The file manager..." => "Filbehandleren viser deretter et ny GitHub-ikon, som du kan klikke p&aring;, for &aring; utf&oslash;re en sjekk og vise forskjell mellom de 2 kildene. Disse forskjellene kan da v&aelig;re p&aring;krevd, og flyttes til den eksterne stien p&aring; GitHub eller klonet til din lokale sti, for &aring; synkronisere filene dine.",
"If you want..." => "Hvis du &oslash;nsker &aring; velge en annen root sti, kan dette gj&oslash;res i skjermbildet Innstillinger."
),
"github" =>
array(
"Sorry, you do..." => "Beklager, det ser ikke ut til &aring; ha lastet inn OpenSSL p&aring; PHP instans, s&aring; https er ikke tilgjengelig. Dette er n&oslash;dvendig for GitHub dataoverf&oslash;ring, du kan endre php.ini innstillingene, start serveren p&aring; nytt og pr&oslash;v igjen"
),
"headers" =>
array(
"Bad CSRF token..." => "Bad CSRF token. Vennligst rapporter feilinfoen p&aring; https://github.com/mattpass/ICEcoder slik at det kan fikses."
),
"help" =>
array(
"shortcuts" => "snarveier",
"Within document" => "Innenfor dokument",
"On Tabs" => "P&aring; faner",
"Within file manager" => "Innenfor filbehandler",
"Anywhere" => "Hvor som helst",
"Space" => "Mellomrom",
"Click" => "Klikk",
"or" => "eller",
"Left click" => "Venstre klikk",
"Middle click" => "Middel klikk",
"Double click tap..." => "Dobbel klikk / tap (mobil)",
"Right click" => "H&oslash;yre klikk",
"Middle scrollwheel" => "Middel rullehjul",
"Drag" => "Dra",
"Autocomplete add snippet" => "Autofullf&oslash;r/legg til kodebiten",
"Multiple select" => "Flere valg",
"Move line up" => "Flytt linje opp",
"Move line down" => "Flytt linje ned",
"Duplicate lines" => "Dupliser linje(r)",
"Remove lines" => "Slett linje(r)",
"Insert line before" => "Sett inn linje f&oslash;r",
"Insert line after" => "Sett inn linje etter",
"Search for selected" => "S&oslash;k etter valgt",
"Jump to definition" => "Hopp til definisjon/hopp tilbake",
"Comment uncomment" => "Kommentar/fjern kommentar",
"Insert tab indent" => "Sett inn innrykk/valgt innrykk",
"Wrap with div" => "Wrap med &lt;div&gt;",
"Wrap with span" => "Wrap med &lt;span&gt;",
"Wrap unwrap p" => "Wrap/uwrap med &lt;p&gt;",
"Wrap unwrap a" => "Wrap/uwrap med &lt;a&gt;",
"Wrap unwrap b" => "Wrap/uwrap med &lt;b&gt;",
"Wrap unwrap i" => "Wrap/uwrap med &lt;i&gt;",
"Wrap unwrap strong" => "Wrap/uwrap med &lt;strong&gt;",
"Wrap unwrap em" => "Wrap/uwrap med &lt;em&gt;",
"Wrap unwrap li" => "Wrap/uwrap med &lt;li&gt;",
"Wrap unwrap h1..." => "Wrap/uwrap med &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "Avslutt linje med &lt;br&gt;",
"Close tab" => "Lukk fane",
"Select file folder" => "Velg fil/mappe",
"Open file" => "&Aring;pne fil",
"Range select" => "Velg omr&aring;de",
"Options for selected" => "Egenskaper for valgt",
"Delete selected" => "Slett valgt",
"Next previous tab" => "Neste/forige fane",
"Next tab" => "Neste fane",
"Previous tab" => "Forige fane",
"New tab" => "Ny fane",
"Close current tab" => "Lukk gjeldende fane",
"Open file prompt" => "&Aring;pne fil prompt",
"Find" => "Finn",
"Focus on Go..." => "Fokus p&aring; Go til linje inndata",
"Save" => "Lagre",
"Save as" => "Lagre som...",
"View webpage" => "Vis webside",
"Contract expand file..." => "Trekk sammen/utvid filbehandler",
"Fold unfold current..." => "Brett/utfold gjeldende linje",
"Refocus on document" => "Refokusere p&aring; dokument",
"Cancel tasks" => "Avbryt oppgaver"
),
"ice-coder" =>
array(
"No text selected..." => "Ingen tekst valgt til &aring; s&oslash;ke p&aring;",
"Creating Folder" => "Lage mappe",
"Sorry you can..." => "Beklager, du kan bare ha 100 filer &aring;pne samtidig!",
"Opening File" => "&Aring;pner Fil",
"Enter relative file..." => "Oppgi den relative filstien (med prefiks /) eller ekstern URL",
"Getting" => "F&aring;r",
"Please enter the..." => "Skriv inn det nye navnet p&aring;",
"Renaming to" => "Endre navn til",
"Moving to" => "Flytt til",
"Deleting File" => "Slett Fil",
"Pasting File" => "Lim inn Fil",
"Sorry cannot paste..." => "Beklager, kan ikke lime inn en hel rot mappe",
"Nothing to paste..." => "Ingenting &aring; lime inn, kopiere en fil/mappe f&oslash;rst!",
"Replacing text in" => "Erstatte tekst i",
"Cancelled tasks" => "Kansellerte oppgaver",
"Open previous files" => "&Aring;pne siste filer?",
"Please enter your..." => "Skriv inn GitHub token (enten personlig tilgang token eller kunde/hemmelig par token). Se verkt&oslash;ytips ved siden av Github Auth Token p&aring; Hjelp-skjermbildet > Innstillinger for mer info",
"This will compare..." => "Det vil sammenlignes og vise en forskjell mellom din lokale mappe og lagringsstedet. OK?",
"Please note for..." => "Vennligst merk: for at oppdatering skal fungere skikkelig, m&aring; du ha skrive/slette tilgang til alle ICEcoder kataloger og filer. Hvis du trenger &aring; gjenopprette denne versjonen av ICEcoder av en eller annen grunn, vil du finne den i /tmp mappen. Klikk OK for &aring; fortsette med en auto-oppdatering eller avbryt for &aring; bes&oslash;ke ICEcoder omr&aring;det slik at du kan ta tak i zip-filen og oppdatere manuelt.",
"You can start..." => "Du kan starte feilrapportering i Hjelp > Innstillinger",
"Error cannot find..." => "Feil: kan ikke finne/f&aring; tilgang til feil filstier",
"No new errors..." => "Ingen feil funnet",
"You have made..." => "Du har gjort endringer. Er du sikker p&aring;, at du vil lukke uten &aring; lagre?",
"Close all tabs" => "Lukk alle faner?"
),
"login" =>
array(
"set password" => "sett passord",
"login" => "logginn",
"To disable registration..." => "Hvis du vil deaktivere registreringsmodus, &aring;pne innstillingsmenyen eller &aring;pne lib/config ___ settings.php og endre/aktiver P&aring;melding til 'false', deretter laste siden om igjen",
"Registration mode enabled" => "Registreringsmodus aktivert",
"auto-check for updates" => "auto-sjekk for oppdateringer",
"To put into..." => "&Aring; sette til flerbrukermodus, &aring;pne innstillingsmenyen eller &aring;pen lib/config ___ settings.php og endre flerbruker til 'true', deretter laste siden om igjen",
"multi-user" => "flerbruker"
),
"multiple-results" =>
array(
"rename all" => "endre navn p&aring; alle",
"replace all" => "erstatte alle",
"document" => "dokument",
"Found" => "Funnet",
"times" => "ganger",
"replace" => "erstatte",
"file folder" => "fil/mappe",
"rename to" => "endre navn til",
"rename" => "endre navn",
"file" => "fil",
"No matches found" => "Ingen treff",
"selected" => "valgt",
"found in" => "funnet i",
"Replaced" => "Erstattet"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder m&aring; startes om igjen, for &aring; gj&oslash;re programtillegget kj&oslash;rbar. Start om igjen n&aring;?",
"saving plugins" => "lagre programtillegg...",
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
"and try again" => "og pr&oslash;v igjen",
"couldnt delete dir" => "kan ikke slette mappe",
"couldnt delete file" => "kan ikke slette fil",
"plugins" => "programtillegg",
"Guide to writing..." => "Guide til skriving av programtillegg",
"Manage Installed" => "Administrer installerte",
"URL" => "URL",
"Target" => "M&aring;l",
"Timer" => "Tidsur",
"Update" => "Oppdater",
"Install" => "Installer",
"Uninstall" => "Avinstaller",
"Reload after install..." => "Omstart etter installasjon n&oslash;dvendig"
),
"properties" =>
array(
"properties" => "egenskaper",
"Size" => "St&oslash;rrelse",
"Modified" => "Endret",
"Last access" => "Siste tilgang",
"Type" => "Type",
"Readable Writeable" => "Lesbar/Skrivbar",
"Relative path" => "Relativ sti",
"Absolute path" => "Absolute sti",
"Contains" => "Inneholder",
"Permissions" => "Tillatelser",
"Owner" => "Eier",
"Group" => "Gruppe",
"Public" => "Offentlig",
"Read" => "Lese",
"Write" => "Skrive",
"Execute" => "Kj&oslash;re",
"Change to" => "Endre til",
"update" => "oppdatere"
),
"settings-common" =>
array(
"Your document does..." => "Dokumentet ser ikke ut til &aring; v&aelig;re i UTF-8 koding, derfor har det blitt omgjort"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter",
"and try again" => "og pr&oslash;v igjen"
),
"settings-screen" =>
array(
"settings" => "innstillinger",
"version" => "versjon",
"website" => "webside",
"git" => "git",
"codemirror dir" => "codemirror mappe",
"codemirror version" => "codemirror versjon",
"file manager root" => "filbehandler root",
"Free to use..." => "Gratis &aring; bruke den til eget form&aring;l, kommersielle eller ikke, bare gi meg beskjed om eventuelle kule bruk eller tilpasninger. :) <br>Ingen garanti eller erstatningsansvar aksepteres for noe som helst, det er ditt eget ansvar for all bruk.<br>Mange fantastiske mennesker og bedrifter har bidratt til &aring; bygge ICEcoder og det er for mange &aring; takke her. Vennligst se hele listen p&aring;",
"functionality" => "funksjonalitet",
"check for updates..." => "se etter oppdateringer ved start",
"auto open last..." => "&aring;pne automatisk siste filer ved innlogging",
"when finding in..." => "n&aring;r funnet blant filer, utelukke",
"assisting" => "assistere",
"code assist" => "code assistent",
"visible tabs" => "synlige faner",
"locked nav" => "l&aring;st navi",
"tag wrapper command" => "tag wrapper kommando",
"auto-complete on" => "autokompletering p&aring;",
"security" => "sikkerhet",
"new password" => "nytt passord",
"8 chars min" => "min. 8 tegn",
"confirm password" => "bekreft passord",
"banned files/folders" => "forbudte filer/mapper",
"banned paths" => "forbudte stier",
"ip addresses" => "ip adresser",
"Slash prefixed comma..." => "Slash som prefiks, komma som skille",
"Comma delimited" => "Skilled med komma",
"style" => "stil",
"theme" => "tema",
"line wrapping" => "linjebryting",
"indent type" => "innrykk type",
"indent size" => "innrykk st&oslash;rr.",
"font size" => "skrift st&oslash;rr.",
"layout" => "layout",
"plugin panel aligned" => "programtilleggspanel justert",
"file manager" => "filbehandler",
"root" => "root",
"Slash prefixed" => "Slash prefiks",
"bug reporting" => "feil rapportering",
"check in files" => "sjekke blant filer",
"every" => "hver",
"secs getting last" => "sek., f&aring;r siste",
"lines" => "linjer",
"multi-user" => "flerbruker",
"Make sure you..." => "Pass p&aring;, at du ikke l&aring;ser deg ut selv",
"Registration" => "Registrering",
"auth token" => "auth token",
"Required to get..." => "N&oslash;dvendig for &aring; skille, bestemme ditt lagringssted p&aring; GitHub lageret etc. Hvis du ikke har en, kan du bruke en:".PHP_EOL.PHP_EOL.
"- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), eller".PHP_EOL.
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"Det anbefales ikke, at du setter token din her midlertidig, og v&aelig;r sikre p&aring; &aring; oppgi den, n&aring;r du blir bedt av ICEcoder, som vil holde den i &oslash;kten sin.".PHP_EOL.PHP_EOL.
"Men hvis du jobber i et trygt og sikkert milj&oslash;, er det mer effektivt &aring; sette den her.",
"Beklager, kan ikke bekrefte..." => "Beklager, kan ikke bekrefte innstillinger i demo-modus",
"update" => "oppdatere"
),
"settings-update" =>
array(
"Cannot update config..." => "Kan ikke oppdatere konfigurasjonsfilen. Vennligst sett offentlige skriverettigheter;",
"and try again" => "og pr&oslash;v igjen",
"and press refresh" => "og trykker refresh"
),
"updater" =>
array(
"Update appears to..." => "Oppdatering synes &aring; v&aelig;re vellykket"
)
);
?>

423
lang/persian.php Normal file
View File

@@ -0,0 +1,423 @@
<?php
// Persian language translation
// by: @voltan (GitHub)
// @azizabadi_ (Twitter)
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
$text = array(
// / [ROOT LEVEL]
"editor" =>
array(
"Click icons for..." => "<b>بر روی آیکن ها کلیک کنید<br>برای راهنمایی &amp;<br>اطلاعات استفاده</b>",
"server" => "سرور",
"Server name, OS..." => "نام سرور ، سیستم عامل و آی پی :",
"Root" => "روت:",
"ICEcoder root" => "ICEcoder روت :",
"PHP version" => "نسخه پی اچ پی:",
"Date & time" => "زمان و تاریخ :",
"your device" => "دستگاه شما",
"Browser" => "مرورگر :",
"Your IP" => "آی پی شما:",
"files" => "فایل ها",
"Last 10 files..." => "آخرین ۱۰ فایل باز شده",
"none" => "[پوچ]",
"test suite" => "تست سویت",
"Run unit tests" => "اجرای تست های واحد",
"dev mode" => "حالت توسعه دهنده",
"Status" => "وضعیت",
"Using" => "استفاده",
"You can switch..." => "شما میتوانید حالت توسعه را از lib/config__settings.php روشن یا خاموش کنید",
"results" => "نتایج"
),
"files" =>
array(
"Lock" => "قفل",
"Refresh" => "بارگذاری مجدد",
"ROOT" => "[ریشه]"
),
"index" =>
array(
"UPDATE INFO" => "اطلاعات به روز رسانی",
"now available" => "هم اکنون در دسترس است",
"Your version is" => "نسخه مورد استفاده شما",
"Update now" => "به روز کنید",
"You have some..." => "شما چند تغییر ذخیره نشده دارید",
"working" => "در حال کار",
"Color picker" => "اشاره گر رنگ",
"New File" => "فایل جدید",
"New Folder" => "پوشه جدید",
"Upload File(s)" => "بارگذاری فایل",
"Paste" => "چسباندن",
"Open" => "باز کردن",
"Copy" => "کپی کردن",
"Duplicate" => "تهیه نسخه دوم",
"Delete" => "حذف",
"Rename" => "تغیر نام",
"View Webpage" => "نمایش وب سایت",
"Download" => "دریافت",
"Properties" => "ویژگی ها",
"File" => "فایل",
"Edit" => "ویرایش",
"Remote" => "کنترل از راه دور",
"Help" => "کمک",
"Save" => "ذخیره",
"Save As" => "ذخیره به عنوان",
"Live Preview" => "پیش نمایش زنده",
"Upload" => "بارگذاری",
"Zip" => "زیپ",
"Print" => "چاپ",
"Fullscreen toggle" => "نمایش تمام صفحه",
"Logout" => "خروج",
"Undo" => "برگشت",
"Redo" => "ازنو",
"Indent more" => "کم کردن فاصله",
"Indent less" => "زیاد کردن فاصله",
"Autocomplete" => "تکمیل خودکار",
"Comment/Uncomment" => "نظر/ضد نظر",
"Jump to Definition" => "انتقال به تعریف",
"Manual" => "دستی",
"Shortcuts" => "کلید های میانبر",
"Settings" => "تنظیمات",
"Search for selected" => "جستجو برای انتخاب شده ها",
"website" => "وب سایت",
"Close all tabs" => "بستن همه پنجره ها",
"Alphabetize tabs" => "مرتب سازی پنجره ها بر اساس حروف الفبا",
// "Find" => "یافتن",
// "in" => "در",
// "and" => "و",
// "replace" => "جایگزین کردن",
// "replace all" => "جایگزین کردن همه",
// "this document" => "این سند",
// "open documents" => "سند های باز",
// "all files" => "همه فایل ها",
// "all filenames" => "همه نام فایل ها",
"Turn on/off..." => "روشن / خاموش کردن کد کمد",
"Code Assist" => "کد کمک",
"Go to Line" => "برو به خط",
"View" => "نمایش",
"Bug reporting not active" => "گزارش اشکال فعال نیست"
),
// /LIB
"bug-files-check" =>
array(
"Found in" => "یافتن در :"
),
"file-control" =>
array(
"Sorry" => "متاسفیم",
"does not seem..." => "به نظر می رسد بر روی سرور موجود نیست",
"Sorry, could not..." => "متاسفانه نمی توانیم اطلاعات را دریافت کنیم",
"Sorry, cannot create..." => "متاسفانه نمی توانیم یک شاخه در مسیر زیر ایجاد کنیم",
"Sorry, cannot copy" => "متاسفانه نمی توانیم کپی کنیم",
"into" => "into",
"Uploaded file(s) OK" => "بارگذاری فایل ها موفقیت آمیز بود",
"Sorry, cannot upload" => "متاسفانه نمیتوانیم آپلود کنیم",
"Sorry, cannot upload..." => "متاسفانه امکان آپلود در نسخه دمو وجود ندارد",
"Sorry, cannot rename" => "متاسفانه نمی توانیم تغییر نام دهیم",
"Maybe public write..." => "به نظر می رسد دسترسی نوشتن برای شاخه والد لازم است",
"Sorry, cannot move" => "متاسفانه نمی توانیم انتقال دهیم",
"Sorry, cannot save" => "متاسفانه نمی توانیم ذخیره کنیم",
"Sorry, cannot replace..." => "متاسفانه نمی نمی توانیم جایگزین کنیم",
"Sorry, cannot change..." => "متاسفانه نمی توانیم دسترسی را تغییر دهیم",
"Sorry, cannot delete..." => "متاسفانه نمی توانیم دسترسی ریشه را تغییر دهیم",
"Sorry, cannot delete" => "متاسفانه نمی توانیم تغییر دهیم",
"Sorry, this file..." => "متاسفانه این فایل تغییر دارد و نمی توانیم آن را ذخیره کنیم",
"Reload this file..." => "بارگذاری مجدد این فایل و جایگزینی تغییرات شما در یک فایل جدید؟",
"There was a..." => "یک وقفه تکنولوژیک وجوددارد،احتمالا چیزی کامل آماده نیست. بنابراین ICEcoder مجددا این فایل را بارگذاری می کند..",
"displayed at" => "نمایش داده شده در",
"Enter filename to..." => "نام فایل را برای ذخیره وارد کنید",
"That file exists..." => "این فایل هم اکنون موجود است ، جایگزین شود؟",
"Saving" => "در حال ذخره"
),
"get-branch" =>
array(
"There are no..." => "تغییراتی بین مخزن محلی و مخزن گیت وجود دارد ، به حالت معمول برگردد؟",
"Sorry, there was..." => "متاسفانه خطای روی داده است . کد خطا : ",
"Your local folder..." => "شاخه محلی شما خالی است ، آیا میخواهید تکثیر کنید ؟"
),
"github-manager" =>
array(
"Sorry, cannot create..." => "متاسفانه نمیتوانیم یک شاخه بسازیم در :",
"Cannot update config..." => "متاسفانه نمیتوان فایل تنظیمات را به روز کرد. لطفا دسترسی نوشتن را اضافه کنید به",
"and try again" => "و مجددا تلاش نمایید",
"saving github paths" => "ذخیره مسیر های گیت هاب ...",
"github paths" => "مسیر های گیت هاب",
"Choose existing path" => "انتخاب یک مسیر موجود",
"Local path" => "مسیر محلی",
"Remote GitHub path" => "مسیر ریموت گیت هاب",
"Choose" => "انتخاب",
"Set local and..." => "برای حذف مسیر محلی و ریموت ، آنها را به صورت خالی تنظیم کرده و ذخیره کنید",
"Update" => "به روز رسانی",
"Add new path" => "اضافه کردن مسیر جدید",
"Add" => "اضافه کردن",
"Usage Info" => "اطلاعات مورد استفاده :",
"Enter relative local..." => "Enter relative local paths (eg /server/myfiles) and absolute GitHub paths (eg https://github.com/user/repo or https://github.com/user/repo/tree/branch for branches), as per the examples. With this done you have established the source paths at both locations, as a pair.",
"You can then..." => "شما میتوانید یک جفت مسیر انتخاب کنید و مسیر جدید ریشه خود را در ICEcoder وارد کنید.",
"The file manager..." => "The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.",
"If you want..." => "اگر میخواهید یک مسیر ریشه دیگر تنظیم کنید ، به صفحه تنظیمات بروید."
),
"github" =>
array(
"Sorry, you do..." => "متاسفانه امکان استفاده از OpenSSL در تنظیمات پی اچ پی شما وجود ندارد, بنابر این https در دسترس نیست. این گزینه برای انتقال فایل با گیت هاب لازم است, لطفا تنظیمات php.ini خود را به روز کنید, سرور خود را مجددا راه اندازی کنید و سپس امتحان کنید"
),
"headers" =>
array(
"Bad CSRF token..." => "توکن CSRF اشتباه. لطفا خطا را در https://github.com/mattpass/ICEcoder گزارش دهید تا اصلاح شود."
),
"help" =>
array(
"shortcuts" => "میان بر ها",
"Within document" => "داخل سند",
"On Tabs" => "در تب های",
"Within file manager" => "در مدیریت فایل",
"Anywhere" => "همه جا",
"Space" => "اسپیس",
"Click" => "کلیک",
"or" => "یا",
"Left click" => "کلیک چپ",
"Middle click" => "کلیک وسط",
"Double click tap..." => "دبل کلیک / تب ( موبایل )",
"Right click" => "کلیک راست",
"Middle scrollwheel" => "اسکرولر وسط",
"Drag" => "دراگ",
"Autocomplete add snippet" => "تکمیل خودکار / اضافه کردن قطعه",
"Multiple select" => "چند انتخاب",
"Move line up" => "انتقال خط بالا",
"Move line down" => "انتقال خط پایین",
"Duplicate lines" => "تکثیر خط",
"Remove lines" => "حذف خط",
"Insert line before" => "اضافه کردن خط قبل از",
"Insert line after" => "اضافه کردن خط بعد از",
"Search for selected" => "جستجو برای انتخاب شده",
"Jump to definition" => "برو به تعریف / برو عقب",
"Comment uncomment" => "کامتی / حذف کامیت",
"Insert tab indent" => "وارد کردن تب / انتخاب شده داخل است",
"Wrap with div" => "قرار دادن با &lt;div&gt;",
"Wrap with span" => "قرار دادن با &lt;span&gt;",
"Wrap unwrap p" => "قرار دادن / باز کردن با &lt;p&gt;",
"Wrap unwrap a" => "قرار دادن / باز کردن با &lt;a&gt;",
"Wrap unwrap b" => "قرار دادن / باز کردن با &lt;b&gt;",
"Wrap unwrap i" => "قرار دادن / باز کردن با &lt;i&gt;",
"Wrap unwrap strong" => "قرار دادن / باز کردن با &lt;strong&gt;",
"Wrap unwrap em" => "قرار دادن / باز کردن با &lt;em&gt;",
"Wrap unwrap li" => "قرار دادن / باز کردن با &lt;li&gt;",
"Wrap unwrap h1..." => "قرار دادن / باز کردن با &lt;h1&gt; - &lt;h3&gt;",
"End line with..." => "انتخاب خط با &lt;br&gt;",
"Close tab" => "بستن تب",
"Select file folder" => "انتخاب فایل / پوشه",
"Open file" => "باز کردن فایل",
"Range select" => "انتخاب رنج",
"Options for selected" => "گزینه های برای انتخاب",
"Delete selected" => "حذف انتخاب ها",
"Next previous tab" => "تب قبلی / بعدی",
"Next tab" => "تب بعدی",
"Previous tab" => "تب قبلی",
"New tab" => "تب جدید",
"Close current tab" => "بستن تب فعلی",
"Open file prompt" => "باز کردن سریع فایل",
"Find" => "یافتن",
"Focus on Go..." => "فکوس کن برای رفتن به خط ورود",
"Save" => "ذخیره",
"Save as" => "ذخیره به عنوان ...",
"View webpage" => "مشاهده صفحه وب",
"Contract expand file..." => "قرارداد / گسترش مدیریت فایل",
"Fold unfold current..." => "ریختن (فولد) / آشکار شدن فایل فعلی",
"Refocus on document" => "فوکوس مجدد در سند",
"Cancel tasks" => "لغو تسک"
),
"ice-coder" =>
array(
"No text selected..." => "هیچ متنی برای جستجو انتخاب نشده است",
"Creating Folder" => "در حال ساخت پوشه",
"Sorry you can..." => "متاسفانه ، شما می توانید حداکثر ۱۰۰ فایل را هم زمان باز کنید !",
"Opening File" => "در حال باز کردن فایل",
"Enter relative file..." => "قراردادن مسیر فایل مشابه ( ابتدا با / ) یا لینک ریموت",
"Getting" => "دریافت",
"Please enter the..." => "لطفا یک نام جدید وارد کنید برای",
"Renaming to" => "تغییر نام به",
"Moving to" => "انتقال به",
"Deleting File" => "در حال حذف فایل ها",
"Pasting File" => "در حال پست کردن فایل",
"Sorry cannot paste..." => "متاسفانه نمی توان به ریشه چیزی اضافه کرد",
"Nothing to paste..." => "هیچ چیش برای چسباندن نیست ! ابتدا فایل / پوشه را کپی کنید",
"Replacing text in" => "جایگزین کردن متن در",
"Cancelled tasks" => "تسک های لغو شده ",
"Open previous files" => "بازکردن فایل های قبلی؟",
"Please enter your..." => "Please enter your GitHub token (either personal access token or client/secret pair token). See tooltip next to Github Auth Token on Help > Settings screen for more info",
"This will compare..." => "این گزینه تفاوت بین فایل محلی شما و تغییرات سرور را نمایش می دهد. مورد تایید است؟",
"Please note for..." => "Please note: for updating to work properly, you need to have write/delete access on all ICEcoder dirs & files. If you need to recover this version of ICEcoder for any reason, you'll find it in the /tmp dir. Click OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually.",
"You can start..." => "شما می توانید ارسال خطا را از منوی کمک رسانی > تنظیمات انجام دهید",
"Error cannot find..." => "خطا : نمی توانید به فایل / مسیر فایل های خطا دسترسی پیدا کنید.",
"No new errors..." => "هیچ خطای جدیدی پیدا نشد",
"You have made..." => "شما تغییراتی اعمال کرده اید. آیا اطمینان دارید که میخواهید بدون ذخیره کردن فایل را ببندید؟",
"Close all tabs" => "بستن همه تب ها؟"
),
"login" =>
array(
"set password" => "تنظیم واژه رمز",
"login" => "ورود",
"To disable registration..." => "برای غیر فعال کردن حالت ثبت نام ، منوی تنظیمات را باز کنید و یا فایل lib/config___settings.php را باز کنید و گزینه enableRegistration را به false تغییر دهید. سپس این صفحه را بارگذاری مجدد نمایید",
"Registration mode enabled" => "حالت ثبت نام فعال است",
"auto-check for updates" => "بررسی خودکار برای به روز رسانی",
"To put into..." => "برای وارد شدن به حالت چند کاربره ، منوی تنظیمات را باز کنید و یا فایل lib/config___settings.php و گزینه multiUser را به true تغییر دهید و و ذخیره کنید. سپس این صفحه را بارگذاری مجدد نمایید",
"multi-user" => "چند کاربره"
),
"multiple-results" =>
array(
"rename all" => "تغییر نام همه",
"replace all" => "جایگزین کردن همه",
"document" => "سند",
"Found" => "یافتن",
"times" => "دفعات",
"replace" => "جایگزین کردن",
"file folder" => "فایل/فولدر",
"rename to" => "تغییر نام به",
"rename" => "تغیر نام",
"file" => "فایل",
"No matches found" => "جستجو نتیجه ای نداشت",
"selected" => "انتخاب شده",
"found in" => "یافتن در",
"Replaced" => "جایگزین شود"
),
"plugins-manager" =>
array(
"ICEcoder needs to..." => "ICEcoder نیاز به بارگذاری مجدد برای فعال شدن این افزونه دارد. بارگذاری مجدد انجام شود؟",
"saving plugins" => "ذخیره سازی افزونه ...",
"Cannot update config..." => "نمی توان فایل تنظیمات را به روز کرد ، دسترسی نوشتن را فعال کنید برای",
"and try again" => "و مجدد امتحان کنید",
"couldnt delete dir" => "ناتوان در حذف پوشه",
"couldnt delete file" => "ناتوان در حذف فایل",
"plugins" => "افزونه ها",
"Guide to writing..." => "راهنمای نوشتن افزونه",
"Manage Installed" => "مدیریت نصب",
"URL" => "آدرس",
"Target" => "هدف",
"Timer" => "زمان سنج",
"Update" => "آپدیت",
"Install" => "اینستال",
"Uninstall" => "آن انیستال",
"Reload after install..." => "بارگذاری مجدد بعد از نصب لازم است"
),
"properties" =>
array(
"properties" => "ویژگی ها",
"Size" => "اندازه",
"Modified" => "ویرایش شده",
"Last access" => "آخرین دسترسی",
"Type" => "نوع",
"Readable Writeable" => "قابل خواندن / قابل نوشتن",
"Relative path" => "مسیر نسبی",
"Absolute path" => "مسیر مطلق",
"Contains" => "شامل",
"Permissions" => "دسترسی ها",
"Owner" => "سازنده",
"Group" => "گروه",
"Public" => "عمومی",
"Read" => "خواندن",
"Write" => "نوشتن",
"Execute" => "اجرا",
"Change to" => "تغییر به",
"update" => "به روز کردن"
),
"settings-common" =>
array(
"Your document does..." => "سند شما با استاندارد UTF-8 همخوانی ندارد ، تبدیل می شود"
),
"settings-save-current-files" =>
array(
"Cannot update config..." => "نمیتوان فایل تنظیمات را به روز کرد ، لطفا دسترسی نوشتن را بررسی کنید در",
"and try again" => "و مجددا تلاش نمایید"
),
"settings-screen" =>
array(
"settings" => "تنظیمات",
"version" => "نسخه",
"website" => "وب سایت",
"git" => "گیت",
"codemirror dir" => "مسیر کد آینه",
"codemirror version" => "نسخه کد آینه",
"file manager root" => "ریشه مسیر مدیریت فایل",
"Free to use..." => "Free to use it for your own purposes, commercial or not, just let me know of any cool uses or customisations. :)<br><br>No warranty or liability accepted for anything, all responsibility of use is your own.<br><br>A lot of fantastic people and companies have helped build ICEcoder and there is too many to thank here. Please see the full list at",
"functionality" => "تابع بندی",
"check for updates..." => "بررسی برای به روز رسانی در هنگام بارگذاری",
"auto open last..." => "باز کردن خودکار آخرین فایل ها در هنگامک بارگذاری",
"when finding in..." => "وقتی در فایل یافت شد ، رد شود",
"assisting" => "کمک رسانی",
"code assist" => "کد کمک",
"visible tabs" => "تب های قابل نمایش",
"locked nav" => "قفل کردن منو",
"tag wrapper command" => "برچسب دستور والد",
"auto-complete on" => "تکمیل خودکار روشن",
"security" => "امنیت",
"new password" => "پسورد جدید",
"8 chars min" => "حداقل ۸ کارکتر",
"confirm password" => "تایید پسورد",
"banned files/folders" => "فایل ها / پوشه های مسدود شده",
"banned paths" => "مسیر های مسدود شده",
"ip addresses" => "آدرس آی پی",
"Slash prefixed comma..." => "پیشوند اسلش, با کاما از هم جدا کنید",
"Comma delimited" => "با کما جدا شوند",
"style" => "استایل",
"theme" => "قالب",
"line wrapping" => "وارپینگ خط",
"indent type" => "نوع برجسته کردن",
"indent size" => "اندازه برجسته کردن",
"font size" => "اندازه فونت",
"layout" => "لایه",
"plugin panel aligned" => "تراز پنل پلاگین",
"file manager" => "مدیریت فایل",
"root" => "ریشه",
"Slash prefixed" => "پیشوند اسلش",
"bug reporting" => "گزارش باگ",
"check in files" => "فایل های چک این",
"every" => "همه",
"secs getting last" => "دریافت فهرست",
"lines" => "خط",
"multi-user" => "چند کاربره",
"Make sure you..." => "مطمئن شوید خود را خاریج از اینجا قفل نکرده اید",
"Registration" => "ثبت نام",
"auth token" => "توکن خودکار",
"Required to get..." => "Required to get diffs, commit to your GitHub hosted repo etc. If you do not have one, you can use a:".PHP_EOL.PHP_EOL.
"- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or".PHP_EOL.
"- full client/secret pair token (http://developer.github.com/v3/oauth).".PHP_EOL.PHP_EOL.
"It is not recommended you set your token here however and is more secure to enter it when requested by ICEcoder as that will keep it in session only.".PHP_EOL.PHP_EOL.
"However, if you work in a trusted and secure environment, it is more efficient to set it here.",
"Sorry cannot commit..." => "متاسفانه نمی توان در حالت نمایشی تنظیمات را تغییر داد",
"update" => "به روز کردن"
),
"settings-update" =>
array(
"Cannot update config..." => "نمی توان فایل تنظیمات را به روز کرد ، لطفا دسترسی نوشتن را اعمال کنید در",
"and try again" => "و مجدد تلاش کنید",
"and press refresh" => "و صفحه را مجدد بارگذاری کنید"
),
"updater" =>
array(
"Update appears to..." => "با موفقیت به روز شد"
)
);
?>

View File

@@ -2,6 +2,8 @@
// Load common functions
include("headers.php");
include_once("settings-common.php");
$text = $_SESSION['text'];
$t = $text['bug-files-check'];
$files = explode(",",str_replace("|","/",$_GET['files']));
$filesSizesSeen = explode(",",$_GET['filesSizesSeen']);
@@ -10,8 +12,10 @@ $maxLines = $_GET['maxLines'];
$result = "ok";
for ($i=0; $i<count($files); $i++) {
$files[$i] = $_SERVER['DOCUMENT_ROOT'].$files[$i];
if (!file_exists($files[$i])) {
// Work out the real path for a file
$files[$i] = realpath($_SERVER['DOCUMENT_ROOT'].$files[$i]);
// If we can't find that file or it doesn't start with the doc root, it's an error
if (!file_exists($files[$i]) || strpos($files[$i],$_SERVER['DOCUMENT_ROOT']) !== 0) {
$result = "error";
} else {
$filesSizesSeen[$i] = filesize($files[$i]);
@@ -76,7 +80,7 @@ if ($result != "error") {
$output = rtrim(str_replace("\r\n","\n",$output));
$output = explode("\n",$output);
$output = array_slice($output, -$maxLines);
$output = "Found in: ".$filename."...\n".implode("\n",$output);
$output = $t['Found in']." ".$filename."...\n".implode("\n",$output);
if ($filesWithNewBugs==1) {
file_put_contents("../tmp/bug-report.log", $output);

View File

@@ -1,7 +1,7 @@
<?php
// ICEcoder system settings
$ICEcoderSettings = array(
"versionNo" => "4.1",
"versionNo" => "4.3",
"codeMirrorDir" => "CodeMirror-4.2",
"docRoot" => $_SERVER['DOCUMENT_ROOT'],
"demoMode" => false,

View File

@@ -1,6 +1,6 @@
<?php
$ICEcoderUserSettings = array(
"versionNo" => "4.1",
"versionNo" => "4.3",
"root" => "",
"checkUpdates" => true,
"openLastFiles" => true,
@@ -19,10 +19,11 @@ $ICEcoderUserSettings = array(
"lineWrapping" => true,
"indentWithTabs" => true,
"indentSize" => 4,
"pluginPanelAligned" => "left",
"bugFilePaths" => array(),
"bugFileCheckTimer" => 0,
"bugFileMaxLines" => 0,
"pluginPanelAligned" => "left",
"githubAuthToken" => "",
"plugins" => array(),
"githubLocalPaths" => array(),
"githubRemotePaths" => array(),

View File

@@ -2,7 +2,12 @@
include("headers.php");
include("settings.php");
$file = $docRoot.$iceRoot.str_replace("../","",str_replace("|","/",$_GET['file']));
// Establish the real absolute path to the file
$file = realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['file'])));
// If it doesn't exist, or doesn't start with the $docRoot, stop here
if (!file_exists($file) || strpos($file,$docRoot) !== 0) {
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
}
if (file_exists($file)) {
header('Content-Description: File Transfer');

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['file-control'];
?>
<script>
<?php
@@ -14,14 +15,49 @@ $file = str_replace("|","/",strClean(
: $_GET['file']
));
// Trim any +'s or spaces from the end of file and clear any ../'s
$file = str_replace("../","",rtrim(rtrim($file,'+'),' '));
// Put the original $file var aside for use
$fileOrig = $file;
// Make $file a full path and establish the $fileLoc and $fileName
if (strpos($file,$docRoot)===false && $_GET['action']!="getRemoteFile") {$file=str_replace("|","/",$docRoot.$iceRoot.$file);};
// Trim any +'s or spaces from the end of file
$file = rtrim(rtrim($file,'+'),' ');
// Also remove [NEW] from $file, we can consider $_GET['action'] or $fileOrig to pick that up
$file = rtrim($file,'[NEW]');
// Make each path in $file a full path (; seperated list)
$allFiles = explode(";",$file);
for ($i=0; $i<count($allFiles); $i++) {
if (strpos($allFiles[$i],$docRoot)===false && $_GET['action']!="getRemoteFile") {
$allFiles[$i]=str_replace("|","/",$docRoot.$iceRoot.$allFiles[$i]);
}
};
$file = implode(";",$allFiles);
// Establish the $fileLoc and $fileName (used in single file cases, eg opening. Multiple file cases, eg deleting, is worked out in that loop)
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
$fileName = basename($file);
// Check through all files to make sure they're valid/safe
$allFiles = explode(";",$file);
for ($i=0; $i<count($allFiles); $i++) {
// Uncomment to alert and console.log the action and file, useful for debugging
// echo ";alert('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');console.log('".xssClean($_GET['action'],"html")." : ".$allFiles[$i]."');";
// Die if the file requested isn't something we expect
if(
// A local folder that isn't the doc root or starts with the doc root
($_GET['action']!="getRemoteFile" &&
rtrim($allFiles[$i],"/") !== rtrim($docRoot,"/") &&
strpos(realpath(rtrim(dirname($allFiles[$i]),"/")),realpath(rtrim($docRoot,"/"))) !== 0
) ||
// Or a remote URL that doesn't start http
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
) {
die("alert('Sorry! - problem with file requested');</script>");
};
}
// If we're due to open a file...
if ($_GET['action']=="load") {
echo 'action="load";';
@@ -50,7 +86,7 @@ if ($_GET['action']=="load") {
echo 'fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');';
};
} else {
echo 'fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');';
echo 'fileType="nothing"; top.ICEcoder.message(\''.$t['Sorry'].', '.$fileLoc."/".$fileName.' '.$t['does not seem...'].'\');';
}
};
@@ -66,7 +102,7 @@ if ($_GET['action']=="getRemoteFile") {
echo '</script><textarea name="remoteFile" id="remoteFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&amp;",$remoteFile)).'</textarea><script>';
echo 'top.ICEcoder.getcMInstance().setValue(document.getElementById("remoteFile").value);action="getRemoteFile";';
} else {
echo 'action="nothing"; top.ICEcoder.message(\'Sorry, could\\\'t get contents of '.$file.'\');';
echo 'action="nothing"; top.ICEcoder.message(\''.$t['Sorry, could not...'].' '.$file.'\');';
}
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
}
@@ -78,7 +114,7 @@ if ($_GET['action']=="newFolder") {
// Reload file manager
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\',false,false,false,\'folder\');action="newFolder";';
} else {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot create folder at\\n".$fileLoc."');";
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$fileLoc."');";
}
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
}
@@ -128,7 +164,7 @@ if ($_GET['action']=="paste") {
// Reload file manager
echo 'top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\',false,false,false,\''.$fileOrFolder.'\');action="pasteFile";';
} else {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot copy \\n".str_replace($docRoot,"",$source)."\\n into \\n".str_replace($docRoot,"",$dest)."');";
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);';
}
@@ -144,9 +180,9 @@ if ($_GET['action']=="upload") {
$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("Uploaded file(s) OK");setTimeout(function(){top.ICEcoder.serverMessage();},2000);';
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('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,'/'));";
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,'/'));";
}
}
}
@@ -173,7 +209,7 @@ if ($_GET['action']=="upload") {
$fileUploader=new fileUploader($uploads);
}
} else {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot upload whilst in demo mode');";
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'));";
@@ -191,7 +227,7 @@ if ($_GET['action']=="rename") {
}
}
if (!$renamed) {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot rename\\n".strClean($_GET['oldFileName'])."\\n\\nMaybe public write permissions needed on this or parent folder?');";
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);';
}
@@ -212,7 +248,7 @@ if ($_GET['action']=="move") {
}
}
if (!$moved) {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot move\\n".strClean($_GET['oldFileName'])."\\n\\nMaybe public write permissions needed on this or parent folder?');";
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot move']."\\n".strClean($_GET['oldFileName'])."\\n\\n".$t['Maybe public write...']."');";
}
} else {
echo "action='nothing';";
@@ -226,12 +262,12 @@ if ($_GET['action']=="replaceText") {
$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("Sorry, cannot save");
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
fwrite($fh, $newContent);
fclose($fh);
echo 'action="replaceText";';
} else {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot replace text in\\n".strClean($_GET['fileRef'])."');";
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot replace...']."\\n".strClean($_GET['fileRef'])."');";
}
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
}
@@ -244,7 +280,7 @@ if ($_GET['action']=="perms") {
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
echo 'action="perms";';
} else {
echo "action='nothing'; top.ICEcoder.message('Sorry, cannot change permissions on \\n".strClean($file)."');";
echo "action='nothing'; top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
}
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
}
@@ -258,7 +294,7 @@ if ($_GET['action']=="delete") {
$fullPath = $docRoot.$iceRoot.$fullPath;
if (rtrim($fullPath,"/") == rtrim($docRoot,"/")) {
echo "top.ICEcoder.message('Sorry can\\'t delete the root level');";
echo "top.ICEcoder.message('".$t['Sorry, cannot delete...']."');";
} else if (!$demoMode && is_writable($fullPath)) {
is_dir($fullPath)
? rrmdir($fullPath)
@@ -270,7 +306,7 @@ if ($_GET['action']=="delete") {
echo 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
echo 'action="delete";';
} else {
echo "top.ICEcoder.message('Sorry can\\'t delete\\n".str_replace($docRoot,"",$fullPath)."');";
echo "top.ICEcoder.message('".$t['Sorry, cannot delete']."\\n".str_replace($docRoot,"",$fullPath)."');";
}
echo 'action="nothing";';
}
@@ -300,7 +336,7 @@ if ($_GET['action']=="save") {
if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) {
$filemtime = $serverType=="Linux" ? filemtime($file) : "1000000";
if (!(isset($_GET['fileMDT']))||$filemtime==$_GET['fileMDT']) {
$fh = fopen($file, 'w') or die("Sorry, cannot save");
$fh = fopen($file, 'w') or die($t['Sorry, cannot save']);
// replace \r\n (Windows), \r (old Mac) and \n (Linux) line endings with whatever we chose to be lineEnding
$contents = $_POST['contents'];
$contents = str_replace("\r\n", $ICEcoder["lineEnding"], $contents);
@@ -328,7 +364,7 @@ if ($_GET['action']=="save") {
// Do the pesticide plugin if it exists
try {top.ICEcoder.doPesticide();} catch(err) {};
};';
echo 'top.ICEcoder.setPreviousFiles();action="doneSave";';
echo 'top.ICEcoder.setPreviousFiles();setTimeout(function(){top.ICEcoder.indicateChanges()},4);action="doneSave";';
// Run our custom processes
include_once("../processes/on-file-save.php");
} else {
@@ -336,7 +372,7 @@ if ($_GET['action']=="save") {
echo '</script><textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
echo '<textarea name="userVersionFile" id="userVersionFile"></textarea><script>';
?>
var refreshFile = top.ICEcoder.ask('Sorry, this file has changed, cannot save\n<?php echo $file;?>\n\nReload this file and copy your version to a new document?');
var refreshFile = top.ICEcoder.ask('<?php echo $t['Sorry, this file...']."\n".$file."\n\n".$t['Reload this file...'];?>');
if (refreshFile) {
var cM = top.ICEcoder.getcMInstance();
var thisTab = top.ICEcoder.selectedTab;
@@ -358,7 +394,7 @@ if ($_GET['action']=="save") {
<?php
}
} else {
echo "action='nothing';top.ICEcoder.message('Sorry, cannot write\\n".$file."');";
echo "action='nothing';top.ICEcoder.message('".$t['Sorry, cannot save']."\\n".$file."');";
}
echo 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
}
@@ -368,7 +404,7 @@ if (action=="load") {
if (fileType=="text") {
setTimeout(function() {
if (!top.ICEcoder.content.contentWindow.createNewCMInstance) {
console.log('There was tech hiccup, likely something wasn\'t quite ready. So ICEcoder reloaded it\'s file control again.');
console.log('<?php echo $t['There was a...']; ?>');
window.location.reload();
<?php
if (file_exists($file)) {
@@ -414,7 +450,7 @@ if (action=="load") {
top.document.getElementById('blackMask').style.visibility = "visible";
top.document.getElementById('mediaContainer').innerHTML =
"<canvas id=\"canvasPicker\" width=\"1\" height=\"1\" style=\"position: absolute; margin: 10px 0 0 10px; cursor: crosshair\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\"></canvas>" +
"<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('images/checkerboard.png')\" onLoad=\"reducedImgMsg = (this.naturalWidth > 700 || this.naturalHeight > 500) ? ', displayed at ' + this.width + ' x ' + this.height : ''; document.getElementById('imgInfo').innerHTML += ' (' + this.naturalWidth + ' x ' + this.naturalHeight + reducedImgMsg + ')'; top.ICEcoder.drawCanvasImage(this)\"><br>" +
"<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('images/checkerboard.png')\" onLoad=\"reducedImgMsg = (this.naturalWidth > 700 || this.naturalHeight > 500) ? ', <?php echo $t['displayed at']; ?> ' + this.width + ' x ' + this.height : ''; document.getElementById('imgInfo').innerHTML += ' (' + this.naturalWidth + ' x ' + this.naturalHeight + reducedImgMsg + ')'; top.ICEcoder.drawCanvasImage(this)\"><br>" +
"<div class=\"whiteGlow\" style=\"display: inline-block; margin-top: -10px; border: solid 10px #fff; color: #000; background-color: #fff\" id=\"imgInfo\" onmouseover=\"top.ICEcoder.overPopup=true\" onmouseout=\"top.ICEcoder.overPopup=false\">" +
"<b><?php echo $fileLoc."/".$fileName;?></b>" +
"</div><br>" +
@@ -437,21 +473,21 @@ if (action=="load") {
<script>
if (action=="save") {
<?php
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") {
if (strpos($fileOrig,"[NEW]")>0||$saveType=="saveAs") {
?>
fileLoc = '<?php echo $fileLoc;?>';
newFileName = top.ICEcoder.getInput('Enter filename to save at '+(fileLoc!='' ? fileLoc : '/'),'');
newFileName = top.ICEcoder.getInput('<?php echo $t['Enter filename to...']; ?> '+(fileLoc!='' ? fileLoc : '/'),'');
if (newFileName) {
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
newFileName = fileLoc + newFileName;
if (top.document.getElementById('filesFrame').contentWindow.document.getElementById(newFileName.replace(/\//g,"|"))) {
overwriteOK = top.ICEcoder.ask('That file exists already, overwrite?');
overwriteOK = top.ICEcoder.ask('<?php echo $t['That file exists...']; ?>');
}
}
document.saveFile.newFileName.value = '<?php echo $docRoot; ?>' + newFileName;
<?php ;};?>
if ("undefined" == typeof newFileName || (newFileName && "undefined" == typeof overwriteOK) || ("undefined" != typeof overwriteOK && overwriteOK)) {
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ <?php echo strpos($file,"[NEW]")>0 ? "newFileName" : "'$file'"; ?>);
top.ICEcoder.serverMessage('<b><?php echo $t['Saving']; ?></b><br>'+ <?php echo strpos($fileOrig,"[NEW]")>0 ? "newFileName" : "'$file'"; ?>);
document.saveFile.contents.value = top.document.getElementById('saveTemp1').value;
document.saveFile.submit();
} else {

View File

@@ -6,15 +6,117 @@ if (!isset($ICEcoder['root'])) {
if (!$_SESSION['loggedIn']) {
header("Location: ../");
die();
}
$text = $_SESSION['text'];
$t = $text['get-branch'];
?>
<!DOCTYPE html>
<html>
<head>
<title>ICEcoder v <?php echo $ICEcoder["versionNo"];?> get branch</title>
<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>
<?php ;}; ?>
</head>
<body>
<?php
// Need to get dir contents recursively? (Used by GitHub diff mode)
if ($_SESSION['githubDiff']) {
// Function to sort given values alphabetically
function alphasort($a, $b) {
return strcmp($a->getPathname(), $b->getPathname());
}
// Class to put forward the values for sorting
class SortingIterator implements IteratorAggregate {
private $iterator = null;
public function __construct(Traversable $iterator, $callback) {
$array = iterator_to_array($iterator);
usort($array, $callback);
$this->iterator = new ArrayIterator($array);
}
public function getIterator() {
return $this->iterator;
}
}
// Get a full list of dirs & files and begin sorting using above class & function
$path = $docRoot.$iceRoot;
$objectList = new SortingIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST), 'alphasort');
// Iterator to get files
$iter = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::SELF_FIRST,
RecursiveIteratorIterator::CATCH_GET_CHILD // Ignore "Permission denied"
);
// Check if dir has .gitignore file
function hasGitignore($dir) {
return is_file("$dir/.gitignore");
}
// Get a list of .gitignore files into $gi array
$gi = array();
if(hasGitignore($path)) {
$gi[] = "$path/.gitignore";
}
foreach ($iter as $scanpath) {
if (is_dir($scanpath) && strpos($scanpath,".git") == false) {
$thisDir = str_replace("\\","/",$scanpath);
if(hasGitignore($thisDir)) {
$gi[] = $thisDir."/.gitignore";
}
}
}
// Get $matches array containing existing files listed in .gitignore
function parseGitignore($file) { # $file = '/absolute/path/to/.gitignore'
$dir = dirname($file);
$matches = array();
$lines = file($file);
foreach ($lines as $line) {
$line = trim($line);
if ($line === '') continue; # empty line
if (substr($line, 0, 1) == '#') continue; # a comment
if (substr($line, 0, 1) == '!') { # negated glob
$line = substr($line, 1);
$files = array_diff(glob("$dir/*"), glob("$dir/$line"));
} else { # normal glob
$files = glob("$dir/$line");
}
$matches = array_merge($matches, $files);
}
return $matches;
}
// Cycle through all .gitignore files running above function to get a list of $excluded files
// Exclude the .git dir as first item as we don't want to see that
$excluded = array("/.git");
foreach ($gi as $scanpath) {
$excludedTest = (parseGitignore($scanpath));
if (count($excludedTest) > 0) {
$excluded = array_merge($excluded, $excludedTest);
}
}
$objectListArray = array();
foreach ($objectList as $objectRef) {
$fileFolderName = @ltrim(substr(str_replace("\\","/",$objectRef->getPathname()), strlen($path)),"/");
array_push($objectListArray,$fileFolderName);
}
}
// If we're just getting a branch, get that and set as the finalArray
$scanDir = $docRoot.$iceRoot;
$location = "";
if (isset($_GET['location'])) {
echo '<div id="branch" style="display: none">';
$location = str_replace("|","/",$_GET['location']);
}
echo '<div id="branch" style="display: none">';
$location = str_replace("|","/",$_GET['location']);
if ($location=="/") {$location = "";};
$dirArray = $filesArray = $finalArray = array();
@@ -56,9 +158,162 @@ for ($i=0;$i<count($finalArray);$i++) {
echo "</span></a></li>\n";
}
if (isset($_GET['location'])) {
echo ' </div>';
if ($_SESSION['githubDiff']) {
// Show the loading screen until we're done comparing files with GitHub
echo "<script>setTimeout(function(){top.ICEcoder.showHide('show',top.get('loadingMask'));},4)</script>";
$i=0;
$dirListArray = $dirSHAArray = $dirTypeArray = array();
// For each of the files in our local path...
for ($i=0; $i<count($objectListArray); $i++) {
$fileFolderName = "/".$objectListArray[$i];
// If we're not looking at a .git dir, it's not a .gitignore excluded path and not a dir
if (strpos($fileFolderName,".git/") == false && !in_array($docRoot.$iceRoot.$fileFolderName, $excluded) && !is_dir($docRoot.$iceRoot.$fileFolderName)) {
// Get contents of file
$contents = file_get_contents($docRoot.$iceRoot.$fileFolderName);
$finfo = "text";
// Determine if we should remove \r line endings based on mime type (text files yes, others no)
if (function_exists('finfo_open')) {
$finfoMIME = finfo_open(FILEINFO_MIME);
$finfo = finfo_file($finfoMIME, $docRoot.$iceRoot.$fileFolderName);
finfo_close($finfoMIME);
} else {
$fileExt = explode(" ",pathinfo($docRoot.$iceRoot.$fileFolderName, PATHINFO_EXTENSION));
$fileExt = $fileExt[0];
if (array_search($fileExt,array("gif","jpg","jpeg","png"))!==false) {$finfo = "image";};
if (array_search($fileExt,array("doc","docx","ppt","rtf","pdf","zip","tar","gz","swf","asx","asf","midi","mp3","wav","aiff","mov","qt","wmv","mp4","odt","odg","odp"))!==false) {$finfo = "other";};
}
if (strpos($finfo,"text")===0 || strpos($finfo,"empty")!==false) {
$contents = str_replace("\r","",$contents);
};
// Establish the blob SHA contents and push name, SHA and type into 3 arrays
$store = "blob ".strlen($contents)."\000".$contents;
array_push($dirListArray,ltrim($fileFolderName,"/"));
array_push($dirSHAArray,sha1($store));
array_push($dirTypeArray,"file");
}
}
// Get our GitHub relative site path
$ghRemoteURLPos = array_search($ICEcoder["root"],$ICEcoder['githubLocalPaths']);
$ghRemoteURLPaths = $ICEcoder['githubRemotePaths'];
$ghRemoteURL = $ghRemoteURLPaths[$ghRemoteURLPos];
$ghRemoteURL = str_replace("https://github.com/","",$ghRemoteURL);
// Reduce absolute excluded paths to relative
for ($i=0; $i<count($excluded); $i++) {
$excluded[$i] = str_replace($docRoot.$iceRoot,"",$excluded[$i]);
}
?>
<script>
top.repo = '<?php echo $ghRemoteURL;?>';
top.path = '<?php echo $path;?>';
dirListArray = [<?php echo "'".implode("','", $dirListArray)."'";?>];
dirSHAArray = [<?php echo "'".implode("','", $dirSHAArray)."'";?>];
dirTypeArray = [<?php echo "'".implode("','", $dirTypeArray)."'";?>];
excludedArray = [<?php echo "'".implode("','", $excluded)."'";?>];
// Start our github object
var github = new Github({token: "<?php echo $_SESSION['githubAuthToken'];?>", auth: "oauth"});
repoListArray = [];
repoSHAArray = [];
// Set our repo and get the tree recursively
var repo = github.getRepo(top.repo.split("/")[0], top.repo.split("/")[1]);
repo.getTree('master?recursive=true', function(err, tree) {
if(!err) {
top.treePaths = [];
top.diffPaths = [];
top.deletedPaths = [];
// ==========================================================
// NEW FILES are not compared for diffs in this loop, so kept
// ==========================================================
for (var i=0; i<tree.length; i++) {
// compare files (when tree types are blobs)
if (tree[i].type == "blob") {
// ===========================
// UNCHANGED FILES are removed
// ===========================
if (tree[i].sha == dirSHAArray[dirListArray.indexOf(tree[i].path)]) {
if (document.getElementById("|"+tree[i].path.replace("/","|")+"_perms")) {
thatNode = document.getElementById("|"+tree[i].path.replace("/","|")+"_perms").parentNode.parentNode;
thatNode.parentNode.removeChild(thatNode);
}
} else {
// ======================
// CHANGED FILES are kept
// ======================
if ("undefined" != typeof dirSHAArray[dirListArray.indexOf(tree[i].path)]) {
top.diffPaths.push(tree[i].path);
// ======================
// DELETED FILES are kept
// ======================
} else {
top.deletedPaths.push(tree[i].path);
}
}
} else {
top.treePaths.push(tree[i].path);
}
}
// Now we are only showing new, changed and deleted files from our GitHub tree list
// in short, we have removed unchanged files from what would be visible
// However, we should now consider dirs that the user hasn't opened yet as we can
// maybe remove closed dirs that contain no changes
for (var i=0; i<top.treePaths.length; i++) {
canShowDir = false;
for (j=0; j<top.diffPaths.length; j++) {
if (top.diffPaths[j].indexOf(top.treePaths[i]+"/") === 0) {
canShowDir = true;
}
}
// Remove dirs that contain no changes in them
if (!canShowDir) {
if (document.getElementById("|"+top.treePaths[i].replace("/","|")+"_perms")) {
thatNode = document.getElementById("|"+top.treePaths[i].replace("/","|")+"_perms").parentNode.parentNode;
thatNode.parentNode.removeChild(thatNode);
}
}
}
// Finally, remove any excluded files as specified in the .gitignore file
for (var i=0; i<excludedArray.length; i++) {
if (document.getElementById(excludedArray[i].replace(/\//g,"|")+"_perms")) {
thatNode = document.getElementById(excludedArray[i].replace(/\//g,"|")+"_perms").parentNode.parentNode;
thatNode.parentNode.removeChild(thatNode);
}
}
// With everything done, we can now set folderContent, animate those into view and when done, hide the loading screen
setTimeout(function(){
folderContent = document.getElementById('branch').innerHTML;
showFiles();
// If there are no diffs, ask user if they want to switch back to regular mode
setTimeout(function(){
if (parent.document.getElementById('|').parentNode.parentNode.parentNode.childNodes[2].childNodes.length==1) {
if(top.ICEcoder.ask('<?php echo $t['There are no...'];?>')) {
top.ICEcoder.githubDiffToggle();
} else {
top.ICEcoder.showHide('hide',top.get('loadingMask'));
}
} else {
top.ICEcoder.showHide('hide',top.get('loadingMask'));
}
},100);
},4);
} else {
// There was an error, display HTTP error code and response message
top.ICEcoder.message('<?php echo $t['Sorry, there was...'];?> '+err.error+'\n\n'+err.request.response);
top.ICEcoder.showHide('hide',top.get('loadingMask'));
}
});
</script>
<?php
}
?>
</div>
<script>
targetElem = top.ICEcoder.filesFrame.contentWindow.document.getElementById('<?php echo $_GET['location'];?>');
newUL = document.createElement("ul");
@@ -69,27 +324,82 @@ if (isset($_GET['location'])) {
x.parentNode.removeChild(x);
}
folderContent = document.getElementById('branch').innerHTML;
if (folderContent.indexOf('<ul')>-1 || folderContent.indexOf('<li')>-1) {
// Now animate folders & files into view
i=0;
animFolders = setInterval(function() {
i++;
folderItems = folderContent.split("\n");
showFiles = function() {
// Now display folders & files
// Animate into view?
if (folderItems.length <= 50) {
showFileI=0;
animFolders = setInterval(function() {
showFileI++;
showNextFile('progressive');
},4);
// Display immediately
} else {
showFileJ = folderItems.length;
showContent = folderContent;
showNextFile();
}
}
showNextFile = function(progressive) {
if (progressive) {
showContent = "";
folderItems = folderContent.split("\n");
for (j=0; j<=i; j++) {
showContent += folderItems[j];
if (j<i) {showContent += "\n";};
for (showFileJ=0; showFileJ<=showFileI; showFileJ++) {
showContent += folderItems[showFileJ];
if (showFileJ<showFileI) {showContent += "\n";};
}
showContent = showContent.slice(28);
if (j==folderItems.length) {
clearInterval(animFolders);
showContent = showContent.slice(0,-2);
setTimeout(function(){top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);},4);
if (!top.ICEcoder.fmReady) {top.ICEcoder.fmReady=true;};
}
showContent = showContent.slice(28);
if (showFileJ==folderItems.length) {
// If we've been animating into view, clear that interval
if ("undefined" != typeof animFolders) {clearInterval(animFolders);};
showContent = showContent.slice(0,-2);
// If we've got some deleted files (as we're in GitHub diff mode), add those into the file manager
if ("undefined" != typeof top.deletedPaths && top.deletedPaths.length > 0) {
i = 0;
top.addDeletedFiles = setInterval(function() {
fSplit = top.deletedPaths[i].lastIndexOf("/");
thePath = top.deletedPaths[i].substr(0,fSplit);
theFile = top.deletedPaths[i].substr(fSplit+1);
// If it's not excluded
if ("undefined" != typeof excludedArray && excludedArray.indexOf((thePath == "" ? "" : "/" + thePath)+"/"+theFile) == -1) {
// If we're adding a deleted dir/file in a sub-dir
if ("<?php echo $location;?>" == "/"+thePath) {
top.ICEcoder.updateFileManagerList('add','/'+thePath,theFile,false,false,false,'file');
// If we're adding a deleted dir/file at the root level
} else {
// Folder
if (thePath != "") {
top.ICEcoder.updateFileManagerList('add',top.iceRoot,thePath,false,false,false,'folder');
// File
} else {
top.ICEcoder.updateFileManagerList('add',top.iceRoot+thePath,theFile,false,false,false,'file');
}
}
}
i++;
if ("undefined" == typeof top.deletedPaths[i]) {
clearInterval(top.addDeletedFiles);
}
},20);
}
newUL.innerHTML = showContent;
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
},4);
setTimeout(function(){top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);},4);
if (!top.ICEcoder.fmReady) {top.ICEcoder.fmReady=true;};
}
newUL.innerHTML = showContent;
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
}
// If we're not in githubDiff mode, show files here
if (folderContent.indexOf('<ul')>-1 || folderContent.indexOf('<li')>-1) {
<?php if (!$_SESSION['githubDiff']) {echo 'showFiles();';};?>
} else {
<?php
$iceGithubLocalPaths = $ICEcoder["githubLocalPaths"];
@@ -97,15 +407,14 @@ if (isset($_GET['location'])) {
$pathPos = array_search($iceRoot,$iceGithubLocalPaths);
if ($pathPos !== false) {
?>
if (top.ICEcoder.ask("Your local folder is empty, would you like to clone <?php echo $iceGithubRemotePaths[$pathPos];?>?")) {
if (top.ICEcoder.ask("<?php echo $t['Your local folder...'];?> <?php echo $iceGithubRemotePaths[$pathPos];?>?")) {
setTimeout(function() {
top.ICEcoder.showHide('show',top.get('loadingMask'));
top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/github.php?action=clone&csrf="+top.ICEcoder.csrf;
top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "github.php?action=clone&csrf="+top.ICEcoder.csrf;
},4);
}
<?php ;}; ?>
}
</script>
<?php
;};
?>
</body>
</html>

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['github-manager'];
// If we have an action to perform
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action'])) {
@@ -26,7 +27,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
if (is_writable($docRoot)) {
mkdir($docRoot.$chosenLocal, 0705);
} else {
echo "<script>top.ICEcoder.message('Sorry, cannot create folder at\\n".$chosenLocal."');</script>";
echo "<script>top.ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$chosenLocal."');</script>";
}
}
@@ -54,9 +55,9 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Hide this popup and reload file manager
echo "<script>top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));top.ICEcoder.refreshFileManager();</script>";
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
}
}
@@ -153,9 +154,9 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Finally, reload the iFrame screen for the user
header("Location: github-manager.php?updatedGithubPaths&csrf=".$_SESSION["csrf"]);
echo "<script>window.location='github-manager.php?updatedGithubPaths&csrf='+top.ICEcoder.csrf;</script>";
die('saving github paths...');
die($t['saving github paths']);
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
}
}
@@ -172,7 +173,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
<body class="githubManager">
<h1>github paths</h1>
<h1><?php echo $t['github paths'];?></h1>
<div style="display: inline-block; width: 620px; height: 340px; overflow-y: auto">
<?php
@@ -181,25 +182,25 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
if (count($pathsLocal) > 0) {
?>
<div style="display: inline-block; width: 600px; margin-bottom: 30px">
<h2>Choose existing path</h2><br>
<h2><?php echo $t['Choose existing path'];?></h2><br>
<form id="githubUpdateForm" action="github-manager.php?action=update" method="POST">
<table>
<tr>
<td style="padding-left: 5px">Local path</td>
<td style="padding-left: 5px">Remote GitHub path</td>
<td style="padding-left: 5px"><?php echo $t['Local path'];?></td>
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td>
</tr>
<?php
for ($i=0; $i<count($pathsLocal); $i++) {
echo '<tr>';
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPath'.$i.'" value="'.$pathsLocal[$i].'" style="width: 250px"></td>';
echo '<td style="padding: 0 10px 8px 0"><input type="text" name="githubRemotePath'.$i.'" value="'.$pathsRemote[$i].'" style="width: 250px"></td>';
echo '<td style="padding: 2px 0 8px 0"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'github-manager.php?action=choose&pathPair='.$i.'&csrf='.$_SESSION["csrf"].'\'">Choose</div></td>';
echo '<td style="padding: 2px 0 8px 0"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'github-manager.php?action=choose&pathPair='.$i.'&csrf='.$_SESSION["csrf"].'\'">'.$t['Choose'].'</div></td>';
echo '</tr>';
}
echo '<tr>';
echo '<td style="padding-top: 7px; color: #444">Set local and remote path to blanks to remove</td>';
echo '<td style="padding: 3px 10px 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'githubUpdateForm\').submit()">Update</div></td>';
echo '<td style="padding-top: 7px; color: #444">'.$t['Set local and...'].'</td>';
echo '<td style="padding: 3px 10px 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'githubUpdateForm\').submit()">'.$t['Update'].'</div></td>';
echo '</tr>';
?>
</table>
@@ -211,32 +212,32 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
?>
<div style="display: inline-block; width: 600px">
<h2>Add new path</h2><br>
<h2><?php echo $t['Add new path'];?></h2><br>
<form id="githubAddForm" action="github-manager.php?action=add" method="POST">
<table>
<tr>
<td style="padding-left: 5px">Local path</td>
<td style="padding-left: 5px">Remote GitHub path</td>
<td style="padding-left: 5px"><?php echo $t['Local path'];?></td>
<td style="padding-left: 5px"><?php echo $t['Remote GitHub path'];?></td>
</tr>
<tr>
<td style="padding: 0 10px 8px 0"><input type="text" name="githubLocalPathNEW" value="" style="width: 250px"></td>
<td style="padding: 0 0 8px 0"><input type="text" name="githubRemotePathNEW" value="" style="width: 250px"></td>
</tr>
<tr>
<td colspan="2" style="padding: 3px 0 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById('githubAddForm').submit()">Add</div></td>
<td colspan="2" style="padding: 3px 0 8px 0; text-align: right"><div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById('githubAddForm').submit()"><?php echo $t['Add'];?></div></td>
</tr>
</table>
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
</div>
<h2 style="margin-bottom: 10px">Usage Info:</h2>
<h2 style="margin-bottom: 10px"><?php echo $t['Usage Info'];?></h2>
<p style="color: #888; margin: 0 10px 10px 0">Enter relative local paths (eg /server/myfiles) and absolute GitHub paths (eg https://github.com/user/repo or https://github.com/user/repo/tree/branch for branches), as per the examples. With this done you have established the source paths at both locations, as a pair.</p>
<p style="color: #888; margin: 0 10px 10px 0">You can then choose a path pair and this then becomes your new root path in ICEcoder.</p>
<p style="color: #888; margin: 0 10px 10px 0">The file manager then displays a new GitHub icon, which you can click on to perform and show a diff check between the 2 sources. These diffs can then be committed and pushed to the remote path at GitHub or cloned to your local path, to sync your files.</p>
<p style="color: #888; margin: 0 10px 0 0">If you want to set another root path, this can be done in the Help > Settings screen.</p>
<p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['Enter relative local...'];?></p>
<p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['You can then...'];?></p>
<p style="color: #888; margin: 0 10px 10px 0"><?php echo $t['The file manager...'];?></p>
<p style="color: #888; margin: 0 10px 0 0"><?php echo $t['If you want...'];?></p>
</div>

36
lib/github.css Normal file
View File

@@ -0,0 +1,36 @@
/* First, reset everything to a standard */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border: 0;
margin: 0;
padding: 0;
outline: 0;
font-size: 12px;
vertical-align: top;
}
body {overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
a {color: #fff; text-decoration: none}
input, textarea {font-family: arial, verdana, helvetica, sans-serif; padding: 4px; border: 1px solid #555; background-color: #444; color: #fff}
input:focus, textarea:focus {
outline: none;
-webkit-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
-moz-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
}
.githubAction {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}

413
lib/github.js Normal file
View File

@@ -0,0 +1,413 @@
// This file contains the HTTP Req Abs, Repo API and getRepo
// portions of Top Level API from github.com/michael/github.js
// ORIGINAL LIB:
// Github.js 0.7.0
// (c) 2012 Michael Aufreiter, Development Seed
// Github.js is freely distributable under the MIT license.
// For all details and documentation:
// http://substance.io/michael/github
(function() {
var Github;
var API_URL = 'https://api.github.com';
Github = window.Github = function(options) {
// HTTP Request Abstraction
// =======
//
// I'm not proud of this and neither should you be if you were responsible for the XMLHttpRequest spec.
function _request(method, path, data, cb, raw) {
function getURL() {
var url = API_URL + path;
return url + ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime();
}
var xhr = new XMLHttpRequest();
if (!raw) {xhr.dataType = "json"}
xhr.open(method, getURL());
xhr.onreadystatechange = function () {
if (this.readyState == 4) {
if (this.status >= 200 && this.status < 300 || this.status === 304) {
cb(null, raw ? this.responseText : this.responseText ? JSON.parse(this.responseText) : true);
} else {
cb({request: this, error: this.status});
}
}
}
xhr.setRequestHeader('Accept','application/vnd.github.raw');
xhr.setRequestHeader('Content-Type','application/json;charset=UTF-8');
if (
(options.auth == 'oauth' && options.token) ||
(options.auth == 'basic' && options.username && options.password)
) {
xhr.setRequestHeader('Authorization',options.auth == 'oauth'
? 'token '+ options.token
: 'Basic ' + Base64.encode(options.username + ':' + options.password)
);
}
data ? xhr.send(JSON.stringify(data)) : xhr.send();
}
// Repository API
// =======
Github.Repository = function(options) {
var repo = options.name;
var user = options.user;
var that = this;
var repoPath = "/repos/" + user + "/" + repo;
var currentTree = {
"branch": null,
"sha": null
};
// Uses the cache if branch has not been changed
// -------
function updateTree(branch, cb) {
if (branch === currentTree.branch && currentTree.sha) return cb(null, currentTree.sha);
that.getRef("heads/"+branch, function(err, sha) {
currentTree.branch = branch;
currentTree.sha = sha;
cb(err, sha);
});
}
// Get a particular reference
// -------
this.getRef = function(ref, cb) {
_request("GET", repoPath + "/git/refs/" + ref, null, function(err, res) {
if (err) return cb(err);
cb(null, res.object.sha);
});
};
// Create a new reference
// --------
//
// {
// "ref": "refs/heads/my-new-branch-name",
// "sha": "827efc6d56897b048c772eb4087f854f46256132"
// }
this.createRef = function(options, cb) {
_request("POST", repoPath + "/git/refs", options, cb);
};
// Delete a reference
// --------
//
// repo.deleteRef('heads/gh-pages')
// repo.deleteRef('tags/v1.0')
this.deleteRef = function(ref, cb) {
_request("DELETE", repoPath + "/git/refs/"+ref, options, cb);
};
// List all branches of a repository
// -------
this.listBranches = function(cb) {
_request("GET", repoPath + "/git/refs/heads", null, function(err, heads) {
if (err) return cb(err);
cb(null, _.map(heads, function(head) { return _.last(head.ref.split('/')); }));
});
};
// Retrieve the contents of a blob
// -------
this.getBlob = function(sha, cb) {
_request("GET", repoPath + "/git/blobs/" + sha, null, cb, 'raw');
};
// For a given file path, get the corresponding sha (blob for files, tree for dirs)
// -------
this.getSha = function(branch, path, cb) {
// Just use head if path is empty
if (path === "") return that.getRef("heads/"+branch, cb);
that.getTree(branch+"?recursive=true", function(err, tree) {
var file = _.select(tree, function(file) {
return file.path === path;
})[0];
cb(null, file ? file.sha : null);
});
};
// Retrieve the tree a commit points to
// -------
this.getTree = function(tree, cb) {
_request("GET", repoPath + "/git/trees/"+tree, null, function(err, res) {
if (err) return cb(err);
cb(null, res.tree);
});
};
// Post a new blob object, getting a blob SHA back
// -------
this.postBlob = function(content, cb) {
if (typeof(content) === "string") {
content = {
"content": content,
"encoding": "utf-8"
};
}
_request("POST", repoPath + "/git/blobs", content, function(err, res) {
if (err) return cb(err);
cb(null, res.sha);
});
};
// Update an existing tree adding a new blob object getting a tree SHA back
// -------
this.updateTree = function(baseTree, path, blob, cb) {
var data = {
"base_tree": baseTree,
"tree": [
{
"path": path,
"mode": "100644",
"type": "blob",
"sha": blob
}
]
};
_request("POST", repoPath + "/git/trees", data, function(err, res) {
if (err) return cb(err);
cb(null, res.sha);
});
};
// Post a new tree object having a file path pointer replaced
// with a new blob SHA getting a tree SHA back
// -------
this.postTree = function(tree, cb) {
_request("POST", repoPath + "/git/trees", { "tree": tree }, function(err, res) {
if (err) return cb(err);
cb(null, res.sha);
});
};
// Create a new commit object with the current commit SHA as the parent
// and the new tree SHA, getting a commit SHA back
// -------
this.commit = function(parent, tree, message, cb) {
var data = {
"message": message,
"author": {
"name": options.username
},
"parents": [
parent
],
"tree": tree
};
_request("POST", repoPath + "/git/commits", data, function(err, res) {
currentTree.sha = res.sha; // update latest commit
if (err) return cb(err);
cb(null, res.sha);
});
};
// Update the reference of your head to point to the new commit SHA
// -------
this.updateHead = function(head, commit, cb) {
_request("PATCH", repoPath + "/git/refs/heads/" + head, { "sha": commit }, function(err, res) {
cb(err);
});
};
// Show repository information
// -------
this.show = function(cb) {
_request("GET", repoPath, null, cb);
};
// Get contents
// --------
this.contents = function(path, cb) {
_request("GET", repoPath + "/contents", { path: path }, cb);
};
// Fork repository
// -------
this.fork = function(cb) {
_request("POST", repoPath + "/forks", null, cb);
};
// Create pull request
// --------
this.createPullRequest = function(options, cb) {
_request("POST", repoPath + "/pulls", options, cb);
};
// Read file at given path
// -------
this.read = function(branch, path, cb) {
that.getSha(branch, path, function(err, sha) {
if (!sha) return cb("not found", null);
that.getBlob(sha, function(err, content) {
cb(err, content, sha);
});
});
};
// Remove a file from the tree
// -------
this.remove = function(branch, path, cb) {
updateTree(branch, function(err, latestCommit) {
that.getTree(latestCommit+"?recursive=true", function(err, tree) {
// Update Tree
var newTree = _.reject(tree, function(ref) { return ref.path === path });
_.each(newTree, function(ref) {
if (ref.type === "tree") delete ref.sha;
});
that.postTree(newTree, function(err, rootTree) {
that.commit(latestCommit, rootTree, 'Deleted '+path , function(err, commit) {
that.updateHead(branch, commit, function(err) {
cb(err);
});
});
});
});
});
};
// Move a file to a new location
// -------
this.move = function(branch, path, newPath, cb) {
updateTree(branch, function(err, latestCommit) {
that.getTree(latestCommit+"?recursive=true", function(err, tree) {
// Update Tree
_.each(tree, function(ref) {
if (ref.path === path) ref.path = newPath;
if (ref.type === "tree") delete ref.sha;
});
that.postTree(tree, function(err, rootTree) {
that.commit(latestCommit, rootTree, 'Deleted '+path , function(err, commit) {
that.updateHead(branch, commit, function(err) {
cb(err);
});
});
});
});
});
};
// Write file contents to a given branch and path
// -------
this.write = function(branch, path, content, message, cb) {
updateTree(branch, function(err, latestCommit) {
if (err) return cb(err);
that.postBlob(content, function(err, blob) {
if (err) return cb(err);
that.updateTree(latestCommit, path, blob, function(err, tree) {
if (err) return cb(err);
that.commit(latestCommit, tree, message, function(err, commit) {
if (err) return cb(err);
that.updateHead(branch, commit, cb);
});
});
});
});
};
};
// Gists API
// =======
Github.Gist = function(options) {
var id = options.id;
var that = this;
var gistPath = "/gists/"+id;
// Read the gist
// --------
this.read = function(cb) {
_request("GET", gistPath, null, function(err, gist) {
cb(err, gist);
});
};
// Delete the gist
// --------
this.delete = function(cb) {
_request("DELETE", gistPath, null, function(err,res) {
cb(err,res);
});
};
// Fork a gist
// --------
this.fork = function(cb) {
_request("POST", gistPath+"/fork", null, function(err,res) {
cb(err,res);
});
};
// Update a gist with the new stuff
// --------
this.update = function(options, cb) {
_request("PATCH", gistPath, options, function(err,res) {
cb(err,res);
});
};
};
// Top Level API
// -------
this.getRepo = function(user, repo) {
return new Github.Repository({user: user, name: repo});
};
Github.User = function(token) {
console.log(token);
this.validate = function(cb) {
_request("GET", "/applications/"+token+"/tokens/", function(err, res) {
console.log(err);
console.log(res);
cb(err,res);
});
};
}
this.getUser = function(token) {
return new Github.User(token);
};
};
}).call(this);

View File

@@ -1,19 +1,44 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['github'];
// SSL check, as everything is over https
$wrappers = stream_get_wrappers();
$sslAvail = true;
if (!extension_loaded('openssl') || !in_array('https', $wrappers)) {
$sslAvail = false;
echo "<script>top.ICEcoder.message('Sorry, you don\'t appear to have OpenSSL loaded on your PHP instance, so https is not available. This is required for GitHub data transfer, please amend php.ini settings, restart your server and try again');top.ICEcoder.showHide('hide',top.get('loadingMask'));</script>";
echo "<script>top.ICEcoder.message('".$t['Sorry, you do...']."');top.ICEcoder.showHide('hide',top.get('loadingMask'));</script>";
die();
}
// If we have an action to perform
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action']) && $sslAvail) {
// ====
// AUTH
// ====
if ($_GET['action']=="auth") {
$_SESSION['githubAuthToken'] = xssClean($_GET['token'],"html");
echo '<!DOCTYPE html>
<html>
<head>
<script src="github.js"></script>
</body>
<script>
top.ICEcoder.githubAuthTokenSet = true;
goNext = "'.xssClean($_GET['goNext'],"html").'";
if (goNext=="showManager") {
top.ICEcoder.githubManager();
}
if (goNext=="loadFiles") {
top.ICEcoder.githubDiffToggle();
}
</script>
</body>
</html>';
}
// =====
// CLONE
// =====
@@ -83,5 +108,136 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
}
// ======
// COMMIT
// ======
if ($_GET['action']=="commit") {
?>
<!DOCTYPE html>
<html onContextMenu="return false">
<head>
<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">
</head>
<body class="githubAction">
<h1><?php
$action = xssClean($_GET['action'],"html");
echo $action == "commit" ? "Commit files" : "Pull files"; ?></h1>
<form name="commitDetails">
Title:<br><input type="text" name="commitTitle" id="commitTitle" value="" style="width: 300px; margin: 5px 0 15px 0" maxlength="50"><br>
Message:<br><textarea name="commitMessage" id="commitMessage" style="width: 300px; height: 118px; margin: 5px 0 15px 0"></textarea>
</form>
<div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="top.ICEcoder.showHide('show',top.get('loadingMask'));commitFiles()">Commit</div>
<br><br>
<?php
// Get file contents for selected files
$selectedFiles = xssClean($_GET['selectedFiles'],"html");
$selectedFiles = explode(";",$selectedFiles);
for ($i=0; $i<count($selectedFiles); $i++) {
// Replace pipes with slashes
$file = str_replace("|","/",$selectedFiles[$i]);
// Trim any +'s or spaces from the end of file
$file = rtrim(rtrim($file,'+'),' ');
// Establish the real absolute path to the file
$file = str_replace("\\","/",realpath($docRoot.$iceRoot.$file));
// Only get the file if it exists and begins with our $docRoot
if (file_exists($file) && strpos($file,$docRoot) === 0) {
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
echo '<textarea name="loadedFile'.$i.'" id="loadedFile'.$i.'" style="display: none">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&amp;",$loadedFile)).'</textarea><br><br>'.PHP_EOL.PHP_EOL;
} else {
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
}
}
?>
<script>
// Start our github object
var github = new Github({token: "<?php echo $_SESSION['githubAuthToken'];?>", auth: "oauth"});
committingFiles = ['<?php
$cF = implode("','", $selectedFiles);
echo $cF;
?>'];
seqFile = 0;
commitFiles = function() {
// Commit our files one after another
var repo = github.getRepo(top.repo.split("/")[0], top.repo.split("/")[1]);
repo.write(
'master',
committingFiles[seqFile].substr(1).replace(/\|/g,"/"),
document.getElementById('loadedFile'+seqFile).value,
document.getElementById('commitTitle').value+'\n\n'+document.getElementById('commitMessage').value,
function(err) {
if (!err) {
var locSplit = committingFiles[seqFile].lastIndexOf("|");
var location = committingFiles[seqFile].substr(0,locSplit+1);
var file = committingFiles[seqFile].substr(locSplit+1);
// Splice from diff or deleted paths
if (top.diffPaths.indexOf(committingFiles[seqFile].substr(1).replace(/\|/g,"/")) > -1) {
top.diffPaths.splice(top.diffPaths.indexOf(committingFiles[seqFile].substr(1).replace(/\|/g,"/")),1);
}
if (top.deletedPaths.indexOf(committingFiles[seqFile].substr(1).replace(/\|/g,"/")) > -1) {
top.deletedPaths.splice(top.deletedPaths.indexOf(committingFiles[seqFile].substr(1).replace(/\|/g,"/")),1);
}
// Then deselect and remove from file manager
top.ICEcoder.thisFileFolderLink = committingFiles[seqFile];
top.ICEcoder.selectFileFolder(false,'ctrlSim');
top.ICEcoder.updateFileManagerList("delete",location,file);
seqFile++;
// If there's another file to do
if (top.ICEcoder.selectedFiles.length > 0) {
commitFiles();
} else {
top.ICEcoder.showHide('hide',top.get('loadingMask'));
top.ICEcoder.showHide('hide',top.get('blackMask'));
if (top.diffPaths.length == 0 && top.deletedPaths.length == 0) {
top.ICEcoder.message('All done, switching modes');
top.ICEcoder.githubDiffToggle();
}
}
} else {
top.ICEcoder.message('There was an error with committing.\n\nSee dev tools console for details.');
console.log(err);
}
}
);
}
</script>
</body>
</html>
<?php
}
// ====
// PULL
// ====
if ($_GET['action']=="pull") {
?>
<script>
top.ICEcoder.showHide('hide',top.get('blackMask'));
top.ICEcoder.message("Pull actions not yet available. Will be in ICEcoder v4.3");
</script>
<?php
}
}
?>
?>

View File

@@ -1,27 +1,35 @@
<?php
// Stop if we're running an old version in the tmp dir
if(strpos(str_replace("\\","/",dirname(__FILE__)),"tmp/oldVersion") !== false) {
die("This is an old version of ICEcoder. Won't run from tmp/oldVersion/ dir.");
}
// Load common functions
include_once(dirname(__FILE__)."/settings-common.php");
$text = $_SESSION['text'];
$t = $text['headers'];
// CSRF synchronizer token pattern, 32 chars
if (!isset($_SESSION["csrf"])) {
$_SESSION["csrf"] = md5(uniqid(mt_rand(), true));
$_SESSION["csrf"] = md5(uniqid(mt_rand(), true));
}
if (($_GET || $_POST) && (!isset($_REQUEST["csrf"]) || $_REQUEST["csrf"] !== $_SESSION["csrf"])) {
$req = isset($_REQUEST["csrf"]) ? xssClean($_REQUEST["csrf"],"html") : "";
die("Bad CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed.<br><br>
die($t['Bad CSRF token...']."<br><br>
CSRF issue:<br>
REQUEST: ".$req."<br>
SESSION: ".xssClean($_SESSION["csrf"],"html")."<br>
FILE: ".xssClean($_SERVER["SCRIPT_NAME"],"html")."<br>
GET: ".xssClean(var_export($_GET, true),"html")."<br>
POST: ".xssClean(var_export($_POST, true),"html")."<br>
<br>Many thanks!");
POST: ".xssClean(var_export($_POST, true),"html"));
}
// Set our security related headers
header("X-Frame-Options: SAMEORIGIN"); // Only frames of same origin
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
if (!headers_sent()) {
// Set our security related headers
header("X-Frame-Options: SAMEORIGIN"); // Only frames of same origin
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
}
?>

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['help'];
?>
<!DOCTYPE html>
@@ -14,63 +15,64 @@ include("settings.php");
<body class="help">
<h1 id="title">shortcuts</h1>
<h1 id="title"><?php echo $t['shortcuts'];?></h1>
<?php $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;?>
<div style="display: inline-block; width: 365px; margin-right: 20px">
<h2>Within document</h2>
<h2><?php echo $t['Within document'];?></h2>
<!-- This can only be CTRL+space as Cmd+space is a reserved apple shortcut -->
<span class="key">Ctrl <span class="plus">+</span> Space</span> <span class="shortcut">Autocomplete / add snippet</span><br>
<span class="key">Ctrl <span class="plus">+</span> Click <span class="plus">or</span> Alt <span class="plus">+</span> Drag</span> <span class="shortcut">Multiple select</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &uarr;</span> <span class="shortcut">Move line up</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &darr;</span> <span class="shortcut">Move line down</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut">Duplicate line(s)</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut">Remove line(s)</span><br>
<span class="key">Shift <span class="plus">+</span> Enter</span> <span class="shortcut">Insert line before</span><br>
<span class="key">Alt <span class="plus">+</span> Enter</span> <span class="shortcut">Insert line after</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> i</span> <span class="shortcut">Search for selected <span class="info" title="Popups need to be enabled">[?]</span></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> j</span> <span class="shortcut">Jump to definition / jump back</span><br>
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment</span><br>
<span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> d</span> <span class="shortcut">Wrap with &lt;div&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> s</span> <span class="shortcut">Wrap with &lt;span&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> p</span> <span class="shortcut">Wrap / unwrap with &lt;p&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> a</span> <span class="shortcut">Wrap / unwrap with &lt;a&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> b</span> <span class="shortcut">Wrap / unwrap with &lt;b&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> i</span> <span class="shortcut">Wrap / unwrap with &lt;i&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> g</span> <span class="shortcut">Wrap / unwrap with &lt;strong&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> e</span> <span class="shortcut">Wrap / unwrap with &lt;em&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> nums 1 - 3</span> <span class="shortcut">Wrap/unwrap with &lt;h1&gt; - &lt;h3&gt;</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> Enter</span> <span class="shortcut">End line with &lt;br&gt;</span><br><br>
<h2>On Tabs</h2>
<span class="key">Middle click</span> <span class="shortcut">Close tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> <?php echo $t['Space'];?></span> <span class="shortcut"><?php echo $t['Autocomplete add snippet'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> <?php echo $t['Click'];?> <span class="plus"><?php echo $t['or'];?></span> Alt <span class="plus">+</span> <?php echo $t['Drag'];?></span> <span class="shortcut"><?php echo $t['Multiple select'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &uarr;</span> <span class="shortcut"><?php echo $t['Move line up'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &darr;</span> <span class="shortcut"><?php echo $t['Move line down'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut"><?php echo $t['Duplicate lines'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut"><?php echo $t['Remove lines'];?></span><br>
<span class="key">Shift <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['Insert line before'];?></span><br>
<span class="key">Alt <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['Insert line after'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> i</span> <span class="shortcut"><?php echo $t['Search for selected'];?> <span class="info" title="Popups need to be enabled">[?]</span></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> j</span> <span class="shortcut"><?php echo $t['Jump to definition'];?></span><br>
<span class="key">Esc</span> <span class="shortcut"><?php echo $t['Comment uncomment'];?></span><br>
<span class="key">Tab</span> <span class="shortcut"><?php echo $t['Insert tab indent'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> d</span> <span class="shortcut"><?php echo $t['Wrap with div'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> s</span> <span class="shortcut"><?php echo $t['Wrap with span'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> p</span> <span class="shortcut"><?php echo $t['Wrap unwrap p'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> a</span> <span class="shortcut"><?php echo $t['Wrap unwrap a'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> b</span> <span class="shortcut"><?php echo $t['Wrap unwrap b'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> i</span> <span class="shortcut"><?php echo $t['Wrap unwrap i'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> g</span> <span class="shortcut"><?php echo $t['Wrap unwrap strong'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> e</span> <span class="shortcut"><?php echo $t['Wrap unwrap em'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> 8</span> <span class="shortcut"><?php echo $t['Wrap unwrap li'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> 1, 2 <?php echo $t['or'];?> 3</span> <span class="shortcut"><?php echo $t['Wrap unwrap h1...'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Alt <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['End line with...'];?></span><br><br>
<h2><?php echo $t['On Tabs'];?></h2>
<span class="key"><?php echo $t['Middle click'];?></span> <span class="shortcut"><?php echo $t['Close tab'];?></span><br>
</div>
<div style="display: inline-block; width: 365px">
<h2>Within file manager</h2>
<span class="key">Left click</span> <span class="shortcut">Select file / folder</span><br>
<span class="key">Double click / click (mobile)</span> <span class="shortcut">Open file</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> left click</span> <span class="shortcut">Multiple select</span><br>
<span class="key">Shift <span class="plus">+</span> left click</span> <span class="shortcut">Range select</span><br>
<span class="key">Right click</span> <span class="shortcut">Options for selected</span><br>
<span class="key">Delete</span> <span class="shortcut">Delete selected</span><br><br>
<h2><?php echo $t['Within file manager'];?></h2>
<span class="key"><?php echo $t['Left click'];?></span> <span class="shortcut"><?php echo $t['Select file folder'];?></span><br>
<span class="key"><?php echo $t['Double click tap...'];?></span> <span class="shortcut"><?php echo $t['Open file'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> <?php echo strtolower($t['Left click']);?></span> <span class="shortcut"><?php echo $t['Multiple select'];?></span><br>
<span class="key">Shift <span class="plus">+</span> <?php echo strtolower($t['Left click']);?></span> <span class="shortcut"><?php echo $t['Range select'];?></span><br>
<span class="key"><?php echo $t['Right click'];?></span> <span class="shortcut"><?php echo $t['Options for selected'];?></span><br>
<span class="key">Delete</span> <span class="shortcut"><?php echo $t['Delete selected'];?></span><br><br>
<h2>Anywhere</h2>
<span class="key">Middle scrollwheel</span> <span class="shortcut">Next/previous tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &rarr;</span> <span class="shortcut">Next tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &larr;</span> <span class="shortcut">Previous tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> o</span> <span class="shortcut">Open file prompt</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> f</span> <span class="shortcut">Find</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> g</span> <span class="shortcut">Focus on Go to line input</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> s</span> <span class="shortcut">Save</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut">Save as...</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage <span class="info" title="Popups need to be enabled">[?]</span></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> `</span> <span class="shortcut">Contract/expand file manager</span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> .</span> <span class="shortcut">Fold/unfold current line</span><br>
<span class="key">Space</span> <span class="shortcut">Refocus on document</span><br>
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
<h2><?php echo $t['Anywhere'];?></h2>
<span class="key"><?php echo $t['Middle scrollwheel'];?></span> <span class="shortcut"><?php echo $t['Next previous tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &rarr;</span> <span class="shortcut"><?php echo $t['Next tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> &larr;</span> <span class="shortcut"><?php echo $t['Previous tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> +</span> <span class="shortcut"><?php echo $t['New tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> -</span> <span class="shortcut"><?php echo $t['Close current tab'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> o</span> <span class="shortcut"><?php echo $t['Open file prompt'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> f</span> <span class="shortcut"><?php echo $t['Find'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> g</span> <span class="shortcut"><?php echo $t['Focus on Go...'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> s</span> <span class="shortcut"><?php echo $t['Save'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Shift <span class="plus">+</span> s</span> <span class="shortcut"><?php echo $t['Save as'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> Enter</span> <span class="shortcut"><?php echo $t['View webpage'];?> <span class="info" title="Popups need to be enabled">[?]</span></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> `</span> <span class="shortcut"><?php echo $t['Contract expand file...'];?></span><br>
<span class="key"><?php echo $isMac ? "Cmd" : "Ctrl";?> <span class="plus">+</span> .</span> <span class="shortcut"><?php echo $t['Fold unfold current...'];?></span><br>
<span class="key"><?php echo $t['Space'];?></span> <span class="shortcut"><?php echo $t['Refocus on document'];?></span><br>
<span class="key">Esc</span> <span class="shortcut"><?php echo $t['Cancel tasks'];?></span><br><br>
</div>
</body>

View File

@@ -62,6 +62,12 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
.files .fileNav li {display: inline-block; padding: 18px 15px 0 0}
.files .fileNav a {color: #666; text-decoration: none}
.files .fileNav a:hover {color: #fff; cursor: pointer}
.files .githubNav {display: none; height: 19px; padding-top: 17px}
.files .githubNav .commit {display: inline-block; margin-left: 15px; padding: 6px 9px; background: #555; color: #333; cursor: pointer}
.files .githubNav .selected {display: inline-block; margin-left: 15px; padding: 6px 0; color: #333}
.files .githubNav .pull {position: absolute; display: inline-block; margin-left: 15px; padding: 6px 9px; background: #555; color: #333; right: 15px; cursor: pointer}
.files .options {
transition: opacity 0.15s ease-in-out;
}

View File

@@ -50,6 +50,7 @@ var ICEcoder = {
bugFilesSizesSeen: [], // Array of last seen sizes of bug files
bugFilesSizesActual: [], // Array of actual sizes of bug files
githubDiff: false, // Toggle for viewing GitHub/FM diff view
githubAuthTokenSet: false, // Has the user set their GitHub token yet
ready: false, // Indicates if ICEcoder is ready for action
// Set our aliases
@@ -114,7 +115,7 @@ var ICEcoder = {
if (!dontSetEditor) {
this.editor.style.width = ICEcoder.content.style.width = (winW-this.filesW) + "px";
ICEcoder.content.style.height = (winH-headerH-tabsBarH-findBarH-26) + "px";
// Resize the CodeMirror instances to match the window size
setTimeout(function(){
for (var i=0;i<top.ICEcoder.openFiles.length;i++) {
@@ -404,7 +405,7 @@ var ICEcoder = {
cM.indentLine(endLine+2,'subtract');
});
} else {
if ( ['p','a','b','i','strong','em','h1','h2','h3','h4','h5','h6'].indexOf(tag)>-1 &&
if ( ['p','a','b','i','strong','em','h1','h2','h3','li'].indexOf(tag)>-1 &&
cM.getSelection().substr(0,tag.length+1) == "<"+tagStart &&
cM.getSelection().substr(-(tag.length+3)) == "</"+tagEnd+">") {
// Undo wrapper
@@ -544,7 +545,7 @@ var ICEcoder = {
}
window.open("http://www.google.com/#output=search&q="+searchPrefix+top.ICEcoder.getcMInstance().getSelection());
} else {
top.ICEcoder.message('No text selected to search on');
top.ICEcoder.message(top.t['No text selected...']);
}
}
},
@@ -582,12 +583,12 @@ var ICEcoder = {
},
// Select file or folder on demand
selectFileFolder: function(evt) {
selectFileFolder: function(evt,ctrlSim) {
var tgtFile, shortURL, selecting, dirList, lastFileClicked, startFile, endFile, thisFileObj;
// If we've clicked somewhere other than a file/folder
if (top.ICEcoder.thisFileFolderLink=="") {
if (!evt.ctrlKey && !top.ICEcoder.cmdKey) {
if (!ctrlSim && !evt.ctrlKey && !top.ICEcoder.cmdKey) {
top.ICEcoder.deselectAllFiles();
}
} else if (top.ICEcoder.thisFileFolderLink) {
@@ -596,7 +597,7 @@ var ICEcoder = {
tgtFile = ICEcoder.filesFrame.contentWindow.document.getElementById(shortURL);
// If we have the CTRL/Cmd key down
if (evt.ctrlKey || top.ICEcoder.cmdKey) {
if (ctrlSim || evt.ctrlKey || top.ICEcoder.cmdKey) {
// Deselect or select file
if (top.ICEcoder.selectedFiles.indexOf(shortURL)>-1) {
ICEcoder.selectDeselectFile('deselect',tgtFile);
@@ -648,9 +649,20 @@ var ICEcoder = {
top.ICEcoder.selectedFiles.push(shortURL);
}
}
// If in GitHub mode, update the selected count and button colours
if (top.ICEcoder.githubDiff) {
top.get('githubNavSelectedCount').innerHTML = "Selected: " + top.ICEcoder.selectedFiles.length;
top.get('githubNavCommit').style.color = top.ICEcoder.selectedFiles.length > 0 ? "#fff" : "#333";
top.get('githubNavCommit').style.background = top.ICEcoder.selectedFiles.length > 0 ? "#2187e7" : "#555";
top.get('githubNavSelectedCount').style.color = top.ICEcoder.selectedFiles.length > 0 ? "#fff" : "#333";
top.get('githubNavPull').style.color = top.ICEcoder.selectedFiles.length > 0 ? "#fff" : "#333";
top.get('githubNavPull').style.background = top.ICEcoder.selectedFiles.length > 0 ? "#2187e7" : "#555";
}
// Adjust the file & replace select dropdown values accordingly
document.findAndReplace.target[2].innerHTML = !top.ICEcoder.selectedFiles[0] ? "all files" : "selected files";
document.findAndReplace.target[3].innerHTML = !top.ICEcoder.selectedFiles[0] ? "all filenames" : "selected filenames";
document.findAndReplace.target[2].innerHTML = !top.ICEcoder.selectedFiles[0] ? top.t['all files'] : top.t['selected files'];
document.findAndReplace.target[3].innerHTML = !top.ICEcoder.selectedFiles[0] ? top.t['all filenames'] : top.t['selected filenames'];
// Hide the file menu incase it's showing
top.ICEcoder.hideFileMenu();
@@ -701,7 +713,7 @@ var ICEcoder = {
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.serverMessage('<b>Creating Folder</b><br>'+newFolder);
top.ICEcoder.serverMessage('<b>'+top.t['Creating Folder']+'</b><br>'+newFolder);
}
},
@@ -723,7 +735,7 @@ var ICEcoder = {
canOpenFile = true;
// Limit to 100 files open at a time
if (top.ICEcoder.openFiles.length>=100) {
top.ICEcoder.message('Sorry, you can only have 100 files open at a time!');
top.ICEcoder.message(top.t['Sorry you can...']);
canOpenFile = false;
}
@@ -734,7 +746,7 @@ var ICEcoder = {
if (shortURL!="/[NEW]") {
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>Opening File</b><br>'+top.ICEcoder.shortURL);
top.ICEcoder.serverMessage('<b>'+top.t['Opening File']+'</b><br>'+top.ICEcoder.shortURL);
} else {
top.ICEcoder.createNewTab();
}
@@ -756,7 +768,7 @@ var ICEcoder = {
openPrompt: function() {
var fileLink;
if(fileLink = top.ICEcoder.getInput('Enter relative file path (prefixed with /) or remote URL','')) {
if(fileLink = top.ICEcoder.getInput(top.t['Enter relative file...'],'')) {
fileLink.indexOf("://")>-1
? top.ICEcoder.getRemoteFile(fileLink)
: top.ICEcoder.openFile(fileLink);
@@ -766,7 +778,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.serverMessage('<b>Getting</b><br>'+remoteFile);
top.ICEcoder.serverMessage('<b>'+top.t['Getting']+'</b><br>'+remoteFile);
},
// Save a file
@@ -783,7 +795,7 @@ var ICEcoder = {
}
filePath = filePath.replace("||","|");
top.ICEcoder.serverQueue("add","lib/file-control.php?action=save&file="+filePath+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+saveType+"&csrf="+top.ICEcoder.csrf);
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""));
top.ICEcoder.serverMessage('<b>'+top.t['Saving']+'</b><br>'+ICEcoder.openFiles[ICEcoder.selectedTab-1].replace(top.iceRoot,""));
},
// Prompt a rename dialog
@@ -797,7 +809,7 @@ var ICEcoder = {
shortURL = oldName.replace(/\|/g,"/");
}
if (!newName) {
newName = top.ICEcoder.getInput('Please enter the new name for',shortURL);
newName = top.ICEcoder.getInput(top.t['Please enter the...'],shortURL);
}
if (newName) {
i = top.ICEcoder.openFiles.indexOf(shortURL.replace(/\|/g,"/"));
@@ -810,7 +822,7 @@ var ICEcoder = {
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.serverMessage('<b>Renaming to</b><br>'+newName);
top.ICEcoder.serverMessage('<b>'+top.t['Renaming to']+'</b><br>'+newName);
top.ICEcoder.setPreviousFiles();
}
@@ -831,7 +843,7 @@ var ICEcoder = {
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.serverMessage('<b>Moving to</b><br>'+newName);
top.ICEcoder.serverMessage('<b>'+top.t['Moving to']+'</b><br>'+newName);
top.ICEcoder.setPreviousFiles();
}
@@ -845,7 +857,7 @@ var ICEcoder = {
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.serverMessage('<b>Deleting File</b><br>'+tgtListDisplay);
top.ICEcoder.serverMessage('<b>'+top.t['Deleting File']+'</b><br>'+tgtListDisplay);
};
},
@@ -869,13 +881,13 @@ var ICEcoder = {
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.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFiles[i].toString().replace(/\|/g,"/").replace(/,/g,"\n"));
top.ICEcoder.serverMessage('<b>'+top.t['Pasting File']+'</b><br>'+top.ICEcoder.copiedFiles[i].toString().replace(/\|/g,"/").replace(/,/g,"\n"));
} else {
top.ICEcoder.message("Sorry, cannot paste a whole root");
top.ICEcoder.message(top.t['Sorry cannot paste...']);
}
}
} else {
top.ICEcoder.message("Nothing to paste, copy a file/folder first!");
top.ICEcoder.message(top.t['Nothing to paste...']);
}
},
@@ -988,10 +1000,10 @@ var ICEcoder = {
// Update the file manager tree list on demand
updateFileManagerList: function(action,location,file,perms,oldName,uploaded,fileOrFolder) {
var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver;
var actionElemType, cssStyle, perms, targetElem, locNest, newText, innerLI, newUL, newLI, elemType, nameLI, shortURL, newMouseOver;
// Adding files
if (action=="add" && !top.get('filesFrame').contentWindow.document.getElementById(location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file)) {
if (action=="add" && !top.get('filesFrame').contentWindow.document.getElementById(location.replace(top.iceRoot,"").replace(/\/$/, "").replace(/\//g,"|")+"|"+file)) {
// Is this is a file or folder and based on that, set the CSS styling & link
actionElemType = fileOrFolder;
cssStyle = actionElemType=="file" ? "pft-file ext-" + file.substr(file.indexOf(".")+1) : "pft-directory";
@@ -999,12 +1011,12 @@ var ICEcoder = {
// Identify our target element & the first child element in it's location
if (!location) {location="/"}
location = location.replace(top.iceRoot,"");
location = location.replace(top.iceRoot,"/");
location = location.replace("//","/");
targetElem = top.get('filesFrame').contentWindow.document.getElementById(location.replace(/\//g,"|"));
locNest = targetElem.parentNode.parentNode.nextSibling;
newText = document.createTextNode("\n");
innerLI = '<a nohref title="'+location.replace(/\/$/, "")+"/"+file+'" onMouseOver="top.ICEcoder.overFileFolder(\''+actionElemType+'\',\''+location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file+'\')" onMouseOut="top.ICEcoder.overFileFolder(\''+actionElemType+'\',\'\')" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file+'">'+file+'</span> <span style="color: #888; font-size: 8px" id="'+location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file+'_perms">'+perms+'</span></a>';
innerLI = '<a nohref title="'+location.replace(/\/$/, "")+"/"+file+'" onMouseOver="top.ICEcoder.overFileFolder(\''+actionElemType+'\',this.childNodes[1].id)" onMouseOut="top.ICEcoder.overFileFolder(\''+actionElemType+'\',\'\')" onClick="if(!event.ctrlKey && !top.ICEcoder.cmdKey) {top.ICEcoder.openCloseDir(this,'+(actionElemType=="folder" ? 'true' : 'false')+'); if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file+'">'+file+'</span> <span style="color: #888; font-size: 8px" id="'+location.replace(/\/$/, "").replace(/\//g,"|")+"|"+file+'_perms">'+perms+'</span></a>';
// If we don't have at least 3 DOM items in here, it's an empty folder
if(locNest.childNodes.length<3) {
// We now need to begin a new UL list
@@ -1028,7 +1040,7 @@ var ICEcoder = {
if (locNest.childNodes[i].className) {
// Identify if the item we're considering is a file or folder
elemType = locNest.childNodes[i].className.indexOf('directory')>0 ? "folder" : "file";
// Get the name of the item
nameLI = locNest.childNodes[i].getElementsByTagName('span')[0].innerHTML;
@@ -1090,10 +1102,12 @@ var ICEcoder = {
// Deleting files
if (action=="delete") {
// Simply get our target and make it dissapear
targetElem = top.get('filesFrame').contentWindow.document.getElementById(
(top.iceRoot == "" ? location.replace(/\/$/, "").replace(/\//g,"|") : "")
+"|"+file).parentNode.parentNode;
if (!location) {location=""}
location = location.replace(top.iceRoot,"/");
location = location.replace("//","/");
location = location.replace(/\/$/, "").replace(/\//g,"|");
targetElem = (location +"|"+file).replace("||","|");
targetElem = top.get('filesFrame').contentWindow.document.getElementById(targetElem).parentNode.parentNode;
top.ICEcoder.openCloseDir(targetElem.childNodes[0],false);
targetElem.parentNode.removeChild(targetElem);
}
@@ -1102,7 +1116,7 @@ var ICEcoder = {
// Refresh file manager
refreshFileManager: function() {
top.ICEcoder.showHide('show',top.get('loadingMask'));
top.ICEcoder.filesFrame.src="files.php";
top.ICEcoder.filesFrame.contentWindow.location.reload();
top.ICEcoder.filesFrame.style.opacity="0";
top.ICEcoder.filesFrame.onload = function() {
top.ICEcoder.filesFrame.style.opacity="1";
@@ -1156,7 +1170,7 @@ var ICEcoder = {
top.get('rText').style.display =
top.get('replace').style.display =
top.get('rTarget').style.display =
document.findAndReplace.connector.value=="and"
document.findAndReplace.connector.value==top.t['and']
? "inline-block" : "none";
},
@@ -1171,13 +1185,13 @@ var ICEcoder = {
// If we have something to find in currrent document
cM = ICEcoder.getcMInstance();
if (cM && find.length>0 && document.findAndReplace.target.value=="this document") {
if (cM && find.length>0 && document.findAndReplace.target.value==top.t['this document']) {
content = cM.getValue().toLowerCase();
// Find & replace the next instance, or all?
if (document.findAndReplace.connector.value=="and" && buttonClick) {
if (document.findAndReplace.replaceAction.value=="replace" && cM.getSelection().toLowerCase()==find) {
if (document.findAndReplace.connector.value==top.t['and'] && buttonClick) {
if (document.findAndReplace.replaceAction.value==top.t['replace'] && cM.getSelection().toLowerCase()==find) {
cM.replaceSelection(replace,"around");
} else if (document.findAndReplace.replaceAction.value=="replace all") {
} else if (document.findAndReplace.replaceAction.value==top.t['replace all']) {
var rExp = new RegExp(find,"gi");
cM.setValue(cM.getValue().replace(rExp,replace));
}
@@ -1264,13 +1278,13 @@ var ICEcoder = {
replaceQS = "";
targetQS = "";
filesQS = "";
if (document.findAndReplace.connector.value=="and") {
if (document.findAndReplace.connector.value==top.t['and']) {
replaceQS = "&replace="+replace;
}
if (document.findAndReplace.target.value.indexOf("file")>=0) {
if (document.findAndReplace.target.value.indexOf(top.t['file'])>=0) {
targetQS = "&target="+document.findAndReplace.target.value.replace(/ /g,"-");
}
if (document.findAndReplace.target.value=="selected files") {
if (document.findAndReplace.target.value==top.t['selected files']) {
filesQS = "&selectedFiles="+top.ICEcoder.selectedFiles.join(":");
}
find = find.replace(/\'/g, '\&#39;');
@@ -1289,7 +1303,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.serverMessage('<b>Replacing text in</b><br>'+fileRef);
top.ICEcoder.serverMessage('<b>'+top.t['Replacing text in']+'</b><br>'+fileRef);
},
// ==============
@@ -1685,7 +1699,7 @@ var ICEcoder = {
ICEcoder.serverQueueItems.splice(1,ICEcoder.serverQueueItems.length);
}
top.ICEcoder.showHide('hide',top.get('loadingMask'));
top.ICEcoder.serverMessage('<b style="color: #d00">Cancelled tasks</b>');
top.ICEcoder.serverMessage('<b style="color: #d00">'+top.t['Cancelled tasks']+'</b>');
setTimeout(function() {top.ICEcoder.serverMessage();},2000);
},
@@ -1701,7 +1715,7 @@ var ICEcoder = {
// Opens the last files we had open
autoOpenFiles: function() {
if (top.ICEcoder.previousFiles.length>0 && top.ICEcoder.ask('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'),""))) {
if (top.ICEcoder.previousFiles.length>0 && 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 i=0;i<top.ICEcoder.previousFiles.length;i++) {
top.ICEcoder.thisFileFolderLink=top.ICEcoder.previousFiles[i].replace('|','/');
top.ICEcoder.thisFileFolderType='file';
@@ -1720,7 +1734,7 @@ var ICEcoder = {
// Show the help screen
helpScreen: function() {
top.get('mediaContainer').innerHTML = '<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 500px"></iframe>';
top.get('mediaContainer').innerHTML = '<iframe src="lib/help.php" class="whiteGlow" style="width: 840px; height: 515px"></iframe>';
top.ICEcoder.showHide('show',top.get('blackMask'));
},
@@ -1745,28 +1759,54 @@ var ICEcoder = {
top.ICEcoder.showHide('show',top.get('blackMask'));
},
// Show the GitHub commit screen
githubAction: function(action) {
top.get('mediaContainer').innerHTML = '<iframe src="lib/github.php?action='+action+'&selectedFiles='+top.ICEcoder.selectedFiles.join(";")+'&csrf='+top.ICEcoder.csrf+'" class="whiteGlow" style="width: 340px; height: 340px"></iframe>';
top.ICEcoder.showHide('show',top.get('blackMask'));
},
// Ask user for GitHub token
githubTokenAsk: function(goNext) {
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="+goNext+"&csrf="+top.ICEcoder.csrf;
// Clear the token from the var for security
githubAuthToken = "";
}
},
// Show/Hide the GitHub file nav
showHideGithubNav: function(vis) {
top.get('githubNav').style.display = vis == "show" ? "block" : "none";
top.get('fileNav').style.display = vis == "show" ? "none" : "block";
},
// Show the GitHub manager
githubManager: function() {
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'));
var githubAuthToken;
if (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'));
} else {
top.ICEcoder.githubTokenAsk('showManager');
}
},
// Toggle the GitHub diff on/off view
githubDiffToggle: function() {
var gHDiff;
if (top.ICEcoder.githubDiff || top.ICEcoder.ask("This will compare and show a diff view between your local dir and the repo. OK?")) {
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;
gHDiff = top.ICEcoder.githubDiff ? "true" : "false";
top.ICEcoder.filesFrame.src = "files.php?githubDiff="+gHDiff+"&csrf="+top.ICEcoder.csrf;
}
alert("This is a work in progress, unfinished at present and due for an ICEcoder v4.2 release. Currently ~40% done.");
},
// Update the settings used when we make a change to them
useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentSize,pluginPanelAligned,bugFilePaths,bugFileCheckTimer,bugFileMaxLines,refreshFM) {
useNewSettings: function(themeURL,codeAssist,lockedNav,tagWrapperCommand,autoComplete,visibleTabs,fontSize,lineWrapping,indentWithTabs,indentSize,pluginPanelAligned,bugFilePaths,bugFileCheckTimer,bugFileMaxLines,githubAuthTokenSet,refreshFM) {
var styleNode, strCSS, cMCSS, activeLineBG;
// Add new stylesheet for selected theme
@@ -1834,6 +1874,9 @@ var ICEcoder = {
}
}
// Set the flag to indicate if the GitHub auth token is set
top.ICEcoder.githubAuthTokenSet = githubAuthTokenSet;
// Finally, refresh the file manager if we need to
if (refreshFM) {top.ICEcoder.refreshFileManager()};
},
@@ -1933,11 +1976,7 @@ var ICEcoder = {
update: function() {
var autoUpdate;
autoUpdate = confirm( "Updating is currently an experimental feature. While it should work fine, please note there may be issues here, plus the following isn't yet part of this:\n\n"
+"- Settings not ported to new version\n- Plugins not ported to new version\n- Any mods you've made not ported to new version\n\n"
+"If you have write access on the whole of ICEcoder (ie, running locally) it should work fine. If tho you need to recover ICEcoder for any reason, you'll find this current version in its tmp dir.\n\n"
+"Click OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually"
);
autoUpdate = confirm(top.t['Please note for...']);
if (autoUpdate) {
top.ICEcoder.showHide('show',top.get('loadingMask'));
window.location = "lib/updater.php";
@@ -1962,13 +2001,13 @@ var ICEcoder = {
var bugReportOpenFilePos;
if(top.ICEcoder.bugReportStatus=="off") {
top.ICEcoder.message('You can start bug reporting in Help > Settings');
top.ICEcoder.message(top.t['You can start...']);
}
if(top.ICEcoder.bugReportStatus=="error") {
top.ICEcoder.message('Error: can\'t find/access the error file paths');
top.ICEcoder.message(top.t['Error cannot find...']);
}
if(top.ICEcoder.bugReportStatus=="ok") {
top.ICEcoder.message('No new errors found');
top.ICEcoder.message(top.t['No new errors...']);
}
if(top.ICEcoder.bugReportStatus=="bugs") {
// Close bug-report without saving previousFiles and without confirming close if we made changes on the bug report
@@ -2025,13 +2064,13 @@ var ICEcoder = {
}
top.ICEcoder.bugFilesSizesActual = statusArray['filesSizesSeen'];
top.ICEcoder.bugReportPath = statusArray['bugReportPath'];
}
};
// console.log('Calling '+bugCheckURL+' via XHR');
xhr.open("GET",bugCheckURL,true);
xhr.send();
},parseInt(top.ICEcoder.bugFileCheckTimer*1000,10));
// State that we're checking for bugs
top.ICEcoder.bugReportStatus = "ok";
@@ -2059,7 +2098,7 @@ var ICEcoder = {
cM = top.ICEcoder.getcMInstance();
printIFrame = top.ICEcoder.filesFrame.contentWindow.frames['fileControl'];
// Print page content injected into iFrame, escaped with pre and xssClean
printIFrame.window.document.body.innerHTML = '<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre>'+top.ICEcoder.xssClean(cM.getValue())+'</pre></body></html>';
printIFrame.window.document.body.innerHTML = '<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre style="white-space: pre-wrap">'+top.ICEcoder.xssClean(cM.getValue())+'</pre></body></html>';
printIFrame.focus();
printIFrame.print();
// Focus back on code
@@ -2236,7 +2275,7 @@ var ICEcoder = {
cM = ICEcoder.getcMInstance();
okToRemove = true;
if (!dontAsk && ICEcoder.savedPoints[closeTabNum-1]!=top.ICEcoder.getcMInstance(closeTabNum).changeGeneration()) {
okToRemove = top.ICEcoder.ask('You have made changes.\n\nAre you sure you want to close without saving?');
okToRemove = top.ICEcoder.ask(top.t['You have made...']);
}
if (okToRemove) {
@@ -2299,7 +2338,7 @@ var ICEcoder = {
// Close all tabs
closeAllTabs: function() {
if (top.ICEcoder.cMInstances.length>0 && ICEcoder.ask("Close all tabs?")) {
if (top.ICEcoder.cMInstances.length>0 && ICEcoder.ask(top.t['Close all tabs'])) {
for (var i=top.ICEcoder.cMInstances.length; i>0; i--) {
top.ICEcoder.closeTab(i, i>1? true:false);
}
@@ -2539,6 +2578,7 @@ var ICEcoder = {
else if (key==49) {top.ICEcoder.tagWrapper('h1'); return false;}
else if (key==50) {top.ICEcoder.tagWrapper('h2'); return false;}
else if (key==51) {top.ICEcoder.tagWrapper('h3'); return false;}
else if (key==56) {top.ICEcoder.tagWrapper('li'); return false;}
else if (key==13) {top.ICEcoder.addLineBreakAtEnd(); return false;}
else {return key;}
// Alt+Enter (Insert Line After)

196
lib/ice-coder.min.js vendored
View File

@@ -1,68 +1,70 @@
var get=function(a){return top.document.getElementById(a)},ICEcoder={filesW:250,minFilesW:14,maxFilesW:250,selectedTab:0,savedPoints:[],canSwitchTabs:!0,openFiles:[],openFileMDTs:[],cMInstances:[],nextcMInstance:1,selectedFiles:[],findMode:!1,lockedNav:!0,htmlTagArray:[],mouseDown:!1,draggingFilesW:!1,draggingTab:!1,draggingWithKey:!1,tabLeftPos:[],tabBGcurrent:"#141414",tabBGselected:"#49d",tabBGopen:"#c3c3c3",tabBGnormal:"transparent",tabFGcurrent:"#fff",tabFGselected:"#fff",tabFGopenFile:"#000",
tabFGnormalFile:"#eee",tabFGnormalTab:"#888",serverQueueItems:[],previewWindow:!1,pluginIntervalRefs:[],overPopup:!1,cmdKey:!1,fmReady:!1,bugReportStatus:"off",bugReportPath:"",bugFilesSizesSeen:[],bugFilesSizesActual:[],githubDiff:!1,ready:!1,initAliases:function(){for(var a="header files fileOptions optionsFile optionsEdit optionsRemote optionsHelp filesFrame editor tabsBar findBar content footer nestValid nestDisplay charDisplay byteDisplay".split(" "),b=0;b<a.length;b++)ICEcoder[a[b]]=top.get(a[b])},
init:function(){ICEcoder.setLayout();top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.autoOpenInt=setInterval(function(){top.ICEcoder.fmReady&&(top.ICEcoder.openLastFiles&&top.ICEcoder.autoOpenFiles(),clearInterval(top.ICEcoder.autoOpenInt))},4);setInterval(ICEcoder.updateNestingIndicator,30);top.ICEcoder.startBugChecking();top.ICEcoder.ready=!0},setLayout:function(a){var b,c;b=window.innerWidth;c=window.innerHeight;this.header.style.width=this.tabsBar.style.width=this.findBar.style.width=
b+"px";this.files.style.width=this.editor.style.left=this.filesW+"px";this.optionsFile.style.width=this.optionsEdit.style.width=this.optionsRemote.style.width=this.optionsHelp.style.width=this.filesW-60+"px";this.filesFrame.style.height=c-25-35+"px";this.nestValid.style.left=this.filesW+10+"px";this.nestDisplay.style.left=this.filesW+17+"px";top.ICEcoder.setTabWidths();a||(this.editor.style.width=ICEcoder.content.style.width=b-this.filesW+"px",ICEcoder.content.style.height=c-25-21-28-26+"px",setTimeout(function(){for(var a=
0;a<top.ICEcoder.openFiles.length;a++)top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize("100%",top.ICEcoder.content.style.height)},4))},changeFilesW:function(a){ICEcoder.lockedNav&&ICEcoder.filesW!=ICEcoder.minFilesW||("undefined"!=typeof ICEcoder.changeFilesInt&&clearInterval(ICEcoder.changeFilesInt),ICEcoder.changeFilesInt=setInterval(function(){ICEcoder.changeFilesWStep(a)},10))},changeFilesWStep:function(a){"expand"==a?ICEcoder.filesW<ICEcoder.maxFilesW-1?ICEcoder.filesW+=
Math.ceil((ICEcoder.maxFilesW-ICEcoder.filesW)/2):ICEcoder.filesW=ICEcoder.maxFilesW:ICEcoder.filesW>ICEcoder.minFilesW+1?ICEcoder.filesW-=Math.ceil((ICEcoder.filesW-ICEcoder.minFilesW)/2):ICEcoder.filesW=ICEcoder.minFilesW;("expand"==a&&ICEcoder.filesW==ICEcoder.maxFilesW||"contract"==a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt);ICEcoder.setLayout()},canResizeFilesW:function(){top.ICEcoder.ready&&"w-resize"==top.document.body.style.cursor?top.ICEcoder.mouseDown&&
(top.ICEcoder.filesW=top.ICEcoder.maxFilesW=250<=top.ICEcoder.mouseX&&400>=top.ICEcoder.mouseX?top.ICEcoder.mouseX:250>top.ICEcoder.mouseX?250:400,top.ICEcoder.files.style.width=top.ICEcoder.filesFrame.style.width=top.ICEcoder.filesW+"px",top.ICEcoder.setLayout(),top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a;a=top.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;a.style.backgroundPosition=ICEcoder.lockedNav?
"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},contentCleanUp:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getValue();b=b.replace(/<ICEcoder:\/:textarea>/g,"</textarea>");a.setValue(b);a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration()},undo:function(){ICEcoder.getcMInstance().undo()},redo:function(){ICEcoder.getcMInstance().redo()},
indent:function(a){var b;b=ICEcoder.getcMInstance();"more"==a?top.ICEcoder.content.contentWindow.CodeMirror.commands.indentMore(b):top.ICEcoder.content.contentWindow.CodeMirror.commands.indentLess(b)},moveLines:function(a){var b,c,d,e,f;b=top.ICEcoder.getcMInstance();c=b.getCursor("start");d=b.getCursor("end");"up"==a&&0<c.line&&(e=c.line-1);"down"==a&&d.line<b.lineCount()-1&&(e=d.line+1);isNaN(e)||(f=b.getLine(e),b.operation(function(){if("up"==a)for(var e=c.line;e<=d.line;e++)b.replaceRange(b.getLine(e),
{line:e-1,ch:0},{line:e-1,ch:1E6});else for(e=d.line;e>=c.line;e--)b.replaceRange(b.getLine(e),{line:e+1,ch:0},{line:e+1,ch:1E6});b.replaceRange(f,{line:"up"==a?d.line:c.line,ch:0},{line:"up"==a?d.line:c.line,ch:1E6});b.setSelection({line:c.line+("up"==a?-1:1),ch:c.ch},{line:d.line+("up"==a?-1:1),ch:d.ch})}))},highlightLine:function(a){var b;b=top.ICEcoder.getcMInstance();b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(){var a;/iPhone|iPad|iPod/i.test(navigator.userAgent)||
(a=top.ICEcoder.getcMInstance())&&a.focus()},goToLine:function(a){ICEcoder.getcMInstance().setCursor(a?a-1:top.get("goToLineNo").value-1);top.ICEcoder.focus();return!1},lineCommentToggle:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().ch;c=a.getCursor().line;d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,b,c,d,d.length,2)},highlightBlock:function(a,b){var c,d,e,f;c=top.ICEcoder.getcMInstance();if(b)top.ICEcoder.dontUpdateNest?c.setCursor(top.ICEcoder.cursorOrigLine,top.ICEcoder.cursorOrigCh):
top.ICEcoder.getNestLocation("updateNestDisplay"),top.ICEcoder.dontUpdateNest=!1;else{top.ICEcoder.cursorOrigCh=c.getCursor().ch;top.ICEcoder.cursorOrigLine=c.getCursor().line;top.ICEcoder.dontUpdateNest=!0;d={};d.ch=c.getCursor().ch;d.line=c.getCursor().line;for(var g=top.ICEcoder.htmlTagArray.length-1;g>=a;g--)e=c.getSearchCursor("<"+top.ICEcoder.htmlTagArray[g],d),e.findPrevious(),d.ch=e.from().ch,d.line=e.from().line,g==a&&(f=c.getSearchCursor(">",d),f.findNext(),c.setCursor(f.from().line,f.from().ch+
1),top.ICEcoder.getNestLocation(),ICEcoder.htmlTagArray.length-1!=a&&g++);e.from()&&(d={},top.ICEcoder.startPosLine=d.line=e.from().line,top.ICEcoder.startPosCh=d.ch=e.from().ch,e={},e.line=top.ICEcoder.content.contentWindow.CodeMirror.fold.xml(c,d)||d.line,e.line=e.line.to?e.line.to.line:e.line,e.ch=c.getLine(e.line).indexOf("</"+top.ICEcoder.htmlTagArray[a]+">")+top.ICEcoder.htmlTagArray[a].length+3,top.ICEcoder.dontSelect?top.ICEcoder.dontSelect=!1:c.setSelection(d,e),c.scrollIntoView(d))}},setPosition:function(a,
b,c){var d;d=ICEcoder.getcMInstance();c=d.getLine(b).indexOf(">",d.getLine(b).indexOf("<"+c))+1;d.setCursor(b,c);top.ICEcoder.focus();for(d=b=0;d<=a;d++)b=ICEcoder.nestDisplay.innerHTML.indexOf("&gt;",b+1);ICEcoder.nestDisplay.innerHTML=ICEcoder.nestDisplay.innerHTML.substr(0,b).replace(/<(?:.|\n)*?>/gm,"");top.ICEcoder.dontUpdateNest=!1;top.ICEcoder.dontSelect=!0},tagWrapper:function(a){var b,c,d,e;b=ICEcoder.getcMInstance();c=a;"div"==a?(d=b.getCursor("start").line,e=b.getCursor().line,b.operation(function(){b.replaceSelection("<div>\n"+
b.getSelection()+"\n</div>","around");for(var a=d+1;a<=e+1;a++)b.indentLine(a);b.indentLine(e+2,"prev");b.indentLine(e+2,"subtract")})):-1<"p a b i strong em h1 h2 h3 h4 h5 h6".split(" ").indexOf(a)&&b.getSelection().substr(0,a.length+1)=="<"+c&&b.getSelection().substr(-(a.length+3))=="</"+a+">"?b.replaceSelection(b.getSelection().substr(b.getSelection().indexOf(">")+1,b.getSelection().length-b.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==a&&(c='a href=""'),b.replaceSelection("<"+c+">"+
b.getSelection()+"</"+a+">","around"),"a"==a&&b.setCursor({line:b.getCursor("start").line,ch:b.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange("\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6});b.setCursor({line:b.getCursor().line-1,ch:0});b.execCommand("indentAuto")})},
insertLineAfter:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange(b.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});b.execCommand("indentAuto")})},duplicateLines:function(a){var b,c,d;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?(c=b.getCursor("start"),d=b.getCursor("end"),a=c.line!=d.line&&d.ch==b.getLine(d.line).length?"\n":"",b.replaceSelection(b.getSelection()+a+b.getSelection(),"end"),b.setSelection(c,d)):(a||(a=b.getCursor().line),
c=b.getCursor().ch,b.replaceRange(b.getLine(a)+"\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6}),b.setCursor(a+1,c))},removeLines:function(a){var b,c;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?b.replaceSelection("","end"):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.execCommand("deleteLine"),b.setCursor(a-1,c))},jumpToDefinition:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getTokenAt(a.getCursor()).string;if(a.somethingSelected()&&top.ICEcoder.origCurorPos)a.setCursor(top.ICEcoder.origCurorPos);
else for(top.ICEcoder.origCurorPos=a.getCursor(),a=["var "+b,"function "+b,b+"=function",b+"= function",b+" =function",b+" = function",b+"=new function",b+"= new function",b+" =new function",b+" = new function","window['"+b+"']",'window["'+b+'"]',"this['"+b+"']",'this["'+b+'"]',b+":",b+" :","def "+b,"class "+b],b=0;b<a.length&&!top.ICEcoder.findReplace(a[b],!1,!1);b++);},autocomplete:function(){var a;a=ICEcoder.getcMInstance();top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},
pasteURL:function(a){var b;b=ICEcoder.getcMInstance();"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+a);b.replaceSelection(a,"around")},searchForSelected:function(){if(top.ICEcoder.caretLocType)if(""!=top.ICEcoder.getcMInstance().getSelection()){var a=top.ICEcoder.caretLocType.toLowerCase()+" ";"Content"==top.ICEcoder.caretLocType&&(a="");window.open("http://www.google.com/#output=search&q="+a+top.ICEcoder.getcMInstance().getSelection())}else top.ICEcoder.message("No text selected to search on")},
tabFGnormalFile:"#eee",tabFGnormalTab:"#888",serverQueueItems:[],previewWindow:!1,pluginIntervalRefs:[],overPopup:!1,cmdKey:!1,fmReady:!1,bugReportStatus:"off",bugReportPath:"",bugFilesSizesSeen:[],bugFilesSizesActual:[],githubDiff:!1,githubAuthTokenSet:!1,ready:!1,initAliases:function(){for(var a="header files fileOptions optionsFile optionsEdit optionsRemote optionsHelp filesFrame editor tabsBar findBar content footer nestValid nestDisplay charDisplay byteDisplay".split(" "),b=0;b<a.length;b++)ICEcoder[a[b]]=
top.get(a[b])},init:function(){ICEcoder.setLayout();top.ICEcoder.showHide("hide",top.get("loadingMask"));top.ICEcoder.autoOpenInt=setInterval(function(){top.ICEcoder.fmReady&&(top.ICEcoder.openLastFiles&&top.ICEcoder.autoOpenFiles(),clearInterval(top.ICEcoder.autoOpenInt))},4);setInterval(ICEcoder.updateNestingIndicator,30);top.ICEcoder.startBugChecking();top.ICEcoder.ready=!0},setLayout:function(a){var b,c;b=window.innerWidth;c=window.innerHeight;this.header.style.width=this.tabsBar.style.width=
this.findBar.style.width=b+"px";this.files.style.width=this.editor.style.left=this.filesW+"px";this.optionsFile.style.width=this.optionsEdit.style.width=this.optionsRemote.style.width=this.optionsHelp.style.width=this.filesW-60+"px";this.filesFrame.style.height=c-25-35+"px";this.nestValid.style.left=this.filesW+10+"px";this.nestDisplay.style.left=this.filesW+17+"px";top.ICEcoder.setTabWidths();a||(this.editor.style.width=ICEcoder.content.style.width=b-this.filesW+"px",ICEcoder.content.style.height=
c-25-21-28-26+"px",setTimeout(function(){for(var a=0;a<top.ICEcoder.openFiles.length;a++)top.ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[a]].setSize("100%",top.ICEcoder.content.style.height)},4))},changeFilesW:function(a){ICEcoder.lockedNav&&ICEcoder.filesW!=ICEcoder.minFilesW||("undefined"!=typeof ICEcoder.changeFilesInt&&clearInterval(ICEcoder.changeFilesInt),ICEcoder.changeFilesInt=setInterval(function(){ICEcoder.changeFilesWStep(a)},10))},changeFilesWStep:function(a){"expand"==a?
ICEcoder.filesW<ICEcoder.maxFilesW-1?ICEcoder.filesW+=Math.ceil((ICEcoder.maxFilesW-ICEcoder.filesW)/2):ICEcoder.filesW=ICEcoder.maxFilesW:ICEcoder.filesW>ICEcoder.minFilesW+1?ICEcoder.filesW-=Math.ceil((ICEcoder.filesW-ICEcoder.minFilesW)/2):ICEcoder.filesW=ICEcoder.minFilesW;("expand"==a&&ICEcoder.filesW==ICEcoder.maxFilesW||"contract"==a&&ICEcoder.filesW==ICEcoder.minFilesW)&&clearInterval(ICEcoder.changeFilesInt);ICEcoder.setLayout()},canResizeFilesW:function(){top.ICEcoder.ready&&"w-resize"==
top.document.body.style.cursor?top.ICEcoder.mouseDown&&(top.ICEcoder.filesW=top.ICEcoder.maxFilesW=250<=top.ICEcoder.mouseX&&400>=top.ICEcoder.mouseX?top.ICEcoder.mouseX:250>top.ICEcoder.mouseX?250:400,top.ICEcoder.files.style.width=top.ICEcoder.filesFrame.style.width=top.ICEcoder.filesW+"px",top.ICEcoder.setLayout(),top.ICEcoder.draggingFilesW=!0):top.ICEcoder.draggingFilesW=!1},lockUnlockNav:function(){var a;a=top.filesFrame.contentWindow.document.getElementById("fmLock");ICEcoder.lockedNav=!ICEcoder.lockedNav;
a.style.backgroundPosition=ICEcoder.lockedNav?"0 0":"-16px 0"},showHidePlugins:function(a){get("plugins").style.width="show"==a?"55px":"3px";get("plugins").style.background="show"==a?"#333":"transparent";"show"==a&&ICEcoder.changeFilesW("expand")},contentCleanUp:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getValue();b=b.replace(/<ICEcoder:\/:textarea>/g,"</textarea>");a.setValue(b);a.clearHistory();top.ICEcoder.savedPoints[top.ICEcoder.selectedTab-1]=a.changeGeneration()},undo:function(){ICEcoder.getcMInstance().undo()},
redo:function(){ICEcoder.getcMInstance().redo()},indent:function(a){var b;b=ICEcoder.getcMInstance();"more"==a?top.ICEcoder.content.contentWindow.CodeMirror.commands.indentMore(b):top.ICEcoder.content.contentWindow.CodeMirror.commands.indentLess(b)},moveLines:function(a){var b,c,d,e,f;b=top.ICEcoder.getcMInstance();c=b.getCursor("start");d=b.getCursor("end");"up"==a&&0<c.line&&(e=c.line-1);"down"==a&&d.line<b.lineCount()-1&&(e=d.line+1);isNaN(e)||(f=b.getLine(e),b.operation(function(){if("up"==a)for(var e=
c.line;e<=d.line;e++)b.replaceRange(b.getLine(e),{line:e-1,ch:0},{line:e-1,ch:1E6});else for(e=d.line;e>=c.line;e--)b.replaceRange(b.getLine(e),{line:e+1,ch:0},{line:e+1,ch:1E6});b.replaceRange(f,{line:"up"==a?d.line:c.line,ch:0},{line:"up"==a?d.line:c.line,ch:1E6});b.setSelection({line:c.line+("up"==a?-1:1),ch:c.ch},{line:d.line+("up"==a?-1:1),ch:d.ch})}))},highlightLine:function(a){var b;b=top.ICEcoder.getcMInstance();b.setSelection({line:a,ch:0},{line:a,ch:b.lineInfo(a).text.length})},focus:function(){var a;
/iPhone|iPad|iPod/i.test(navigator.userAgent)||(a=top.ICEcoder.getcMInstance())&&a.focus()},goToLine:function(a){ICEcoder.getcMInstance().setCursor(a?a-1:top.get("goToLineNo").value-1);top.ICEcoder.focus();return!1},lineCommentToggle:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().ch;c=a.getCursor().line;d=a.getLine(c);ICEcoder.lineCommentToggleSub(a,b,c,d,d.length,2)},highlightBlock:function(a,b){var c,d,e,f;c=top.ICEcoder.getcMInstance();if(b)top.ICEcoder.dontUpdateNest?c.setCursor(top.ICEcoder.cursorOrigLine,
top.ICEcoder.cursorOrigCh):top.ICEcoder.getNestLocation("updateNestDisplay"),top.ICEcoder.dontUpdateNest=!1;else{top.ICEcoder.cursorOrigCh=c.getCursor().ch;top.ICEcoder.cursorOrigLine=c.getCursor().line;top.ICEcoder.dontUpdateNest=!0;d={};d.ch=c.getCursor().ch;d.line=c.getCursor().line;for(var g=top.ICEcoder.htmlTagArray.length-1;g>=a;g--)e=c.getSearchCursor("<"+top.ICEcoder.htmlTagArray[g],d),e.findPrevious(),d.ch=e.from().ch,d.line=e.from().line,g==a&&(f=c.getSearchCursor(">",d),f.findNext(),c.setCursor(f.from().line,
f.from().ch+1),top.ICEcoder.getNestLocation(),ICEcoder.htmlTagArray.length-1!=a&&g++);e.from()&&(d={},top.ICEcoder.startPosLine=d.line=e.from().line,top.ICEcoder.startPosCh=d.ch=e.from().ch,e={},e.line=top.ICEcoder.content.contentWindow.CodeMirror.fold.xml(c,d)||d.line,e.line=e.line.to?e.line.to.line:e.line,e.ch=c.getLine(e.line).indexOf("</"+top.ICEcoder.htmlTagArray[a]+">")+top.ICEcoder.htmlTagArray[a].length+3,top.ICEcoder.dontSelect?top.ICEcoder.dontSelect=!1:c.setSelection(d,e),c.scrollIntoView(d))}},
setPosition:function(a,b,c){var d;d=ICEcoder.getcMInstance();c=d.getLine(b).indexOf(">",d.getLine(b).indexOf("<"+c))+1;d.setCursor(b,c);top.ICEcoder.focus();for(d=b=0;d<=a;d++)b=ICEcoder.nestDisplay.innerHTML.indexOf("&gt;",b+1);ICEcoder.nestDisplay.innerHTML=ICEcoder.nestDisplay.innerHTML.substr(0,b).replace(/<(?:.|\n)*?>/gm,"");top.ICEcoder.dontUpdateNest=!1;top.ICEcoder.dontSelect=!0},tagWrapper:function(a){var b,c,d,e;b=ICEcoder.getcMInstance();c=a;"div"==a?(d=b.getCursor("start").line,e=b.getCursor().line,
b.operation(function(){b.replaceSelection("<div>\n"+b.getSelection()+"\n</div>","around");for(var a=d+1;a<=e+1;a++)b.indentLine(a);b.indentLine(e+2,"prev");b.indentLine(e+2,"subtract")})):-1<"p a b i strong em h1 h2 h3 li".split(" ").indexOf(a)&&b.getSelection().substr(0,a.length+1)=="<"+c&&b.getSelection().substr(-(a.length+3))=="</"+a+">"?b.replaceSelection(b.getSelection().substr(b.getSelection().indexOf(">")+1,b.getSelection().length-b.getSelection().indexOf(">")-1-a.length-3),"around"):("a"==
a&&(c='a href=""'),b.replaceSelection("<"+c+">"+b.getSelection()+"</"+a+">","around"),"a"==a&&b.setCursor({line:b.getCursor("start").line,ch:b.getCursor("start").ch+9}))},addLineBreakAtEnd:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.replaceRange(b.getLine(a)+"<br>",{line:a,ch:0},{line:a,ch:1E6})},insertLineBefore:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange("\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6});
b.setCursor({line:b.getCursor().line-1,ch:0});b.execCommand("indentAuto")})},insertLineAfter:function(a){var b;b=ICEcoder.getcMInstance();a||(a=b.getCursor().line);b.operation(function(){b.replaceRange(b.getLine(a)+"\n",{line:a,ch:0},{line:a,ch:1E6});b.execCommand("indentAuto")})},duplicateLines:function(a){var b,c,d;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?(c=b.getCursor("start"),d=b.getCursor("end"),a=c.line!=d.line&&d.ch==b.getLine(d.line).length?"\n":"",b.replaceSelection(b.getSelection()+
a+b.getSelection(),"end"),b.setSelection(c,d)):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.replaceRange(b.getLine(a)+"\n"+b.getLine(a),{line:a,ch:0},{line:a,ch:1E6}),b.setCursor(a+1,c))},removeLines:function(a){var b,c;b=ICEcoder.getcMInstance();!a&&b.somethingSelected()?b.replaceSelection("","end"):(a||(a=b.getCursor().line),c=b.getCursor().ch,b.execCommand("deleteLine"),b.setCursor(a-1,c))},jumpToDefinition:function(){var a,b;a=ICEcoder.getcMInstance();b=a.getTokenAt(a.getCursor()).string;if(a.somethingSelected()&&
top.ICEcoder.origCurorPos)a.setCursor(top.ICEcoder.origCurorPos);else for(top.ICEcoder.origCurorPos=a.getCursor(),a=["var "+b,"function "+b,b+"=function",b+"= function",b+" =function",b+" = function",b+"=new function",b+"= new function",b+" =new function",b+" = new function","window['"+b+"']",'window["'+b+'"]',"this['"+b+"']",'this["'+b+'"]',b+":",b+" :","def "+b,"class "+b],b=0;b<a.length&&!top.ICEcoder.findReplace(a[b],!1,!1);b++);},autocomplete:function(){var a;a=ICEcoder.getcMInstance();top.ICEcoder.content.contentWindow.CodeMirror.commands.autocomplete(a)},
pasteURL:function(a){var b;b=ICEcoder.getcMInstance();"CTRL"==top.ICEcoder.draggingWithKey&&(a=window.location.protocol+"//"+window.location.hostname+a);b.replaceSelection(a,"around")},searchForSelected:function(){if(top.ICEcoder.caretLocType)if(""!=top.ICEcoder.getcMInstance().getSelection()){var a=top.ICEcoder.caretLocType.toLowerCase()+" ";"Content"==top.ICEcoder.caretLocType&&(a="");window.open("http://www.google.com/#output=search&q="+a+top.ICEcoder.getcMInstance().getSelection())}else top.ICEcoder.message(top.t["No text selected..."])},
openCloseDir:function(a,b){var c,d;a.onclick=function(a){a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.openCloseDir(this,!1)};c=a.parentNode;c.nextSibling&&(c=c.nextSibling);c&&"UL"==c.tagName&&((d="none"==c.style.display)?b=!0:c.style.display="none",a.parentNode.className=a.className=d?"pft-directory dirOpen":"pft-directory");b&&(top.ICEcoder.filesFrame.contentWindow.frames.fileControl.location.href="lib/get-branch.php?location="+a.childNodes[1].id+"&csrf="+top.ICEcoder.csrf);return!1},overFileFolder:function(a,
b){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},selectFileFolder:function(a){var b,c,d,e,f;if(""==top.ICEcoder.thisFileFolderLink)a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink)if(c=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),b=ICEcoder.filesFrame.contentWindow.document.getElementById(c),a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(c)?(ICEcoder.selectDeselectFile("deselect",b),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(c),
1)):(ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c));else if(a.shiftKey){a=!1;d=b.parentNode.parentNode.parentNode;e=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];var g=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};f=c.replace(/\d+/g,g)<e.replace(/\d+/g,g)?c:e;e=c.replace(/\d+/g,g)>e.replace(/\d+/g,g)?c:e;if(0<top.ICEcoder.selectedFiles.length&&f.substr(0,f.lastIndexOf("|"))==e.substr(0,e.lastIndexOf("|")))for(c=0;1E6>c&&("LI"!=d.childNodes[c].nodeName&&
c++,b=d.childNodes[c].childNodes[0].childNodes[1],b.id==f&&(a=!0),!0==a&&-1==top.ICEcoder.selectedFiles.indexOf(b.id)&&(ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(b.id)),b.id!=e);c+=2);else ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",b),top.ICEcoder.selectedFiles.push(c);document.findAndReplace.target[2].innerHTML=top.ICEcoder.selectedFiles[0]?"selected files":"all files";
document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?"selected filenames":"all filenames";top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=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)},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>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("Sorry, you can only have 100 files open at a time!"),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>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("Enter relative file path (prefixed with /) or remote URL",""))-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>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.php?action=save&file="+b+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf);top.ICEcoder.serverMessage("<b>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("Please enter the new name for",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>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){ICEcoder.thisFileFolderType=a;ICEcoder.thisFileFolderLink=b},selectFileFolder:function(a,b){var c,d,e,f,g,m;if(""==top.ICEcoder.thisFileFolderLink)b||a.ctrlKey||top.ICEcoder.cmdKey||top.ICEcoder.deselectAllFiles();else if(top.ICEcoder.thisFileFolderLink)if(d=top.ICEcoder.thisFileFolderLink.replace(/\//g,"|"),c=ICEcoder.filesFrame.contentWindow.document.getElementById(d),b||a.ctrlKey||top.ICEcoder.cmdKey)-1<top.ICEcoder.selectedFiles.indexOf(d)?(ICEcoder.selectDeselectFile("deselect",c),top.ICEcoder.selectedFiles.splice(top.ICEcoder.selectedFiles.indexOf(d),
1)):(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d));else if(a.shiftKey){var h=function(a,b,c,d){return("00000000000000000000"+a).substr(-20)};e=!1;f=c.parentNode.parentNode.parentNode;g=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1];m=d.replace(/\d+/g,h)<g.replace(/\d+/g,h)?d:g;g=d.replace(/\d+/g,h)>g.replace(/\d+/g,h)?d:g;if(0<top.ICEcoder.selectedFiles.length&&m.substr(0,m.lastIndexOf("|"))==g.substr(0,g.lastIndexOf("|")))for(d=0;1E6>d&&("LI"!=f.childNodes[d].nodeName&&
d++,c=f.childNodes[d].childNodes[0].childNodes[1],c.id==m&&(e=!0),1==e&&-1==top.ICEcoder.selectedFiles.indexOf(c.id)&&(ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(c.id)),c.id!=g);d+=2);else ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d)}else top.ICEcoder.deselectAllFiles(),ICEcoder.selectDeselectFile("select",c),top.ICEcoder.selectedFiles.push(d);top.ICEcoder.githubDiff&&(top.get("githubNavSelectedCount").innerHTML="Selected: "+top.ICEcoder.selectedFiles.length,
top.get("githubNavCommit").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavCommit").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555",top.get("githubNavSelectedCount").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.color=0<top.ICEcoder.selectedFiles.length?"#fff":"#333",top.get("githubNavPull").style.background=0<top.ICEcoder.selectedFiles.length?"#2187e7":"#555");document.findAndReplace.target[2].innerHTML=
top.ICEcoder.selectedFiles[0]?top.t["selected files"]:top.t["all files"];document.findAndReplace.target[3].innerHTML=top.ICEcoder.selectedFiles[0]?top.t["selected filenames"]:top.t["all filenames"];top.ICEcoder.hideFileMenu()},deselectAllFiles:function(){for(var a,b=0;b<top.ICEcoder.selectedFiles.length;b++)a=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)},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&&
(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.php?action=save&file="+b+"&fileMDT="+ICEcoder.openFileMDTs[ICEcoder.selectedTab-1]+"&saveType="+a+"&csrf="+top.ICEcoder.csrf);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]=
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>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>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>Pasting File</b><br>"+top.ICEcoder.copiedFiles[b].toString().replace(/\|/g,"/").replace(/,/g,"\n"))):top.ICEcoder.message("Sorry, cannot paste a whole root");else top.ICEcoder.message("Nothing to paste, copy a file/folder first!")},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","optionsRemote","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.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","optionsRemote","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,e,f,g){var m,h,k,n,p,l,r;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){m="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?664:705;b||(b="/");b=b.replace(top.iceRoot,"");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,
"|"));k=h.parentNode.parentNode.nextSibling;n=document.createTextNode("\n");p='<a nohref title="'+b.replace(/\/$/,"")+"/"+c+'" onMouseOver="top.ICEcoder.overFileFolder(\''+g+"','"+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+"')\" onMouseOut=\"top.ICEcoder.overFileFolder('"+g+'\',\'\')" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="color: #888; font-size: 8px" id="'+b.replace(/\/$/,
"").replace(/\//g,"|")+"|"+c+'_perms">'+d+"</span></a>";if(3>k.childNodes.length)l=document.createElement("ul"),k=h.parentNode.parentNode,k.parentNode.insertBefore(l,k.nextSibling),l=document.createElement("li"),l.className=m,l.draggable=!0,l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()},l.ondragend=function(){top.ICEcoder.dropFile(this)},l.innerHTML=p,k.nextSibling.appendChild(l),k.nextSibling.appendChild(n);else for(h=
0;h<k.childNodes.length;h++)if(k.childNodes[h].className&&(l=0<k.childNodes[h].className.indexOf("directory")?"folder":"file",r=k.childNodes[h].getElementsByTagName("span")[0].innerHTML,l==g&&r>c||"folder"==g&&"file"==l||h==k.childNodes.length-1)){l=document.createElement("li");l.className=m;l.draggable=!0;l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()};l.ondragend=function(){top.ICEcoder.dropFile(this)};l.innerHTML=p;h==
k.childNodes.length-1?(k.appendChild(l),k.appendChild(n)):(k.insertBefore(l,k.childNodes[h]),k.insertBefore(n,k.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id=
b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==a&&(h=top.get("filesFrame").contentWindow.document.getElementById((""==top.iceRoot?b.replace(/\/$/,"").replace(/\//g,
"|"):"")+"|"+c).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.src="files.php";top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b;b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;
if(224==b||91==b||93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},dropFile:function(a){var b,c;b=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=b.substr(b.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(b);"files"==top.ICEcoder.area&&setTimeout(function(){c="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==
top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(c)):top.ICEcoder.moveFile(b,c.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display="and"==document.findAndReplace.connector.value?"inline-block":"none"},findReplace:function(a,b,c){var d,e,f;d=a.toLowerCase();e=top.get("replace").value;f=top.get("results");if((a=
ICEcoder.getcMInstance())&&0<d.length&&"this document"==document.findAndReplace.target.value){a.getValue().toLowerCase();"and"==document.findAndReplace.connector.value&&c&&("replace"==document.findAndReplace.replaceAction.value&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):"replace all"==document.findAndReplace.replaceAction.value&&(c=new RegExp(d,"gi"),a.setValue(a.getValue().replace(c,e))));c=a.getValue().toLowerCase();if(!top.ICEcoder.findMode||d!=top.ICEcoder.lastsearch){ICEcoder.results=
[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,d.length)==d&&-1==ICEcoder.results.indexOf(e)&&(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(a.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(a.posFromIndex(e).line+1));ICEcoder.lastsearch=d}if(0<ICEcoder.results.length){c=a.getScrollInfo().height>a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+" results";else{for(e=ICEcoder.findResult=0;e<ICEcoder.results.length;e++)ICEcoder.results[e]<a.indexFromPos(a.getCursor())&&
ICEcoder.findResult++;ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=a.getSearchCursor(d,a.getCursor(),!0);b.findNext();b.from()||(b=a.getSearchCursor(d,{line:0,ch:0},!0),b.findNext());a.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}d=c?parseInt(top.ICEcoder.content.style.height,10)/a.lineCount():a.defaultTextHeight();b=c?0:a.heightAtLine(0);top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=
c?"17px":"0";f="";for(e=1;e<=a.lineCount();e++)c=-1<ICEcoder.resultsLines.indexOf(e)?a.getCursor().line+1==e?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+d+"px; background: "+c+"; top: "+parseInt(d*(e-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}""!=d&&c?(f=b=a="","and"==document.findAndReplace.connector.value&&(a="&replace="+e),0<=document.findAndReplace.target.value.indexOf("file")&&(b="&target="+document.findAndReplace.target.value.replace(/ /g,"-")),"selected files"==document.findAndReplace.target.value&&(f="&selectedFiles="+top.ICEcoder.selectedFiles.join(":")),d=d.replace(/\'/g,"&#39;"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):
d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+d+a+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>Replacing text in</b><br>"+a)},getNestLocation:function(a){var b,c,d;if(b=ICEcoder.getcMInstance()){c=b.getValue();b=b.getTokenAt(b.getCursor()).state;d=!1;"undefined"!=typeof b&&(d=b.context);"undefined"!=typeof b.curState&&"undefined"!=typeof b.curState.htmlState&&(d=b.curState.htmlState.context);ICEcoder.htmlTagArray=[];if(d)for(;d;d=d.prev)"undefined"!=
typeof d.tagName&&ICEcoder.htmlTagArray.unshift(d.tagName);ICEcoder.tagString=ICEcoder.htmlTagArray[ICEcoder.htmlTagArray.length-1];"JavaScript"==ICEcoder.caretLocType&&(ICEcoder.tagString="script");a&&!top.ICEcoder.dontUpdateNest&&(ICEcoder.nestDisplay.innerHTML="","undefined"!=typeof ICEcoder.openFiles[ICEcoder.selectedTab-1]&&(a=ICEcoder.openFiles[ICEcoder.selectedTab-1],ICEcoder.getNestLocationSub(c,a)))}},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().line;
c=a.getCursor().ch;for(var e=d=0;e<b;e++)d+=a.getLine(e).length+1;ICEcoder.caretPos=d+c-1;ICEcoder.getNestLocation("yes")},updateCharDisplay:function(){var a;a=ICEcoder.getcMInstance();ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateByteDisplay:function(){ICEcoder.byteDisplay.innerHTML=ICEcoder.getcMInstance().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]]},getMouseXY:function(a,b){top.ICEcoder.mouseX=a.pageX?a.pageX:a.clientX+document.body.scrollLeft;top.ICEcoder.mouseY=
a.pageY?a.pageY:a.clientY+document.body.scrollTop;top.ICEcoder.area=b;"top"!=b&&(top.ICEcoder.mouseY+=70);"editor"==b&&(top.ICEcoder.mouseX+=top.ICEcoder.filesW);top.ICEcoder.dragCursorTest();62<top.ICEcoder.mouseY&&top.ICEcoder.setTabWidths()},dragCursorTest:function(){var a,b;a=top.ICEcoder.mouseX-top.ICEcoder.diffStartX;!1!==top.ICEcoder.draggingTab&&top.ICEcoder.diffStartX&&(-10>=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-
parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX<top.ICEcoder.filesW+7||top.ICEcoder.draggingFilesW)?"w-resize":"auto",top.ICEcoder.content.contentWindow.document&&top.ICEcoder.filesFrame.contentWindow)){top.document.body.style.cursor=a;if(b=top.ICEcoder.content.contentWindow.document.body)b.style.cursor=
a;if(b=top.ICEcoder.filesFrame.contentWindow.document.body)b.style.cursor=a}},serverMessage:function(a){var b;b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a).replace(/\&lt;b\&gt;/g,"<b>").replace(/\&lt;\/b\&gt;/g,"</b>").replace(/\&lt;br\&gt;/g,"<br>"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b,c,d;if(a=ICEcoder.getcMInstance()){b=a.getLine(a.getCursor().line);for(c=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(d=
c.exec(b))&&a.getCursor().ch>d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&
(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<div id="picker" class="picker"></div><br><br><input type="text" id="color" name="color" value="#000" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'color\').value)" value="insert &gt;" class="insertColorValue"><br><input type="text" id="colorRGB" name="colorRGB" value="rgb(0,0,0)" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'colorRGB\').value)" value="insert &gt;" class="insertColorValue">';
"1"},4)},hideFileMenu:function(){top.get("fileMenu").style.display="none";top.get("fileMenu").style.opacity="0"},updateFileManagerList:function(a,b,c,d,e,f,g){var m,h,k,n,p,l,r;if("add"==a&&!top.get("filesFrame").contentWindow.document.getElementById(b.replace(top.iceRoot,"").replace(/\/$/,"").replace(/\//g,"|")+"|"+c)){m="file"==g?"pft-file ext-"+c.substr(c.indexOf(".")+1):"pft-directory";d="file"==g?664:705;b||(b="/");b=b.replace(top.iceRoot,"/");b=b.replace("//","/");h=top.get("filesFrame").contentWindow.document.getElementById(b.replace(/\//g,
"|"));k=h.parentNode.parentNode.nextSibling;n=document.createTextNode("\n");p='<a nohref title="'+b.replace(/\/$/,"")+"/"+c+'" onMouseOver="top.ICEcoder.overFileFolder(\''+g+"',this.childNodes[1].id)\" onMouseOut=\"top.ICEcoder.overFileFolder('"+g+"','')\" onClick=\"if(!event.ctrlKey && !top.ICEcoder.cmdKey) {top.ICEcoder.openCloseDir(this,"+("folder"==g?"true":"false")+'); if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {top.ICEcoder.openFile()}}" style="position: relative; left:-22px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span id="'+
b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'">'+c+'</span> <span style="color: #888; font-size: 8px" id="'+b.replace(/\/$/,"").replace(/\//g,"|")+"|"+c+'_perms">'+d+"</span></a>";if(3>k.childNodes.length)l=document.createElement("ul"),k=h.parentNode.parentNode,k.parentNode.insertBefore(l,k.nextSibling),l=document.createElement("li"),l.className=m,l.draggable=!0,l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&top.ICEcoder.getcMInstance().focus()},l.ondragend=
function(){top.ICEcoder.dropFile(this)},l.innerHTML=p,k.nextSibling.appendChild(l),k.nextSibling.appendChild(n);else for(h=0;h<k.childNodes.length;h++)if(k.childNodes[h].className&&(l=0<k.childNodes[h].className.indexOf("directory")?"folder":"file",r=k.childNodes[h].getElementsByTagName("span")[0].innerHTML,l==g&&r>c||"folder"==g&&"file"==l||h==k.childNodes.length-1)){l=document.createElement("li");l.className=m;l.draggable=!0;l.ondrag=function(a){top.ICEcoder.draggingWithKeyTest(a);top.ICEcoder.getcMInstance()&&
top.ICEcoder.getcMInstance().focus()};l.ondragend=function(){top.ICEcoder.dropFile(this)};l.innerHTML=p;h==k.childNodes.length-1?(k.appendChild(l),k.appendChild(n)):(k.insertBefore(l,k.childNodes[h]),k.insertBefore(n,k.childNodes[h+1]));break}"file"!=g||f||(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]=b+c)}"rename"==a&&(f=e.replace(/\//g,"|"),h=top.get("filesFrame").contentWindow.document.getElementById(f),h.innerHTML=c,h.id=b.replace(/\//g,"|")+"|"+c,h.parentNode.title=h.id.replace(/\|/g,"/"),
targetElemPerms=top.get("filesFrame").contentWindow.document.getElementById(f+"_perms"),targetElemPerms.id=b.replace(/\//g,"|")+"|"+c+"_perms");"move"==a&&(top.ICEcoder.updateFileManagerList("add",b,c,!1,!1,!1,g),top.ICEcoder.updateFileManagerList("delete",e.substr(0,e.lastIndexOf("/")),c));"chmod"==a&&(f=top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1].replace(/\|/g,"/"),h=top.get("filesFrame").contentWindow.document.getElementById(f.replace(/\//g,"|")+"_perms"),h.innerHTML=d);"delete"==
a&&(b||(b=""),b=b.replace(top.iceRoot,"/"),b=b.replace("//","/"),b=b.replace(/\/$/,"").replace(/\//g,"|"),h=(b+"|"+c).replace("||","|"),h=top.get("filesFrame").contentWindow.document.getElementById(h).parentNode.parentNode,top.ICEcoder.openCloseDir(h.childNodes[0],!1),h.parentNode.removeChild(h))},refreshFileManager:function(){top.ICEcoder.showHide("show",top.get("loadingMask"));top.ICEcoder.filesFrame.contentWindow.location.reload();top.ICEcoder.filesFrame.style.opacity="0";top.ICEcoder.filesFrame.onload=
function(){top.ICEcoder.filesFrame.style.opacity="1";top.ICEcoder.showHide("hide",top.get("loadingMask"))}},draggingWithKeyTest:function(a){var b;b=a.keyCode?a.keyCode:a.which?a.which:a.charCode;if(224==b||91==b||93==b)top.ICEcoder.cmdKey=!0;top.ICEcoder.draggingWithKey=a.ctrlKey||top.ICEcoder.cmdKey?"CTRL":!1},dropFile:function(a){var b,c;b=a.childNodes[0].childNodes[1].id.replace(/\|/g,"/");fileName=b.substr(b.lastIndexOf("/")+1);"editor"==top.ICEcoder.area&&top.ICEcoder.pasteURL(b);"files"==top.ICEcoder.area&&
setTimeout(function(){c="folder"==ICEcoder.thisFileFolderType?ICEcoder.thisFileFolderLink:ICEcoder.thisFileFolderLink.substr(0,ICEcoder.thisFileFolderLink.lastIndexOf("|"));"CTRL"==top.ICEcoder.draggingWithKey?(top.ICEcoder.copyFiles(top.ICEcoder.selectedFiles),top.ICEcoder.pasteFiles(c)):top.ICEcoder.moveFile(b,c.replace(/\|/g,"/")+"/"+fileName)},4);top.ICEcoder.mouseDown=!1},findReplaceOptions:function(){top.get("rText").style.display=top.get("replace").style.display=top.get("rTarget").style.display=
document.findAndReplace.connector.value==top.t.and?"inline-block":"none"},findReplace:function(a,b,c){var d,e,f;d=a.toLowerCase();e=top.get("replace").value;f=top.get("results");if((a=ICEcoder.getcMInstance())&&0<d.length&&document.findAndReplace.target.value==top.t["this document"]){a.getValue().toLowerCase();document.findAndReplace.connector.value==top.t.and&&c&&(document.findAndReplace.replaceAction.value==top.t.replace&&a.getSelection().toLowerCase()==d?a.replaceSelection(e,"around"):document.findAndReplace.replaceAction.value==
top.t["replace all"]&&(c=new RegExp(d,"gi"),a.setValue(a.getValue().replace(c,e))));c=a.getValue().toLowerCase();if(!top.ICEcoder.findMode||d!=top.ICEcoder.lastsearch){ICEcoder.results=[];ICEcoder.resultsLines=[];for(e=0;e<c.length;e++)c.substr(e,d.length)==d&&-1==ICEcoder.results.indexOf(e)&&(ICEcoder.results.push(e),-1==ICEcoder.resultsLines.indexOf(a.posFromIndex(e).line+1)&&ICEcoder.resultsLines.push(a.posFromIndex(e).line+1));ICEcoder.lastsearch=d}if(0<ICEcoder.results.length){c=a.getScrollInfo().height>
a.getScrollInfo().clientHeight;if(b)f.innerHTML=ICEcoder.results.length+" results";else{for(e=ICEcoder.findResult=0;e<ICEcoder.results.length;e++)ICEcoder.results[e]<a.indexFromPos(a.getCursor())&&ICEcoder.findResult++;ICEcoder.findResult>ICEcoder.results.length-1&&(ICEcoder.findResult=0);f.innerHTML="Highlighted result "+(ICEcoder.findResult+1)+" of "+ICEcoder.results.length+" results";b=a.getSearchCursor(d,a.getCursor(),!0);b.findNext();b.from()||(b=a.getSearchCursor(d,{line:0,ch:0},!0),b.findNext());
a.setSelection(b.from(),b.to());top.ICEcoder.focus();top.ICEcoder.findMode=!0}d=c?parseInt(top.ICEcoder.content.style.height,10)/a.lineCount():a.defaultTextHeight();b=c?0:a.heightAtLine(0);top.ICEcoder.content.contentWindow.document.getElementById("resultsBar").style.right=c?"17px":"0";f="";for(e=1;e<=a.lineCount();e++)c=-1<ICEcoder.resultsLines.indexOf(e)?a.getCursor().line+1==e?"#b00":"#888":"transparent",f+='<div style="position: absolute; display: block; width: 5px; height:'+d+"px; background: "+
c+"; top: "+parseInt(d*(e-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}""!=d&&c?(f=b=a="",document.findAndReplace.connector.value==
top.t.and&&(a="&replace="+e),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(":")),d=d.replace(/\'/g,"&#39;"),d!=encodeURIComponent(d)?d="ICEcoder:"+encodeURIComponent(d):d,top.ICEcoder.showHide("show",top.get("loadingMask")),top.get("mediaContainer").innerHTML='<iframe src="lib/multiple-results.php?find='+
d+a+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>"+
top.t["Replacing text in"]+"</b><br>"+a)},getNestLocation:function(a){var b,c,d;if(b=ICEcoder.getcMInstance()){c=b.getValue();b=b.getTokenAt(b.getCursor()).state;d=!1;"undefined"!=typeof b&&(d=b.context);"undefined"!=typeof b.curState&&"undefined"!=typeof b.curState.htmlState&&(d=b.curState.htmlState.context);ICEcoder.htmlTagArray=[];if(d)for(;d;d=d.prev)"undefined"!=typeof d.tagName&&ICEcoder.htmlTagArray.unshift(d.tagName);ICEcoder.tagString=ICEcoder.htmlTagArray[ICEcoder.htmlTagArray.length-1];
"JavaScript"==ICEcoder.caretLocType&&(ICEcoder.tagString="script");a&&!top.ICEcoder.dontUpdateNest&&(ICEcoder.nestDisplay.innerHTML="","undefined"!=typeof ICEcoder.openFiles[ICEcoder.selectedTab-1]&&(a=ICEcoder.openFiles[ICEcoder.selectedTab-1],ICEcoder.getNestLocationSub(c,a)))}},getCaretPosition:function(){var a,b,c,d;a=ICEcoder.getcMInstance();b=a.getCursor().line;c=a.getCursor().ch;for(var e=d=0;e<b;e++)d+=a.getLine(e).length+1;ICEcoder.caretPos=d+c-1;ICEcoder.getNestLocation("yes")},updateCharDisplay:function(){var a;
a=ICEcoder.getcMInstance();ICEcoder.caretLocationType();ICEcoder.charDisplay.innerHTML=ICEcoder.caretLocType+", Line: "+(a.getCursor().line+1)+", Char: "+a.getCursor().ch},updateByteDisplay:function(){ICEcoder.byteDisplay.innerHTML=ICEcoder.getcMInstance().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]]},getMouseXY:function(a,b){top.ICEcoder.mouseX=a.pageX?a.pageX:a.clientX+document.body.scrollLeft;top.ICEcoder.mouseY=a.pageY?a.pageY:a.clientY+document.body.scrollTop;top.ICEcoder.area=b;"top"!=b&&(top.ICEcoder.mouseY+=70);"editor"==b&&
(top.ICEcoder.mouseX+=top.ICEcoder.filesW);top.ICEcoder.dragCursorTest();62<top.ICEcoder.mouseY&&top.ICEcoder.setTabWidths()},dragCursorTest:function(){var a,b;a=top.ICEcoder.mouseX-top.ICEcoder.diffStartX;!1!==top.ICEcoder.draggingTab&&top.ICEcoder.diffStartX&&(-10>=a||10<=a)&&top.ICEcoder.mouseX>parseInt(top.ICEcoder.files.style.width,10)&&(top.ICEcoder.tabDragMouseX=top.ICEcoder.mouseX-parseInt(top.ICEcoder.files.style.width,10)-top.ICEcoder.tabDragMouseXStart,top.ICEcoder.tabDragMove());if(top.ICEcoder.ready&&
(top.ICEcoder.mouseDown||(top.ICEcoder.draggingFilesW=!1),a=!ICEcoder.draggingTab&&(top.ICEcoder.mouseX>top.ICEcoder.filesW-7&&top.ICEcoder.mouseX<top.ICEcoder.filesW+7||top.ICEcoder.draggingFilesW)?"w-resize":"auto",top.ICEcoder.content.contentWindow.document&&top.ICEcoder.filesFrame.contentWindow)){top.document.body.style.cursor=a;if(b=top.ICEcoder.content.contentWindow.document.body)b.style.cursor=a;if(b=top.ICEcoder.filesFrame.contentWindow.document.body)b.style.cursor=a}},serverMessage:function(a){var b;
b=top.get("serverMessage");a?(b.innerHTML=top.ICEcoder.xssClean(a).replace(/\&lt;b\&gt;/g,"<b>").replace(/\&lt;\/b\&gt;/g,"</b>").replace(/\&lt;br\&gt;/g,"<br>"),b.style.left="0"):setTimeout(function(){b.style.left="2000px"},200);b.style.opacity=a?1:0},cssColorPreview:function(){var a,b,c,d;if(a=ICEcoder.getcMInstance()){b=a.getLine(a.getCursor().line);for(c=/(#[\da-f]{3}(?:[\da-f]{3})?\b|\b(?:rgb|hsl)a?\([\s\d%,.-]+\)|\b[a-z]+\b)/gi;(d=c.exec(b))&&a.getCursor().ch>d.index+d[0].length;);(b=top.get("content").contentWindow.document.getElementById("cssColor"))&&
b.parentNode.removeChild(b);top.ICEcoder.codeAssist&&"CSS"==top.ICEcoder.caretLocType&&(b=top.document.createElement("div"),b.id="cssColor",b.style.position="absolute",b.style.display="block",b.style.width=b.style.height="20px",b.style.zIndex="1000",b.style.background=d?d[0]:"",b.style.cursor="pointer",b.onclick=function(){top.ICEcoder.showColorPicker(d[0])},""==b.style.backgroundColor&&(b.style.display="none"),top.get("header").appendChild(b),a.addWidget(a.getCursor(),top.get("cssColor"),!0))}},
showColorPicker:function(a){top.get("blackMask").style.visibility="visible";top.get("mediaContainer").innerHTML='<div id="picker" class="picker"></div><br><br><input type="text" id="color" name="color" value="#000" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'color\').value)" value="insert &gt;" class="insertColorValue"><br><input type="text" id="colorRGB" name="colorRGB" value="rgb(0,0,0)" class="colorValue"><input type="button" onClick="top.ICEcoder.insertColorValue(top.get(\'colorRGB\').value)" value="insert &gt;" class="insertColorValue">';
farbtastic("picker","color");a&&top.get("picker").farbtastic.setColor(a)},drawCanvasImage:function(a){var b,c,d,e,f,g,m,h,k,n,p;b=top.get("canvasPicker").getContext("2d");c=new Image;c.src=a.src;c.onload=function(){top.get("canvasPicker").width=a.width;top.get("canvasPicker").height=a.height;b.drawImage(c,0,0,a.width,a.height)};top.get("canvasPicker").onmousemove=function(a){d=a.pageX-this.offsetLeft;e=a.pageY-this.offsetTop;f=b.getImageData(d,e,1,1).data;g=f[0];m=f[1];h=f[2];k=g+","+m+","+h;n=top.ICEcoder.rgbToHex(g,
m,h);top.get("rgbMouseXY").value=k;top.get("hexMouseXY").value="#"+n;top.get("hexMouseXY").style.backgroundColor=top.get("rgbMouseXY").style.backgroundColor="#"+n;p=128>g||128>m||128>h&&200>g&&200>m&&50<h?"#fff":"#000";top.get("hexMouseXY").style.color=top.get("rgbMouseXY").style.color=p};top.get("canvasPicker").onclick=function(){top.get("rgb").value=top.get("rgbMouseXY").value;top.get("hex").value=top.get("hexMouseXY").value;top.get("hex").style.backgroundColor=top.get("rgb").style.backgroundColor=
top.get("hex").value;top.get("hex").style.color=top.get("rgb").style.color=p}},rgbToHex:function(a,b,c){return top.ICEcoder.toHex(a)+top.ICEcoder.toHex(b)+top.ICEcoder.toHex(c)},toHex:function(a){a=parseInt(a,10);if(isNaN(a))return"00";a=Math.max(0,Math.min(a,255));return"0123456789abcdef".charAt((a-a%16)/16)+"0123456789abcdef".charAt(a%16)},insertColorValue:function(a){var b,c;b=ICEcoder.getcMInstance();c=b.getTokenAt(b.getCursor());b.replaceRange(a,{line:b.getCursor().line,ch:c.start},{line:b.getCursor().line,
@@ -70,27 +72,27 @@ ch:1E6})},fMIconVis:function(a,b){var c;if(c=top.get(a))c.style.opacity=b},isOpe
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;ICEcoder.getcMInstance();top.ICEcoder.codeAssist=!top.ICEcoder.codeAssist;top.get("codeAssistDisplay").style.backgroundPosition=top.ICEcoder.codeAssist?"0 0":"-16px 0";top.ICEcoder.cssColorPreview();top.ICEcoder.focus();for(i=0;i<top.ICEcoder.cMInstances.length;i++)-1<top.ICEcoder.openFiles[i].indexOf(".js")&&
(a=top.ICEcoder.content.contentWindow["cM"+top.ICEcoder.cMInstances[i]],top.ICEcoder.codeAssist?a.setOption("lintWith",top.ICEcoder.content.contentWindow.CodeMirror.javascriptValidator):(a.clearGutter("CodeMirror-lint-markers"),a.setOption("lintWith",!1)))},serverQueue:function(a,b){var c,d,e;c=ICEcoder.getcMInstance();for(e=d=0;e<ICEcoder.serverQueueItems.length;e++)0<ICEcoder.serverQueueItems[e].indexOf("action=save")&&d++;d++;if("add"==a)ICEcoder.serverQueueItems.push(b),0<b.indexOf("action=save")&&
(e=document.createElement("textarea"),e.setAttribute("id","saveTemp"+d),document.body.appendChild(e),top.get("saveTemp"+d).value=c.getValue());else if("del"==a){if(ICEcoder.serverQueueItems[0]&&0<ICEcoder.serverQueueItems[0].indexOf("action=save")){c=d-1;for(e=1;e<c;e++)top.get("saveTemp"+e).value=top.get("saveTemp"+(e+1)).value;c=top.get("saveTemp"+c);c.parentNode.removeChild(c)}ICEcoder.serverQueueItems.splice(0,1)}("del"==a&&1<=ICEcoder.serverQueueItems.length||1==ICEcoder.serverQueueItems.length)&&
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">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("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: 500px"></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"))},githubManager:function(){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"))},githubDiffToggle:function(){var a;
if(top.ICEcoder.githubDiff||top.ICEcoder.ask("This will compare and show a diff view between your local dir and the repo. OK?"))top.ICEcoder.githubDiff=!top.ICEcoder.githubDiff,a=top.ICEcoder.githubDiff?"true":"false",top.ICEcoder.filesFrame.src="files.php?githubDiff="+a+"&csrf="+top.ICEcoder.csrf;alert("This is a work in progress, unfinished at present and due for an ICEcoder v4.2 release. Currently ~40% done.")},useNewSettings:function(a,b,c,d,e,f,g,m,h,k,n,p,l,r,s){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"]=f?"1px":"0";c[b][4].style["margin-left"]=f?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=m;top.ICEcoder.indentWithTabs=
h;top.ICEcoder.indentSize=k;for(f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("tabSize",top.ICEcoder.indentSize);
d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);e!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=e);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=l;top.ICEcoder.bugFileMaxLines=r;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);s&&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)},openPreviewWindow:function(){if(0<top.ICEcoder.openFiles.length){var a,b,c;b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];c=b.substr(b.lastIndexOf("/")+1);c=c.substr(c.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();top.ICEcoder.previewWindow=window.open(b,"previewWindow");-1<["md"].indexOf(c)?top.ICEcoder.previewWindow.onload=
function(){top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())}:top.ICEcoder.previewWindow.onload=function(){try{top.ICEcoder.doPesticide()}catch(a){}}}},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("Updating is currently an experimental feature. While it should work fine, please note there may be issues here, plus the following isn't yet part of this:\n\n- Settings not ported to new version\n- Plugins not ported to new version\n- Any mods you've made not ported to new version\n\nIf you have write access on the whole of ICEcoder (ie, running locally) it should work fine. If tho you need to recover ICEcoder for any reason, you'll find this current version in its tmp dir.\n\nClick OK to proceed with an auto-update or cancel to visit the ICEcoder site so you can grab the zip and update manually")?
(top.ICEcoder.showHide("show",top.get("loadingMask")),window.location="lib/updater.php"):window.open("https://icecoder.net")},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(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null},openBugReport:function(){var a;
"off"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("You can start bug reporting in Help > Settings");"error"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("Error: can't find/access the error file paths");"ok"==top.ICEcoder.bugReportStatus&&top.ICEcoder.message("No new errors found");"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),
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,e,f,g,m,h,k,n,p,l,r,s,t){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"]=f?"1px":"0";c[b][4].style["margin-left"]=f?"-1px":"0";c[b][2].style.cssText="background-color: "+a+" !important";top.ICEcoder.lineWrapping=m;top.ICEcoder.indentWithTabs=h;top.ICEcoder.indentSize=k;for(f=0;f<ICEcoder.cMInstances.length;f++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("lineWrapping",top.ICEcoder.lineWrapping),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentWithTabs",top.ICEcoder.indentWithTabs),
ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("indentUnit",top.ICEcoder.indentSize),ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[f]].setOption("tabSize",top.ICEcoder.indentSize);d!=top.ICEcoder.tagWrapperCommand&&(top.ICEcoder.tagWrapperCommand=d);e!=top.ICEcoder.autoComplete&&(top.ICEcoder.autoComplete=e);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=
l;top.ICEcoder.bugFileMaxLines=r;""!=top.ICEcoder.bugFilePaths[0]?top.ICEcoder.startBugChecking():"undefined"!=typeof top.ICEcoder.bugFileCheckInt&&clearInterval(top.ICEcoder.bugFileCheckInt);top.ICEcoder.githubAuthTokenSet=s;t&&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)},openPreviewWindow:function(){if(0<
top.ICEcoder.openFiles.length){var a,b,c;b=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];c=b.substr(b.lastIndexOf("/")+1);c=c.substr(c.lastIndexOf(".")+1);a=ICEcoder.getcMInstance();top.ICEcoder.previewWindow=window.open(b,"previewWindow");-1<["md"].indexOf(c)?top.ICEcoder.previewWindow.onload=function(){top.ICEcoder.previewWindow.document.documentElement.innerHTML=mmd(a.getValue())}:top.ICEcoder.previewWindow.onload=function(){try{top.ICEcoder.doPesticide()}catch(a){}}}},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")},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(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;").replace(/'/g,"&#039;")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();b=top.ICEcoder.filesFrame.contentWindow.frames.fileControl;b.window.document.body.innerHTML="<!DOCTYPE html><head><title>ICEcoder code output</title></head><body><pre>"+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-
"&quot;").replace(/'/g,"&#039;")},printCode:function(){var a,b;a=top.ICEcoder.getcMInstance();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;ICEcoder.selectedTab=a;if(c=ICEcoder.getcMInstance()){ICEcoder.switchMode();for(var d=0;d<ICEcoder.cMInstances.length;d++)ICEcoder.content.contentWindow["cM"+ICEcoder.cMInstances[d]].getWrapperElement().style.display="none";c.setOption("theme",top.ICEcoder.theme);c.getWrapperElement().style.display="block";b||setTimeout(function(){top.ICEcoder.focus()},4);c.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["cMActiveLine"+ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]],"background");ICEcoder["cMActiveLine"+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-
@@ -99,22 +101,22 @@ top.ICEcoder.findMode=!1;ICEcoder.findReplace(top.get("find").value,!0,!1);top.I
"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();d=!0;c||ICEcoder.savedPoints[a-
1]==top.ICEcoder.getcMInstance(a).changeGeneration()||(d=top.ICEcoder.ask("You have made changes.\n\nAre you sure you want to close without saving?"));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";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-=1: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.getNestLocation("update");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("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,e,f;if(top.ICEcoder.ready){b=parseInt(top.ICEcoder.content.style.width,10)-53-22-10;c=b/top.ICEcoder.openFiles.length-18;d=-18;e=53;f=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,e=0==g?53:parseInt(top.get("tab"+g).style.left,10),f=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=e+f+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(e+f);top.get("newTab").style.left=e+f+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 e=0;e<b.length;e++){for(var f=0;f<b[e].length;f++)c[e].push(b[e][a[f]-
1]);b[e]=c[e]}for(e=0;e<a.length;e++)top.get("tab"+a[e]).id="tab"+(e+1)+".temp",top.ICEcoder.selectedTab==a[e]&&(d=e+1);for(e=0;e<a.length;e++)top.get("tab"+(e+1)+".temp").id="tab"+(e+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,e;a=[];b=[];c=[];for(var f=
0;f<top.ICEcoder.openFiles.length;f++)a.push(top.ICEcoder.openFiles[f].slice(top.ICEcoder.openFiles[f].lastIndexOf("/")+1)),b.push(top.ICEcoder.openFiles[f]),top.get("tab"+(f+1)).className="tab tabSlide";for(;0<a.length;){d=a[0];nextValueFull=b[0];for(f=e=0;f<a.length;f++)a[f]<d&&(d=a[f],nextValueFull=top.ICEcoder.openFiles[top.ICEcoder.openFiles.indexOf(b[f])],e=f);c.push(top.ICEcoder.openFiles.indexOf(nextValueFull)+1);a.splice(e,1);b.splice(e,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,
b){var c;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){var d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1;return"content"==a&&("ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d)?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):13==c?(top.ICEcoder.addLineBreakAtEnd(),!1):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c}return 13==c&&b.shiftKey?(top.ICEcoder.insertLineBefore(),!1):70==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("find").focus(),
!1):71==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("goToLineNo").focus(),!1):73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.searchForSelected(),!1):39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.nextTab(),!1):37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.previousTab(),!1):38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("up"),!1):40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("down"),
!1):107==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.duplicateLines():top.ICEcoder.newTab(),!1):109==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1):83==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(b.shiftKey?top.ICEcoder.saveFile("saveAs"):top.ICEcoder.saveFile(),!1):13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]?(top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-
1]),!1):79==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):32==c&&"content"!=a&&-1==["find","replace"].indexOf(document.activeElement.id)?(top.ICEcoder.getcMInstance()&&top.ICEcoder.focus(),!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=c.getCursor().line,-1<c.getLine(d).indexOf("{")?top.contentFrame.codeFoldBrace(c,d):top.contentFrame.codeFoldTag(c,d),!1):27==c&&"content"==a?(top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),!1):c},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();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,e,f,g,m;c=top.ICEcoder.getcMInstance();d=c.getCursor().line;if(-1<c.getLine(d).indexOf(a)){e=c.getLine(d);f=e.indexOf(a);e=e.slice(e.indexOf(a)+
a.length+1);b=b.replace(/VAR/g,e);e=c.getLine(d).slice(0,f);f=c.getLine(d).length-c.getLine(d).replace(/^\s\s*/,"").length;f=c.getLine(d).slice(0,f);b=b.replace(/INDENT/g,f);e+=b;f=e.indexOf("CURSOR");g=0;m=d;for(i=0;i<e.length;i++)e.indexOf("\n",g)<e.indexOf("CURSOR")&&(g=e.indexOf("\n",g)+1,m+=1);c.replaceRange(e.replace("CURSOR",""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(m,f);top.ICEcoder.focus()}}};
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";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-=1: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.getNestLocation("update");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,e,f;if(top.ICEcoder.ready){b=parseInt(top.ICEcoder.content.style.width,10)-53-22-10;c=b/top.ICEcoder.openFiles.length-18;d=-18;e=53;f=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,e=0==g?53:parseInt(top.get("tab"+g).style.left,10),f=0==g?0:parseInt(top.get("tab"+g).style.width,10)+18,a?d=-18:(top.get("tab"+(g+1)).style.left=e+f+"px",top.get("tab"+(g+1)).style.width=d+"px"),top.ICEcoder.tabLeftPos.push(e+f);top.get("newTab").style.left=e+f+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 e=0;e<b.length;e++){for(var f=0;f<b[e].length;f++)c[e].push(b[e][a[f]-1]);b[e]=c[e]}for(e=0;e<a.length;e++)top.get("tab"+a[e]).id="tab"+
(e+1)+".temp",top.ICEcoder.selectedTab==a[e]&&(d=e+1);for(e=0;e<a.length;e++)top.get("tab"+(e+1)+".temp").id="tab"+(e+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,e;a=[];b=[];c=[];for(var f=0;f<top.ICEcoder.openFiles.length;f++)a.push(top.ICEcoder.openFiles[f].slice(top.ICEcoder.openFiles[f].lastIndexOf("/")+
1)),b.push(top.ICEcoder.openFiles[f]),top.get("tab"+(f+1)).className="tab tabSlide";for(;0<a.length;){d=a[0];nextValueFull=b[0];for(f=e=0;f<a.length;f++)a[f]<d&&(d=a[f],nextValueFull=top.ICEcoder.openFiles[top.ICEcoder.openFiles.indexOf(b[f])],e=f);c.push(top.ICEcoder.openFiles.indexOf(nextValueFull)+1);a.splice(e,1);b.splice(e,1)}top.ICEcoder.sortTabs(c)}},interceptKeys:function(a,b){var c;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){var d=b.ctrlKey||top.ICEcoder.cmdKey?!0:!1;return"content"==a&&("ctrl+alt"==top.ICEcoder.tagWrapperCommand&&d||"alt-left"==top.ICEcoder.tagWrapperCommand&&!d)?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):c:13==c?(top.ICEcoder.insertLineAfter(),!1):c}return 13==c&&b.shiftKey?(top.ICEcoder.insertLineBefore(),!1):70==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("find").focus(),!1):71==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(top.get("goToLineNo").focus(),!1):
73==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.searchForSelected(),!1):39==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.nextTab(),!1):37==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"!=a?(top.ICEcoder.previousTab(),!1):38==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("up"),!1):40==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.moveLines("down"),!1):107==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.duplicateLines():
top.ICEcoder.newTab(),!1):109==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?("content"==a?top.ICEcoder.removeLines():top.ICEcoder.closeTab(top.ICEcoder.selectedTab),!1):83==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?(b.shiftKey?top.ICEcoder.saveFile("saveAs"):top.ICEcoder.saveFile(),!1):13==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"/[NEW]"!=top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]?(top.ICEcoder.resetKeys(b),window.open(top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]),!1):79==c&&(b.ctrlKey||top.ICEcoder.cmdKey)?
(top.ICEcoder.openPrompt(),!1):32==c&&(b.ctrlKey||top.ICEcoder.cmdKey)&&"content"==a?(top.ICEcoder.addSnippet(),!1):32==c&&"content"!=a&&-1==["find","replace"].indexOf(document.activeElement.id)?(top.ICEcoder.getcMInstance()&&top.ICEcoder.focus(),!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=c.getCursor().line,-1<c.getLine(d).indexOf("{")?top.contentFrame.codeFoldBrace(c,d):top.contentFrame.codeFoldTag(c,d),!1):27==c&&"content"==a?(top.ICEcoder.lineCommentToggle(),!1):27==c&&"content"!=a?(top.ICEcoder.cancelAllActions(),!1):c},resetKeys:function(a){top.ICEcoder.cmdKey=!1},addSnippet:function(){var a,b,c;a=ICEcoder.getcMInstance();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,e,f,g,m;c=top.ICEcoder.getcMInstance();d=c.getCursor().line;if(-1<c.getLine(d).indexOf(a)){e=c.getLine(d);f=e.indexOf(a);e=e.slice(e.indexOf(a)+a.length+1);b=b.replace(/VAR/g,e);
e=c.getLine(d).slice(0,f);f=c.getLine(d).length-c.getLine(d).replace(/^\s\s*/,"").length;f=c.getLine(d).slice(0,f);b=b.replace(/INDENT/g,f);e+=b;f=e.indexOf("CURSOR");g=0;m=d;for(i=0;i<e.length;i++)e.indexOf("\n",g)<e.indexOf("CURSOR")&&(g=e.indexOf("\n",g)+1,m+=1);c.replaceRange(e.replace("CURSOR",""),{line:d,ch:0},{line:d,ch:1E6});c.setCursor(m,f);top.ICEcoder.focus()}}};

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['login'];
?>
<!DOCTYPE html>
@@ -12,6 +13,7 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
?></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="ice-coder.css">
<link rel="icon" type="image/png" href="../favicon.png">
</head>
@@ -26,17 +28,20 @@ echo $ICEcoder["password"] == "" && !$ICEcoder["multiUser"] ? "Setup" : "Login";
<form name="settingsUpdate" action="login.php" method="POST">
<?php if ($ICEcoder["multiUser"]) {echo ' <input type="text" name="username" class="password"><br><br>'.PHP_EOL;};?>
<input type="password" name="password" class="password"><br><br>
<input type="submit" name="submit" value="<?php if ($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]) {echo "set password / login";} else {echo $ICEcoder["password"] == "" ? "set password" : "login";}; ?>" class="button">
<input type="submit" name="submit" value="<?php if ($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]) {echo $t['set password']." / ".$t['login'];} else {echo $ICEcoder["password"] == "" ? $t['set password'] : $t['login'];}; ?>" class="button">
<?php
if(empty($_SERVER['HTTPS'])) {
echo '<div class="text">Using over non-https connection.<br>SSL is recommended!</div>';
}
if($ICEcoder["multiUser"] && $ICEcoderSettings["enableRegistration"]){
echo '<div class="text"><a href="javascript:alert(\'To disable registration mode, open the settings menu or open lib/config___settings.php and change enableRegistration to false then reload this page\')">Registration mode enabled</a></div>';
echo '<div class="text"><a href="javascript:alert(\''.$t['To disable registration...'].'\')">'.$t['Registration mode enabled'].'</a></div>';
}
?>
<?php
if ($ICEcoder["password"] == "" || $ICEcoder["multiUser"]) {
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> auto-check for updates</div>';
echo '<div class="text"><input type="checkbox" name="checkUpdates" value="true" checked> '.$t['auto-check for updates'].'</div>';
}
if (!$ICEcoder["multiUser"]) { echo '<div class="text"><a href="javascript:alert(\'To put into multi-user mode, open the settings menu or open lib/config___settings.php and change multiUser to true then reload this page\')">multi-user?</a></div>';};
if (!$ICEcoder["multiUser"]) { echo '<div class="text"><a href="javascript:alert(\''.$t['To put into...'].'\')">'.$t['multi-user'].'?</a></div>';};
?>
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['multiple-results'];
?>
<?php
if(isset($_GET['selectedFiles'])) {
@@ -32,7 +33,7 @@ if(isset($_GET['selectedFiles'])) {
} else {
echo 'replaceAll()';
}
?>" style="opacity: 0.1"><?php echo isset($_GET['target']) && strpos($_GET['target'],"filenames") ? 'rename all' : 'replace all';?></div>
?>" style="opacity: 0.1"><?php echo isset($_GET['target']) && strpos($_GET['target'],"filenames") ? $t['rename all'] : $t['replace all'];?></div>
<?php ;}; ?>
<script>
@@ -48,7 +49,7 @@ findText = top.findAndReplace.find.value.toLowerCase();
$findText = str_replace("ICEcoder:","",str_replace("&#39;","\'",$_GET['find']));
// Find in open docs?
if (!isset($_GET['target'])) {
$targetName = "document";
$targetName = $t['document'];
?>
var startTab = top.ICEcoder.selectedTab;
var rExp = new RegExp(findText,"gi");
@@ -57,9 +58,9 @@ for (var i=1;i<=top.ICEcoder.openFiles.length;i++) {
var cM = top.ICEcoder.getcMInstance();
var content = cM.getValue();
if (content.match(rExp)) {
resultsDisplay += '<a href="javascript:gotoTab('+i+')">'+ top.ICEcoder.openFiles[i-1]+ '</a><br><div id="foundCount'+i+'">Found '+content.match(rExp).length+' times</div>';
resultsDisplay += '<a href="javascript:gotoTab('+i+')">'+ top.ICEcoder.openFiles[i-1]+ '</a><br><div id="foundCount'+i+'"><?php echo $t['Found'];?> '+content.match(rExp).length+' <?php echo $t['times'];?></div>';
<?php if (isset($_GET['replace'])) { ?>
resultsDisplay += '<div class="replace" id="replace" onClick="replaceSingle('+i+');this.style.display=\'none\'">replace</div>';
resultsDisplay += '<div class="replace" id="replace" onClick="replaceSingle('+i+');this.style.display=\'none\'"><?php echo $t['replace'];?></div>';
<?php ;}; ?>
resultsDisplay += '<hr>';
foundArray.push(i);
@@ -72,7 +73,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
// Find in files or filenames
} else {
if (strpos($_GET['target'],"filenames")>0) {
$targetName = "file/folder";
$targetName = $t['file folder'];
?>
var spansArray = top.ICEcoder.filesFrame.contentWindow.document.getElementsByTagName('span');
for (var i=0;i<spansArray.length;i++) {
@@ -99,11 +100,11 @@ if (startTab!=top.ICEcoder.selectedTab) {
<?php if (!isset($_GET['replace'])) { ?>
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+'</div>';
<?php ;} else { ?>
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>';
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', <?php echo $t['rename to'];?> '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>';
<?php
;};
if (isset($_GET['replace'])) { ?>
resultsDisplay += '<div class="replace" id="replace" onClick="renameSingle('+i+');this.style.display=\'none\'">rename</div>';
resultsDisplay += '<div class="replace" id="replace" onClick="renameSingle('+i+');this.style.display=\'none\'"><?php echo $t['rename'];?></div>';
<?php ;}; ?>
resultsDisplay += '<hr>';
foundArray.push(i);
@@ -112,11 +113,11 @@ if (startTab!=top.ICEcoder.selectedTab) {
}
<?php
} else {
$targetName = "file";
$targetName = $t['file'];
$r = 0;
function phpGrep($q, $path, $base) {
$fp = opendir($path);
global $r, $ICEcoder, $serverType, $selectedFiles, $docRoot, $ICEcoderDir, $context;
global $t, $r, $ICEcoder, $serverType, $selectedFiles, $docRoot, $ICEcoderDir, $context;
if (!isset($ret)) {$ret="";};
$slash = $serverType == strpos($path,"\\")>-1 ? "\\" : "/";
while($f = readdir($fp)) {
@@ -146,9 +147,9 @@ if (startTab!=top.ICEcoder.selectedTab) {
}
if (!$bFile && (count($selectedFiles)==0 || count($selectedFiles)>0 && $foundInSelFile)) {
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.get('blackMask'))\\\">";
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath,false,$context),false)),$q)." times</div>";
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">".$t['Found']." ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath,false,$context),false)),$q)." ".$t['times']."</div>";
if (isset($_GET['replace'])) {
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>";
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">".$t['replace']."</div>";
};
$ret .= '<hr>';
echo 'foundArray.push("'.$fullPath.'");'.PHP_EOL;
@@ -168,14 +169,14 @@ if (startTab!=top.ICEcoder.selectedTab) {
?>
showHide = foundArray.length==0 ? "hide" : "show";
top.ICEcoder.showHide(showHide,top.get('blackMask'));
if (foundArray.length==0) {top.ICEcoder.message('No matches found')};
if (foundArray.length==0) {top.ICEcoder.message('<?php echo $t['No matches found'];?>')};
<?php if (isset($_GET['replace'])) { ?>
if (foundArray.length!=0) {document.getElementById('replaceAll').style.opacity = 1};
<?php ;}; ?>
plural = foundArray.length >= 2 ? "s" : "";
targetName = "<?php echo $targetName;?>";
selectedText = foundInSelected ? "selected " : "";
document.getElementById('title').innerHTML = findText.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+" found in "+foundArray.length+" "+selectedText+targetName+plural;
selectedText = foundInSelected ? "<?php echo $t['selected'];?> " : "";
document.getElementById('title').innerHTML = findText.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+" <?php echo $t['found in'];?> "+foundArray.length+" "+selectedText+targetName+plural;
document.getElementById('results').innerHTML = resultsDisplay;
var gotoTab = function(tab) {
@@ -188,7 +189,7 @@ var replaceSingle = function(tab) {
cM = top.ICEcoder.getcMInstance();
content = cM.getValue();
cM.setValue(cM.getValue().replace(rExp,top.get('replace').value));
document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('Found','Replaced');
document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('<?php echo $t['Found'];?>','<?php echo $t['Replaced'];?>');
}
var replaceAll = function() {

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['plugins-manager'];
// Set the plugin data source
$pluginsDataSrc = "https://icecoder.net/plugin-data?format=JSON";
@@ -153,14 +154,14 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
fclose($fh);
// Finally, reload ICEcoder itself if plugin requires it or just the iFrame screen for the user if it doesn't
if ($_GET['action']=="install" && $pluginsData[$_GET['plugin']]['reload'] == "true") {
echo "<script>if (top.confirm('ICEcoder needs to reload to make this plugin usable.\\n\\nReload now?')) {top.window.location.reload();} else {window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;}</script>";
echo "<script>if (top.confirm('".$t['ICEcoder needs to...']."')) {top.window.location.reload();} else {window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;}</script>";
} else {
header("Location: plugins-manager.php?updatedPlugins&csrf=".$_SESSION["csrf"]);
echo "<script>window.location='plugins-manager.php?updatedPlugins&csrf='+top.ICEcoder.csrf;</script>";
}
die("<span style='color: #fff'>saving plugins...</span>");
die("<span style='color: #fff'>".$t['saving plugins']."</span>");
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
}
@@ -174,11 +175,11 @@ function deletePlugin($dir) {
chdir('.');
deletePlugin($dir.$file.'/');
if(is_dir($dir.$file)) {
rmdir($dir.$file);// or DIE("<span style='color: #fff'>couldn't delete dir: $dir$file</span><br />");
rmdir($dir.$file) or DIE("<span style='color: #fff'>".$t['couldnt delete dir'].": $dir$file</span><br />");
}
}
else
unlink($dir.$file) or DIE("<span style='color: #fff''>couldn't delete file: $dir$file</span><br />");
unlink($dir.$file) or DIE("<span style='color: #fff''>".$t['couldnt delete file'].": $dir$file</span><br />");
}
}
closedir($mydir);
@@ -197,24 +198,24 @@ function deletePlugin($dir) {
<body class="pluginsManager">
<h1>plugins</h1>
<h1><?php echo $t['plugins'];?></h1>
<a href="javascript:top.ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>','writingPlugins')" style="position: absolute; top: 26px; right: 20px"><div style="padding: 10px; background: #333; color: #fff; font-size: 18px">Guide to writing plugins</div></a>
<a href="javascript:top.ICEcoder.showManual('<?php echo $ICEcoder["versionNo"];?>','writingPlugins')" style="position: absolute; top: 26px; right: 20px"><div style="padding: 10px; background: #333; color: #fff; font-size: 18px"><?php echo $t['Guide to writing...'];?></div></a>
<div style="display: inline-block; width: 760px; height: 340px; overflow-y: auto">
<?php
$plugins = $ICEcoder['plugins'];
if (count($plugins) > 0) {
?>
<div style="display: inline-block; width: 740px; margin-bottom: 30px">
<h2>Manage Installed</h2><br>
<h2><?php echo $t['Manage Installed'];?></h2><br>
<form id="pluginUpdateForm" action="plugins-manager.php?action=update" method="POST">
<table>
<tr>
<td colspan="2"></td>
<td style="padding-left: 5px">URL</td>
<td style="padding-left: 5px">Target</td>
<td style="padding-left: 5px">Timer</td>
<td style="padding-left: 5px"><?php echo $t['URL'];?></td>
<td style="padding-left: 5px"><?php echo $t['Target'];?></td>
<td style="padding-left: 5px"><?php echo $t['Timer'];?></td>
</tr>
<?php
for ($i=0; $i<count($plugins); $i++) {
@@ -228,7 +229,7 @@ function deletePlugin($dir) {
}
echo '<tr>';
echo '<td colspan="4"></td>';
echo '<td style="padding: 3px 0 8px 0"><div style="padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'pluginUpdateForm\').submit()">Update</div></td>';
echo '<td style="padding: 3px 0 8px 0"><div style="padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="document.getElementById(\'pluginUpdateForm\').submit()">'.$t['Update'].'</div></td>';
echo '</tr>';
?>
</table>
@@ -240,7 +241,7 @@ function deletePlugin($dir) {
?>
<div style="display: inline-block; width: 740px">
<h2>Install / Uninstall</h2><br>
<h2><?php echo $t['Install'].' / '.$t['Uninstall'];?></h2><br>
<table>
<?php
@@ -249,14 +250,14 @@ function deletePlugin($dir) {
echo '<tr>'.PHP_EOL;
}
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=install&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">Install</div>';
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #2187e7; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=install&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">'.$t['Install'].'</div>';
for ($j=0; $j<count($plugins); $j++) {
if ($pluginsData[$i]['name'] == $plugins[$j][0]) {
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #333; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=uninstall&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">Uninstall</div>';
$installUninstallButton = '<div style="display: inline-block; padding: 5px; background: #333; color: #fff; font-size: 12px; cursor: pointer" onclick="window.location=\'plugins-manager.php?action=uninstall&plugin='.$i.'&csrf='.$_SESSION["csrf"].'\'">'.$t['Uninstall'].'</div>';
}
}
$reloadExtra = $pluginsData[$i]['reload'] == 'true' ? '<br><span style="color: #888">Reload after install required</span>' : '';
$reloadExtra = $pluginsData[$i]['reload'] == 'true' ? '<br><span style="color: #888">'.$t['Reload after install...'].'</span>' : '';
echo '<td style="padding: 0 10px 18px 0; width: 28px; text-align: center"><img src="https://icecoder.net/'.$pluginsData[$i]['icon'].'" alt="'.$pluginsData[$i]['name'].'"></td>';
echo '<td style="padding: 8px 10px 8px 0; width: 250px; white-space: nowrap">'.$pluginsData[$i]['name'].$reloadExtra.'</td>';
$styleExtra = ($i % 2 == 1 || $i == count($pluginsData)-1) ? "0" : "30px";

View File

@@ -1,6 +1,14 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['properties'];
// Establish the real absolute path to the file/folder
$fileName=realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['fileName'])));
// If it doesn't exist, or doesn't start with the $docRoot, stop here
if (!file_exists($fileName) || strpos(str_replace("\\","/",$fileName),$docRoot) !== 0) {
die("<script>alert('Sorry - problem with file/folder requested');window.history.back();</script>");
}
?>
<!DOCTYPE html>
@@ -14,13 +22,10 @@ include("settings.php");
<body class="properties">
<h1 id="title">properties</h1>
<h1 id="title"><?php echo $t['properties'];?></h1>
<?php
$fileName=$docRoot.$iceRoot.str_replace("|","/",strClean($_GET['fileName']));
?>
<h2><?php echo basename($fileName); ?></h2><br>
<span class="column" style="width: 180px">Size: <?php
<span class="column" style="width: 180px"><?php echo $t['Size'];?>: <?php
$bytes = filesize($fileName);
// If it's a dir, get the dir size
if (is_dir($fileName)) {
@@ -38,18 +43,18 @@ if ($outputSize >= 1024) {
}
echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)";
?></span>
<span class="column" style="margin: 0 10px">Modified: <?php echo date( "D jS M Y g:i:sa", filemtime($fileName)); ?></span>
<span class="column">Last access: <?php echo date( "D jS M Y g:i:sa", fileatime($fileName)); ?></span>
<span class="column" style="margin: 0 10px"><?php echo $t['Modified'];?>: <?php echo date( "D jS M Y g:i:sa", filemtime($fileName)); ?></span>
<span class="column"><?php echo $t['Last access'];?>: <?php echo date( "D jS M Y g:i:sa", fileatime($fileName)); ?></span>
<br><br>
<span class="column" style="width: 180px">Type: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
<span class="column" style="margin: 0 10px">Readable / Writeable:
<span class="column" style="width: 180px"><?php echo $t['Type'];?>: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
<span class="column" style="margin: 0 10px"><?php echo $t['Readable Writeable'];?>:
<?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writeable($fileName) ? "Yes" : "No";?>
</span>
<span class="column">Relative path: <?php echo str_replace($docRoot,"",$fileName);?></span>
<span class="column"><?php echo $t['Relative path'];?>: <?php echo str_replace($docRoot,"",$fileName);?></span>
<br><br>
<span class="column" style="width: 410px">Absolute path:<br><?php echo $fileName;?></span>
<span class="column" style="width: 410px"><?php echo $t['Absolute path'];?>:<br><?php echo $fileName;?></span>
<?php if (is_dir($fileName)) {?>
<span class="column" style="width: 180px">Contains:<br><?php
<span class="column" style="width: 180px"><?php echo $t['Contains'];?>:<br><?php
$dirList = scandir($fileName);
$dirCount = 0;
$fileCount = 0;
@@ -70,7 +75,7 @@ echo $dirCount." sub-folder".$dirPlural.", ".$fileCount." file".$filePlural;
<?php ;};?>
<br><br><br>
<span class="column" style="width: 180px">
Permissions:
<?php echo $t['Permissions'];?>:
<?php
$chmodInfo = substr(sprintf('%o', fileperms($fileName)), -4);
echo $chmodInfo;
@@ -84,33 +89,33 @@ $writeVars = array(2,3,6,7);
$execVars = array(1,3,5,7);
?>
<table>
<tr><th>Owner</th><th>Group</th><th>Public</th></tr>
<tr><th><?php echo $t['Owner'];?></th><th><?php echo $t['Group'];?></th><th><?php echo $t['Public'];?></th></tr>
<tr>
<td><input type="checkbox" name="ownerR" id="owner4"<?php if(in_array($perms[0],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
<td><input type="checkbox" name="groupR" id="group4"<?php if(in_array($perms[1],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
<td><input type="checkbox" name="publicR" id="public4"<?php if(in_array($perms[2],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Read</td>
<td><input type="checkbox" name="ownerR" id="owner4"<?php if(in_array($perms[0],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Read'];?></td>
<td><input type="checkbox" name="groupR" id="group4"<?php if(in_array($perms[1],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Read'];?></td>
<td><input type="checkbox" name="publicR" id="public4"<?php if(in_array($perms[2],$readVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Read'];?></td>
</tr>
<tr>
<td><input type="checkbox" name="ownerW" id="owner2"<?php if(in_array($perms[0],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
<td><input type="checkbox" name="groupW" id="group2"<?php if(in_array($perms[1],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
<td><input type="checkbox" name="publicW" id="public2"<?php if(in_array($perms[2],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Write</td>
<td><input type="checkbox" name="ownerW" id="owner2"<?php if(in_array($perms[0],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Write'];?></td>
<td><input type="checkbox" name="groupW" id="group2"<?php if(in_array($perms[1],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Write'];?></td>
<td><input type="checkbox" name="publicW" id="public2"<?php if(in_array($perms[2],$writeVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Write'];?></td>
</tr>
<tr>
<td><input type="checkbox" name="ownerE" id="owner1"<?php if(in_array($perms[0],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
<td><input type="checkbox" name="groupE" id="group1"<?php if(in_array($perms[1],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
<td><input type="checkbox" name="publicE" id="public1"<?php if(in_array($perms[2],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> Execute</td>
<td><input type="checkbox" name="ownerE" id="owner1"<?php if(in_array($perms[0],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Execute'];?></td>
<td><input type="checkbox" name="groupE" id="group1"<?php if(in_array($perms[1],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Execute'];?></td>
<td><input type="checkbox" name="publicE" id="public1"<?php if(in_array($perms[2],$execVars)!="") {echo ' checked';};?> onClick="changePerms();showButton()"> <?php echo $t['Execute'];?></td>
</tr>
</table>
</span>
<span class="column">
Change to:<br>
<?php echo $t['Change to'];?>:<br>
<form name="chmod" action="#" method="GET">
<input type="text" name="chmod" id="permText" style="width: 30px; border: 0; background-color: #444; font-size: 10px; color: #fff" maxlength="3" value="<?php echo substr($chmodInfo,1,3); ?>" onKeyUp="changePerms(this.value);showButton()" onChange="changePerms(this.value);showButton()">
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
</span>
<div class="update" id="updateButton" onClick="validatePerms()">update</div>
<div class="update" id="updateButton" onClick="validatePerms()"><?php echo $t['update'];?></div>
<script>
readVars = [4,5,6,7];

View File

@@ -18,6 +18,10 @@ $context = stream_context_create(array('http'=>
// Start a session if we haven't already
if(!isset($_SESSION)) {@session_start();}
// Set the language file
$text = $_SESSION['text'];
$t = $text['settings-common'];
// Logout if that's the action we're taking
if (isset($_GET['logout'])) {
include(dirname(__FILE__)."/../processes/on-user-logout.php");
@@ -93,7 +97,7 @@ function xssClean($data,$type) {
return $match[0];
} else {
return 'javascript:void(0)';
}
}
}
$output = str_replace($bad, $good, $data);
@@ -115,7 +119,7 @@ function toUTF8noBOM($string,$message) {
if ($encType != "ASCII" && $encType != "UTF-8" && strlen($teststringConverted) == strlen($teststringBroken)) {
$string = utf8_encode($string);
if ($message) {
echo "top.ICEcoder.message('Your document doesn\'t appear to be in UTF-8 encoding so has been converted.');";
echo "top.ICEcoder.message('".$t['Your document does...'].".');";
}
}
}

View File

@@ -1,4 +1,8 @@
<?php
include_once("settings-common.php");
$text = $_SESSION['text'];
$t = $text['settings-save-current-files'];
// Save the currently opened files for next time
if ($_SESSION['loggedIn'] && isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
$settingsContents = file_get_contents($settingsFile,false,$context);
@@ -27,7 +31,7 @@ if ($_SESSION['loggedIn'] && isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
fwrite($fh, $settingsContents);
fclose($fh);
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
// Update our last10Files var?
@@ -46,7 +50,7 @@ if ($_SESSION['loggedIn'] && isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
fwrite($fh, $settingsContents);
fclose($fh);
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config...']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
}
}

View File

@@ -42,5 +42,5 @@ h2 {font-size: 18px; font-weight: normal; color: #fff}
-moz-box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
box-shadow: 0 0 10px 1px rgba(0,198,255,0.7);
}
.settings .info {font-size: 10px; color: #bbb; cursor: help}
.settings .info {font-size: 10px; color: rgba(0,198,255,0.7); cursor: help}
.settings .update {position: absolute; bottom: 0; right: 20px; padding: 5px 10px; font-size: 18px; background-color: rgba(0,198,255,0.7); opacity: 0.1; cursor: pointer}

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['settings-screen'];
?>
<!DOCTYPE html>
@@ -14,7 +15,7 @@ include("settings.php");
<script src="../<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js"></script>
<style type="text/css">
.CodeMirror {position: absolute; width: 409px; height: 240px; font-size: <?php echo $ICEcoder["fontSize"];?>}
.CodeMirror {position: absolute; width: 409px; height: 180px; font-size: <?php echo $ICEcoder["fontSize"];?>}
.CodeMirror-scroll {overflow: hidden}
/* Make sure this next one remains the 3rd item, updated with JS */
.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)}
@@ -41,88 +42,86 @@ for ($i=0;$i<count($themeArray);$i++) {
<div class="infoPane">
<a href="https://icecoder.net" target="_blank"><img src="../images/ice-coder.png" alt="ICEcoder" class="logo"></a>
<h1 style="margin: 10px 0">settings</h1>
<h1 style="margin: 10px 0"><?php echo $t['settings'];?></h1>
<p>
version:<br>
<?php echo $t['version'];?>:<br>
v <?php echo $ICEcoder["versionNo"];?>
<br><br>
website:<br>
<?php echo $t['website'];?>:<br>
<a href="https://icecoder.net" target="_blank">https://icecoder.net</a>
<br><br>
git:<br>
<?php echo $t['git'];?>:<br>
<a href="https://github.com/mattpass/ICEcoder" target="_blank">https://github.com/mattpass/ICEcoder</a>
<br><br>
codemirror dir:<br>
<?php echo $t['codemirror dir'];?>:<br>
<?php echo $ICEcoder["codeMirrorDir"]; ?>
<br><br>
codemirror version:<br>
<?php echo $t['codemirror version'];?>:<br>
<script>
document.write(CodeMirror.version);
</script>
<br><br>
file manager root:<br>
<?php echo $t['file manager root'];?>:<br>
<?php echo $ICEcoder['root'] == "" ? "/" : $ICEcoder['root'];?>
<br><br>
<div style="font-size: 10px; line-height: 12px">ICEcoder by Matt Pass (<a href="https://www.twitter.com/mattpass" style="font-size: 10px" target="_blank">@mattpass</a>)<br><br>
Free to use it for your own purposes, commercial or not, just let me know of any cool uses or customisations. :)<br><br>
No warranty or liability accepted for anything, all responsibility of use is your own.<br><br>
A lot of fantastic people and companies have helped build ICEcoder and there's too many to thank here. Please see the full list at <a href="https://icecoder.net" target="_blank">https://icecoder.net</a>
<div style="font-size: 10px; line-height: 12px">ICEcoder on Twitter (<a href="https://www.twitter.com/icecoder" style="font-size: 10px" target="_blank">@icecoder</a>)<br><br>
<?php echo $t['Free to use...'];?> <a href="https://icecoder.net" target="_blank">https://icecoder.net</a>
</div>
</p>
</div>
<form name="settings" action="settings.php" method="POST">
<div class="settingsColumn1">
<h2>functionality</h2>
<input type="checkbox" onclick="showButton()" name="checkUpdates" value="true"<?php if($ICEcoder["checkUpdates"]) {echo ' checked';};?>> check for updates on load<br>
<input type="checkbox" onclick="showButton()" name="openLastFiles" value="true"<?php if($ICEcoder["openLastFiles"]) {echo ' checked';};?>> auto open last files on login<br>
<h2><?php echo $t['functionality'];?></h2>
<input type="checkbox" onclick="showButton()" name="checkUpdates" value="true"<?php if($ICEcoder["checkUpdates"]) {echo ' checked';};?>> <?php echo $t['check for updates...'];?><br>
<input type="checkbox" onclick="showButton()" name="openLastFiles" value="true"<?php if($ICEcoder["openLastFiles"]) {echo ' checked';};?>> <?php echo $t['auto open last...'];?><br>
<br>
when finding in files, exclude:<br>
<?php echo $t['when finding in...'];?>:<br>
<input type="text" onkeydown="showButton()" name="findFilesExclude" value="<?php echo implode(", ",$ICEcoder["findFilesExclude"]); ?>"><br>
<br>
<h2>assisting</h2>
<input type="checkbox" onclick="showButton()" name="codeAssist" value="true"<?php if($ICEcoder["codeAssist"]) {echo ' checked';};?>> code assist<br>
<input type="checkbox" onclick="showButton();showHideTabs()" name="visibleTabs" value="true"<?php if($ICEcoder["visibleTabs"]) {echo ' checked';};?>> visible tabs<br>
<input type="checkbox" onclick="showButton()" name="lockedNav" value="true"<?php if($ICEcoder["lockedNav"]) {echo ' checked';};?>> locked nav<br><br>
tag wrapper command<br>
<h2><?php echo $t['assisting'];?></h2>
<input type="checkbox" onclick="showButton()" name="codeAssist" value="true"<?php if($ICEcoder["codeAssist"]) {echo ' checked';};?>> <?php echo $t['code assist'];?><br>
<input type="checkbox" onclick="showButton();showHideTabs()" name="visibleTabs" value="true"<?php if($ICEcoder["visibleTabs"]) {echo ' checked';};?>> <?php echo $t['visible tabs'];?><br>
<input type="checkbox" onclick="showButton()" name="lockedNav" value="true"<?php if($ICEcoder["lockedNav"]) {echo ' checked';};?>> <?php echo $t['locked nav'];?><br><br>
<?php echo $t['tag wrapper command'];?><br>
<select onchange="showButton()" name="tagWrapperCommand">
<option value="ctrl+alt"<?php if($ICEcoder["tagWrapperCommand"]=='ctrl+alt') {echo " selected";};?>>ctrl/cmd + alt</option>
<option value="alt-left"<?php if($ICEcoder["tagWrapperCommand"]=='alt-left') {echo " selected";};?>>alt left</option>
</select><br>
<br>
auto-complete on<br>
<?php echo $t['auto-complete on'];?><br>
<select onchange="showButton()" name="autoComplete">
<option value="ctrl+space"<?php if($ICEcoder["autoComplete"]=='ctrl+space') {echo " selected";};?>>ctrl/cmd + space</option>
<option value="keypress"<?php if($ICEcoder["autoComplete"]=='keypress') {echo " selected";};?>>keypress</option>
</select><br>
<br>
<h2>security</h2>
new password <span class="info" title="8 chars min">[?]</span><br>
<h2><?php echo $t['security'];?></h2>
<?php echo $t['new password'];?> <span class="info" title="<?php echo $t['8 chars min'];?>">[?]</span><br>
<input type="password" name="password" onkeydown="showButton()"><br>
confirm password<br>
<?php echo $t['confirm password'];?><br>
<input type="password" name="passwordConfirm" onkeydown="showButton()"><br>
<br>
banned files/folders<br>
<?php echo $t['banned files/folders'];?><br>
<input type="text" onkeydown="document.settings.changedFileSettings.value='true';showButton()" name="bannedFiles" value="<?php echo implode(", ",$ICEcoder["bannedFiles"]); ?>"><br>
banned paths <span class="info" title="Slash prefixed, comma delimited">[?]</span><br>
<?php echo $t['banned paths'];?> <span class="info" title="<?php echo $t['Slash prefixed comma...'];?>">[?]</span><br>
<input type="text" onkeydown="document.settings.changedFileSettings.value='true';showButton()" name="bannedPaths" value="<?php echo implode(", ",$ICEcoder["bannedPaths"]); ?>"><br>
<input type="hidden" name="changedFileSettings" value="false">
ip addresses <span class="info" title="Comma delimited">[?]</span><br>
<?php echo $t['ip addresses'];?> <span class="info" title="<?php echo $t['Comma delimited'];?>">[?]</span><br>
<input type="text" onkeydown="showButton()" name="allowedIPs" value="<?php echo implode(", ",$ICEcoder["allowedIPs"]); ?>"><br>
</div>
<div class="settingsColumn2">
<h2>style</h2>
theme<br>
<h2><?php echo $t['style'];?></h2>
<?php echo $t['theme'];?><br>
<select onchange="selectTheme();showButton()" id="select" name="theme" style="width: 95px">
<option<?php if ($ICEcoder["theme"]=="default") {echo ' selected';}; ?>>default</option>
<?php
@@ -134,7 +133,7 @@ for ($i=0;$i<count($themeArray);$i++) {
</select>
<span style="position: absolute; margin: -15px 0 0 10px">
line wrapping<br>
<?php echo $t['line wrapping'];?><br>
<select onchange="showButton()" name="lineWrapping">
<option value="true"<?php if($ICEcoder["lineWrapping"]) {echo " selected";};?>>yes</option>
<option value="false"<?php if(!$ICEcoder["lineWrapping"]) {echo " selected";};?>>no</option>
@@ -142,7 +141,7 @@ for ($i=0;$i<count($themeArray);$i++) {
</span>
<span style="position: absolute; margin: -15px 0 0 100px">
indent type<br>
<?php echo $t['indent type'];?><br>
<select onchange="showButton()" name="indentWithTabs">
<option value="true"<?php if($ICEcoder["indentWithTabs"]) {echo " selected";};?>>tabs</option>
<option value="false"<?php if(!$ICEcoder["indentWithTabs"]) {echo " selected";};?>>spaces</option>
@@ -150,12 +149,12 @@ for ($i=0;$i<count($themeArray);$i++) {
</span>
<span style="position: absolute; margin: -15px 0 0 190px">
indent size <br>
<?php echo $t['indent size'];?><br>
<input type="text" name="indentSize" id="indentSize" style="width: 30px" onkeydown="showButton()" onkeyup="changeIndentSize()" value="<?php echo $ICEcoder["indentSize"];?>">
</span>
<span style="position: absolute; margin: -15px 0 0 267px">
font size <br>
<?php echo $t['font size'];?><br>
<input type="text" name="fontSize" id="fontSize" style="width: 44px" onkeydown="showButton()" onkeyup="changeFontSize()" value="<?php echo $ICEcoder["fontSize"];?>">
</span>
<br><br>
@@ -175,11 +174,11 @@ function findSequence(goal) {
}</textarea>
<br>
<span style="position: absolute; top: 360px">
<span style="position: absolute; top: 300px">
<div style="position: relative; display: inline-block; margin-right: 20px">
<h2>layout</h2>
plugin panel aligned<br>
<h2><?php echo $t['layout'];?></h2>
<?php echo $t['plugin panel aligned'];?><br>
<select onchange="showButton()" name="pluginPanelAligned">
<option value="left"<?php if($ICEcoder["pluginPanelAligned"] == "left") {echo " selected";};?>>left</option>
<option value="right"<?php if($ICEcoder["pluginPanelAligned"] == "right") {echo " selected";};?>>right</option>
@@ -187,34 +186,41 @@ function findSequence(goal) {
</div>
<div style="position: relative; display: inline-block">
<h2>file manager</h2>
root <span class="info" title="Slash prefixed">[?]</span><br>
<h2><?php echo $t['file manager'];?></h2>
<?php echo $t['root'];?> <span class="info" title="<?php echo $t['Slash prefixed'];?>">[?]</span><br>
<input type="text" name="root" style="width: 200px" onkeydown="document.settings.changedFileSettings.value='true';showButton()" value="<?php echo $ICEcoder["root"];?>">
</div>
<br><br>
<h2>bug reporting</h2>
check in files <span class="info" title="Slash prefixed, comma delimited">[?]</span><br>
<h2><?php echo $t['bug reporting'];?></h2>
<?php echo $t['check in files'];?> <span class="info" title="<?php echo $t['Slash prefixed comma...'];?>">[?]</span><br>
<input type="text" name="bugFilePaths" style="width: 120px" onkeydown="showButton()" value="<?php echo implode(", ",$ICEcoder["bugFilePaths"]);?>">
<span style="display: inline-block; padding: 4px 5px 0 5px">every</span>
<span style="display: inline-block; padding: 4px 5px 0 5px"><?php echo $t['every'];?></span>
<input type="text" name="bugFileCheckTimer" style="width: 50px" onkeydown="showButton()" value="<?php echo $ICEcoder["bugFileCheckTimer"];?>">
<span style="display: inline-block; padding: 4px 5px 0 5px">secs, getting last</span>
<span style="display: inline-block; padding: 4px 5px 0 5px"><?php echo $t['secs getting last'];?></span>
<input type="text" name="bugFileMaxLines" style="width: 50px" onkeydown="showButton()" value="<?php echo $ICEcoder["bugFileMaxLines"];?>">
<span style="display: inline-block; padding: 4px 5px 0 5px">lines</span>
<span style="display: inline-block; padding: 4px 5px 0 5px"><?php echo $t['lines'];?></span>
<br><br>
<div>
<h2> multi-user <span class="info" title="Make sure you don't lock yourself out">[?]</span> </h2>
<h2><?php echo $t['multi-user'];?> <span class="info" title="<?php echo $t['Make sure you...'];?>">[?]</span></h2>
<input type="checkbox" name="multiUser" value="true" onclick="showButton();changeEnableRegistrationStatus();"<?php if($ICEcoder["multiUser"]){echo ' checked';} ?>>Multi-User
<?php
echo '<input type="checkbox" name="enableRegistration" value="true"';
if($ICEcoder["enableRegistration"]){echo ' checked';}
if($ICEcoder["enableRegistration"]){echo ' checked';}
if(!$ICEcoder["multiUser"]){
echo ' disabled=""';
}
echo ' onclick="showButton()" id="enableRegistration"> Registration </input>';
echo ' onclick="showButton()" id="enableRegistration"> '.$t['Registration'].' </input>';
?>
</div>
<br>
<div>
<h2>github</h2>
<?php echo $t['auth token'];?> <span class="info" title="<?php echo $t['Required to get...'];?>">[?]</span> &nbsp; <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use" target="_blank" class="info">Personal Access Token</a> &nbsp; <a href="(http://developer.github.com/v3/oauth" target="_blank" class="info">Client/Secret Pair Token</a><br>
<input type="text" name="githubAuthToken" style="width: 320px" onkeydown="showButton()" value="<?php echo $ICEcoder["githubAuthToken"];?>" autocomplete="off">
</div>
</span>
<script>

View File

@@ -1,4 +1,8 @@
<?php
include_once("settings-common.php");
$text = $_SESSION['text'];
$t = $text['settings-update'];
// Update this config file?
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_POST["theme"]) && $_POST["theme"]) {
$settingsContents = file_get_contents($settingsFile,false,$context);
@@ -29,13 +33,14 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
$ICEcoder["bugFilePaths"] = 'array("'.str_replace(',','","',str_replace(" ","",strClean($_POST['bugFilePaths']))).'")';
$ICEcoder["bugFileCheckTimer"] = intval($_POST['bugFileCheckTimer']);
$ICEcoder["bugFileMaxLines"] = intval($_POST['bugFileMaxLines']);
$ICEcoder["githubAuthToken"] = strClean($_POST['githubAuthToken']);
$settingsArray = array("root","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines");
$settingsArray = array("root","checkUpdates","openLastFiles","findFilesExclude","codeAssist","visibleTabs","lockedNav","tagWrapperCommand","autoComplete","password","bannedFiles","bannedPaths","allowedIPs","theme","fontSize","lineWrapping","indentWithTabs","indentSize","pluginPanelAligned","bugFilePaths","bugFileCheckTimer","bugFileMaxLines","githubAuthToken");
$settingsNew = "";
for ($i=0;$i<count($settingsArray);$i++) {
$settingsNew .= '"'.$settingsArray[$i].'" => ';
// Wrap certain values in double quotes
$settingWrap = $settingsArray[$i]=="root"||$settingsArray[$i]=="password"||$settingsArray[$i]=="theme"||$settingsArray[$i]=="fontSize"||$settingsArray[$i]=="tagWrapperCommand"||$settingsArray[$i]=="autoComplete"||$settingsArray[$i]=="pluginPanelAligned" ? '"' : '';
$settingWrap = $settingsArray[$i]=="root"||$settingsArray[$i]=="password"||$settingsArray[$i]=="theme"||$settingsArray[$i]=="fontSize"||$settingsArray[$i]=="tagWrapperCommand"||$settingsArray[$i]=="autoComplete"||$settingsArray[$i]=="pluginPanelAligned"||$settingsArray[$i]=="githubAuthToken" ? '"' : '';
$settingsNew .= $settingWrap.$ICEcoder[$settingsArray[$i]].$settingWrap.','.PHP_EOL;
}
@@ -48,7 +53,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
fwrite($fh, $settingsContents);
fclose($fh);
} else {
echo "<script>top.ICEcoder.message('Cannot update config file. Please set public write permissions on lib/".$settingsFile." and try again');</script>";
echo "<script>top.ICEcoder.message('".$t['Cannot update config']." lib/".$settingsFile." ".$t['and try again']."');</script>";
}
// OK, now the config file has been updated, update our current session with new arrays
@@ -72,14 +77,15 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
$isEnableRegistration = $_POST['enableRegistration'] ? "true" : "false";
$generalSettingsContents = str_replace('"enableRegistration" => true','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);
$generalSettingsContents = str_replace('"enableRegistration" => false','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);
$fConfigSettings = fopen($configSettings, 'w') or die("Can't update config file. Please set public write permissions on ".$configSettings." and press refresh");
$fConfigSettings = fopen($configSettings, 'w') or die($t['Cannot update config']." ".$configSettings." ".$t['and press refresh']);
fwrite($fConfigSettings, $generalSettingsContents);
fclose($fConfigSettings);
$githubAuthTokenSet = $ICEcoder["githubAuthToken"] != "" ? "true" : "false";
// With all that worked out, we can now hide the settings screen and apply the new settings
$jsBugFilePaths = "['".str_replace(",","','",str_replace(" ","",strClean($_POST['bugFilePaths'])))."']";
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",".$refreshFM.");top.iceRoot = '".$ICEcoder["root"]."';</script>";
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",'".$githubAuthTokenSet."',".$refreshFM.");top.iceRoot = '".$ICEcoder["root"]."';</script>";
}
?>

View File

@@ -39,6 +39,15 @@ If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
// Join ICEcoder settings and user settings together to make our final ICEcoder array
$ICEcoder = $ICEcoderSettings + $ICEcoderUserSettings;
// Include language file
// Load English first as foundation
include(dirname(__FILE__)."/../lang/english.php");
$englishText = $text;
// Load chosen language ontop to replace English
include(dirname(__FILE__)."/../lang/english.php");
$text = array_replace_recursive ($englishText, $text);
$_SESSION['text'] = $text;
// Login not required or we're in demo mode and have password set in our settings, log us straight in
if ((!$ICEcoder['loginRequired'] || $ICEcoder['demoMode']) && $ICEcoder['password']!="") {$_SESSION['loggedIn']=true;};
$demoMode = $ICEcoder['demoMode'];

12
lib/underscore-min.js vendored Normal file
View File

@@ -0,0 +1,12 @@
// This file contains the select, reject, forEach and has functions
// from underscore.js, then minified to make it extra tiny
// Underscore.js 1.3.3
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function(){var e=this,t=Array.prototype,n=Object.prototype,r=t.forEach,i=t.filter,s=n.hasOwnProperty,o={};_=function(obj) {return new wrapper(obj);};_.filter=_.select=function(e,t,n){var r=[];return e==null?r:i&&e.filter===i?e.filter(t,n):(u(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},_.reject=function(e,t,n){var r=[];return e==null?r:(u(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)};var u=_.each=_.forEach=function(e,t,n){if(e==null)return;if(r&&e.forEach===r)e.forEach(t,n);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(i in e&&t.call(n,e[i],i,e)===o)return}else for(var u in e)if(_.has(e,u)&&t.call(n,e[u],u,e)===o)return};_.has=function(e,t){return s.call(e,t)}}).call(this)

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['updater'];
?>
<!DOCTYPE html>
<head>
@@ -150,6 +151,10 @@ function transposeSettings($oldFile,$newFile,$saveFile) {
// And override with old setting if not blank, not in excluded array and we have a match
if ($thisKey != "" && $thisKey != "versionNo" && $thisKey != "codeMirrorDir" && strpos($oldSettingsArray[$j],'"'.$thisKey.'"') > -1) {
$contentLine = $oldSettingsArray[$j].PHP_EOL;
// If the old setting we're copying over isn't replacing the last line and doesn't end in a comma (after an rtrim to remove line endings), add one
if ($i != count($newSettingsArray)-1 && substr(rtrim($contentLine),-1) != ",") {
$contentLine = str_replace(PHP_EOL,",".PHP_EOL,$contentLine);
}
}
}
$contents .= $contentLine;
@@ -188,7 +193,7 @@ startUpdate();
if ($updateDone) {
echo 'Updated successfully!<br><br>';
echo 'Restarting ICEcoder...';
echo '<script>alert("Update appears to be successful");window.location = "../";</script>';
echo '<script>alert("'.$t['Update appears to...'].'");window.location = "../";</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>';

View File

@@ -13,35 +13,39 @@ CodeMirror.commands.autocomplete = function(cm) {
// Switch the CodeMirror mode on demand
top.ICEcoder.switchMode = function(mode) {
var cM, fileName;
var cM, fileName, fileExt;
cM = top.ICEcoder.getcMInstance();
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
if (cM && mode) {
cM.setOption("mode",mode);
} else if (cM && fileName) {
fileName.indexOf('.js')>0 ? cM.setOption("mode","text/javascript")
: fileName.indexOf('.coffee')>0 ? cM.setOption("mode","text/x-coffeescript")
: fileName.indexOf('.rb')>0 ? cM.setOption("mode","text/x-ruby")
: fileName.indexOf('.py')>0 ? cM.setOption("mode","text/x-python")
: fileName.indexOf('.css')>0 ? cM.setOption("mode","text/css")
: fileName.indexOf('.less')>0 ? cM.setOption("mode","text/x-less")
: fileName.indexOf('.md')>0 ? cM.setOption("mode","text/x-markdown")
: fileName.indexOf('.xml')>0 ? cM.setOption("mode","application/xml")
: fileName.indexOf('.sql')>0 ? cM.setOption("mode","text/x-mysql") // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql
: fileName.indexOf('.erl')>0 ? cM.setOption("mode","text/x-erlang")
: fileName.indexOf('.yaml')>0 ? cM.setOption("mode","text/x-yaml")
: fileName.indexOf('.java')>0 ? cM.setOption("mode","text/x-java")
: fileName.indexOf('.jl')>0 ? cM.setOption("mode","text/x-julia")
: fileName.indexOf('.c')>0 ? cM.setOption("mode","text/x-csrc")
: fileName.indexOf('.cpp')>0 ? cM.setOption("mode","text/x-c++src")
: fileName.indexOf('.cs')>0 ? cM.setOption("mode","text/x-csharp")
: fileName.indexOf('.go')>0 ? cM.setOption("mode","text/x-go")
: fileName.indexOf('.lua')>0 ? cM.setOption("mode","text/x-lua")
: fileName.indexOf('.pl')>0 ? cM.setOption("mode","text/x-perl")
: fileName.indexOf('.rs')>0 ? cM.setOption("mode","text/x-rustsrc")
: fileName.indexOf('.scss')>0 ? cM.setOption("mode","text/x-sass")
: cM.setOption("mode","application/x-httpd-php");
fileExt = fileName.split(".");
fileExt = fileExt[fileExt.length-1];
cM.setOption("mode",
fileExt == "js" ? "text/javascript"
: fileExt == "coffee" ? "text/x-coffeescript"
: fileExt == "rb" ? "text/x-ruby"
: fileExt == "py" ? "text/x-python"
: fileExt == "css" ? "text/css"
: fileExt == "less" ? "text/x-less"
: fileExt == "md" ? "text/x-markdown"
: fileExt == "xml" ? "application/xml"
: fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql
: fileExt == "erl" ? "text/x-erlang"
: fileExt == "yaml" ? "text/x-yaml"
: fileExt == "java" ? "text/x-java"
: fileExt == "jl" ? "text/x-julia"
: fileExt == "c" ? "text/x-csrc"
: fileExt == "cpp" ? "text/x-c++src"
: fileExt == "cs" ? "text/x-csharp"
: fileExt == "go" ? "text/x-go"
: fileExt == "lua" ? "text/x-lua"
: fileExt == "pl" ? "text/x-perl"
: fileExt == "rs" ? "text/x-rustsrc"
: fileExt == "scss" ? "text/x-sass"
: "application/x-httpd-php"
);
}
}
@@ -112,9 +116,12 @@ top.ICEcoder.lineCommentToggleSub = function(cM, cursorPos, linePos, lineContent
// Work out the nesting depth location on demand and update our display if required
top.ICEcoder.getNestLocationSub = function(nestCheck, fileName) {
var events;
var events, fileExt;
if (["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileName.split(".")[1])<0 &&
fileExt = fileName.split(".");
fileExt = fileExt[fileExt.length-1];
if (["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileExt)<0 &&
(nestCheck.indexOf("include(")==-1)&&(nestCheck.indexOf("include_once(")==-1)) {
// Then for all the array items, output as the nest display
@@ -134,12 +141,16 @@ top.ICEcoder.getNestLocationSub = function(nestCheck, fileName) {
// Indicate if the nesting structure of the code is OK
top.ICEcoder.updateNestingIndicator = function() {
var cM, testToken, nestOK, fileName;
var cM, testToken, nestOK, fileName, fileExt;
cM = top.ICEcoder.getcMInstance();
nestOK = true;
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
if (cM && fileName && ["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileName.split(".")[1])==-1) {
if (fileName) {
fileExt = fileName.split(".");
fileExt = fileExt[fileExt.length-1];
}
if (cM && fileName && ["js","coffee","css","less","sql","erl","yaml","java","jl","c","cpp","cs","go","lua","pl","rs","scss"].indexOf(fileExt)==-1) {
testToken = cM.getTokenAt({line:cM.lineCount(),ch:cM.lineInfo(cM.lineCount()-1).text.length});
nestOK = testToken.type && testToken.type.indexOf("error") == -1 ? true : false;
}
@@ -149,7 +160,7 @@ top.ICEcoder.updateNestingIndicator = function() {
// Determine which area of the document we're in
top.ICEcoder.caretLocationType = function() {
var cM, caretLocType, caretChunk, fileName;
var cM, caretLocType, caretChunk, fileName, fileExt;
cM = top.ICEcoder.getcMInstance();
caretLocType = "Unknown";
@@ -163,27 +174,31 @@ top.ICEcoder.caretLocationType = function() {
fileName = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
if (fileName) {
if (fileName.indexOf(".js")>0) {caretLocType="JavaScript"}
else if (fileName.indexOf(".coffee")>0) {caretLocType="CoffeeScript"}
else if (fileName.indexOf(".py")>0) {caretLocType="Python"}
else if (fileName.indexOf(".rb")>0) {caretLocType="Ruby"}
else if (fileName.indexOf(".css")>0) {caretLocType="CSS"}
else if (fileName.indexOf(".less")>0) {caretLocType="LESS"}
else if (fileName.indexOf(".md")>0) {caretLocType="Markdown"}
else if (fileName.indexOf(".xml")>0) {caretLocType="XML"}
else if (fileName.indexOf(".sql")>0) {caretLocType="SQL"}
else if (fileName.indexOf(".yaml")>0) {caretLocType="YAML"}
else if (fileName.indexOf(".java")>0) {caretLocType="Java"}
else if (fileName.indexOf(".erl")>0) {caretLocType="Erlang"}
else if (fileName.indexOf(".jl")>0) {caretLocType="Julia"}
else if (fileName.indexOf(".c")>0 && fileName.indexOf(".cpp")<0 && fileName.indexOf(".cs")<0) {caretLocType="C"}
else if (fileName.indexOf(".cpp")>0) {caretLocType="C++"}
else if (fileName.indexOf(".cs")>0) {caretLocType="C#"}
else if (fileName.indexOf(".go")>0) {caretLocType="Go"}
else if (fileName.indexOf(".lua")>0) {caretLocType="Lua"}
else if (fileName.indexOf(".pl")>0) {caretLocType="Perl"}
else if (fileName.indexOf(".rs")>0) {caretLocType="Rust"}
else if (fileName.indexOf(".scss")>0) {caretLocType="Sass"};
fileExt = fileName.split(".");
fileExt = fileExt[fileExt.length-1];
caretLocType =
fileExt == "js" ? "JavaScript"
: fileExt == "coffee" ? "CoffeeScript"
: fileExt == "py" ? "Python"
: fileExt == "rb" ? "Ruby"
: fileExt == "css" ? "CSS"
: fileExt == "less" ? "LESS"
: fileExt == "md" ? "Markdown"
: fileExt == "xml" ? "XML"
: fileExt == "sql" ? "SQL"
: fileExt == "yaml" ? "YAML"
: fileExt == "java" ? "Java"
: fileExt == "erl" ? "Erlang"
: fileExt == "jl" ? "Julia"
: fileExt == "c" ? "C"
: fileExt == "cpp" ? "C++"
: fileExt == "cs" ? "C#"
: fileExt == "go" ? "Go"
: fileExt == "lua" ? "Lua"
: fileExt == "pl" ? "Perl"
: fileExt == "rs" ? "Rust"
: fileExt == "scss" ? "Sass"
: "Content";
}
top.ICEcoder.caretLocType = caretLocType;

View File

@@ -5,4 +5,48 @@
// $fh = fopen(dirname(__FILE__)."/../file-saves.log", 'a');
// fwrite($fh, "save ".date("D dS M Y h:i:sa").": ".$file."\n");
// fclose($fh);
// Compiling Sass and LESS files (.scss and .less to .css version, with same name, in same dir)
$fileName = basename($file);
$fileNameExtPos = strrpos($fileName,".");
$filePieces = explode(".",$file);
$fileExt = $filePieces[count($filePieces)-1];
// SCSS Compiling if we have SCSSPHP plugin installed
if (strtolower($fileExt) == "scss" && file_exists(dirname(__FILE__)."/../plugins/scssphp/scss.inc.php")) {
// Load the SCSSPHP lib and start a new instance
require dirname(__FILE__)."/../plugins/scssphp/scss.inc.php";
$scss = new scssc();
// Set the import path and formatting type
$scss->setImportPaths(dirname($file)."/");
$scss->setFormatter('scss_formatter_compressed'); // scss_formatter, scss_formatter_nested, scss_formatter_compressed
try {
$scssContent = $scss->compile('@import "'.$fileName.'"');
$fh = fopen(substr($file, 0, -$fileNameExtPos)."css", 'w');
fwrite($fh, $scssContent);
fclose($fh);
} catch (Exception $e) {
echo ";top.ICEcoder.message('Couldn\'t compile your Sass, error info below:\\n\\n".$e->getMessage()."');";
}
}
// LESS Compiling if we have LESSPHP plugin installed
if (strtolower($fileExt) == "less" && file_exists(dirname(__FILE__)."/../plugins/lessphp/lessc.inc.php")) {
// Load the LESSPHP lib and start a new instance
require dirname(__FILE__)."/../plugins/lessphp/lessc.inc.php";
$less = new lessc();
// Set the formatting type and if we want to preserve comments
$less->setFormatter('lessjs'); // lessjs (same style used in LESS for JS), compressed (no whitespace) or classic (LESSPHP's original formatting)
$less->setPreserveComments(false); // true or false
try {
$less->checkedCompile($file, substr($file, 0, -$fileNameExtPos)."css"); // Note: Only recompiles if changed
} catch (Exception $e) {
echo ";top.ICEcoder.message('Couldn\'t compile your LESS, error info below:\\n\\n".$e->getMessage()."');";
}
}
?>

View File

@@ -13,7 +13,7 @@ echo "<b>Test date, time & microtime:</b><br>".date("jS M Y g:i:sa")." (".microt
$success = 0;
echo '<b>TEST 1 of 3: PHP Version:</b></b><br>ICEcoder needs at least PHP 5.0, tho 5.3 and above is recommended:<br><br>';
echo '<b>TEST 1 of 3: PHP Version:</b><br>ICEcoder needs at least PHP 5.0, tho 5.3 and above is recommended:<br><br>';
echo "Your PHP Version: ".phpversion()."<br><br>";
echo '<b>TEST RESULT:</b> ';
@@ -28,7 +28,7 @@ echo "<br><br><hr><br>";
if(!isset($_SESSION)) {@session_start();}
echo '<b>TEST 2 of 3: Sessions:</b></b><br>These values should all be the same:<br><br>';
echo '<b>TEST 2 of 3: Sessions:</b></b><br>Session ID: '.session_id().'. These values should all be the same:<br><br>';
echo '<div style="display: inline-block; width: 200px">SESSION, BEFORE SET:</div>'.$_SESSION["string"]."<br>";
if (!isset($_GET["string"])) {
$_SESSION["string"] = md5(uniqid(mt_rand(), true));
@@ -78,4 +78,4 @@ echo $success." of 3 tests passed successfully<br><br>";
</body>
</html>
</html>