D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
blackhat.pw
:
/
homepages
/
oneclick
/
magento
/
1.9.1.0
/
2
/
scripts
/
Filename :
configure
back
Copy
<?php $start = time(); $helpText = <<<EOT Usage: configure [OPTION]... install Install application remove Delete application configure Switch current installation between TRIAL-MODE | SAFE-MODE | FREE-MODE upgrade <current-version> <version> Upgrades <current-version> installation to version <version> patch <current-version> <version> Patch <current-version> installation to version <version> Requires minimum PHP 5.5 version to assure functionality Report bugs to <albert.florescu@1and1.ro> For internal use of 1&1 Internet AG application packaging EOT; if (version_compare(preg_replace('/[^0-9.]/', '', PHP_VERSION), '5.5', '<')) { echo $helpText; exit(1); } if (count($argv) < 2 || count($argv) > 4) { echo $helpText; exit(1); } if (isset($argv[2]) && isset($argv[3])) { if ($argv[1] === 'upgrade') { require_once dirname(__FILE__) . '/defines.php'; require_once dirname(__FILE__) . '/functions.php'; require_once dirname(__FILE__) . '/upgrade.php'; $stop = time(); $time = $stop - $start; file_put_contents(getenv('WEB___DIR') . '/.runtime', "{$argv[1]} {$argv[2]} to {$argv[3]}: {$time}s\n", FILE_APPEND); exit(0); } if ($argv[1] === 'patch') { require_once dirname(__FILE__) . '/defines.php'; require_once dirname(__FILE__) . '/functions.php'; require_once dirname(__FILE__) . '/patch.php'; $stop = time(); $time = $stop - $start; file_put_contents(getenv('WEB___DIR') . '/.runtime', "{$argv[1]} {$argv[2]} to {$argv[3]}: {$time}s\n", FILE_APPEND); exit(0); } else { echo $helpText; exit(1); } } if ($argv[1] === 'install') { require_once dirname(__FILE__) . '/defines.php'; require_once dirname(__FILE__) . '/functions.php'; require_once dirname(__FILE__) . '/install.php'; $stop = time(); $time = $stop - $start; file_put_contents(getenv('WEB___DIR') . '/.runtime', "{$argv[1]}: {$time}s\n", FILE_APPEND); exit(0); } if ($argv[1] === 'remove') { require_once dirname(__FILE__) . '/defines.php'; require_once dirname(__FILE__) . '/functions.php'; require_once dirname(__FILE__) . '/remove.php'; $stop = time(); $time = $stop - $start; file_put_contents(getenv('WEB___DIR') . '/.runtime', "{$argv[1]}: {$time}s\n", FILE_APPEND); exit(0); } if ($argv[1] === 'configure') { require_once dirname(__FILE__) . '/defines.php'; require_once dirname(__FILE__) . '/functions.php'; require_once dirname(__FILE__) . '/switch.php'; $stop = time(); $time = $stop - $start; file_put_contents(getenv('WEB___DIR') . '/.runtime', "{$argv[1]}: {$time}s\n", FILE_APPEND); exit(0); } else { echo $helpText; exit(1); }