Compare commits

...

21 Commits
v1.4 ... v1.5

Author SHA1 Message Date
Matt Pass
ef157d71f2 Version 1.5 2013-01-18 17:19:47 +00:00
Matt Pass
0b718e0fbf Styling of a elems for manual link 2013-01-18 17:09:42 +00:00
Matt Pass
809af86c16 Link to manual from Help screen
Passes through version number to be used by function in the URL that
shows the manual
2013-01-18 17:08:26 +00:00
Matt Pass
449e8e2c4a Function to show the ICEcoder manual
Shows the manual in the mediaContainer popup, also passing through the
version number so in the future we can show relevant info.
2013-01-18 17:07:09 +00:00
Matt Pass
01c8a10463 DOCTYPE must be set before anything else
By setting doctype before settings.php, the script elements etc are
loaded after defining the doctype to be html5. This issue only affects
IE9 and not Chrome or Firefox.
2013-01-18 12:59:41 +00:00
Matt Pass
27da7ed0fe Close all tabs function added
Close button added to left of tabs as close all button. Simple styling
added to match tabs. closeAllTabs function added to close all tabs from
last back to first.
2013-01-18 12:13:09 +00:00
Matt Pass
685116c555 Can now pass mode argument to switchMode()
Allows you to set a mode to use via the API
2013-01-18 11:50:16 +00:00
Matt Pass
0c4741c793 Disallow traversing to parent dir 2013-01-15 11:54:12 +00:00
Matt Pass
4da7024f91 Upload files function added
This function will get uploaded file details for each file uploaded and
when uploaded, move the file to the user selected folder. Also shows
error message if there is an issue. Either way, when finished it will
clear the selectedFiles, file menu and hide the loading mask to return
user to normal view.
2013-01-15 11:47:31 +00:00
Matt Pass
b49a2cc52d 2 new functions to select & submit uploaded files
Select function sets uploadedDir hidden form field and clicks the file
input button for user. Submit function is automatically triggered when
files value changes, which then shows the loading screen and submits the
form. preventDefault is also needed here.
2013-01-15 11:45:06 +00:00
Matt Pass
c0fe50cd2f Upload files option added
Clicking on new 'Upload File(s)' option triggers a function to click the
file input button. onChange of this value, the submit function is called
to post the form
2013-01-15 11:43:24 +00:00
Matt Pass
497efaabf0 Fixing multiple & path issies in delete function
Establish a fullPath to begin with and use that
Only show relative path in message re not being able to delete
2013-01-13 16:10:19 +00:00
Matt Pass
2ee777739f Paste same name files with postfixed next nos
$dest now has double slashes replaced with singles
Now also considers if a file exists before copying
If it does, next available number up to 1 billion postfixed to end of
filename
Copy with that new filename, next number postfixed
Slight adjust to filename shown in file manager to match
2013-01-13 15:13:34 +00:00
Matt Pass
deb3ad5359 Logout link added
Logout link added to left of version no, next to logo in top right
Clicking this triggers the logout function, which directs the browser to
the same window location with ?logout QS
The settings.php file is run again (via inclusion) and finding the QS
var, sets the loggedIn var set to false (as a double measure to the
session also being destroyed) and header location boots user back to
login screen
2013-01-13 14:37:36 +00:00
Matt Pass
3f1801ef2b Postfix comparison to check path
Establish a stringExtra value of a slash or nothing depending on wether
we are considering the root level or not
When comparing the folder against the selectedFile array value, postfix
both with a slash (could be any char though). This is to eliminate path
mismatches.
2013-01-13 13:46:59 +00:00
Matt Pass
ca8e92e443 Establish cM and consider in if statement
Avoids errors on content = cM.getValue line
2013-01-13 13:09:46 +00:00
Matt Pass
c514e4a1ad Replace pipes with slahes before opening URL 2013-01-13 12:53:59 +00:00
Matt Pass
ec28de40c9 Checkerboard BG behind image popups
Show checkerboard image behind image popups so you can see transparent
areas on images. Needed black BG as a fallback too.
2013-01-13 12:47:48 +00:00
Matt Pass
14053fbfdd Fixed banned & selected finding issues
Remove old echo test message
Added new $foundInSelFile var
Both this and bFile are false to begin with
Testing on not false of bannedFile in strpos
If we find our matching item is one of our selected files, set
$foundInSelFile to true
Only if we don't have a banned file and either we have no selected
files, or we do have some and have a match, push to array etc
PHP_EOL's to make source easier to read
2012-12-30 19:24:17 +00:00
Matt Pass
464030808c No need to preload the snippet display
Doesn't help with repainting issue
2012-12-30 19:20:43 +00:00
Matt Pass
d2377bff34 Close button for snippet-display 2012-12-30 19:20:09 +00:00
11 changed files with 838 additions and 723 deletions

View File

@@ -223,8 +223,6 @@ function createNewCMInstance(num) {
var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder); var codeFoldBrace = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);
</script> </script>
<iframe name="snippetLoader" src="snippets/snippet-display.php" style="display: none"></iframe>
</body> </body>
</html> </html>

BIN
images/checkerboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<?php include("lib/settings.php"); <?php include("lib/settings.php");
// Check IP permissions // Check IP permissions
@@ -15,7 +16,6 @@ if ($ICEcoder["checkUpdates"]) {
} }
} }
?> ?>
<!DOCTYPE html>
<html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'top');top.ICEcoder.canResizeFilesW()}"> <html onMouseDown="top.ICEcoder.mouseDown=true" onMouseUp="top.ICEcoder.mouseDown=false" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'top');top.ICEcoder.canResizeFilesW()}">
<head> <head>
@@ -83,12 +83,20 @@ if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
<a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()">New File</a> <a href="javascript:top.ICEcoder.newFile()" onMouseOver="ICEcoder.showFileMenu()">New File</a>
<a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()">New Folder</a> <a href="javascript:top.ICEcoder.newFolder()" onMouseOver="ICEcoder.showFileMenu()">New Folder</a>
<a href="javascript:top.ICEcoder.pasteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Paste</a> <a href="javascript:top.ICEcoder.pasteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Paste</a>
<a href="javascript:top.ICEcoder.uploadFilesSelect(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Upload File(s)</a>
<div style="display: none">
<form enctype="multipart/form-data" id="uploadFilesForm" action="lib/file-control.php?action=upload&file=/uploaded" method="POST" target="fileControl">
<input type="hidden" name="folder" id="uploadDir" value="/">
<input type="file" name="filesInput[]" id="fileInput" onchange="top.ICEcoder.uploadFilesSubmit(this)" multiple>
<input type="submit" value="Upload File">
</form>
</div>
</span> </span>
<a href="javascript:top.ICEcoder.deleteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Delete</a> <a href="javascript:top.ICEcoder.deleteFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Delete</a>
<span id="singleFileMenuItems"> <span id="singleFileMenuItems">
<a href="javascript:top.ICEcoder.copyFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Copy</a> <a href="javascript:top.ICEcoder.copyFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Copy</a>
<a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Rename</a> <a href="javascript:top.ICEcoder.renameFile(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Rename</a>
<a href="javascript:window.open(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">View Webpage</a> <a href="javascript:window.open(top.ICEcoder.rightClickedFile.replace(/\|/g,'/'))" onMouseOver="ICEcoder.showFileMenu()">View Webpage</a>
</span> </span>
<a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a> <a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a>
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Properties</a> <a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.rightClickedFile)" onMouseOver="ICEcoder.showFileMenu()">Properties</a>
@@ -98,7 +106,7 @@ if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
<div class="plugins" id="pluginsContainer"> <div class="plugins" id="pluginsContainer">
<?php echo $pluginsDisplay; ?> <?php echo $pluginsDisplay; ?>
</div> </div>
<div class="version">v <?php echo $ICEcoder["versionNo"];?></div><img src="images/full-screen.gif" id="screenMode" class="screenModeIcon" onClick="top.ICEcoder.fullScreenSwitcher()"> <div class="version"><a href="javascript:top:ICEcoder.logout()">logout</a> : v <?php echo $ICEcoder["versionNo"];?></div><img src="images/full-screen.gif" id="screenMode" class="screenModeIcon" onClick="top.ICEcoder.fullScreenSwitcher()">
<img src="images/ice-coder.png" class="logo" onClick="ICEcoder.helpScreen()" onContextMenu="ICEcoder.settingsScreen()"> <img src="images/ice-coder.png" class="logo" onClick="ICEcoder.helpScreen()" onContextMenu="ICEcoder.settingsScreen()">
</div> </div>
@@ -122,6 +130,7 @@ if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
<div id="editor" class="editor"> <div id="editor" class="editor">
<div id="tabsBar" class="tabsBar" onContextMenu="return false"> <div id="tabsBar" class="tabsBar" onContextMenu="return false">
<a nohref onClick="top.ICEcoder.closeAllTabs()"><img src="images/nav-close.gif" class="closeAllTabs"></a>
<?php <?php
for ($i=1;$i<=100;$i++) { for ($i=1;$i<=100;$i++) {
echo '<div id="tab'.$i.'" class="tab" draggable="true" onClick="ICEcoder.canSwitchTabs ? ICEcoder.switchTab('.$i.') : ICEcoder.canSwitchTabs=true; thisColor=\'#000\'" onMouseOver="thisColor=this.style.color;this.style.color=\'#000\'" onMouseOut="this.style.color=thisColor"></div>'; echo '<div id="tab'.$i.'" class="tab" draggable="true" onClick="ICEcoder.canSwitchTabs ? ICEcoder.switchTab('.$i.') : ICEcoder.canSwitchTabs=true; thisColor=\'#000\'" onMouseOver="thisColor=this.style.color;this.style.color=\'#000\'" onMouseOut="this.style.color=thisColor"></div>';

View File

@@ -1,307 +1,368 @@
<?php include("settings.php");?> <?php include("settings.php");?>
<?php <?php
// Get the save type if any // Get the save type if any
$saveType = ""; $saveType = "";
if (isset($_GET['saveType'])) {$saveType = strClean($_GET['saveType']);}; if (isset($_GET['saveType'])) {$saveType = strClean($_GET['saveType']);};
// Establish the filename/new filename // Establish the filename/new filename
$file = str_replace("|","/",strClean( $file = str_replace("|","/",strClean(
isset($_POST['newFileName']) && $_POST['newFileName']!="" isset($_POST['newFileName']) && $_POST['newFileName']!=""
? $_POST['newFileName'] ? $_POST['newFileName']
: $_GET['file'] : $_GET['file']
)); ));
// Make $file a full path and establish the $fileLoc and $fileName // Make $file a full path and establish the $fileLoc and $fileName
if (strpos($file,$docRoot)===false) {$file=str_replace("|","/",$docRoot.$iceRoot.$file);}; if (strpos($file,$docRoot)===false) {$file=str_replace("|","/",$docRoot.$iceRoot.$file);};
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/")); $fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
$fileName = basename($file); $fileName = basename($file);
// If we're due to open a file... // If we're due to open a file...
if ($_GET['action']=="load") { if ($_GET['action']=="load") {
echo '<script>action="load";</script>'; echo '<script>action="load";</script>';
if (file_exists($file)) { if (file_exists($file)) {
// Determine what to do based on mime type // Determine what to do based on mime type
$finfo = finfo_open(FILEINFO_MIME_TYPE); $finfo = finfo_open(FILEINFO_MIME_TYPE);
if (strpos(finfo_file($finfo, $file),"text")===0) { if (strpos(finfo_file($finfo, $file),"text")===0) {
echo '<script>fileType="text";'; echo '<script>fileType="text";';
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";'; echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
echo '</script>'; echo '</script>';
$loadedFile = file_get_contents($file); $loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>'; echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
} else if (strpos(finfo_file($finfo, $file),"image")===0) { } else if (strpos(finfo_file($finfo, $file),"image")===0) {
echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>'; echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>';
} else { } else {
echo '<script>fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');</script>'; echo '<script>fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');</script>';
}; };
} else { } else {
echo '<script>fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');</script>'; echo '<script>fileType="nothing"; top.ICEcoder.message(\'Sorry, '.$fileLoc."/".$fileName.' doesn\\\'t seem to exist on the server\');</script>';
} }
finfo_close($finfo); finfo_close($finfo);
}; };
// If we're due to add a new folder... // If we're due to add a new folder...
if ($_GET['action']=="newFolder") { if ($_GET['action']=="newFolder") {
if (!$demoMode && is_writable($docRoot.$fileLoc)) { if (!$demoMode && is_writable($docRoot.$fileLoc)) {
mkdir($file, 0705); mkdir($file, 0705);
// Reload file manager // Reload file manager
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');action="newFolder";</script>'; echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');action="newFolder";</script>';
} else { } else {
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot create folder at\\n".$fileLoc."')</script>"; echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot create folder at\\n".$fileLoc."')</script>";
} }
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
} }
// If we're due to paste a new file... // If we're due to paste a new file...
if ($_GET['action']=="paste") { if ($_GET['action']=="paste") {
$source = $file; $source = $file;
$dest = $docRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source); $dest = str_replace("//","/",$docRoot.strClean(str_replace("|","/",$_GET['location']))."/".basename($source));
if (!$demoMode && is_writable(dirname($dest))) { if (!$demoMode && is_writable(dirname($dest))) {
if (is_dir($source)) { if (is_dir($source)) {
if (!is_dir($dest)) { if (!is_dir($dest)) {
mkdir($dest, 0705); mkdir($dest, 0705);
} }
foreach ($iterator = new RecursiveIteratorIterator( foreach ($iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS), new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::SELF_FIRST) as $item RecursiveIteratorIterator::SELF_FIRST) as $item
) { ) {
if ($item->isDir()) { if ($item->isDir()) {
mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), 0705); mkdir($dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName(), 0705);
} else { } else {
copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName()); copy($item, $dest.DIRECTORY_SEPARATOR.$iterator->getSubPathName());
} }
} }
} else { } else {
copy($source, $dest); if (!file_exists($dest)) {
} copy($source, $dest);
// Reload file manager } else {
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.$fileName.'\');action="pasteFile";</script>'; for ($i=2; $i<1000000000; $i++) {
} else { if (!file_exists($dest." (".$i.")")) {
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot copy \\n".str_replace($docRoot,"",$source)."\\n into \\n".str_replace($docRoot,"",$dest)."')</script>"; $dest = $dest." (".$i.")";
} copy($source, $dest);
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; $i=1000000000;
} }
}
// If we're due to rename a file/folder... }
if ($_GET['action']=="rename") { }
if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) { // Reload file manager
rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName); echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.strClean(str_replace("|","/",$_GET['location'])).'\',\''.basename($dest).'\');action="pasteFile";</script>';
// Reload file manager } else {
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');'; echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot copy \\n".str_replace($docRoot,"",$source)."\\n into \\n".str_replace($docRoot,"",$dest)."')</script>";
echo 'action="rename";</script>'; }
} else { echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot rename\\n".strClean($_GET['oldFileName'])."');</script>"; }
}
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; // If we're due to upload files...
} if ($_GET['action']=="upload") {
if (!$demoMode) {
// If we're due to replace text in a file... class fileUploader {
if ($_GET['action']=="replaceText") { public function __construct($uploads) {
if (!$demoMode && is_writable(str_replace("|","/",strClean($_GET['fileRef'])))) { global $docRoot;
$file = str_replace("|","/",strClean($_GET['fileRef'])); $uploadDir=$docRoot.$iceRoot.str_replace("..","",str_replace("|","/",strClean($_POST['folder'])."/"));
$loadedFile = file_get_contents($file); foreach($uploads as $current) {
$newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile); $this->uploadFile=$uploadDir.$current->name;
$fh = fopen($file, 'w') or die("Sorry, cannot save"); $fileName = $current->name;
fwrite($fh, $newContent); if ($this->upload($current,$this->uploadFile)) {
fclose($fh); echo '<script>action="upload"; top.ICEcoder.updateFileManagerList(\'add\',top.ICEcoder.rightClickedFile.replace(/\|/g,\'/\'),\''.$fileName.'\');</script>';
echo '<script>action="replaceText";</script>'; } else {
} else { echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload \\n".$fileName."\\n into \\n'+top.ICEcoder.rightClickedFile.replace(/\|/g,'/'))</script>";
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot replace text in\\n".strClean($_GET['fileRef'])."');</script>"; }
} }
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; }
}
public function upload($current,$uploadFile){
// If we're due to change permissions on a file/folder... if(move_uploaded_file($current->tmp_name,$uploadFile)){
if ($_GET['action']=="perms") { return true;
if (!$demoMode && is_writable($file)) { }
chmod($file,octdec(numClean($_GET['perms']))); }
// Reload file manager }
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
echo 'action="perms";</script>'; function getDetails($fileArr) {
} else { foreach($fileArr['name'] as $keyee => $info) {
echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot change permissions on \\n".strClean($file)."');</script>"; $uploads[$keyee]->name=$fileArr['name'][$keyee];
} $uploads[$keyee]->type=$fileArr['type'][$keyee];
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; $uploads[$keyee]->tmp_name=$fileArr['tmp_name'][$keyee];
} $uploads[$keyee]->error=$fileArr['error'][$keyee];
}
// If we're due to delete a file... return $uploads;
if ($_GET['action']=="delete") { }
$filesArray = explode(";",$file); // May contain more than one file here
for ($i=0;$i<=count($filesArray)-1;$i++) { if($_FILES['filesInput']){
if (!$demoMode && is_writable($iceRoot.$filesArray[$i])) { $uploads = getDetails($_FILES['filesInput']);
is_dir($iceRoot.$filesArray[$i]) $fileUploader=new fileUploader($uploads);
? rrmdir($iceRoot.$filesArray[$i]) }
: unlink($iceRoot.$filesArray[$i]); } else {
// Reload file manager echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot upload whilst in demo mode');</script>";
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');'; }
echo 'action="delete";</script>';
} else { echo "<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.hideFileMenu();top.ICEcoder.showHide('hide',top.document.getElementById('loadingMask'));</script>";
echo "<script>top.ICEcoder.message('Sorry can\\'t delete\\n".$filesArray[$i]."');</script>"; }
}
echo '<script>action="nothing";</script>'; // If we're due to rename a file/folder...
} if ($_GET['action']=="rename") {
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
} rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName);
// Reload file manager
// The function to recursively remove folders & files echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'rename\',\''.$fileLoc.'\',\''.$fileName.'\',\'\',\''.str_replace($iceRoot,"",strClean($_GET['oldFileName'])).'\');';
function rrmdir($dir) { echo 'action="rename";</script>';
if (is_dir($dir)) { } else {
$objects = scandir($dir); echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot rename\\n".strClean($_GET['oldFileName'])."');</script>";
foreach ($objects as $object) { }
if ($object != "." && $object != "..") { echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
filetype($dir."/".$object) == "dir" }
? rrmdir($dir."/".$object)
: unlink($dir."/".$object); // If we're due to replace text in a file...
} if ($_GET['action']=="replaceText") {
} if (!$demoMode && is_writable(str_replace("|","/",strClean($_GET['fileRef'])))) {
reset($objects); $file = str_replace("|","/",strClean($_GET['fileRef']));
rmdir($dir); $loadedFile = file_get_contents($file);
} $newContent = str_replace(strClean($_GET['find']),strClean($_GET['replace']),$loadedFile);
} $fh = fopen($file, 'w') or die("Sorry, cannot save");
fwrite($fh, $newContent);
if ($_GET['action']=="save") { fclose($fh);
echo '<script>action="save";</script>'; echo '<script>action="replaceText";</script>';
// on the form posting via a reload, save the file } else {
if (isset($_POST['contents'])) { echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot replace text in\\n".strClean($_GET['fileRef'])."');</script>";
if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) { }
if (filemtime($file)==$_GET['fileMDT']||!(isset($_GET['fileMDT']))) { echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
$fh = fopen($file, 'w') or die("Sorry, cannot save"); }
fwrite($fh, $_POST['contents']);
fclose($fh); // If we're due to change permissions on a file/folder...
clearstatcache(); if ($_GET['action']=="perms") {
echo '<script>top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.filemtime($file).'";</script>'; if (!$demoMode && is_writable($file)) {
// Reload file manager & rename tab if it was a new file chmod($file,octdec(numClean($_GET['perms'])));
if (isset($_POST['newFileName']) && $_POST['newFileName']!="") { // Reload file manager
echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');'; echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'chmod\',\''.$fileLoc.'\',\''.$fileName.'\',\''.numClean($_GET['perms']).'\');';
echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');</script>'; echo 'action="perms";</script>';
} } else {
// Reload stickytab window echo "<script>action='nothing'; top.ICEcoder.message('Sorry, cannot change permissions on \\n".strClean($file)."');</script>";
echo '<script>if (top.ICEcoder.stickyTab.location) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>'; }
} else { echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
$loadedFile = file_get_contents($file); }
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
echo '<textarea name="userVersionFile" id="userVersionFile"></textarea>'; // If we're due to delete a file...
?> if ($_GET['action']=="delete") {
<script> $filesArray = explode(";",$file); // May contain more than one file here
var refreshFile = top.ICEcoder.ask('Sorry, this file has changed, cannot save\n<?php echo $file;?>\n\nReload this file and copy your version to a new document?'); for ($i=0;$i<=count($filesArray)-1;$i++) {
if (refreshFile) { $fullPath = str_replace($docRoot,"",$filesArray[$i]);
var cM = top.ICEcoder.getcMInstance(); $fullPath = str_replace($iceRoot,"",$fullPath);
var thisTab = top.ICEcoder.selectedTab; $fullPath = $docRoot.$iceRoot.$fullPath;
document.getElementById('userVersionFile').value = cM.getValue(); if (!$demoMode && is_writable($fullPath)) {
// Revert back to original is_dir($fullPath)
cM.setValue(document.getElementById('loadedFile').value); ? rrmdir($fullPath)
top.ICEcoder.changedContent[thisTab-1] = 0; : unlink($fullPath);
top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "<?php echo filemtime($file); ?>"; $fileName = basename($fullPath);
cM.clearHistory(); $fileLoc = dirname(str_replace($docRoot,"",$fullPath));
// Now for the new file // Reload file manager
top.ICEcoder.newTab(); echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
cM = top.ICEcoder.getcMInstance(); echo 'action="delete";</script>';
cM.setValue(document.getElementById('userVersionFile').value); } else {
cM.clearHistory(); echo "<script>top.ICEcoder.message('Sorry can\\'t delete\\n".str_replace($docRoot,"",$fullPath)."');</script>";
// Finally, switch back to original tab }
top.ICEcoder.switchTab(thisTab); echo '<script>action="nothing";</script>';
} }
action='nothing'; echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
</script> }
<?php
} // The function to recursively remove folders & files
} else { function rrmdir($dir) {
echo "<script>action='nothing';top.ICEcoder.message('Sorry, cannot write\\n".$file."')</script>"; if (is_dir($dir)) {
} $objects = scandir($dir);
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>'; foreach ($objects as $object) {
} if ($object != "." && $object != "..") {
}; filetype($dir."/".$object) == "dir"
?> ? rrmdir($dir."/".$object)
<script> : unlink($dir."/".$object);
if (action=="load") { }
if (fileType=="text") { }
setTimeout(function() { reset($objects);
if (!top.ICEcoder.content.contentWindow.createNewCMInstance) { rmdir($dir);
console.log('There was tech hiccup, likely something wasn\'t quite ready. So ICEcoder reloaded it\'s file control again.'); }
window.location.reload(); }
<?php
if (file_exists($file)) { if ($_GET['action']=="save") {
?> echo '<script>action="save";</script>';
} else { // on the form posting via a reload, save the file
top.ICEcoder.loadingFile = true; if (isset($_POST['contents'])) {
// Reset the various states back to their initial setting if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) {
selectedTab = top.ICEcoder.openFiles.length; // The tab that's currently selected if (filemtime($file)==$_GET['fileMDT']||!(isset($_GET['fileMDT']))) {
$fh = fopen($file, 'w') or die("Sorry, cannot save");
// Finally, store all data, show tabs etc fwrite($fh, $_POST['contents']);
top.ICEcoder.createNewTab(); fclose($fh);
top.ICEcoder.cMInstances.push(top.ICEcoder.nextcMInstance); clearstatcache();
top.ICEcoder.setLayout(); echo '<script>top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1]="'.filemtime($file).'";</script>';
top.ICEcoder.content.contentWindow.createNewCMInstance(top.ICEcoder.nextcMInstance); // Reload file manager & rename tab if it was a new file
if (isset($_POST['newFileName']) && $_POST['newFileName']!="") {
// Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on _coder's load) echo '<script>top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'add\',\''.$fileLoc.'\',\''.$fileName.'\');';
top.ICEcoder.switchMode(); echo 'top.ICEcoder.renameTab(top.ICEcoder.selectedTab,\''.$fileLoc."/".$fileName.'\');</script>';
cM = top.ICEcoder.getcMInstance(); }
cM.setValue(document.getElementById('loadedFile').value); // Reload stickytab window
top.document.getElementById('content').style.visibility='visible'; echo '<script>if (top.ICEcoder.stickyTab.location) {top.ICEcoder.stickyTab.location.reload()};action="doneSave";</script>';
top.ICEcoder.switchTab(top.ICEcoder.selectedTab); } else {
cM.focus(); $loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
// Then clean it up, set the text cursor, update the display and get the character data echo '<textarea name="userVersionFile" id="userVersionFile"></textarea>';
top.ICEcoder.contentCleanUp(); ?>
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], "background"); <script>
top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine"); var refreshFile = top.ICEcoder.ask('Sorry, this file has changed, cannot save\n<?php echo $file;?>\n\nReload this file and copy your version to a new document?');
top.ICEcoder.nextcMInstance++; if (refreshFile) {
top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>'); var cM = top.ICEcoder.getcMInstance();
top.ICEcoder.loadingFile = false; var thisTab = top.ICEcoder.selectedTab;
<?php document.getElementById('userVersionFile').value = cM.getValue();
;}; // Revert back to original
?> cM.setValue(document.getElementById('loadedFile').value);
} top.ICEcoder.changedContent[thisTab-1] = 0;
},4); top.ICEcoder.openFileMDTs[top.ICEcoder.selectedTab-1] = "<?php echo filemtime($file); ?>";
} cM.clearHistory();
// Now for the new file
if (fileType=="image") { top.ICEcoder.newTab();
top.document.getElementById('blackMask').style.visibility = "visible"; cM = top.ICEcoder.getcMInstance();
top.document.getElementById('mediaContainer').innerHTML = "<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px\" onClick=\"return false\"><br><span class=\"whiteGlow\" style=\"border: solid 10px #fff; color: #000; background-color: #fff\" onClick=\"return false\"><?php echo $fileLoc."/".$fileName;?></span>"; cM.setValue(document.getElementById('userVersionFile').value);
} cM.clearHistory();
// Finally, switch back to original tab
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0); top.ICEcoder.switchTab(thisTab);
} }
</script> action='nothing';
</script>
<form name="saveFile" action="file-control.php?action=save&file=<?php if (isset($file)) {echo $file;}; if (isset($_GET['fileMDT']) && $_GET['fileMDT']!="undefined") {echo "&fileMDT=".numClean($_GET['fileMDT']);};?>" method="POST"> <?php
<textarea name="contents"></textarea> }
<input type="hidden" name="newFileName" value=""> } else {
</form> echo "<script>action='nothing';top.ICEcoder.message('Sorry, cannot write\\n".$file."')</script>";
}
<script> echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
if (action=="save") { }
<?php };
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") { ?>
if (strpos($fileName,"[NEW]")>0) {echo "fileLoc = '".$fileLoc."';";} else {echo "fileLoc = '';";}; <script>
?> if (action=="load") {
newFileName = top.ICEcoder.getInput(fileLoc != "" if (fileType=="text") {
? 'Enter filename to save at '+fileLoc setTimeout(function() {
: 'Enter filename (including path, prefixed with /)' if (!top.ICEcoder.content.contentWindow.createNewCMInstance) {
,''); console.log('There was tech hiccup, likely something wasn\'t quite ready. So ICEcoder reloaded it\'s file control again.');
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName} window.location.reload();
if (newFileName) { <?php
newFileName = fileLoc == "" ? newFileName : fileLoc + "/" + fileName; if (file_exists($file)) {
} ?>
if (newFileName && top.document.getElementById('filesFrame').contentWindow.document.getElementById(newFileName.replace(/\//g,"|"))) { } else {
overwriteOK = top.ICEcoder.ask('That file exists already, overwrite?'); top.ICEcoder.loadingFile = true;
} // Reset the various states back to their initial setting
document.saveFile.newFileName.value = '<?php echo $docRoot; ?>' + newFileName; selectedTab = top.ICEcoder.openFiles.length; // The tab that's currently selected
<?php ;};?>
if ("undefined" == typeof newFileName || (newFileName && "undefined" == typeof overwriteOK) || ("undefined" != typeof overwriteOK && overwriteOK)) { // Finally, store all data, show tabs etc
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ <?php echo strpos($file,"[NEW]")>0 ? "newFileName" : "'$file'"; ?>); top.ICEcoder.createNewTab();
document.saveFile.contents.value = top.document.getElementById('saveTemp1').value; top.ICEcoder.cMInstances.push(top.ICEcoder.nextcMInstance);
document.saveFile.submit(); top.ICEcoder.setLayout();
} else { top.ICEcoder.content.contentWindow.createNewCMInstance(top.ICEcoder.nextcMInstance);
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
action=="nothing"; // Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on _coder's load)
} top.ICEcoder.switchMode();
} cM = top.ICEcoder.getcMInstance();
</script> cM.setValue(document.getElementById('loadedFile').value);
top.document.getElementById('content').style.visibility='visible';
<script> top.ICEcoder.switchTab(top.ICEcoder.selectedTab);
if (action=="doneSave") { cM.focus();
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 0;
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab); // Then clean it up, set the text cursor, update the display and get the character data
} top.ICEcoder.contentCleanUp();
top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].removeLineClass(top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab], "background");
top.ICEcoder['cMActiveLine'+top.ICEcoder.selectedTab] = top.ICEcoder.content.contentWindow['cM'+top.ICEcoder.cMInstances[top.ICEcoder.selectedTab-1]].addLineClass(0, "background", "cm-s-activeLine");
top.ICEcoder.nextcMInstance++;
top.ICEcoder.openFileMDTs.push('<?php echo filemtime($file); ?>');
top.ICEcoder.loadingFile = false;
<?php
;};
?>
}
},4);
}
if (fileType=="image") {
top.document.getElementById('blackMask').style.visibility = "visible";
top.document.getElementById('mediaContainer').innerHTML = "<img src=\"<?php echo $fileLoc."/".$fileName;?>\" class=\"whiteGlow\" style=\"border: solid 10px #fff; max-width: 700px; max-height: 500px; background-color: #000; background-image: url('images/checkerboard.png')\" onClick=\"return false\"><br><span class=\"whiteGlow\" style=\"border: solid 10px #fff; color: #000; background-color: #fff\" onClick=\"return false\"><?php echo $fileLoc."/".$fileName;?></span>";
}
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
}
</script>
<form name="saveFile" action="file-control.php?action=save&file=<?php if (isset($file)) {echo $file;}; if (isset($_GET['fileMDT']) && $_GET['fileMDT']!="undefined") {echo "&fileMDT=".numClean($_GET['fileMDT']);};?>" method="POST">
<textarea name="contents"></textarea>
<input type="hidden" name="newFileName" value="">
</form>
<script>
if (action=="save") {
<?php
if (strpos($file,"[NEW]")>0||$saveType=="saveAs") {
if (strpos($fileName,"[NEW]")>0) {echo "fileLoc = '".$fileLoc."';";} else {echo "fileLoc = '';";};
?>
newFileName = top.ICEcoder.getInput(fileLoc != ""
? 'Enter filename to save at '+fileLoc
: 'Enter filename (including path, prefixed with /)'
,'');
if (newFileName.substr(0,1)!="/") {newFileName = "/" + newFileName}
if (newFileName) {
newFileName = fileLoc == "" ? newFileName : fileLoc + "/" + fileName;
}
if (newFileName && top.document.getElementById('filesFrame').contentWindow.document.getElementById(newFileName.replace(/\//g,"|"))) {
overwriteOK = top.ICEcoder.ask('That file exists already, overwrite?');
}
document.saveFile.newFileName.value = '<?php echo $docRoot; ?>' + newFileName;
<?php ;};?>
if ("undefined" == typeof newFileName || (newFileName && "undefined" == typeof overwriteOK) || ("undefined" != typeof overwriteOK && overwriteOK)) {
top.ICEcoder.serverMessage('<b>Saving</b><br>'+ <?php echo strpos($file,"[NEW]")>0 ? "newFileName" : "'$file'"; ?>);
document.saveFile.contents.value = top.document.getElementById('saveTemp1').value;
document.saveFile.submit();
} else {
top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);
action=="nothing";
}
}
</script>
<script>
if (action=="doneSave") {
top.ICEcoder.changedContent[top.ICEcoder.selectedTab-1] = 0;
top.ICEcoder.redoTabHighlight(top.ICEcoder.selectedTab);
}
</script> </script>

View File

@@ -24,6 +24,7 @@ body {overflow: hidden;
} }
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px} h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
a {color: #fff; text-decoration: none}
.help {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px} .help {font-family: arial, verdana, helvetica, sans-serif; background-color: #1c1c19; color: #fff; padding: 20px}
.help .key {display: inline-block; width: 175px; text-align: right; margin-right: 5px; float: left} .help .key {display: inline-block; width: 175px; text-align: right; margin-right: 5px; float: left}

View File

@@ -1,45 +1,47 @@
<?php include("settings.php");?> <?php include("settings.php");?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</title> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> help</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" type="text/css" href="help.css"> <link rel="stylesheet" type="text/css" href="help.css">
</head> </head>
<body class="help"> <body class="help">
<h1 id="title">help</h1> <h1 id="title">help</h1>
<h2>In file manager</h2> <a href="javascript:top.ICEcoder.showManual(<?php echo $ICEcoder["versionNo"];?>)" style="position: absolute; top: 26px; right: 20px"><div style="padding: 10px; background: #2187e7; color: #fff; font-size: 18px">ICEcoder manual</div></a>
<span class="key">Delete</span> <span class="shortcut">Delete file</span><br><br>
<h2>In file manager</h2>
<h2>Within document</h2> <span class="key">Delete</span> <span class="shortcut">Delete file</span><br><br>
<span class="key">CTRL <span class="plus">+</span> &uarr;</span> <span class="shortcut">Move line up</span><br>
<span class="key">CTRL <span class="plus">+</span> &darr;</span> <span class="shortcut">Move line down</span><br> <h2>Within document</h2>
<span class="key">CTRL <span class="plus">+</span> I</span> <span class="shortcut">Search selected text</span><br> <span class="key">CTRL <span class="plus">+</span> &uarr;</span> <span class="shortcut">Move line up</span><br>
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment text</span><br> <span class="key">CTRL <span class="plus">+</span> &darr;</span> <span class="shortcut">Move line down</span><br>
<span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected text</span><br><br> <span class="key">CTRL <span class="plus">+</span> I</span> <span class="shortcut">Search selected text</span><br>
<span class="key">Esc</span> <span class="shortcut">Comment / uncomment text</span><br>
<h2>Anywhere</h2> <span class="key">Tab</span> <span class="shortcut">Insert tab / indent selected text</span><br><br>
<span class="key">CTRL <span class="plus">+</span> &rarr;</span> <span class="shortcut">Next tab</span><br>
<span class="key">CTRL <span class="plus">+</span> &larr;</span> <span class="shortcut">Previous tab</span><br> <h2>Anywhere</h2>
<span class="key">CTRL <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br> <span class="key">CTRL <span class="plus">+</span> &rarr;</span> <span class="shortcut">Next tab</span><br>
<span class="key">CTRL <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br> <span class="key">CTRL <span class="plus">+</span> &larr;</span> <span class="shortcut">Previous tab</span><br>
<span class="key">CTRL <span class="plus">+</span> F</span> <span class="shortcut">Find</span><br> <span class="key">CTRL <span class="plus">+</span> +</span> <span class="shortcut">New tab</span><br>
<span class="key">CTRL <span class="plus">+</span> G</span> <span class="shortcut">Go to line</span><br> <span class="key">CTRL <span class="plus">+</span> -</span> <span class="shortcut">Close current tab</span><br>
<span class="key">CTRL <span class="plus">+</span> S</span> <span class="shortcut">Save</span><br> <span class="key">CTRL <span class="plus">+</span> F</span> <span class="shortcut">Find</span><br>
<span class="key">CTRL <span class="plus">+</span> Shift <span class="plus">+</span> S</span> <span class="shortcut">Save as...</span><br> <span class="key">CTRL <span class="plus">+</span> G</span> <span class="shortcut">Go to line</span><br>
<span class="key">CTRL <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br> <span class="key">CTRL <span class="plus">+</span> S</span> <span class="shortcut">Save</span><br>
<span class="key">CTRL <span class="plus">+</span> S <span class="plus">+</span> Enter</span> <span class="shortcut">Save & create sticky tab</span><br> <span class="key">CTRL <span class="plus">+</span> Shift <span class="plus">+</span> S</span> <span class="shortcut">Save as...</span><br>
<span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br> <span class="key">CTRL <span class="plus">+</span> Enter</span> <span class="shortcut">View webpage</span><br>
<span class="key">CTRL <span class="plus">+</span> S <span class="plus">+</span> Enter</span> <span class="shortcut">Save & create sticky tab</span><br>
<h2>Logo</h2> <span class="key">Esc</span> <span class="shortcut">Cancel tasks</span><br><br>
<span class="key">Left click</span> <span class="shortcut">Help</span><br>
<span class="key">Right click</span> <span class="shortcut">Settings</span><br> <h2>Logo</h2>
<span class="key">Left click</span> <span class="shortcut">Help</span><br>
</body> <span class="key">Right click</span> <span class="shortcut">Settings</span><br>
</body>
</html> </html>

View File

@@ -1,146 +1,149 @@
/* First, reset everything to a standard */ /* First, reset everything to a standard */
html, body, div, span, applet, object, iframe, html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp, del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, small, strike, strong, sub, sup, tt, var,
b, u, i, center, b, u, i, center,
dl, dt, dd, ol, ul, li, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td { table, caption, tbody, tfoot, thead, tr, th, td {
font-family: arial, verdana, helvetica, sans-serif; font-family: arial, verdana, helvetica, sans-serif;
border: 0; border: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
outline: 0; outline: 0;
font-size: 12px; font-size: 12px;
vertical-align: top; vertical-align: top;
} }
body {overflow: hidden; body {overflow: hidden;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
user-select: none; user-select: none;
background-color: #222; background-color: #222;
} }
h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px} h1 {font-size: 36px; font-weight: normal; color: #888; margin-bottom: 20px}
h2 {font-size: 18px; font-weight: normal; color: #fff} h2 {font-size: 18px; font-weight: normal; color: #fff}
.blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100} .blackMask {position: fixed; display: table; width: 100%; height: 100%; top: 0; left: 0; visibility: hidden; background-color: rgba(0,0,0,0.8); text-align: center; z-index: 100}
.blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center} .blackMask .popupVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
.popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px} .popupVCenter .popup {#position: relative; #top: -50%; text-align: center; color: #fff; font-size: 10px}
.whiteGlow {box-shadow: 0 0 8px 2px rgba(255,255,255,0.6)} .whiteGlow {box-shadow: 0 0 8px 2px rgba(255,255,255,0.6)}
.circleOutside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 35px #2187e7; .circleOutside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 35px #2187e7;
width:50px; height:50px; margin:0 auto; -moz-animation:spin .5s infinite linear; -webkit-animation:spin .5s infinite linear; width:50px; height:50px; margin:0 auto; -moz-animation:spin .5s infinite linear; -webkit-animation:spin .5s infinite linear;
} }
.circleInside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 15px #2187e7; .circleInside {background-color: rgba(0,0,0,0); border:5px solid rgba(0,183,229,0.9); opacity:.9; border-top:5px solid rgba(0,0,0,0); border-left:5px solid rgba(0,0,0,0); border-radius:50px; box-shadow: 0 0 15px #2187e7;
width:30px; height:30px; margin:0 auto; position:relative; top:-50px; -moz-animation:spinoff .5s infinite linear; -webkit-animation:spinoff .5s infinite linear; width:30px; height:30px; margin:0 auto; position:relative; top:-50px; -moz-animation:spinoff .5s infinite linear; -webkit-animation:spinoff .5s infinite linear;
} }
@-moz-keyframes spin { @-moz-keyframes spin {
0% {-moz-transform:rotate(0deg)} 0% {-moz-transform:rotate(0deg)}
100% {-moz-transform:rotate(360deg)} 100% {-moz-transform:rotate(360deg)}
} }
@-moz-keyframes spinoff { @-moz-keyframes spinoff {
0% {-moz-transform:rotate(0deg)} 0% {-moz-transform:rotate(0deg)}
100% {-moz-transform:rotate(-360deg)} 100% {-moz-transform:rotate(-360deg)}
} }
@-webkit-keyframes spin { @-webkit-keyframes spin {
0% {-webkit-transform:rotate(0deg)} 0% {-webkit-transform:rotate(0deg)}
100% {-webkit-transform:rotate(360deg)} 100% {-webkit-transform:rotate(360deg)}
} }
@-webkit-keyframes spinoff { @-webkit-keyframes spinoff {
0% {-webkit-transform:rotate(0deg)} 0% {-webkit-transform:rotate(0deg)}
100% {-webkit-transform:rotate(-360deg)} 100% {-webkit-transform:rotate(-360deg)}
} }
.progressBar {position:absolute; top: 0; left: 0; width:100%; height:1px; margin:2px 0; background:#2187e7; box-shadow:0 0 10px 1px rgba(0,198,255,0.7)} .progressBar {position:absolute; top: 0; left: 0; width:100%; height:1px; margin:2px 0; background:#2187e7; box-shadow:0 0 10px 1px rgba(0,198,255,0.7)}
@-moz-keyframes fullexpand { @-moz-keyframes fullexpand {
0% {width:0} 0% {width:0}
100%{width:100%} 100%{width:100%}
} }
@-webkit-keyframes fullexpand { @-webkit-keyframes fullexpand {
0% {width:0} 0% {width:0}
100%{width:100%} 100%{width:100%}
} }
.header {position: absolute; display: inline-block; top: 0; left: 0; width: 100%; height: 40px; background-color: #fff; text-align: right; z-index: 2} .header {position: absolute; display: inline-block; top: 0; left: 0; width: 100%; height: 40px; background-color: #fff; text-align: right; z-index: 2}
.header .plugins {position: absolute; display: inline-block; left: 15px; top: 3px} .header .plugins {position: absolute; display: inline-block; left: 15px; top: 3px}
.header .plugins img {position: relative; display: inline-block; margin-right: 15px} .header .plugins img {position: relative; display: inline-block; margin-right: 15px}
.header .screenModeIcon {position: absolute; top: 5px; right: 178px; cursor: pointer} .header .screenModeIcon {position: absolute; top: 5px; right: 178px; cursor: pointer}
.header .version {position: relative; display: inline-block; margin-top: 25px; font-size: 10px; color: #bbb} .header .version {position: relative; display: inline-block; margin-top: 25px; font-size: 10px; color: #bbb}
.header .logo {position: relative; margin: 5px 10px 0 5px; cursor: pointer} .header .version a {font-size: 10px; color: #bbb; text-decoration: none}
.header .logo {position: relative; margin: 5px 10px 0 5px; cursor: pointer}
.files {position: absolute; display: inline-block; top: 0; left: 0; height: 100%; width: 250px; background-color: #444; background-image: url('../images/files-arrow.png'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 1;
box-shadow: 0 50px 10px 4px rgba(0,0,0,0.4); .files {position: absolute; display: inline-block; top: 0; left: 0; height: 100%; width: 250px; background-color: #444; background-image: url('../images/files-arrow.png'); background-repeat: no-repeat; background-position: 100% 50%; overflow: hidden; z-index: 1;
} box-shadow: 0 50px 10px 4px rgba(0,0,0,0.4);
.files .account {display: inline-block; height: 50px; width: 250px; margin-top: 40px; background-color: #888} }
.files .accountOptions {position: relative; height: 32px; width: 100%; margin-left: 15px; margin-top: 8px} .files .account {display: inline-block; height: 50px; width: 250px; margin-top: 40px; background-color: #888}
.files .accountOptions div {display: inline-block; background: url('../images/file-manager-icons.png') 0 0 no-repeat; cursor: pointer} .files .accountOptions {position: relative; height: 32px; width: 100%; margin-left: 15px; margin-top: 8px}
.files .accountOptions .save {width: 30px; height: 32px; opacity: 0.3} .files .accountOptions div {display: inline-block; background: url('../images/file-manager-icons.png') 0 0 no-repeat; cursor: pointer}
.files .accountOptions .open {width: 25px; height: 32px; background-position: -32px -3px; margin: 3px 0 0 7px; opacity: 0.3} .files .accountOptions .save {width: 30px; height: 32px; opacity: 0.3}
.files .accountOptions .newFile {width: 15px; height: 16px; background-position: -64px 0; margin: 8px 0 0 10px; opacity: 0.3} .files .accountOptions .open {width: 25px; height: 32px; background-position: -32px -3px; margin: 3px 0 0 7px; opacity: 0.3}
.files .accountOptions .newFolder {width: 20px; height: 16px; background-position: -80px 0; margin: 8px 0 0 5px; opacity: 0.3} .files .accountOptions .newFile {width: 15px; height: 16px; background-position: -64px 0; margin: 8px 0 0 10px; opacity: 0.3}
.files .accountOptions .delete {width: 16px; height: 16px; background-position: -100px 0; margin: 8px 0 0 5px; opacity: 0.3} .files .accountOptions .newFolder {width: 20px; height: 16px; background-position: -80px 0; margin: 8px 0 0 5px; opacity: 0.3}
.files .accountOptions .rename {width: 16px; height: 16px; background-position: -116px 0; margin: 8px 0 0 5px; opacity: 0.3} .files .accountOptions .delete {width: 16px; height: 16px; background-position: -100px 0; margin: 8px 0 0 5px; opacity: 0.3}
.files .accountOptions .view {width: 16px; height: 16px; background-position: -132px 0; margin: 8px 0 0 5px; opacity: 0.3} .files .accountOptions .rename {width: 16px; height: 16px; background-position: -116px 0; margin: 8px 0 0 5px; opacity: 0.3}
.files .accountOptions .lock {position: relative; margin-left: 208px; margin-top: -27px; width: 12px; height: 16px; background-position: -64px -16px; z-index: 1} .files .accountOptions .view {width: 16px; height: 16px; background-position: -132px 0; margin: 8px 0 0 5px; opacity: 0.3}
.files input:focus, .findReplace input:focus, .findReplace select:focus, .accountPassword:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)} .files .accountOptions .lock {position: relative; margin-left: 208px; margin-top: -27px; width: 12px; height: 16px; background-position: -64px -16px; z-index: 1}
.files .button {position: absolute; border: 0; background: #444; color: #eee; height:20px; margin-top: 16px; margin-left: 5px; font-size: 11px; cursor: pointer} .files input:focus, .findReplace input:focus, .findReplace select:focus, .accountPassword:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)}
.files .button:hover {background-color: #222; color: #eee} .files .button {position: absolute; border: 0; background: #444; color: #eee; height:20px; margin-top: 16px; margin-left: 5px; font-size: 11px; cursor: pointer}
.files .frame {display: inline-block; width: 250px} .files .button:hover {background-color: #222; color: #eee}
.files .serverMessage {position: absolute; display: none; width: 450px; bottom: 0; margin-bottom: 30px; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 7px 12px; opacity: 0; .files .frame {display: inline-block; width: 250px}
-webkit-transition: opacity 0.2s; .files .serverMessage {position: absolute; display: none; width: 450px; bottom: 0; margin-bottom: 30px; background-color: rgba(255,255,255,0.8); font-size: 10px; padding: 7px 12px; opacity: 0;
-moz-transition: opacity 0.2s; -webkit-transition: opacity 0.2s;
transition: opacity 0.2s; -moz-transition: opacity 0.2s;
} transition: opacity 0.2s;
.files .serverMessage b {font-size: 10px} }
.files .serverMessage b {font-size: 10px}
.editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
.editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background: #ddd} .editor {position: absolute; display: inline-block; top: 0; left: 15px; width: 2400px}
.tabsBar .tab {display: none; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; color: #fff; direction: rtl; text-align: right; white-space: nowrap; overflow: hidden; cursor: pointer; .editor .tabsBar {display: inline-block; height: 22px; width: 2400px; margin-top: 40px; padding-left: 41px; background: #ddd}
-webkit-transition: all 0.15s; .tabsBar .tab {display: none; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 5px 8px 2px 8px; font-size: 10px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; color: #fff; direction: rtl; text-align: right; white-space: nowrap; overflow: hidden; cursor: pointer;
-moz-transition: all 0.15s; -webkit-transition: all 0.15s;
transition: all 0.15s; -moz-transition: all 0.15s;
} transition: all 0.15s;
.tabsBar .tab .closeTab {margin: 1px 0 0 5px; border-radius: 6px} }
.tabsBar .newTab {display: inline-block; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 6px 5px 5px 5px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; cursor: pointer;} .tabsBar .tab .closeTab, .tabsBar .closeAllTabs {margin: 1px 0 0 5px; border-radius: 6px; cursor: pointer}
.editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #141414} .tabsBar .closeAllTabs {position: absolute; margin: 6px 0 0 -25px; background: #bbb}
.findBar .findReplace {position: absolute; z-index: 1} .tabsBar .closeAllTabs:hover {background: #000}
.findReplace select {position: relative; font-size: 10px; margin: 8px 2px 0 2px; top: -2px;} .tabsBar .newTab {display: inline-block; background-image: url('../images/nav-bg.jpg'); background-repeat: repeat-x; background-position: 0 0; padding: 6px 5px 5px 5px; border-left: solid 1px #eee; border-right: solid 1px #777; border-radius: 4px 4px 0 0; cursor: pointer;}
.findReplace .findText {display: inline-block; height: 21px; font-size: 10px; margin: 8px 2px 0 2px; margin-left: 43px} .editor .findBar {display: inline-block; height: 28px; width: 2400px; color: #fff; background-color: #141414}
.findReplace .find {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px; margin-right: 3px} .findBar .findReplace {position: absolute; z-index: 1}
.findReplace .replaceAction {margin: 0 2px 0 0; top: -2px} .findReplace select {position: relative; font-size: 10px; margin: 8px 2px 0 2px; top: -2px;}
.findReplace .replaceText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px} .findReplace .findText {display: inline-block; height: 21px; font-size: 10px; margin: 8px 2px 0 2px; margin-left: 43px}
.findReplace .replace {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px} .findReplace .find {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px; margin-right: 3px}
.findReplace .targetText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px} .findReplace .replaceAction {margin: 0 2px 0 0; top: -2px}
.findReplace .submit {position: relative; top: -2px; height: 17px; border: 0; background-color: #444; color: #eee; font-size: 10px; margin-left: 2px; cursor: pointer} .findReplace .replaceText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px}
.findReplace .submit:hover {background-color: #2187e7; color: #eee} .findReplace .replace {position: relative; width: 120px; height: 16px; border: 0; top: -3px; font-size: 10px; padding-left: 5px}
.findReplace .results {position: relative; display: inline-block; width: 200px; height: 20px; font-size: 10px; margin: 8px 0 0 20px} .findReplace .targetText {height: 21px; font-size: 10px; margin: 8px 2px 0 2px}
.findBar .codeAssist {position: fixed; display: inline-block; width: 100px; right: 74px; top: 70px; height: 21px; font-size: 10px; z-index: 1} .findReplace .submit {position: relative; top: -2px; height: 17px; border: 0; background-color: #444; color: #eee; font-size: 10px; margin-left: 2px; cursor: pointer}
.findBar .codeAssist input {margin-top: -1px} .findReplace .submit:hover {background-color: #2187e7; color: #eee}
.findBar .goLine {position: fixed; display: inline-block; width: 100px; right: -10px; top: 70px; height: 21px; font-size: 10px; z-index: 1} .findReplace .results {position: relative; display: inline-block; width: 200px; height: 20px; font-size: 10px; margin: 8px 0 0 20px}
.goLine .goToLine {width: 25px; height: 16px; border: 0; font-size: 10px; margin: -3px 0 0 3px} .findBar .codeAssist {position: fixed; display: inline-block; width: 100px; right: 74px; top: 70px; height: 21px; font-size: 10px; z-index: 1}
.goLine .goToLine:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)} .findBar .codeAssist input {margin-top: -1px}
.editor .code {position: relative; display: inline-block; top: 28px; width: 600px; height: 600px; visibility: hidden} .findBar .goLine {position: fixed; display: inline-block; width: 100px; right: -10px; top: 70px; height: 21px; font-size: 10px; z-index: 1}
.goLine .goToLine {width: 25px; height: 16px; border: 0; font-size: 10px; margin: -3px 0 0 3px}
.footer {position: fixed; display: inline-block; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.7); left: 0; z-index: 2} .goLine .goToLine:focus {outline: none; box-shadow: 0 0 10px 1px rgba(0,198,255,1)}
.footer .nesting {display: inline-block; padding: 5px 8px; margin: 4px 0 0 15px; font-weight: bold; font-size: 10px; color: #fff; background-color: #0b0} .editor .code {position: relative; display: inline-block; top: 28px; width: 600px; height: 600px; visibility: hidden}
.footer .nestLoc {position: absolute; display: inline-block; width: 120px; padding: 5px 0 0 8px; margin-top: 2px; left: 112px; font-weight: bold; font-size: 12px; color: #fff; text-align: right}
.footer .nestDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 0px; left: 255px; font-size: 12px; color: #fff; text-align: right} .footer {position: fixed; display: inline-block; width: 100%; height: 30px; bottom: 0; background-color: rgba(0,0,0,0.7); left: 0; z-index: 2}
.footer .charDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 3px; left: 100%; font-weight: bold; font-size: 12px; color: #fff; text-align: right; width: 200px; text-align: right; margin-left: -220px} .footer .nesting {display: inline-block; padding: 5px 8px; margin: 4px 0 0 15px; font-weight: bold; font-size: 10px; color: #fff; background-color: #0b0}
.footer .nestLoc {position: absolute; display: inline-block; width: 120px; padding: 5px 0 0 8px; margin-top: 2px; left: 112px; font-weight: bold; font-size: 12px; color: #fff; text-align: right}
.textbox {box-shadow: inset 1px 1px 2px 0 rgba(0,0,0,0.4)} .footer .nestDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 0px; left: 255px; font-size: 12px; color: #fff; text-align: right}
.footer .charDisplay {position: absolute; display: inline-block; padding: 5px 0 0 8px; margin-top: 3px; left: 100%; font-weight: bold; font-size: 12px; color: #fff; text-align: right; width: 200px; text-align: right; margin-left: -220px}
.fileMenu {position: absolute; display: none; left: 0; top: 0; background-color: #333; z-index: 10}
.fileMenu a {display: block; padding: 2px 5px; background-color: #333; color: #eee; text-decoration: none} .textbox {box-shadow: inset 1px 1px 2px 0 rgba(0,0,0,0.4)}
.fileMenu a:hover {background-color: #666}
.fileMenu {position: absolute; display: none; left: 0; top: 0; background-color: #333; z-index: 10}
.screenContainer {position: absolute; display: table; width: 100%; height: 100%; top: 0; left: 0; text-align: center} .fileMenu a {display: block; padding: 2px 5px; background-color: #333; color: #eee; text-decoration: none}
.screenContainer .screenVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center} .fileMenu a:hover {background-color: #666}
.screenVCenter .screenCenter {#position: relative; #top: -50%; text-align: center; display: inline}
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb} .screenContainer {position: absolute; display: table; width: 100%; height: 100%; top: 0; left: 0; text-align: center}
.screenCenter .accountPassword {border: 0; background-color: #333; color: #fff; height: 20px} .screenContainer .screenVCenter {#position: absolute; display: table-cell; #top: 50%; vertical-align: middle; text-align: center}
.screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer} .screenVCenter .screenCenter {#position: relative; #top: -50%; text-align: center; display: inline}
.screenCenter .version {position: relative; display: block; margin: 5px 0 15px 0; font-size: 10px; color: #bbb}
.screenCenter .accountPassword {border: 0; background-color: #333; color: #fff; height: 20px}
.screenCenter .button {border: 0; background: #444; color: #eee; height: 22px; cursor: pointer}
.screenCenter .button:hover {background: #2187e7; color: #eee} .screenCenter .button:hover {background: #2187e7; color: #eee}

View File

@@ -217,12 +217,14 @@ var ICEcoder = {
}, },
// Switch the CodeMirror mode on demand // Switch the CodeMirror mode on demand
switchMode: function() { switchMode: function(mode) {
var cM, fileName; var cM, fileName;
cM = ICEcoder.getcMInstance(); cM = ICEcoder.getcMInstance();
fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1]; fileName = ICEcoder.openFiles[ICEcoder.selectedTab-1];
if (fileName) { if (mode) {
cM.setOption("mode",mode);
} else if (fileName) {
fileName.indexOf('.js')>0 ? cM.setOption("mode","javascript") fileName.indexOf('.js')>0 ? cM.setOption("mode","javascript")
: fileName.indexOf('.coffee')>0 ? cM.setOption("mode","coffeescript") : fileName.indexOf('.coffee')>0 ? cM.setOption("mode","coffeescript")
: fileName.indexOf('.rb')>0 ? cM.setOption("mode","ruby") : fileName.indexOf('.rb')>0 ? cM.setOption("mode","ruby")
@@ -607,6 +609,17 @@ var ICEcoder = {
top.ICEcoder.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFile.toString().replace(/\|/g,"/").replace(/,/g,"\n")); top.ICEcoder.serverMessage('<b>Pasting File</b><br>'+top.ICEcoder.copiedFile.toString().replace(/\|/g,"/").replace(/,/g,"\n"));
}, },
// Upload file(s) - select & submit
uploadFilesSelect: function(location) {
top.document.getElementById('uploadDir').value = location;
top.document.getElementById("fileInput").click();
},
uploadFilesSubmit: function(obj) {
top.ICEcoder.showHide('show',top.document.getElementById('loadingMask'));
document.getElementById('uploadFilesForm').submit();
event.preventDefault();
},
// Show menu on right clicking in file manager // Show menu on right clicking in file manager
showMenu: function() { showMenu: function() {
var menuType, folderMenuItems; var menuType, folderMenuItems;
@@ -633,7 +646,7 @@ var ICEcoder = {
document.getElementById('fileMenu').style.display='inline-block'; document.getElementById('fileMenu').style.display='inline-block';
}, },
// Continue to show the file manager // Hide the file manager
hideFileMenu: function() { hideFileMenu: function() {
document.getElementById('fileMenu').style.display='none'; document.getElementById('fileMenu').style.display='none';
}, },
@@ -808,8 +821,8 @@ var ICEcoder = {
results = top.document.getElementById('results'); results = top.document.getElementById('results');
// If we have something to find in currrent document // If we have something to find in currrent document
if (find.length>0 && document.findAndReplace.target.value=="this document") { cM = ICEcoder.getcMInstance();
cM = ICEcoder.getcMInstance(); if (cM && find.length>0 && document.findAndReplace.target.value=="this document") {
content = cM.getValue().toLowerCase(); content = cM.getValue().toLowerCase();
// Find & replace the next instance, or all? // Find & replace the next instance, or all?
@@ -1329,6 +1342,12 @@ var ICEcoder = {
top.ICEcoder.showHide('show',top.document.getElementById('blackMask')); top.ICEcoder.showHide('show',top.document.getElementById('blackMask'));
}, },
// Show the ICEcoder manual, loaded remotely
showManual: function(version) {
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="http://icecoder.net/manual?version='+version+'" class="whiteGlow" style="width: 500px; height: 500px"></iframe>';
top.ICEcoder.showHide('show',top.document.getElementById('blackMask'));
},
// Show the properties screen // Show the properties screen
propertiesScreen: function(fileName) { propertiesScreen: function(fileName) {
top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/properties.php?fileName='+fileName.replace(/\//g,"|")+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>'; top.document.getElementById('mediaContainer').innerHTML = '<iframe src="lib/properties.php?fileName='+fileName.replace(/\//g,"|")+'" class="whiteGlow" style="width: 660px; height: 330px"></iframe>';
@@ -1479,6 +1498,11 @@ var ICEcoder = {
top.ICEcoder.serverMessage('<b>chMod '+perms+' on </b><br>'+file.replace(top.iceRoot,"")); top.ICEcoder.serverMessage('<b>chMod '+perms+' on </b><br>'+file.replace(top.iceRoot,""));
}, },
// Logout of ICEcoder
logout: function() {
window.location = window.location + "?logout";
},
// Show a message // Show a message
message: function(msg) { message: function(msg) {
alert(msg); alert(msg);
@@ -1699,6 +1723,13 @@ var ICEcoder = {
top.ICEcoder.setTabWidths(); top.ICEcoder.setTabWidths();
}, },
// Close all tabs
closeAllTabs: function() {
for (var i=top.ICEcoder.cMInstances.length; i>0; i--) {
top.ICEcoder.closeTab(i);
}
},
// Set the tabs width // Set the tabs width
setTabWidths: function() { setTabWidths: function() {
var availWidth, tabWidth, thisWidth; var availWidth, tabWidth, thisWidth;

View File

@@ -1,217 +1,218 @@
<?php include("settings.php");?> <?php include("settings.php");?>
<?php <?php
if(isset($_GET['selectedFiles'])) { if(isset($_GET['selectedFiles'])) {
$selectedFiles=explode(":",strClean($_GET['selectedFiles'])); $selectedFiles=explode(":",strClean($_GET['selectedFiles']));
echo $selectedFiles[0].".....".$selectedFiles[1]; }
} ?>
?> <!DOCTYPE html>
<!DOCTYPE html>
<html>
<html> <head>
<head> <title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</title>
<title>ICEcoder <?php echo $ICEcoder["versionNo"];?> multiple results screen</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow">
<meta name="robots" content="noindex, nofollow"> <link rel="stylesheet" type="text/css" href="multiple-results.css">
<link rel="stylesheet" type="text/css" href="multiple-results.css"> </head>
</head>
<body class="results" onLoad="top.document.getElementById('loadingMask').style.visibility = 'hidden'">
<body class="results" onLoad="top.document.getElementById('loadingMask').style.visibility = 'hidden'">
<h1 id="title"></h1>
<h1 id="title"></h1> <div class="resultsPane" id="resultsPane">
<div class="resultsPane" id="resultsPane"> <div id="results"></div>
<div id="results"></div> </div>
</div> <?php if (isset($_GET['replace'])) { ?>
<?php if (isset($_GET['replace'])) { ?> <div class="replaceAll" id="replaceAll" onClick="<?php
<div class="replaceAll" id="replaceAll" onClick="<?php if (isset($_GET['target']) && strpos($_GET['target'],"filenames")) {
if (isset($_GET['target']) && strpos($_GET['target'],"filenames")) { echo 'renameAll()';
echo 'renameAll()'; } else if (isset($_GET['target']) && strpos($_GET['target'],"files")) {
} else if (isset($_GET['target']) && strpos($_GET['target'],"files")) { echo 'replaceInFilesAll()';
echo 'replaceInFilesAll()'; } else {
} else { echo 'replaceAll()';
echo 'replaceAll()'; }
} ?>" style="opacity: 0.1"><?php echo isset($_GET['target']) && strpos($_GET['target'],"filenames") ? 'rename all' : 'replace all';?></div>
?>" style="opacity: 0.1"><?php echo isset($_GET['target']) && strpos($_GET['target'],"filenames") ? 'rename all' : 'replace all';?></div> <?php ;}; ?>
<?php ;}; ?>
<script>
<script> <?php if (!isset($_GET['replace'])) { ?>
<?php if (!isset($_GET['replace'])) { ?> document.getElementById('resultsPane').style.height = "380px";
document.getElementById('resultsPane').style.height = "380px"; <?php ;}; ?>
<?php ;}; ?> var resultsDisplay = "";
var resultsDisplay = ""; var foundArray = [];
var foundArray = []; foundInSelected = false;
foundInSelected = false; userTarget = top.document.findAndReplace.target.value;
userTarget = top.document.findAndReplace.target.value; findText = top.findAndReplace.find.value.toLowerCase();
findText = top.findAndReplace.find.value.toLowerCase(); <?php
<?php $findText = str_replace("ICEcoder:","",str_replace("&#39;","\'",$_GET['find']));
$findText = str_replace("ICEcoder:","",str_replace("&#39;","\'",$_GET['find'])); // Find in open docs?
// Find in open docs? if (!isset($_GET['target'])) {
if (!isset($_GET['target'])) { $targetName = "document";
$targetName = "document"; ?>
?> var startTab = top.ICEcoder.selectedTab;
var startTab = top.ICEcoder.selectedTab; var rExp = new RegExp(findText,"gi");
var rExp = new RegExp(findText,"gi"); for (var i=1;i<=top.ICEcoder.openFiles.length;i++) {
for (var i=1;i<=top.ICEcoder.openFiles.length;i++) { top.ICEcoder.switchTab(i);
top.ICEcoder.switchTab(i); var cM = top.ICEcoder.getcMInstance();
var cM = top.ICEcoder.getcMInstance(); var content = cM.getValue();
var content = cM.getValue(); if (content.match(rExp)) {
if (content.match(rExp)) { resultsDisplay += '<a href="javascript:gotoTab('+i+')">'+ top.ICEcoder.openFiles[i-1]+ '</a><br><div id="foundCount'+i+'">Found '+content.match(rExp).length+' times</div>';
resultsDisplay += '<a href="javascript:gotoTab('+i+')">'+ top.ICEcoder.openFiles[i-1]+ '</a><br><div id="foundCount'+i+'">Found '+content.match(rExp).length+' times</div>'; <?php if (isset($_GET['replace'])) { ?>
<?php if (isset($_GET['replace'])) { ?> resultsDisplay += '<div class="replace" id="replace" onClick="replaceSingle('+i+');this.style.display=\'none\'">replace</div>';
resultsDisplay += '<div class="replace" id="replace" onClick="replaceSingle('+i+');this.style.display=\'none\'">replace</div>'; <?php ;}; ?>
<?php ;}; ?> resultsDisplay += '<hr>';
resultsDisplay += '<hr>'; foundArray.push(i);
foundArray.push(i); }
} }
} if (startTab!=top.ICEcoder.selectedTab) {
if (startTab!=top.ICEcoder.selectedTab) { top.ICEcoder.switchTab(startTab);
top.ICEcoder.switchTab(startTab); }
} <?php
<?php // Find in files or filenames
// Find in files or filenames } else {
} else { if (strpos($_GET['target'],"filenames")>0) {
if (strpos($_GET['target'],"filenames")>0) { $targetName = "file/folder";
$targetName = "file/folder"; ?>
?> var spansArray = top.ICEcoder.filesFrame.contentWindow.document.getElementsByTagName('span');
var spansArray = top.ICEcoder.filesFrame.contentWindow.document.getElementsByTagName('span'); for (var i=0;i<spansArray.length;i++) {
for (var i=0;i<spansArray.length;i++) { foundInSelected = false;
foundInSelected = false; targetURL = spansArray[i].id.replace(/\|/g,"/").toLowerCase();
targetURL = spansArray[i].id.replace(/\|/g,"/").toLowerCase(); if ( targetURL.lastIndexOf(findText.toLowerCase()) > targetURL.lastIndexOf("/")
if ( targetURL.lastIndexOf(findText.toLowerCase()) > targetURL.lastIndexOf("/") && targetURL.indexOf(findText.toLowerCase())>-1 && targetURL.indexOf('_perms')>-1) {
&& targetURL.indexOf(findText.toLowerCase())>-1 && targetURL.indexOf('_perms')>-1) { if (userTarget.indexOf("selected")>-1) {
if (userTarget.indexOf("selected")>-1) { for (var j=0;j<top.ICEcoder.selectedFiles.length;j++) {
for (var j=0;j<top.ICEcoder.selectedFiles.length;j++) { if (
if ( targetURL.replace(/\//g,"|").indexOf(top.ICEcoder.selectedFiles[j].replace(/\//g,"|").replace(/_perms/g,""))==0
targetURL.replace(/\//g,"|").indexOf(top.ICEcoder.selectedFiles[j].replace(/\//g,"|").replace(/_perms/g,""))==0 && (
&& ( targetURL.replace(/\|/g,"/").replace(/_perms/g,"")==top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").replace(/_perms/g,"")
targetURL.replace(/\|/g,"/").replace(/_perms/g,"")==top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").replace(/_perms/g,"") ||
|| (targetURL.replace(/\|/g,"/").split("/").length > top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").split("/").length && targetURL.charAt(top.ICEcoder.selectedFiles[j].length)=="/"))) {
(targetURL.replace(/\|/g,"/").split("/").length > top.ICEcoder.selectedFiles[j].replace(/\|/g,"/").split("/").length && targetURL.charAt(top.ICEcoder.selectedFiles[j].length)=="/"))) { foundInSelected = true;
foundInSelected = true; }
} }
} }
} if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) {
if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) { resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.document.getElementById(\'blackMask\'))">';
resultsDisplay += '<a href="javascript:top.ICEcoder.openFile(\'<?php echo $docRoot;?>'+targetURL.replace(/\|/g,"/").replace(/_perms/g,"")+'\');top.ICEcoder.showHide(\'hide\',top.document.getElementById(\'blackMask\'))">'; resultsDisplay += targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b>"+findText.toLowerCase()+"</b>");
resultsDisplay += targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b>"+findText.toLowerCase()+"</b>"); resultsDisplay += '</a><br>';
resultsDisplay += '</a><br>'; <?php if (!isset($_GET['replace'])) { ?>
<?php if (!isset($_GET['replace'])) { ?> resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+'</div>';
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+'</div>'; <?php ;} else { ?>
<?php ;} else { ?> resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>';
resultsDisplay += '<div id="foundCount'+i+'">'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(/<?php echo str_replace("/","\/",strtolower($findText)); ?>/g,"<b><?php if(isset($_GET['replace'])) {echo strtolower(strClean($_GET['replace']));};?></b>")+'</div>'; <?php
<?php ;};
;}; if (isset($_GET['replace'])) { ?>
if (isset($_GET['replace'])) { ?> resultsDisplay += '<div class="replace" id="replace" onClick="renameSingle('+i+');this.style.display=\'none\'">rename</div>';
resultsDisplay += '<div class="replace" id="replace" onClick="renameSingle('+i+');this.style.display=\'none\'">rename</div>'; <?php ;}; ?>
<?php ;}; ?> resultsDisplay += '<hr>';
resultsDisplay += '<hr>'; foundArray.push(i);
foundArray.push(i); }
} }
} }
} <?php
<?php } else {
} else { $targetName = "file";
$targetName = "file"; $r = 0;
$r = 0; function phpGrep($q, $path, $base) {
function phpGrep($q, $path, $base) { $fp = opendir($path);
$fp = opendir($path); global $r, $ICEcoder, $serverType, $selectedFiles;
global $r, $ICEcoder, $serverType, $selectedFiles; if (!isset($ret)) {$ret="";};
if (!isset($ret)) {$ret="";}; $slash = $serverType == "Windows" ? "\\" : "/";
$slash = $serverType == "Windows" ? "\\" : "/"; while($f = readdir($fp)) {
while($f = readdir($fp)) { if(preg_match("#^\.+$#", $f)) continue;
if(preg_match("#^\.+$#", $f)) continue; $fullPath = $path.$slash.$f;
$fullPath = $path.$slash.$f; if(is_dir($fullPath)) {
if(is_dir($fullPath)) { $ret .= phpGrep($q, $fullPath, $base);
$ret .= phpGrep($q, $fullPath, $base); } else if(stristr(file_get_contents($fullPath), $q)) {
} else if(stristr(file_get_contents($fullPath), $q)) { $bFile = false;
$bFile = false; $foundInSelFile = false;
for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) { for ($i=0;$i<count($ICEcoder['bannedFiles']);$i++) {
if (strpos($f,$ICEcoder['bannedFiles'][$i])>0) {$bFile = true;}; if (strpos($f,$ICEcoder['bannedFiles'][$i])!==false) {$bFile = true;};
} }
$findPath = str_replace($base,"",$fullPath); $findPath = str_replace($base,"",$fullPath);
for ($i=0;$i<count($selectedFiles);$i++) { for ($i=0;$i<count($selectedFiles);$i++) {
if (strpos($findPath,str_replace("|","/",$selectedFiles[$i]))!==0) { $stringExtra = $selectedFiles[$i] != "|" ? "/" : "";
$bFile = true; if (strpos($findPath.$stringExtra,str_replace("|","/",$selectedFiles[$i]).$stringExtra)===0) {
} $foundInSelFile = true;
} }
if (!$bFile) { }
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">"; if (!$bFile && (count($selectedFiles)==0 || count($selectedFiles)>0 && $foundInSelFile)) {
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>"; $ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'))\\\">";
if (isset($_GET['replace'])) { $ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">Found ".substr_count(strtolower(file_get_contents($fullPath)),$q)." times</div>";
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>"; if (isset($_GET['replace'])) {
}; $ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">replace</div>".PHP_EOL;
$ret .= '<hr>'; };
echo 'foundArray.push("'.$fullPath.'");'; $ret .= '<hr>';
$r++; echo 'foundArray.push("'.$fullPath.'");'.PHP_EOL;
} $r++;
} }
} }
return $ret; }
} return $ret;
}
$results = phpGrep($findText, $docRoot.$iceRoot, $docRoot.$iceRoot);
echo 'resultsDisplay += "'.$results.'";'; $results = phpGrep($findText, $docRoot.$iceRoot, $docRoot.$iceRoot);
?> echo 'resultsDisplay += "'.$results.'";';
<?php ?>
} <?php
} }
?> }
showHide = foundArray.length==0 ? "hide" : "show"; ?>
top.ICEcoder.showHide(showHide,top.document.getElementById('blackMask')); showHide = foundArray.length==0 ? "hide" : "show";
if (foundArray.length==0) {top.ICEcoder.message('No matches found')}; top.ICEcoder.showHide(showHide,top.document.getElementById('blackMask'));
<?php if (isset($_GET['replace'])) { ?> if (foundArray.length==0) {top.ICEcoder.message('No matches found')};
if (foundArray.length!=0) {document.getElementById('replaceAll').style.opacity = 1}; <?php if (isset($_GET['replace'])) { ?>
<?php ;}; ?> if (foundArray.length!=0) {document.getElementById('replaceAll').style.opacity = 1};
plural = foundArray.length >= 2 ? "s" : ""; <?php ;}; ?>
targetName = "<?php echo $targetName;?>"; plural = foundArray.length >= 2 ? "s" : "";
selectedText = foundInSelected ? "selected " : ""; targetName = "<?php echo $targetName;?>";
document.getElementById('title').innerHTML = findText.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+" found in "+foundArray.length+" "+selectedText+targetName+plural; selectedText = foundInSelected ? "selected " : "";
document.getElementById('results').innerHTML = resultsDisplay; document.getElementById('title').innerHTML = findText.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+" found in "+foundArray.length+" "+selectedText+targetName+plural;
document.getElementById('results').innerHTML = resultsDisplay;
var gotoTab = function(tab) {
top.ICEcoder.switchTab(tab); var gotoTab = function(tab) {
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask')); top.ICEcoder.switchTab(tab);
} top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
}
var replaceSingle = function(tab) {
top.ICEcoder.switchTab(tab); var replaceSingle = function(tab) {
cM = top.ICEcoder.getcMInstance(); top.ICEcoder.switchTab(tab);
content = cM.getValue(); cM = top.ICEcoder.getcMInstance();
cM.setValue(cM.getValue().replace(rExp,top.document.getElementById('replace').value)); content = cM.getValue();
document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('Found','Replaced'); cM.setValue(cM.getValue().replace(rExp,top.document.getElementById('replace').value));
} document.getElementById('foundCount'+tab).innerHTML = document.getElementById('foundCount'+tab).innerHTML.replace('Found','Replaced');
}
var replaceAll = function() {
for (var i=0;i<=foundArray.length-1;i++) { var replaceAll = function() {
replaceSingle(foundArray[i]); for (var i=0;i<=foundArray.length-1;i++) {
} replaceSingle(foundArray[i]);
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask')); }
} top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
}
var replaceInFileSingle = function(fileRef) {
top.ICEcoder.replaceInFile(fileRef,findText,'<?php if(isset($_GET['replace'])) {echo strClean($_GET['replace']);}; ?>'); var replaceInFileSingle = function(fileRef) {
} top.ICEcoder.replaceInFile(fileRef,findText,'<?php if(isset($_GET['replace'])) {echo strClean($_GET['replace']);}; ?>');
}
var replaceInFilesAll = function() {
for (var i=0;i<=foundArray.length-1;i++) { var replaceInFilesAll = function() {
replaceInFileSingle(foundArray[i]); for (var i=0;i<=foundArray.length-1;i++) {
} replaceInFileSingle(foundArray[i]);
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask')); }
} top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
}
var renameSingle = function(arrayRef) {
fileRef = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,""); var renameSingle = function(arrayRef) {
newName = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,"").replace(find,"<?php if(isset($_GET['replace'])) {echo strClean($_GET['replace']);}; ?>"); fileRef = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,"");
top.ICEcoder.renameFile(fileRef,newName); newName = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,"").replace(find,"<?php if(isset($_GET['replace'])) {echo strClean($_GET['replace']);}; ?>");
} top.ICEcoder.renameFile(fileRef,newName);
}
var renameAll = function() {
for (var i=0;i<=foundArray.length-1;i++) { var renameAll = function() {
renameSingle(foundArray[i]); for (var i=0;i<=foundArray.length-1;i++) {
} renameSingle(foundArray[i]);
top.ICEcoder.showHide('hide',top.document.getElementById('blackMask')); }
} top.ICEcoder.showHide('hide',top.document.getElementById('blackMask'));
</script> }
</script>
</body>
</body>
</html> </html>

View File

@@ -11,6 +11,13 @@ error_reporting(-1);
// Start a session if we haven't already // Start a session if we haven't already
if(!isset($_SESSION)) {session_start();} if(!isset($_SESSION)) {session_start();}
// Logout if that's the action we're taking
if (isset($_GET['logout'])) {
$_SESSION['loggedIn']=false;
session_destroy();
header("Location: dirname(__FILE__)./?loggedOut");
}
// Function to handle salted hashing // Function to handle salted hashing
define('SALT_LENGTH',9); define('SALT_LENGTH',9);
function generateHash($plainText,$salt=null) { function generateHash($plainText,$salt=null) {
@@ -38,7 +45,7 @@ include($settingsFile);
// Add ICEcoder settings to beginning of $ICEcoder array // Add ICEcoder settings to beginning of $ICEcoder array
$ICEcoder = array( $ICEcoder = array(
"versionNo" => "1.4", "versionNo" => "1.5",
"codeMirrorDir" => "CodeMirror-3.0", "codeMirrorDir" => "CodeMirror-3.0",
"demoMode" => false "demoMode" => false
)+$ICEcoder; )+$ICEcoder;
@@ -262,7 +269,7 @@ echo $ICEcoder["accountPassword"] == "" ? "Setup" : "Login";
<div class="version">v <?php echo $ICEcoder["versionNo"];?></div> <div class="version">v <?php echo $ICEcoder["versionNo"];?></div>
<form name="settingsUpdate" action="settings.php" method="POST"> <form name="settingsUpdate" action="settings.php" method="POST">
<input type="password" name="<?php echo $ICEcoder["accountPassword"] == "" ? "account" : "login"; ?>Password" class="accountPassword"><br><br> <input type="password" name="<?php echo $ICEcoder["accountPassword"] == "" ? "account" : "login"; ?>Password" class="accountPassword"><br><br>
<input type="submit" name="submit" value="<?php echo $ICEcoder["accountPassword"] == "" ? "Set Password" : "Login"; ?>" class="button"> <input type="submit" name="submit" value="<?php echo $ICEcoder["accountPassword"] == "" ? "set password" : "login"; ?>" class="button">
</form> </form>
</div> </div>
</div> </div>

View File

@@ -23,6 +23,8 @@ body {font-family: arial; font-size: 10px; background: #ccc}
Tip: If you have Emmet installed, also try tab key after your abbreviation Tip: If you have Emmet installed, also try tab key after your abbreviation
</script> </script>
<span onClick="top.ICEcoder.removeSnippet()" style="position: absolute; top: 5px; right: 5px; height: 11px; background: #444; margin: 1px 0 0 5px; border-radius: 6px; cursor: pointer"><img src="../images/nav-close.gif"></span>
</body> </body>
</html> </html>