From 9a95bae6ba1afe0bf0e97db3e7aca5fc029a061a Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Mon, 17 Dec 2012 08:46:43 +0000 Subject: [PATCH] Meta robots noindex, nofollow To stop ICEcoder showing up on search engine results --- files.php | 311 +++++++++++++++++++++++---------------------- lib/help.php | 87 ++++++------- lib/properties.php | 293 +++++++++++++++++++++--------------------- 3 files changed, 347 insertions(+), 344 deletions(-) diff --git a/files.php b/files.php index 11bcf7f..31c166c 100644 --- a/files.php +++ b/files.php @@ -1,156 +1,157 @@ - - - - - -ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager - - - - - - -
- -getPathname(), $b->getPathname()); -} - -// Class to put forward the values for sorting -class SortingIterator implements IteratorAggregate { - private $iterator = null; - public function __construct(Traversable $iterator, $callback) { - $array = iterator_to_array($iterator); - usort($array, $callback); - $this->iterator = new ArrayIterator($array); - } - public function getIterator() { - return $this->iterator; - } -} - -class IgnorantRecursiveDirectoryIterator extends RecursiveDirectoryIterator { - function getChildren() { - try { - if (!isset($GLOBALS['ICEcoder']['bannedPaths']) || - !in_array($this->key(), $GLOBALS['ICEcoder']['bannedPaths'])) { - return parent::getChildren(); - } else { - return new RecursiveArrayIterator(array()); - } - } catch(UnexpectedValueException $e) { - return new RecursiveArrayIterator(array()); - } - } -} - -// Get a full list of dirs & files and begin sorting using above class & function -$objectList = new SortingIterator(new RecursiveIteratorIterator(new IgnorantRecursiveDirectoryIterator($docRoot.$iceRoot), RecursiveIteratorIterator::SELF_FIRST), 'alphasort'); - -// With that done, create arrays for out final ordered list and a temp container of files -$finalArray = $tempArray = array(); - -// To start, push folders from object into finalArray, files into tempArray -foreach ($objectList as $objectRef) { - $fileFolderName = substr($objectRef->getPathname(), strlen($docRoot.$iceRoot)); - $canAdd = true; - for ($i=0;$igetFilename()!="." && $objectRef->getFilename()!=".." && $fileFolderName[strlen($fileFolderName)-1]!="/" && $canAdd) { - $fileFolderName!="/" && is_dir($docRoot.$iceRoot.$fileFolderName) - ? array_push($finalArray,$fileFolderName) - : array_push($tempArray,$fileFolderName); - } -} - -// Now push root files onto the end of finalArray and splice from the temp, leaving only files that reside in subdirs -for ($i=0;$i'; -} -?> -
    -
  • - -        -/ - - - - -
  • - $lastDepth) {echo "
      \n";} - if ($thisDepth < $lastDepth) { - for ($j=$lastDepth;$j>$thisDepth;$j--) { - echo "
    \n"; - } - } - if ($serverType=="Linux") { - $chmodInfo = substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3); - $fileAtts = ''.$chmodInfo.''; - } - $type == "folder" ? $class = 'pft-directory' : $class = 'pft-file '.strtolower($ext); - echo "
  •         ".basename($fileFolderName)." ".$fileAtts."\n"; - if ($i\n";} - $lastPath = $fileFolderName; -} -echo "
\n\n"; - - // Output the JS vars - echo ""; -?> - - - - - + + + + + +ICEcoder v <?php echo $ICEcoder["versionNo"];?> file manager + + + + + + + +
+ +getPathname(), $b->getPathname()); +} + +// Class to put forward the values for sorting +class SortingIterator implements IteratorAggregate { + private $iterator = null; + public function __construct(Traversable $iterator, $callback) { + $array = iterator_to_array($iterator); + usort($array, $callback); + $this->iterator = new ArrayIterator($array); + } + public function getIterator() { + return $this->iterator; + } +} + +class IgnorantRecursiveDirectoryIterator extends RecursiveDirectoryIterator { + function getChildren() { + try { + if (!isset($GLOBALS['ICEcoder']['bannedPaths']) || + !in_array($this->key(), $GLOBALS['ICEcoder']['bannedPaths'])) { + return parent::getChildren(); + } else { + return new RecursiveArrayIterator(array()); + } + } catch(UnexpectedValueException $e) { + return new RecursiveArrayIterator(array()); + } + } +} + +// Get a full list of dirs & files and begin sorting using above class & function +$objectList = new SortingIterator(new RecursiveIteratorIterator(new IgnorantRecursiveDirectoryIterator($docRoot.$iceRoot), RecursiveIteratorIterator::SELF_FIRST), 'alphasort'); + +// With that done, create arrays for out final ordered list and a temp container of files +$finalArray = $tempArray = array(); + +// To start, push folders from object into finalArray, files into tempArray +foreach ($objectList as $objectRef) { + $fileFolderName = substr($objectRef->getPathname(), strlen($docRoot.$iceRoot)); + $canAdd = true; + for ($i=0;$igetFilename()!="." && $objectRef->getFilename()!=".." && $fileFolderName[strlen($fileFolderName)-1]!="/" && $canAdd) { + $fileFolderName!="/" && is_dir($docRoot.$iceRoot.$fileFolderName) + ? array_push($finalArray,$fileFolderName) + : array_push($tempArray,$fileFolderName); + } +} + +// Now push root files onto the end of finalArray and splice from the temp, leaving only files that reside in subdirs +for ($i=0;$i'; +} +?> +
    +
  • + +        +/ + + + + +
  • + $lastDepth) {echo "
      \n";} + if ($thisDepth < $lastDepth) { + for ($j=$lastDepth;$j>$thisDepth;$j--) { + echo "
    \n"; + } + } + if ($serverType=="Linux") { + $chmodInfo = substr(sprintf('%o', fileperms($docRoot.$iceRoot.$fileFolderName)), -3); + $fileAtts = ''.$chmodInfo.''; + } + $type == "folder" ? $class = 'pft-directory' : $class = 'pft-file '.strtolower($ext); + echo "
  •         ".basename($fileFolderName)." ".$fileAtts."\n"; + if ($i\n";} + $lastPath = $fileFolderName; +} +echo "
\n\n"; + + // Output the JS vars + echo ""; +?> + + + + + \ No newline at end of file diff --git a/lib/help.php b/lib/help.php index 1bc05e4..c413031 100644 --- a/lib/help.php +++ b/lib/help.php @@ -1,44 +1,45 @@ - - - - - -ICEcoder <?php echo $ICEcoder["versionNo"];?> help - - - - - - -

help

- -

In file manager

-Delete Delete file

- -

Within document

-CTRL + Move line up
-CTRL + Move line down
-CTRL + I Search selected text
-Esc Comment / uncomment text
-Tab Insert tab / indent selected text

- -

Anywhere

-CTRL + Next tab
-CTRL + Previous tab
-CTRL + + New tab
-CTRL + - Close current tab
-CTRL + F Find
-CTRL + G Go to line
-CTRL + S Save
-CTRL + Shift + S Save as...
-CTRL + Enter View webpage
-CTRL + S + Enter Save & create sticky tab
-Esc Cancel tasks

- -

Logo

-Left click Help
-Right click Settings
- - - + + + + + +ICEcoder <?php echo $ICEcoder["versionNo"];?> help + + + + + + + +

help

+ +

In file manager

+Delete Delete file

+ +

Within document

+CTRL + Move line up
+CTRL + Move line down
+CTRL + I Search selected text
+Esc Comment / uncomment text
+Tab Insert tab / indent selected text

+ +

Anywhere

+CTRL + Next tab
+CTRL + Previous tab
+CTRL + + New tab
+CTRL + - Close current tab
+CTRL + F Find
+CTRL + G Go to line
+CTRL + S Save
+CTRL + Shift + S Save as...
+CTRL + Enter View webpage
+CTRL + S + Enter Save & create sticky tab
+Esc Cancel tasks

+ +

Logo

+Left click Help
+Right click Settings
+ + + \ No newline at end of file diff --git a/lib/properties.php b/lib/properties.php index 93e12eb..e239841 100644 --- a/lib/properties.php +++ b/lib/properties.php @@ -1,147 +1,148 @@ - - - - - -ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties - - - - - - -

properties

- - -


-Size: = 1024) { - $outputSize = ($outputSize/1024); - $outputUnit = "mb"; -} -echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)"; -?> -Modified: -Last access: -

-Type: -Readable / Writeable: - / - -Relative path: - -

-Absolute path:
-

-
- -Permissions: - - - - - - - - - - - - - - - - - - - - - -
OwnerGroupPublic
onClick="changePerms();showButton()"> Read onClick="changePerms();showButton()"> Read onClick="changePerms();showButton()"> Read
onClick="changePerms();showButton()"> Write onClick="changePerms();showButton()"> Write onClick="changePerms();showButton()"> Write
onClick="changePerms();showButton()"> Execute onClick="changePerms();showButton()"> Execute onClick="changePerms();showButton()"> Execute
-
- -Change to:
-
- -
-
- -
update
- - - - - + + + + + +ICEcoder <?php echo $ICEcoder["versionNo"];?> file/folder properties + + + + + + + +

properties

+ + +


+Size: = 1024) { + $outputSize = ($outputSize/1024); + $outputUnit = "mb"; +} +echo number_format($outputSize, 2, '.', '').$outputUnit." (".number_format($bytes)." bytes)"; +?> +Modified: +Last access: +

+Type: +Readable / Writeable: + / + +Relative path: + +

+Absolute path:
+

+
+ +Permissions: + + + + + + + + + + + + + + + + + + + + + +
OwnerGroupPublic
onClick="changePerms();showButton()"> Read onClick="changePerms();showButton()"> Read onClick="changePerms();showButton()"> Read
onClick="changePerms();showButton()"> Write onClick="changePerms();showButton()"> Write onClick="changePerms();showButton()"> Write
onClick="changePerms();showButton()"> Execute onClick="changePerms();showButton()"> Execute onClick="changePerms();showButton()"> Execute
+
+ +Change to:
+
+ +
+
+ +
update
+ + + + + \ No newline at end of file