Merge pull request #4 from mattpass/master

update 26-08-2014
This commit is contained in:
kris
2014-08-27 01:00:41 +02:00
18 changed files with 1257 additions and 224 deletions

View File

@@ -53,6 +53,21 @@ window.onbeforeunload = function() {
}
}
}
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>

View File

@@ -1,7 +1,7 @@
<?php
// Chinese language translation
// by: @lzh370 (GitHub)
// @lzh370 (Twitter)
// lzh370@qq.com
// Please preserve formatting, line breaks, special characters, anything in <tags> and HTML equivalents (eg &amp;). Translations on right side.
@@ -90,8 +90,8 @@ $text = array(
"Close all tabs" => "关闭所有选项卡",
"Alphabetize tabs" => "按字母顺序排列的选项卡",
"Find" => "搜索",
"in" => "搜索",
"and" => "替换",
"in" => "in",
"and" => "and",
"replace" => "替换",
"replace all" => "替换所有",
"this document" => "当前文件",
@@ -107,6 +107,168 @@ $text = array(
// /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" => "设置密码",
@@ -116,6 +278,148 @@ $text = array(
"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..." => "更新似乎是成功的"
)
);
?>

Binary file not shown.

155
lang/dutch.php Normal file
View File

@@ -0,0 +1,155 @@
<?php
// Dutch language translation
// Door: Julian Kaagman
// 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..." => "<b>Klik op de icoontjes<br>voor hulp &amp;<br>gebruiks info</b>",
"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" => "Remote",
"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" => "Autocomplete",
"Comment/Uncomment" => "Commentaar maken",
"Jump to Definition" => "Spring naar definitie",
"Manual" => "Manual",
"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 code assistent aan/uit",
"Code Assist" => "Code assistent",
"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"
),
"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"
)
);
?>

View File

@@ -29,8 +29,7 @@ $text = array(
"dev mode" => "dev mode",
"Status" => "Status",
"Using" => "Using",
"You can switch..." => "You can switch dev mode on/off
in lib/config__settings.php",
"You can switch..." => "You can switch dev mode on/off in lib/config__settings.php",
"results" => "results"
),
@@ -177,7 +176,7 @@ in lib/config__settings.php",
"headers" =>
array(
"Bad CSRF token..." => "Baddd CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed."
"Bad CSRF token..." => "Bad CSRF token. Please report the error info at https://github.com/mattpass/ICEcoder so it can be fixed."
),
"help" =>
@@ -216,6 +215,7 @@ in lib/config__settings.php",
"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",
@@ -241,6 +241,34 @@ in lib/config__settings.php",
"Cancel tasks" => "Cancel tasks"
),
"ice-coder" =>
array(
"No text selected..." => "No text selected to search on",
"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!",
"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",
@@ -268,6 +296,129 @@ in lib/config__settings.php",
"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"
)
);

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"
)
);
?>

View File

@@ -23,6 +23,8 @@ if (strpos($file,$docRoot)===false && $_GET['action']!="getRemoteFile") {$file=s
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
$fileName = basename($file);
// echo ";alert('".xssClean($_GET['action'],"html")." : ".$file."');console.log('".xssClean($_GET['action'],"html")." : ".$file."');";
// If we're due to open a file...
if ($_GET['action']=="load") {
echo 'action="load";';

View File

@@ -41,6 +41,7 @@ $t = $text['help'];
<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>

View File

@@ -115,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++) {
@@ -405,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
@@ -545,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...']);
}
}
},
@@ -702,7 +702,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);
}
},
@@ -724,7 +724,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;
}
@@ -735,7 +735,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();
}
@@ -757,7 +757,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);
@@ -767,7 +767,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
@@ -784,7 +784,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
@@ -798,7 +798,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,"/"));
@@ -811,7 +811,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();
}
@@ -832,7 +832,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();
}
@@ -846,7 +846,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);
};
},
@@ -870,13 +870,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...']);
}
},
@@ -1029,7 +1029,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;
@@ -1290,7 +1290,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);
},
// ==============
@@ -1686,7 +1686,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);
},
@@ -1702,7 +1702,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';
@@ -1721,7 +1721,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'));
},
@@ -1748,7 +1748,7 @@ var ICEcoder = {
// Ask user for GitHub token
githubTokenAsk: function(goNext) {
if (githubAuthToken = top.ICEcoder.getInput('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','')) {
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 = "";
@@ -1774,7 +1774,7 @@ var ICEcoder = {
if (!top.ICEcoder.githubAuthTokenSet) {
top.ICEcoder.githubTokenAsk('loadFiles');
} else if (top.ICEcoder.githubDiff || top.ICEcoder.ask("This will compare and show a diff view between your local dir and the repo. OK?")) {
} 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";
@@ -1953,11 +1953,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";
@@ -1982,13 +1978,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
@@ -2045,13 +2041,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";
@@ -2079,7 +2075,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
@@ -2256,7 +2252,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) {
@@ -2319,7 +2315,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);
}
@@ -2559,6 +2555,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)

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

@@ -1,42 +1,42 @@
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]=
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,
@@ -45,24 +45,24 @@ top.get(c[a])),top.get(c[a]+"Nav").style.color=""},150);else for(var d=0;d<c.len
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=
"|"):"")+"|"+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.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="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">';
"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 +70,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")?
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"))},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=""},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;alert("This is a work in progress, unfinished at present and due for an ICEcoder v4.2 release. Currently ~70% done.");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("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),
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-
"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 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 +99,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['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,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['properties'];
?>
<!DOCTYPE html>
@@ -14,13 +15,13 @@ 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 +39,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 +71,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 +85,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

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['settings-screen'];
?>
<!DOCTYPE html>
@@ -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>
@@ -178,8 +177,8 @@ function findSequence(goal) {
<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,46 +186,39 @@ 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>
auth token <span class="info" title="Required to get diffs, commit to your GitHub hosted repo etc. If you don't have one, you can use a:
- personal access token (https://help.github.com/articles/creating-an-access-token-for-command-line-use), or
- full client/secret pair token (http://developer.github.com/v3/oauth).
It's 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.
However, if you work in a trusted and secure environment, it's more efficient to set it here.">[?]</span><br>
<?php echo $t['auth token'];?> <span class="info" title="<?php echo $t['Required to get...'];?>">[?]</span><br>
<input type="text" name="githubAuthToken" style="width: 300px" onkeydown="showButton()" value="<?php echo $ICEcoder["githubAuthToken"];?>">
</div>
</span>

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);
@@ -49,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
@@ -73,8 +77,8 @@ 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);

View File

@@ -40,7 +40,12 @@ If ($ICEcoderUserSettings["versionNo"] != $ICEcoderSettings["versionNo"]) {
$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_merge($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

View File

@@ -1,6 +1,7 @@
<?php
include("headers.php");
include("settings.php");
$t = $text['updater'];
?>
<!DOCTYPE html>
<head>
@@ -192,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>';