
-FileTypeVerification($_FILES['fileToUpload'])) {
- if ($core->FileSizeVerification($_FILES['fileToUpload'])) {
- $newfilename = $core->FileNameConvertor($_FILES['fileToUpload']);
- if ($core->UploadFile($_FILES['fileToUpload'], $newfilename)) {
- $destination = base64_encode(file_destination.'/'.$newfilename); ?>
+FileTypeVerification($_FILES["fileToUpload"])){
+ if($core->FileSizeVerification($_FILES["fileToUpload"])){
+ $newfilename = $core->FileNameConvertor($_FILES["fileToUpload"]);
+ if($core->UploadFile($_FILES["fileToUpload"], $newfilename)){
+ $destination = base64_encode(file_destination.'/'.$newfilename);
+ ?>
+ }else{
+ ?>
An error occured while trying to upload your file(s).
+ }
+ }else{
+ ?>
Your file is too high/low.
+ }
+ }else{
+ ?>
Incorrect file format.
@@ -97,7 +101,7 @@ $(document).ready(function(){
});
-
+
diff --git a/installer.php b/installer.php
index 072a40a..9e50a3d 100644
--- a/installer.php
+++ b/installer.php
@@ -1,81 +1,78 @@
$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;
+function install($config_file = 'system/config.php') {
+ $contents = ' $v) {
+ if ($k == 'code') continue;
+ $v = in_array(strtolower($v), ['true', 'false']) || is_numeric($v) ? strtolower($v) : '\'' . $v . '\'';
+ $contents .= 'define(\'' . $k . '\',' . $v . ');' . PHP_EOL;
}
-
- return true;
+ $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 = [];
- $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 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 "
{$envatoCheck->item->name}
@@ -118,15 +115,14 @@ function verify($code)
";
- }
-
- /*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 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 "
{$envatoCheck->item->name}
@@ -169,11 +165,11 @@ function verify($code)
";
- }
+ }
- /*If Purchase Code doesn't exist, no information will be displayed*/
- if (!isset($envatoCheck->item->name)) {
- return "
+ /*If Purchase Code doesn't exist, no information will be displayed*/
+ if (!isset($envatoCheck->item->name)){
+ return "
INVALID PURCHASE CODE.
@@ -216,18 +212,19 @@ function verify($code)
";
- }
- }
+ }
+
+ }
}
if ($_POST) {
if (isset($_POST['code'])) {
- // Validate code
- $response = verify($_POST['code']);
- } else {
- // No code specified
- $response = '
Error!
Please enter your Envato code!
';
- }
+ // Validate code
+ $response = verify($_POST['code']);
+ } else {
+ // No code specified
+ $response = '
Error!
Please enter your Envato code!
';
+ }
}
?>
@@ -427,9 +424,9 @@ if ($_POST) {
}
};
});
-
+
setStep(5);
-
+
diff --git a/protect.php b/protect.php
index 32e62b2..e4388a5 100644
--- a/protect.php
+++ b/protect.php
@@ -1,25 +1,24 @@
'userpass',
- 'admin' => 'adminpass',
-];
+$LOGIN_INFORMATION = array(
+'user' => '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'])) {
- exit('Include following code into every page you would like to protect, at the very beginning (first line):
<?php include("'.str_replace('\\', '\\\\', __FILE__).'"); ?>');
+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(isset($_GET['logout'])) {
+setcookie("verify", '', $timeout, '/');
+header('Location: ' . LOGOUT_URL);
+exit();
}
-if (!function_exists('showLoginPasswordProtect')) {
- function showLoginPasswordProtect($error_msg)
- {
- ?>
+if(!function_exists('showLoginPasswordProtect')) {
+function showLoginPasswordProtect($error_msg) {
+?>
@@ -62,9 +61,7 @@ input { border: 1px solid black; }
Administration Panel