<HTML> <HEAD> <TITLE>Copy mLists</TITLE> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> </HEAD> <BODY class="background_main"> <H3>Copy mLists</H3> <?php function mysystem($command) { if (!($p = popen("({$command})2>&1", "r"))) { return 126; } while (!feof($p)) { $line = fgets($p, 1000); $out .= $line; } pclose($p); return $out; } $var = "../../../mlists/copymlists.sh"; echo mysystem($var); ?> Verarbeitung erledigt! </BODY> </HTML>
xoops_cp_footer(); exit; } chdir(XOOPS_UPLOAD_PATH . "/update/work"); switch ($op) { case 'exec': system("tar cfCz 'backup-rollback.tar.gz' '{$backupdir}' .; rm -rf '{$backupdir}'"); $updatetrust = $updatedir . "/XOOPS_TRUST_PATH"; if (is_dir($updatetrust)) { // exists XOOPS_TRUST_PATH $trust = XOOPS_TRUST_PATH; $out = mysystem("copy '{$updatetrust}' '{$trust}'"); system("rm -rf '{$updatetrust}'"); } $base = XOOPS_ROOT_PATH; $out = mysystem("copy '{$updatedir}' '{$base}'"); system("rm -rf '{$updatedir}'"); if (empty($out)) { $go = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "index.php"; redirect_header($go, 1, _AM_UPDATE_SUCC); } else { xoops_cp_header(); echo "<h3>" . _AM_UPDATE_PKGS . "</h3>\n"; echo _AM_UPDATE_ERROR; echo "<p>" . _AM_UPDATE_ERROR_DESC . "</p>"; echo "<pre>" . htmlspecialchars($out) . "</pre>"; xoops_cp_footer(); } exit; case 'update': $dirname = $updatedir;
function rollback_update() { $file = ROLLBACK; if (!file_exists($file)) { return false; } $base = XOOPS_ROOT_PATH; mysystem("rollback '{$file}' '{$base}'"); package_expire(); @unlink($file); return true; }