ICEcoder = parent.ICEcoder; ICEcoder.message('".$t['Sorry, you do...']."');ICEcoder.showHide('hide',get('loadingMask'));"; die(); } // If we have an action to perform if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action']) && $sslAvail) { // ==== // AUTH // ==== if ($_GET['action']=="auth") { $_SESSION['githubAuthToken'] = xssClean($_GET['token'],"html"); echo ' '; } // ==== // READ // ==== if ($_GET['action']=="read") { echo ' '; } // ===== // CLONE // ===== if ($_GET['action']=="clone") { $iceGithubLocalPaths = $ICEcoder["githubLocalPaths"]; $iceGithubRemotePaths = $ICEcoder["githubRemotePaths"]; $pathPos = array_search($iceRoot,$iceGithubLocalPaths); if ($pathPos !== false) { // USE: https://github.com/mattpass/ICEcoder/zipball/master // Store the plugin zip to the tmp dir $target = $docRoot.$iceGithubLocalPaths[$pathPos]."/"; $zipURL = $iceGithubRemotePaths[$pathPos].'/zipball/master'; $zipFile = "../tmp/".basename($zipURL); $fileData = getData($zipURL,'curl'); if (count($fileData) > 0) { file_put_contents($zipFile, $fileData); // Now unpack the zip $zip = new ZipArchive; $zip->open($zipFile); // Create all files & dirs, in 1kb chunks for($i=0; $i<$zip->numFiles; $i++) { $name = $zip->getNameIndex($i); if ($i==0) { $dirName = $name; } else { $tgtName = str_replace($dirName,"",$name); // Determine output filename $file = $target.$tgtName; // Create the directories if necessary $dir = dirname($file); if (!is_dir($dir)) mkdir($dir, 0777, true); // Read from zip and write to disk $fpr = $zip->getStream($name); if (!is_dir($file)) { $fpw = fopen($file, 'w'); while ($data = fread($fpr, 1024)) { fwrite($fpw, $data); } fclose($fpw); } fclose($fpr); } } $zip->close(); // Remove the tmp zip file unlink($zipFile); // Refresh the file manager echo ""; } else { echo ""; } } } // ====== // COMMIT // ====== if ($_GET['action']=="commit") { ?> ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub commit files

Title:

Message:
Commit


'.base64_encode($loadedFile).'

'.PHP_EOL.PHP_EOL; } else { die(""); } } ?>