<?php session_start(); $img1 = $_SESSION["img1"]; $img2 = $_SESSION["img2"]; include_once 'scripts/fun2.php'; /*$im1 = isset($_REQUEST['$img1']) ? $_REQUEST['$img1'] : ''; $im2 = isset($_REQUEST['$img2']) ? $_REQUEST['$img2'] : '';*/ if ($img1 != '' && $img2 != '') { $diff = imageCompare($img1, $img2); neat_r($diff); }
} else { $logger->addChild($fileLog); $fileLog->log(" ** Starting installation ** "); $fileLog->log("Status: " . ($installError ? 'FAILED' : 'SUCCESS')); $displayLog->log("This log is also available in {$logFilename}"); } $installArgs = (array) $dataClient; $hiddenFields = array('mysqlP', 'ao_admin_pass1', 'ao_admin_pass2'); foreach ($installArgs as $arg => $param) { if (in_array($arg, $hiddenFields)) { $installArgs[$arg] = "********"; } } $logger->log("Installation arguments\n" . neat_r(array($installArgs))); if (isset($report)) { $logger->log("Installation report\n" . neat_r(array($report))); } else { $logger->log("** Installation crashed **"); } if (is_string($installError)) { $logger->log("Error message: {$installError}"); } if ($installError) { $logger->log("Installation ending with errors"); die; } $sh = md5(filemtime(PATH_GULLIVER . "/class.g.php")); $h = G::encrypt($dataClient->mysqlH . $sh . $dataClient->mysqlU . $sh . $dataClient->mysqlP . $sh . $inst->cc_status, $sh); $db_text = "<?php\n" . "define( 'PATH_DATA', '" . $dir_data . "' );\n" . "define( 'PATH_C', '" . $dir_compiled . "' );\n" . "define( 'HASH_INSTALLATION','" . $h . "' );\n" . "define( 'SYSTEM_HASH','" . $sh . "' );\n" . "?>"; $fp = fopen(FILE_PATHS_INSTALLED, "w"); fputs($fp, $db_text, strlen($db_text));
} $parts = explode(" ", $cmd); //neat_r($parts); switch ($parts[0]) { case 'list': $dir = getcwd(); $files = array_filter(scandir($dir), "is_file"); $fold = array_filter(scandir($dir, 1), "is_dir"); array_pop($fold); array_pop($fold); rsort($files); echo "\tFiles"; neat_r($files); rsort($fold); echo "\tFolders"; neat_r($fold); break; case 'pwd': echo getcwd(); break; case 'cat': if (!isset($parts[1])) { echo 'Invalid Paramenter(File)'; } else { if (is_file($parts[1])) { $file_handler = fopen($parts[1], "r"); $contents = fread($file_handler, filesize($parts[1])); fclose($file_handler); echo "\n" . $contents; } else { echo 'Invalid Paramenter(File). No such file exsists!';