From d2293d89908aa28f478b6ea7e210b5a84ee1f9ed Mon Sep 17 00:00:00 2001 From: mattpass Date: Thu, 4 Jun 2020 20:25:48 +0100 Subject: [PATCH] index.php format overhauled --- index.php | 228 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 120 insertions(+), 108 deletions(-) diff --git a/index.php b/index.php index 63718e9..b59eb40 100644 --- a/index.php +++ b/index.php @@ -1,14 +1,16 @@ $icv, 1 => substr($icvInfo, strlen($matches[0])) ]; - $icvI = str_replace('"','\\\'',$icvInfo[1]); + $icvI = str_replace('"', '\\\'', $icvInfo[1]); $thisV = $ICEcoder["versionNo"]; - if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;}; - if ($thisV<$icv) { - $updateMsg = ";ICEcoder.dataMessage('".$t['UPDATE INFO'].": ICEcoder v ".$icv." ".$t['now available'].". (".$t['Your version is']." v ".$ICEcoder["versionNo"].").

".$t['Update now']."

".$icvI."');"; + if (-1 < strpos($thisV, "beta") && false === strpos($icv, "beta") && str_replace(" beta", "", $thisV) === $icv) { + $thisV-=0.1; + }; + if ($thisV < $icv) { + $updateMsg = + ";ICEcoder.dataMessage('" . $t['UPDATE INFO'] . + ": ICEcoder v " . $icv." " . $t['now available'] . ". (" . $t['Your version is'] . " v " . $ICEcoder["versionNo"] . + ").

" . + $t['Update now'] . "

" . $icvI ."');"; } } -$isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false; +$isMac = false === strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh") ? true : false; ?> - + ICEcoder v <?php echo $ICEcoder["versionNo"];?> @@ -39,9 +47,12 @@ $isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false; + @@ -49,9 +60,9 @@ echo "?microtime=".microtime(true); iceRoot = ""; window.onbeforeunload = function() { - if(ICEcoder.autoLogoutTimer < ICEcoder.autoLogoutMins*60) { - for(var i=1;i<=ICEcoder.savedPoints.length;i++) { - if (ICEcoder.savedPoints[i-1]!=ICEcoder.getcMInstance(i).changeGeneration()) { + if(ICEcoder.autoLogoutTimer < ICEcoder.autoLogoutMins * 60) { + for(var i = 1; i <= ICEcoder.savedPoints.length; i++) { + if (ICEcoder.savedPoints[i - 1] != ICEcoder.getcMInstance(i).changeGeneration()) { return "."; } } @@ -65,9 +76,9 @@ t = { $t = $text['icecoder']; $tOutput = ""; foreach ($t as $key => $value) { - $tOutput .= '"'.$key.'" : "'.$value.'",'.PHP_EOL; + $tOutput .= '"' . $key . '" : "' . $value . '",' . PHP_EOL; } -echo rtrim($tOutput,",".PHP_EOL).PHP_EOL; +echo rtrim($tOutput, "," . PHP_EOL) . PHP_EOL; // Back to the lang array for index $t = $text['index']; @@ -81,55 +92,57 @@ $t = $text['index']; -ICEcoder.init();ICEcoder.content.style.visibility='visible';ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = iceLoc+'/processes/on-load.php';" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="if('visible' === get('blackMask').style.visibility) {ICEcoder.handleModalKeyUp(event, 'modalGeneralCatch')}; ICEcoder.resetKeys(event);" onBlur="ICEcoder.resetKeys(event);"> + $extraProcesses = new ExtraProcesses(); + $onLoad = $extraProcesses->onLoad(); +?>ICEcoder.init();ICEcoder.content.style.visibility = 'visible';" onresize="ICEcoder.setLayout()" onkeydown="return ICEcoder.interceptKeys('coder', event);" onkeyup="if('visible' === get('blackMask').style.visibility) {ICEcoder.handleModalKeyUp(event, 'modalGeneralCatch')}; ICEcoder.resetKeys(event);" onblur="ICEcoder.resetKeys(event);"> -
+
-
+
-
: 0" onMouseOver="ICEcoder.showHidePlugins('show')" onMouseOut="ICEcoder.showHidePlugins('hide')" onClick="ICEcoder.showHidePlugins('hide')"> +
: 0" onmouseover="ICEcoder.showHidePlugins('show')" onmouseout="ICEcoder.showHidePlugins('hide')" onclick="ICEcoder.showHidePlugins('hide')">
- Color Picker

+ / -
-
+
- - -

- + + +

+
-
+ ">
- -

+ +

- - - - + + + + - -

- + +

+
-

+

Zip It!'.PHP_EOL; + if (true === file_exists(dirname(__FILE__) . "/plugins/zip-it/index.php")) { + echo 'Zip It!' . PHP_EOL; }; ?> - -

- + +

+
- + -
+
    -
  • -
  • -
  • -
  • -
+
  • +
  • +
  • +
  • +
    -
    +
    -
    +
    • @@ -235,13 +248,13 @@ $t = $text['index'];
    -
    + -
    +
    - +
    @@ -263,25 +276,25 @@ $t = $text['index'];
    -
    +
    '; + for ($i = 1; $i <= 100; $i++) { + echo '
    '; } ?>
    +
    -
    -
    +
    +
    - +
    - with +
    with
    - @@ -319,17 +332,16 @@ $t = $text['index'];
    Output
    via ICEcoder.output(message);


    sudo nohup php processes/system.php > data/nohup.log 2>&1 &

    ...to run as a background process"; + echo "To provide git diff data to ICEcoder, please run...

    sudo nohup php server/run-tasks.php > data/nohup.log 2>&1 &

    ...to run as a background process"; };?>
    -