diff --git a/404.html b/404.html new file mode 100644 index 0000000..3ced6e8 --- /dev/null +++ b/404.html @@ -0,0 +1,126 @@ + + + + + + + + +404 - Page Not Found + + + + + + + + + + + +
+
+
+

Oops! Page not found

+

404

+
+

we are sorry, but the page you requested was not found

+
+
\ No newline at end of file diff --git a/api.php b/api.php new file mode 100644 index 0000000..56deed8 --- /dev/null +++ b/api.php @@ -0,0 +1,48 @@ + 'Forbidden', + 404 => '404 Not Found', + 500 => 'Internal Server Error' + ); + $source_url = 'http'.((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 's' : '').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; + if (array_key_exists($code, $codes) && is_numeric($code)) { + die("Error $code: {$codes[$code]}"); + } else { + die('Unknown error'); + } +?> \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..d6105d7 --- /dev/null +++ b/index.php @@ -0,0 +1,125 @@ += 0) && ($bytes < $kb)) { +return $bytes . ' B'; + +} elseif (($bytes >= $kb) && ($bytes < $mb)) { +return ceil($bytes / $kb) . ' KB'; + +} elseif (($bytes >= $mb) && ($bytes < $gb)) { +return ceil($bytes / $mb) . ' MB'; + +} elseif (($bytes >= $gb) && ($bytes < $tb)) { +return ceil($bytes / $gb) . ' GB'; + +} elseif ($bytes >= $tb) { +return ceil($bytes / $tb) . ' TB'; +} else { +return $bytes . ' B'; +} +} + +$maxsize = max_size; +$core = new Core(); +?> + + + + + + + <?= app_name; ?> - <?= app_desc; ?> + + + + + + + + +
+ +FileTypeVerification($_FILES["fileToUpload"])){ + if($core->FileSizeVerification($_FILES["fileToUpload"])){ + $newfilename = $core->FileNameConvertor($_FILES["fileToUpload"]); + if($core->UploadFile($_FILES["fileToUpload"], $newfilename)){ + ?> +
+ Success ! Your file is available here: +
+ +
+ An error occured while trying to upload your file +
+ +
+ Your File Is Too Big +
+ +
+ Incorrect File Format +
+ +
+ +

Drag a file here or click to upload

+ + +
+ + + '; + } + ?> +
+
+ + + + + + + \ No newline at end of file diff --git a/index.php.backup b/index.php.backup new file mode 100644 index 0000000..d6105d7 --- /dev/null +++ b/index.php.backup @@ -0,0 +1,125 @@ += 0) && ($bytes < $kb)) { +return $bytes . ' B'; + +} elseif (($bytes >= $kb) && ($bytes < $mb)) { +return ceil($bytes / $kb) . ' KB'; + +} elseif (($bytes >= $mb) && ($bytes < $gb)) { +return ceil($bytes / $mb) . ' MB'; + +} elseif (($bytes >= $gb) && ($bytes < $tb)) { +return ceil($bytes / $gb) . ' GB'; + +} elseif ($bytes >= $tb) { +return ceil($bytes / $tb) . ' TB'; +} else { +return $bytes . ' B'; +} +} + +$maxsize = max_size; +$core = new Core(); +?> + + + + + + + <?= app_name; ?> - <?= app_desc; ?> + + + + + + + + +
+ +FileTypeVerification($_FILES["fileToUpload"])){ + if($core->FileSizeVerification($_FILES["fileToUpload"])){ + $newfilename = $core->FileNameConvertor($_FILES["fileToUpload"]); + if($core->UploadFile($_FILES["fileToUpload"], $newfilename)){ + ?> +
+ Success ! Your file is available here: +
+ +
+ An error occured while trying to upload your file +
+ +
+ Your File Is Too Big +
+ +
+ Incorrect File Format +
+ +
+ +

Drag a file here or click to upload

+ + +
+ + + '; + } + ?> +
+
+ + + + + + + \ No newline at end of file diff --git a/installer.php b/installer.php new file mode 100644 index 0000000..9e50a3d --- /dev/null +++ b/installer.php @@ -0,0 +1,433 @@ + $v) { + if ($k == 'code') continue; + $v = in_array(strtolower($v), ['true', 'false']) || is_numeric($v) ? strtolower($v) : '\'' . $v . '\''; + $contents .= 'define(\'' . $k . '\',' . $v . ');' . PHP_EOL; + } + $contents .= '?>'; + if (!file_put_contents($config_file, $contents)) { + return FALSE; + } + return TRUE; +} + +/*Verify Purchase Code function*/ +function verify($code) +{ + + /*If the submit form is success*/ + if(!empty($code)){ + + /*add purchase code to the API link*/ + $purchase_code = $code; + $url = "https://dl.supers0ft.us/anonuptest/api.php?code=".$purchase_code; + $curl = curl_init($url); + + /*Set your personal token*/ + // $personal_token = "9COT6mduU2sZSMIlC09aYAQveaRdQ2H9"; + + /*Correct header for the curl extension*/ + $header = array(); + $header[] = 'Authorization: Bearer '.$personal_token; + $header[] = 'User-Agent: Purchase code verification'; + $header[] = 'timeout: 20'; + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_HTTPHEADER,$header); + + /*Connect to the API, and get values from there*/ + $envatoCheck = curl_exec($curl); + curl_close($curl); + $envatoCheck = json_decode($envatoCheck); + + /*Variable request from the API*/ + $date = new DateTime(isset($envatoCheck->supported_until) ? $envatoCheck->supported_until : false); + $support_date = $date->format('Y-m-d H:i:s'); + $sold = new DateTime(isset($envatoCheck->sold_at) ? $envatoCheck->sold_at : false); + $sold_at = $sold->format('Y-m-d H:i:s'); + $buyer = (isset( $envatoCheck->buyer) ? $envatoCheck->buyer : false); + $license = (isset( $envatoCheck->license) ? $envatoCheck->license : false); + $count = (isset( $envatoCheck->purchase_count) ? $envatoCheck->purchase_count : false); + $support_amount = (isset( $envatoCheck->support_amount) ? $envatoCheck->support_amount : false); + $item = (isset( $envatoCheck->item->previews->landscape_preview->landscape_url ) ? $envatoCheck->item->previews->landscape_preview->landscape_url : false); + + + /*Check for Special Characters*/ + if (preg_match('/[\'^£$%&*()}{@#~?><>,|=_+¬]/', $code)){ + return 'Not allowed to use special characters!'; + } + + /*Check for Empty Spaces*/ + if(!isset($code) || trim($code) == ''){ + return 'You need to fill up the input area!'; + } + + /*If Purchase code exists, But Purchase ended*/ + if (isset($envatoCheck->item->name) && (date('Y-m-d H:i:s') >= $support_date)){ + return " + + "; + } + + /*If Purchase code exists, display client information*/ + if (isset($envatoCheck->item->name) && (date('Y-m-d H:i:s') < $support_date)){ + if (!install()) { + return '

Error!

Could not write to file! Please check permissions and try again!'; + } + return " +

+ "; + } + + /*If Purchase Code doesn't exist, no information will be displayed*/ + if (!isset($envatoCheck->item->name)){ + return " + + "; + } + + } +} + +if ($_POST) { + if (isset($_POST['code'])) { + // Validate code + $response = verify($_POST['code']); + } else { + // No code specified + $response = '

Error!

Please enter your Envato code!

'; + } +} +?> + + + + + + Installer + + + + +
+ +

Installer

+ +
+
+
+
+
+
+
+ +
+
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ +
+
+ Next +
+
+ +
+
+ + +
+ +
+ +

Options

+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ Prev + Next +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + + +
+
+ Prev + Next +
+
+ +
+
+ +
+ + +
+
+
+ Prev + +
+
+ +
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/protect.php b/protect.php new file mode 100644 index 0000000..e4388a5 --- /dev/null +++ b/protect.php @@ -0,0 +1,110 @@ + 'userpass', +'admin' => 'adminpass' +); +define('USE_USERNAME', true); +define('LOGOUT_URL', 'https://dl.supers0ft.us/logout.php/'); +define('TIMEOUT_MINUTES', 0); +define('TIMEOUT_CHECK_ACTIVITY', true); +if(isset($_GET['help'])) { +die('Include following code into every page you would like to protect, at the very beginning (first line):
<?php include("' . str_replace('\\','\\\\',__FILE__) . '"); ?>'); +} +$timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60); +if(isset($_GET['logout'])) { +setcookie("verify", '', $timeout, '/'); +header('Location: ' . LOGOUT_URL); +exit(); +} +if(!function_exists('showLoginPasswordProtect')) { +function showLoginPasswordProtect($error_msg) { +?> + + + +Admin Panel - Login + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Admin Login

+ +
+
+
+

Administration Panel

+
+
+


'; ?> +

+
+
+ + + + +$val) { +$lp = (USE_USERNAME ? $key : '') .'%'.$val; +if ($_COOKIE['auth'] == md5($lp)) { +$found = true; +if (TIMEOUT_CHECK_ACTIVITY) { +setcookie("auth", md5($lp), $timeout, '/'); +} +break; +} +} +if (!$found) { +showLoginPasswordProtect(""); +} +} +?> \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..0e39c8b --- /dev/null +++ b/style.css @@ -0,0 +1,311 @@ +html, body, div, input, span, a, select, textarea, option, h1, h2, h3, h4, main, aside, article, section, header, p, footer, nav, pre { + box-sizing: border-box; + font-family: Tahoma, Geneva, sans-serif; +} +html { + background: #f8f9f9 linear-gradient(0deg, #f8f9f9 0%, #f8f9f9 80%, #51b47c 80%, #51b47c 100%) no-repeat; + padding: 30px; + height: 100%; +} +input,textarea,select { + outline: 0; +} +h1 { + margin: 0; + padding: 35px 25px 25px 25px; + font-size: 20px; + color: #6a737f; + font-weight: 600; +} +h1 i { + padding-right: 10px; + font-size: 24px; +} +.installer-form { + background-color: #fff; + width: 500px; + margin: 0 auto; + box-shadow: 0px 0px 5px 0px rgba(0,0,0,.2); +} +.installer-form .fields { + position: relative; + padding: 20px; +} +.installer-form select { + appearance: none; + background-image: linear-gradient(45deg, transparent 50%, #c7c9cb 50%), linear-gradient(135deg, #c7c9cb 50%, transparent 50%), linear-gradient(to right, #dfe0e0, #dfe0e0); + background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px, calc(100% - 40px) 10px; + background-size: 5px 5px, 5px 5px, 1px 25px; + background-repeat: no-repeat; +} +.installer-form select option:first-child { + display: none; + } +.installer-form input[type="date"]::-webkit-calendar-picker-indicator { + color: #ddd; + filter: invert(0.8); +} +.installer-form input[type="text"], +.installer-form input[type="password"], +.installer-form input[type="email"], +.installer-form input[type="date"], +.installer-form input[type="tel"], +.installer-form select { + display: flex; + margin-top: 10px; + padding: 15px; + border: 1px solid #dfe0e0; + width: 100%; + flex-basis: 100%; + height: 47px; +} +.installer-form input[type="text"]:focus, +.installer-form input[type="email"]:focus, +.installer-form input[type="tel"]:focus, +.installer-form input[type="date"]:focus, +.installer-form select:focus { + border: 1px solid #c6c7c7; +} +.installer-form input[type="text"]::placeholder, +.installer-form input[type="email"]::placeholder, +.installer-form input[type="tel"]::placeholder, +.installer-form input[type="date"]:invalid, +.installer-form textarea::placeholder, +.installer-form select:invalid { + color: #858688; +} +.installer-form textarea { + resize: none; + margin-top: 15px; + padding: 15px; + border: 1px solid #dfe0e0; + width: 100%; + height: 150px; +} +.installer-form textarea:focus { + border: 1px solid #c6c7c7; +} +.installer-form .buttons { + padding: 20px; + border-top: 1px solid #eceff2; +} +.installer-form .btn { + display: inline-block; + padding: 10px 20px; + border: 0; + background-color: #c9704c; + font-weight: bold; + color: #fff; + cursor: pointer; + border-radius: 25px; + margin-right: 5px; + text-decoration: none; + font-size: 14px; +} +.installer-form .btn:hover { + background-color: #c26c4a; +} +.installer-form .btn.alt { + background-color: transparent; + border: 1px solid #c9704c; + color: #c9704c; +} +.installer-form .btn.alt:hover { + border: 1px solid #c26c4a; + color: #c26c4a; +} +.installer-form input[name="email"] { + position: relative; + display: block; +} +.installer-form .field { + display: inline-flex; + position: relative; + width: 100%; + padding-bottom: 20px; +} +.installer-form label, .installer-form p { + font-size: 14px; + font-weight: 600; + color: #8e939b; +} +.installer-form .field i { + position: absolute; + color: #dfe2e5; + top: 25px; + left: 15px; + z-index: 10; +} +.installer-form .field i ~ input { + padding-left: 45px !important; +} +.installer-form .responses { + padding: 15px; + margin: 0; +} +.installer-form .fields .wrapper { + display: flex; + justify-content: space-between; +} +.installer-form .fields .wrapper > div { + width: 100%; +} +.installer-form .fields .wrapper .gap { + width: 35px; +} +.installer-form .steps { + position: relative; + display: flex; + justify-content: space-between; + margin-top: 10px; + width: calc(100% - 35px); + align-self: center; + margin: 0 auto; +} +.installer-form .steps::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 4px; + background-color: #f2f4f7; + margin: auto 0; + top: 0; + bottom: 0; + z-index: 0; +} +.installer-form .steps .step { + width: 25px; + height: 25px; + background-color: #f2f4f7; + border: 3px solid #f2f4f7; + border-radius: 50px; + + z-index: 1; +} +.installer-form .steps .step.current { + background-color: #8cc6f2; +} +.installer-form .steps .step.complete { + background-color: #6ECBA4; +} +.installer-form .rating { + display: flex; + justify-content: space-between; + padding: 5px 0; +} +.installer-form .rating input[type="radio"]:checked, +.installer-form .rating input[type="radio"]:not(:checked) { + position: absolute; + left: -9999px; +} +.installer-form .rating input[type="radio"]:checked + label, +.installer-form .rating input[type="radio"]:not(:checked) + label +{ + display: flex; + position: relative; + font-size: 14px; + justify-content: center; + align-items: center; + width: 31px; + height: 31px; + cursor: pointer; + color: #8e939b; + z-index: 10; +} +.installer-form .rating input[type="radio"]:checked + label:before, +.installer-form .rating input[type="radio"]:not(:checked) + label:before { + content: ""; + position: absolute; + left: 0; + top: 0; + width: 30px; + height: 30px; + border: 1px solid #dfe0e0; + border-radius: 100%; + background: #fff; + z-index: -1; +} +.installer-form .rating input[type="radio"]:checked + label:after, +.installer-form .rating input[type="radio"]:not(:checked) + label:after { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 31px; + height: 31px; + border-radius: 100%; + background: #c9704c; + z-index: -1; +} +.installer-form .rating input[type="radio"]:not(:checked) + label:after { + opacity: 0; +} +.installer-form .rating input[type="radio"]:checked + label { + color: #fff; +} +.installer-form .rating input[type="radio"]:checked + label:after { + opacity: 1; +} +.installer-form .rating-footer { + display: flex; + justify-content: space-between; + font-size: 14px; + color: #8e939b; + padding: 15px 0 25px; +} +.installer-form .group { + display: flex; + flex-flow: column; + justify-content: center; + padding-bottom: 15px; +} +.installer-form .group label { + display: flex; + font-weight: 500; + height: 25px; + align-items: center; + padding-bottom: 5px; +} +.installer-form .group input[type="radio"], +.installer-form .group input[type="checkbox"] { + appearance: none; + display: inline-flex; + cursor: pointer; + width: 16px; + height: 16px; + padding: 2px; + background-clip: content-box; + border: 1px solid #dfe0e0; + background-color: #eef1f1; + border-radius: 50%; + margin-right: 10px; +} +.installer-form .group input[type="radio"]:hover, +.installer-form .group input[type="checkbox"]:hover { + border: 1px solid #d2d3d3; +} +.installer-form .group input[type="radio"]:checked, +.installer-form .group input[type="checkbox"]:checked { + border: 1px solid #d2d3d3; + background-color: #2996ed; +} +.installer-form .group input[type="checkbox"] { + border-radius: 0; +} +.installer-form .step-content { + display: none; +} +.installer-form .step-content.current { + display: block; +} +.installer-form .result { + padding: 25px; +} +.installer-form .result h3 { + color: #6a737f; +} +.installer-form .result p { + font-weight: 500; +} \ No newline at end of file