Created
August 24, 2012 08:20
-
-
Save anonymous/3447429 to your computer and use it in GitHub Desktop.
eCommerce Unzipper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Red Carrot EE Installer</title> | |
<style type="text/css"> | |
body { | |
width: 500px; | |
margin: 0 auto; | |
font-family: Arial, Helvetica, sans-serif; | |
text-align: center; | |
} | |
.zip { | |
display: block; | |
background: #0072ff; | |
padding: 20px; | |
margin-bottom: 20px; | |
border-radius: 8px; | |
color: #fff; | |
text-shadow: rgba(0,0,0,0.25) 0 2px 0; | |
text-decoration: none; | |
font-weight: bold; | |
} | |
.zip:hover { | |
background: #0043cc; | |
} | |
.success, | |
.error { | |
color: #fff; | |
border: #000 3px solid; | |
padding: 10px; | |
display: block; | |
margin: 40px 0; | |
border-radius: 8px; | |
font-size: 24px; | |
} | |
.success { | |
background: #73a900; | |
border-color: #4c7000; | |
} | |
.error { | |
background: #cc0000; | |
border-color: #8f0000; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Red Carrot EE Installer</h1> | |
<p>Follow the instructions on <a href="http://redcarrot.co.uk/blog/article/uploading-expressionengine-by-ftp-and-zip-updated/">our blog</a></p> | |
<?php | |
$file = $_GET["zip"]; | |
if($file){ | |
$zip = new ZipArchive; | |
$res = $zip->open($file.'.zip'); | |
if ($res === TRUE) { | |
$zip->extractTo('/home/domain.com/public_html/'); | |
$zip->close(); | |
echo '<span class="success">'.$file.'.zip successfully unzipped</span>'; | |
} | |
else { | |
echo '<span class="error">'.$file.'.zip failed, are you sure it exists?</span>'; | |
} | |
} | |
?> | |
<a href="installer.php?zip=core" class="zip">Step 1: core.zip</a> | |
<a href="installer.php?zip=thirdparty" class="zip">Step 2: thirdparty.zip</a> | |
<a href="installer.php?zip=templates" class="zip">Step 3: templates.zip</a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment