Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP8 Decoder for ionCube Encoder)
- *
- * @ Version : 8.2.0.1
- * @ Author : DeZender
- * @ Release on : 27.10.2023
- * @ Official site : http://DeZender.Net
- *
- */
- namespace RSThemes\Template;
- /**
- * Class License
- * @package RSThemes\Template
- */
- class License
- {
- /** @var string $licenseServerUrl */
- public static $licenseServerUrl = 'https://rsstudio.net/my-account/';
- /** @var string $licenseKey */
- public $licenseKey = '';
- /** @var int $licenseFailDays */
- public $licenseFailDays = 30;
- /** @var int $licenseFailWarningDays */
- public $licenseFailWarningDays = 3;
- /** @var Template $template */
- public $template = null;
- /** @var string $templateName */
- public $templateName = null;
- /** @var bool $forceRemoteCheck */
- public $forceRemoteCheck = false;
- /** @var string $licenseKeyName */
- private $licenseKeyName = null;
- /** @var string $licenseSecretKey */
- private $licenseSecretKey = null;
- /** @var string $licenseConfigKey */
- private $licenseConfigKey = null;
- /** @var array $lastRemoteCheck */
- private $activationCache = [];
- /** @var array $licenseDetails */
- private $licenseDetails = ['status' => '', 'service_status' => '', 'license_status' => '', 'nextduedate' => '', 'version' => '1.0.0', 'fullversion' => '1.0.0', 'lastRemoteChecked' => '', 'lastRemoteCheckedFail' => '', 'lastRemoteCheckedSuccess' => '', 'regdate' => '', 'first_payment_amount' => '', 'recuring_amount' => '', 'payment_method' => '', 'warningShowDate' => '', 'deactivationDate' => '', 'license' => ''];
- private $validateDetails = ['status', 'service_status', 'license_status', 'nextduedate', 'version', 'regdate', 'first_payment_amount', 'recuring_amount', 'payment_method'];
- /** @var array $rawLicenseDetails */
- private $rawLicenseDetails = null;
- /** @var string $licenseEncoded */
- private $licenseEncoded = null;
- /** @var string $licenseWarningKey */
- private $licenseWarningKey = null;
- /** @var string $licenseWarningMessage */
- private $licenseWarningMessage = null;
- /** @var bool $debug */
- private $debug = false;
- /**
- * @var string
- */
- private $checkLicenseHour = null;
- private $certificate = '-----BEGIN CERTIFICATE-----' . "\n" . 'MIIFazCCA1OgAwIBAgIUHHVhX4JcvXn15Mrbmp51n2ebIlkwDQYJKoZIhvcNAQEL' . "\n" . 'BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM' . "\n" . 'GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MTEyMDQwNTRaFw0zNDA2' . "\n" . 'MDkyMDQwNTRaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw' . "\n" . 'HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB' . "\n" . 'AQUAA4ICDwAwggIKAoICAQCoWvNiGWc/yHHVuhruZTI3zcmqDFrSJhKtr83Zwmx7' . "\n" . 'YeZmP6jcjs125fcFdHaRN9CigaMS/RwMMQAGygdE+hSszMLctlXDHFfXNCyhKW7Q' . "\n" . 'NZ8Z3bqwpbU/CtaLz4SH2jHAkmFVGqcdtXoLTYtYLF1cdRbX7ta9+GyOP5mILH9a' . "\n" . 'hDVUZhG4kyH+gmgwU4sEKBqITJkxaBGa6F5WQYxFgj19xL6wya529bspF2cegCmx' . "\n" . 'Oz+nU4+HVcwcXoiHnWTns/Q8mYrz3dM8ui7IZFpLLHjHgFaqQAo3lnBaodk0oWcf' . "\n" . 'bzCHAmwiNKvwZ3lAlX/V0D+REd+rXfJOf2g0wrtfsQTTckWcZiiB4q/noY6p/o69' . "\n" . 'jPUQKMufAhNZHBAtF34KWQYjLq0nTH3ELGO1pU5PF4sr2Bt3soWiZ4LZCkt9NPf7' . "\n" . 'RLnKtLCFW6zjiY+ZpTnmlOSXV1BfhKtW2dS69RnMh3I26+FUx55d43WrdM3d6A+J' . "\n" . 'Njbrb2lMKu+EAvvNb+f6NOqA3wG/ysJWj3F926iyg9GeJJYxl8Wf5pUG7XV1u1c3' . "\n" . '1h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nI5HxoGNsaEG4/4=' . "\n" . '-----END CERTIFICATE-----';
- /**
- * License constructor.
- * @param string $licenseKeyName
- * @param string $licenseSecretKey
- * @param Template $template
- */
- public function __construct($licenseKeyName, $licenseSecretKey, $template)
- {
- $this->loadLicenseHour($licenseKeyName);
- $this->licenseKeyName = $licenseKeyName;
- $this->licenseSecretKey = $licenseSecretKey;
- $this->template = $template;
- $this->licenseConfigKey = sprintf('%s-data', $licenseKeyName);
- $this->licenseKey = (new \RSThemes\Models\Configuration())->getConfig($licenseKeyName);
- $this->licenseWarningKey = sprintf('%s-warning', $licenseKeyName);
- $this->licenseWarningMessage = (new \RSThemes\Models\Configuration())->getConfig($this->licenseWarningKey);
- $this->templateName = $this->template->getMainName();
- $this->licenseEncoded = (new \RSThemes\Models\Configuration())->getConfig($this->licenseConfigKey);
- $this->rawLicenseDetails = $this->licenseDetails;
- $this->prepareLicense();
- }
- /**
- * @param $licenseKeyName
- */
- private function loadLicenseHour($licenseKeyName)
- {
- $keyName = sprintf('%s-hour', $licenseKeyName);
- $hour = (new \RSThemes\Models\Configuration())->getConfig($keyName);
- if (strlen($hour) == 0) {
- $hour = rand(4, 23) . ':' . str_pad(rand(2, 59), 2, '0', STR_PAD_LEFT);
- (new \RSThemes\Models\Configuration())->saveConfig($keyName, $hour);
- }
- $this->checkLicenseHour = $hour;
- }
- /**
- *
- */
- private function prepareLicense()
- {
- if (0 < strlen($this->licenseEncoded)) {
- $this->loadLicense();
- }
- if (($this->licenseDetails['service_status'] == 'Active') && isset($this->licenseDetails['deactivationDate']) && strlen($this->licenseDetails['deactivationDate'])) {
- if ($this->licenseDetails['deactivationDate'] < date('Y-m-d')) {
- $this->deactivateTemplate();
- }
- ........................................................
- ...............................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement