diff --git a/system/typemill/Models/License.php b/system/typemill/Models/License.php index b8f2cd7..3b1d8ee 100644 --- a/system/typemill/Models/License.php +++ b/system/typemill/Models/License.php @@ -55,8 +55,6 @@ class License $domain = $this->checkLicenseDomain($licensedata['domain'], $urlinfo); $date = $this->checkLicenseDate($licensedata['payed_until']); -# $domain = true; - if($domain && $date) { return $this->plans[$licensedata['plan']]['scope']; @@ -67,9 +65,18 @@ class License public function refreshLicense() { - + # same as update } + private function updateLicence() + { + # if license not valid anymore, check server for update + } + + private function controlLicence() + { + # regularly check license on server each month. + } public function getLicenseFields() { @@ -143,7 +150,7 @@ class License $verified = openssl_verify($data, $binary_signature, $public_key_pem, OPENSSL_ALGO_SHA256); if ($verified == 1) - { + { return true; } elseif ($verified == 0) @@ -227,11 +234,6 @@ class License return true; } - private function updateLicence() - { - # todo - } - private function checkLicenseDomain(string $licensedomain, array $urlinfo) { $licensehost = parse_url($licensedomain, PHP_URL_HOST); diff --git a/system/typemill/Static/License.php b/system/typemill/Static/License.php index 8058c6c..65e678f 100644 --- a/system/typemill/Static/License.php +++ b/system/typemill/Static/License.php @@ -6,6 +6,7 @@ use Typemill\Static\Translations; class License { + /* public static function getLicenseData() { # returns data for settings page @@ -103,4 +104,5 @@ class License return false; } + */ } \ No newline at end of file diff --git a/system/typemill/Static/Plugins.php b/system/typemill/Static/Plugins.php index fd12ac9..182b8f0 100644 --- a/system/typemill/Static/Plugins.php +++ b/system/typemill/Static/Plugins.php @@ -75,7 +75,7 @@ class Plugins return $middleware; } - public static function getPremiumLicence($className) + public static function getPremiumLicense($className) { $premiumlist = [ '\Plugins\html\html' => 'MAKER' @@ -86,14 +86,14 @@ class Plugins return $premiumList['className']; } - $licenceType = false; + $licenseType = false; - if(method_exists($className, 'setPremiumLicence')) + if(method_exists($className, 'setPremiumLicense')) { - $licenceType = $className::setPremiumLicence(); + $licenseType = $className::setPremiumLicense(); } - return $licenceType; + return $licenseType; } private static function checkRouteArray($routes,$route) diff --git a/system/typemill/author/js/vue-license.js b/system/typemill/author/js/vue-license.js index c6172b2..1aedd07 100644 --- a/system/typemill/author/js/vue-license.js +++ b/system/typemill/author/js/vue-license.js @@ -8,14 +8,22 @@ const app = Vue.createApp({
122 € + VAT per year. Perfect for companies.
+22 € + VAT/Year. Ideal for personal projects and side hustles.
122 € + VAT/Year. Designed for small to medium businesses.
+Activate your Typemill-License below and enjoy a flatrate-subscription for plugins, themes, and services.
-You do not have a License yet? Read all about it here.
+You do not have a License yet? Read all about it on the Typemill website.