1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can anyone nulled this

Discussion in 'General Scripting Chat' started by ased2235, Feb 23, 2017.

  1. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    Hi i am trying to nulled this but no luck so far. can anyone help me please here are the code that calls the license verify SettingsController.php
    PHP:
    <?php defined('MW_PATH') || exit('No direct script access allowed');

    /**
     * SettingsController
     *
     * Handles the settings for the application
     *
     
     */

    class SettingsController extends Controller
    {
        public function 
    init()
        {
            
    $this->getData('pageScripts')->add(array('src' => AssetsUrl::js('settings.js')));
            
    parent::init();
        }

        
    /**
         * Handle the common settings page
         */
        
    public function actionIndex()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $commonModel = new OptionCommon();

            if (
    $request->isPostRequest && ($attributes = (array)$request->getPost($commonModel->modelName, array()))) {
                
    $commonModel->attributes $attributes;
                if (!
    $commonModel->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller'    => $this,
                    
    'success'       => $notify->hasSuccess,
                    
    'commonModel'   => $commonModel,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/index'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Common settings')
                )
            ));

            
    $this->render('index'compact('commonModel'));
        }

        
    /**
         * Handle the settings for system urls
         */
        
    public function actionSystem_urls()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $options Yii::app()->options;
            
    $apps    Yii::app()->apps->getWebApps();

            if (
    $request->isPostRequest) {
                foreach (
    $apps as $appName) {
                    
    $options->set('system.urls.'.$appName.'_absolute_url''');
                }

                
    $scheme 'http';
                if (
    $request->getPost('scheme''http') == 'https') {
                    
    $scheme 'https';
                }
                
    $options->set('system.urls.scheme'$scheme);

                
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/system_urls'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''System urls')
                )
            ));

            
    // the scheme
            
    $scheme Yii::app()->options->get('system.urls.scheme''http');

            
    $this->render('system-urls'compact('apps''options''scheme'));
        }

        
    /**
         * Handle the settings for importer/exporter
         */
        
    public function actionImport_export()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;

            
    $importModel = new OptionImporter();
            
    $exportModel = new OptionExporter();

            if (
    $request->isPostRequest) {
                
    $importModel->attributes = (array)$request->getPost($importModel->modelName, array());
                
    $exportModel->attributes = (array)$request->getPost($exportModel->modelName, array());

                if (!
    $importModel->save() || !$exportModel->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller'   => $this,
                    
    'success'      => $notify->hasSuccess,
                    
    'importModel'  => $importModel,
                    
    'exportModel'  => $exportModel
                
    )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/import_export'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Import/Export settings')
                )
            ));

            
    $this->render('import-export'compact('importModel''exportModel'));
        }

        
    /**
         * Handle the settings for console commands
         */
        
    public function actionCron()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $cronDeliveryModel      = new OptionCronDelivery();
            
    $cronLogsModel          = new OptionCronProcessDeliveryBounce();
            
    $cronSubscribersModel   = new OptionCronProcessSubscribers();
            
    $cronBouncesModel       = new OptionCronProcessBounceServers();
            
    $cronFeedbackModel      = new OptionCronProcessFeedbackLoopServers();

            if (
    $request->isPostRequest) {

                
    $cronDeliveryModel->attributes      = (array)$request->getPost($cronDeliveryModel->modelName, array());
                
    $cronLogsModel->attributes          = (array)$request->getPost($cronLogsModel->modelName, array());
                
    $cronSubscribersModel->attributes   = (array)$request->getPost($cronSubscribersModel->modelName, array());
                
    $cronBouncesModel->attributes       = (array)$request->getPost($cronBouncesModel->modelName, array());
                
    $cronFeedbackModel->attributes      = (array)$request->getPost($cronFeedbackModel->modelName, array());

                if (!
    $cronDeliveryModel->save() || !$cronLogsModel->save() || !$cronSubscribersModel->save() || !$cronBouncesModel->save() || !$cronFeedbackModel->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller'            => $this,
                    
    'success'               => $notify->hasSuccess,
                    
    'cronDeliveryModel'     => $cronDeliveryModel,
                    
    'cronLogsModel'         => $cronLogsModel,
                    
    'cronSubscribersModel'  => $cronSubscribersModel,
                    
    'cronBouncesModel'      => $cronBouncesModel,
                    
    'cronFeedbackModel'     => $cronFeedbackModel
                
    )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/cron'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Cron jobs settings')
                )
            ));

            
    $this->render('cron'compact('cronDeliveryModel''cronLogsModel''cronSubscribersModel''cronBouncesModel''cronFeedbackModel'));
        }

        
    /**
         * Handle the settings for email templates
         */
        
    public function actionEmail_templates($type 'common')
        {
            
    $types = array('common');
            if (!
    in_array($type$types)) {
                
    $type $types[0];
            }

            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;

            
    $model = new OptionEmailTemplate($type);
            
    $model->fieldDecorator->onHtmlOptionsSetup = array($this'_setupEditorOptions');

            if (
    $request->isPostRequest) {
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (isset(
    Yii::app()->params['POST'][$model->modelName][$type])) {
                    
    $model->$type Yii::app()->params['POST'][$model->modelName][$type];
                }

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/email_templates'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Email templates')
                )
            ));

            
    $this->render('email-templates'compact('model''types''type'));
        }

        
    /**
         * Handle the settings for email blacklist checks
         */
        
    public function actionEmail_blacklist()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $blacklistModel = new OptionEmailBlacklist();

            if (
    $request->isPostRequest) {

                
    $blacklistModel->unsetAttributes();
                
    $blacklistModel->attributes = (array)$request->getPost($blacklistModel->modelName, array());

                if (!
    $blacklistModel->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller'        => $this,
                    
    'success'           => $notify->hasSuccess,
                    
    'blacklistModel'    => $blacklistModel,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/email_blacklist'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Email blacklist settings')
                )
            ));

            
    $this->render('email-blacklist'compact('blacklistModel'));
        }

        
    /**
         * Handle the settings for email blacklist checks
         */
        
    public function actionApi_ip_access()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionApiIpAccess();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/api_ip_access'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Api settings'),
                    
    Yii::t('settings''IP access'),
                )
            ));

            
    $this->render('api-ip-access'compact('model'));
        }

        
    /**
         * Handle the common settings for customers options
         */
        
    public function actionCustomer_common()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCustomerCommon();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (isset(
    Yii::app()->params['POST'][$model->modelName]['notification_message'])) {
                    
    $model->notification_message Yii::app()->ioFilter->purify(Yii::app()->params['POST'][$model->modelName]['notification_message']);
                }

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_common'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Common')
                )
            ));

            
    $model->fieldDecorator->onHtmlOptionsSetup = array($this'_setupEditorOptions');

            
    $this->render('customer-common'compact('model'));
        }

        
    /**
         * Handle the settings for customer server options
         */
        
    public function actionCustomer_servers()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerServers();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_servers'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Servers')
                )
            ));

            
    $this->render('customer-servers'compact('model'));
        }

        
    /**
         * Handle the settings for customer domains options
         */
        
    public function actionCustomer_domains()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $tracking = new OptionCustomerTrackingDomains();
            
    $sending  = new OptionCustomerSendingDomains();

            if (
    $request->isPostRequest) {

                
    $tracking->attributes = (array)$request->getPost($tracking->modelName, array());
                
    $sending->attributes  = (array)$request->getPost($sending->modelName, array());

                if (!
    $tracking->save() || !$sending->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'models'     => compact('tracking''sending'),
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_domains'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Domains')
                )
            ));

            
    $this->render('customer-domains'compact('tracking''sending'));
        }

        
    /**
         * Handle the settings for customer lists options
         */
        
    public function actionCustomer_lists()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerLists();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_lists'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Lists')
                )
            ));

            
    $this->render('customer-lists'compact('model'));
        }

        
    /**
         * Handle the settings for customer registration options
         */
        
    public function actionCustomer_registration()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;

            
    $model = new OptionCustomerRegistration();
            
    $model->fieldDecorator->onHtmlOptionsSetup = array($this'_setupEditorOptions');

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (isset(
    Yii::app()->params['POST'][$model->modelName]['welcome_email_content'])) {
                    
    $model->welcome_email_content Yii::app()->ioFilter->purify(Yii::app()->params['POST'][$model->modelName]['welcome_email_content']);
                }

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_registration'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Registration')
                )
            ));

            
    $this->render('customer-registration'compact('model'));
        }

        
    /**
         * Handle the settings for customer sending options
         */
        
    public function actionCustomer_sending()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerSending();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (isset(
    Yii::app()->params['POST'][$model->modelName]['quota_notify_email_content'])) {
                    
    $model->quota_notify_email_content Yii::app()->ioFilter->purify(Yii::app()->params['POST'][$model->modelName]['quota_notify_email_content']);
                }
                
                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_sending'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Sending')
                )
            ));

            
    $model->fieldDecorator->onHtmlOptionsSetup = array($this'_setupEditorOptions');

            
    $this->render('customer-sending'compact('model'));
        }

        
    /**
         * Handle the settings for customer quota counters options
         */
        
    public function actionCustomer_quota_counters()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerQuotaCounters();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_quota_counters'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Quota counters')
                )
            ));

            
    $this->render('customer-quota-counters'compact('model'));
        }

        
    /**
         * Handle the settings for customer campaigns options
         */
        
    public function actionCustomer_campaigns()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerCampaigns();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (isset(
    Yii::app()->params['POST'][$model->modelName]['email_footer'])) {
                    
    $model->email_footer Yii::app()->ioFilter->purify(Yii::app()->params['POST'][$model->modelName]['email_footer']);
                }

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_campaigns'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''Campaigns')
                )
            ));

            
    $model->fieldDecorator->onHtmlOptionsSetup = array($this'_addCustomerCampaignEmailFooterEditor');

            
    $this->render('customer-campaigns'compact('model'));
        }

        
    /**
         * Handle the settings for customer cdn options
         */
        
    public function actionCustomer_cdn()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCustomerCdn();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customer_cdn'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customers') => $this->createUrl('settings/customer_common'),
                    
    Yii::t('settings''CDN')
                )
            ));

            
    $this->render('customer-cdn'compact('model'));
        }

        
    /**
         * Handle the settings for campaign attachments
         */
        
    public function actionCampaign_attachments()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCampaignAttachment();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_attachments'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Attachments')
                )
            ));

            
    $this->render('campaign-attachments'compact('model'));
        }

        
    /**
         * Handle the settings for campaign available tags
         */
        
    public function actionCampaign_template_tags()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCampaignTemplateTag();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_template_tags'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Template tags')
                )
            ));

            
    $this->render('campaign-template-tags'compact('model'));
        }

        
    /**
         * Handle the settings for campaigns to exclude various ips from tracking(opens/clicks)
         */
        
    public function actionCampaign_exclude_ips_from_tracking()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCampaignExcludeIpsFromTracking();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_exclude_ips_from_tracking'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Exclude IPs from tracking')
                )
            ));

            
    $this->render('campaign-exclude-ips-from-tracking'compact('model'));
        }

        
    /**
         * Handle the settings for campaigns to blacklist various words from subject and/or content
         */
        
    public function actionCampaign_blacklist_words()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCampaignBlacklistWords();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_blacklist_words'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Blacklist words')
                )
            ));

            
    $this->render('campaign-blacklist-words'compact('model'));
        }

        
    /**
         * Handle the settings for campaign template engine options
         */
        
    public function actionCampaign_template_engine()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCampaignTemplateEngine();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_template_engine'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Template engine')
                )
            ));

            
    $this->render('campaign-template-engine'compact('model'));
        }
        
        
    /**
         * Handle the settings for misc campaign options
         */
        
    public function actionCampaign_misc()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCampaignMisc();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_misc'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaigns') => $this->createUrl('settings/campaign_attachments'),
                    
    Yii::t('settings''Miscellaneous')
                )
            ));

            
    $this->render('campaign-misc'compact('model'));
        }

        
    /**
         * Handle the settings for campaign options
         */
        
    public function actionCampaign_options()
        {
            
    $request Yii::app()->request;
            
    $notify Yii::app()->notify;
            
    $model = new OptionCampaignOptions();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/campaign_options'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings') => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Campaign options')
                )
            ));

            
    $this->render('campaign-options'compact('model'));
        }

        
    /**
         * Handle the settings for monetization options
         */
        
    public function actionMonetization()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionMonetizationMonetization();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/monetization'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Monetization') => $this->createUrl('settings/monetization'),
                )
            ));

            
    $this->render('monetization'compact('model'));
        }

        
    /**
         * Handle the settings for monetization orders
         */
        
    public function actionMonetization_orders()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionMonetizationOrders();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/monetization_orders'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Monetization') => $this->createUrl('settings/monetization'),
                    
    Yii::t('settings''Orders')
                )
            ));

            
    $this->render('monetization-orders'compact('model'));
        }

        
    /**
         * Handle the settings for monetization invoices
         */
        
    public function actionMonetization_invoices()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionMonetizationInvoices();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/monetization_invoices'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Monetization') => $this->createUrl('settings/monetization'),
                    
    Yii::t('settings''Invoices')
                )
            ));

            
    $this->render('monetization-invoices'compact('model'));
        }

        
    /**
         * Handle the settings for redis queue
         */
        
    public function actionRedis_queue()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionRedisQueue();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    try {
                        
    Yii::app()->queue->size(DeliveryServer::DEFAULT_QUEUE_NAME);
                        
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                    } catch (
    Exception $e) {
                        
    $notify->addError(Yii::t('settings''Unable to connect to redis server with the provided details!'));
                    }
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/redis_queue'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Queue') => $this->createUrl('settings/redis_queue'),
                    
    Yii::t('settings''Redis')
                )
            ));

            
    $this->render('redis-queue'compact('model'));
        }

        
    /**
         * Handle the settings for license options
         */
        
    public function actionLicense()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $options Yii::app()->options;
            
    $model   = new OptionLicense();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                
    $url     'http://www.mailwizz.com/api/license/verify';
                
    $request AppInitHelper::simpleCurlPost($url, array('key' => $model->purchase_code));
                
    $error   '';

                if (
    $request['status'] == 'error') {
                    
    $error $request['message'];
                } else {
                    
    $response CJSON::decode($request['message'], true);
                    if (empty(
    $response['status'])) {
                        
    $error Yii::t('settings''Invalid response, please try again later!');
                    } elseif (
    $response['status'] != 'success') {
                        
    $error $response['message'];
                        
    $options->set('system.license.error_message'$error);
                    }
                }

                if (empty(
    $error)) {
                    if (!
    $model->save()) {
                        
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                    } else {
                        
    $notify->clearAll();
                        
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                        
    $options->set('system.license.error_message''');
                        
    $options->set("system.common.site_status""online");
                        
    $options->set("system.common.api_status""online");
                    }
                } else {
                    
    $notify->addError($error);
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/license'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''License')
                )
            ));

            
    $this->render('license'compact('model'));
        }

        
    /**
         * Handle the settings for CDN options
         */
        
    public function actionCdn()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCdn();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/cdn'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''CDN')
                )
            ));

            
    $this->render('cdn'compact('model'));
        }

        
    /**
         * Handle the settings for CDN options
         */
        
    public function actionSpf_dkim()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionSpfDkim();

            if (
    $request->isPostRequest) {
                
                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    $disabledDomains = array();
                
    $keys    = array('dkim_private_key''dkim_public_key');
                
    $domains SendingDomain::model()->findAllByAttributes(array('verified' => SendingDomain::TEXT_YES));
                foreach (
    $domains as $domain) {
                    foreach (
    $keys as $key) {
                        if (
    $domain->$key != $model->$key) {
                            
    $domain->dkim_private_key $model->dkim_private_key;
                            
    $domain->dkim_public_key  $model->dkim_public_key;
                            
    $domain->verified         SendingDomain::TEXT_NO;
                            
    $domain->save(false);
                            
    $disabledDomains[] = $domain->name;
                            break;
                        }
                    }
                }
                
                
    $disabledDomains array_filter(array_unique($disabledDomains));
                
                if (
    $disabledDomains) {
                    
    $notify->addWarning(Yii::t('app''Please note that following sending domains have been disabled because their dkim signature is not valid anymore: {domains}', array(
                        
    '{domains}' => implode(', '$disabledDomains)
                    )));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/spf_dkim'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Spf/Dkim')
                )
            ));

            
    $this->render('spf-dkim'compact('model'));
        }

        
    /**
         * Handle the settings for customization options
         */
        
    public function actionCustomization()
        {
            
    $request Yii::app()->request;
            
    $notify  Yii::app()->notify;
            
    $model   = new OptionCustomization();

            if (
    $request->isPostRequest) {

                
    $model->unsetAttributes();
                
    $model->attributes = (array)$request->getPost($model->modelName, array());

                if (!
    $model->save()) {
                    
    $notify->addError(Yii::t('app''Your form contains a few errors, please fix them and try again!'));
                } else {
                    
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));
                }

                
    Yii::app()->hooks->doAction('controller_action_save_data'$collection = new CAttributeCollection(array(
                    
    'controller' => $this,
                    
    'success'    => $notify->hasSuccess,
                    
    'model'      => $model,
                )));

                if (
    $collection->success) {
                    
    $this->redirect(array('settings/customization'));
                }
            }

            
    $this->setData(array(
                
    'pageMetaTitle'     => $this->getData('pageMetaTitle') . ' | ' Yii::t('settings''Settings'),
                
    'pageHeading'       => Yii::t('settings''Settings'),
                
    'pageBreadcrumbs'   => array(
                    
    Yii::t('settings''Settings')  => $this->createUrl('settings/index'),
                    
    Yii::t('settings''Customization')
                )
            ));

            
    $this->render('customization'compact('model'));
        }

        
    /**
         * Display the modal window with for htaccess
         */
        
    public function actionHtaccess_modal()
        {
            if (!
    Yii::app()->request->isAjaxRequest) {
                
    $this->redirect(array('settings/index'));
            }
            
    $this->renderPartial('_htaccess_modal');
        }

        
    /**
         * Tries to write the contents of the htaccess file
         */
        
    public function actionWrite_htaccess()
        {
            if (!
    Yii::app()->request->isAjaxRequest) {
                
    $this->redirect(array('settings/index'));
            }

            if (!
    AppInitHelper::isModRewriteEnabled()) {
                return 
    $this->renderJson(array('result' => 'error''message' => Yii::t('settings''Mod rewrite is not enabled on this host. Please enable it in order to use clean urls!')));
            }

            if (!
    is_file($file Yii::getPathOfAlias('root') . '/.htaccess')) {
                if ([email protected]
    touch($file)) {
                    return 
    $this->renderJson(array('result' => 'error''message' => Yii::t('settings''Unable to create the file: {file}. Please create the file manually and paste the htaccess contents into it.', array('{file}' => $file))));
                }
            }

            if ([email protected]
    file_put_contents($file$this->getHtaccessContent())) {
                return 
    $this->renderJson(array('result' => 'error''message' => Yii::t('settings''Unable to write htaccess contents into the file: {file}. Please create the file manually and paste the htaccess contents into it.', array('{file}' => $file))));
            }

            return 
    $this->renderJson(array('result' => 'success''message' => Yii::t('settings''The htaccess file has been successfully created. Do not forget to save the changes!')));
        }

        
    /**
         * Will generate the contents of the htaccess file which later
         * should be written in the document root of the application
         */
        
    protected function getHtaccessContent()
        {
            
    $apps       Yii::app()->apps;
            
    $webApps    $apps->getWebApps();
            
    $baseUrl    '/' trim($apps->getAppUrl('frontend'nullfalsetrue), '/') . '/';
            
    $baseUrl    str_replace('//''/'$baseUrl);

            if ((
    $index array_search('frontend'$webApps)) !== false) {
                unset(
    $webApps[$index]);
            }

            return 
    $this->renderPartial('_htaccess'compact('webApps''baseUrl'), true);
        }

        
    /**
         * Callback method to set the editor options for email settings
         */
        
    public function _setupEditorOptions(CEvent $event)
        {
            if (!
    in_array($event->params['attribute'], array('common''notification_message''welcome_email_content''quota_notify_email_content'))) {
                return;
            }

            
    $options = array();
            if (
    $event->params['htmlOptions']->contains('wysiwyg_editor_options')) {
                
    $options = (array)$event->params['htmlOptions']->itemAt('wysiwyg_editor_options');
            }

            
    $options['id']     = CHtml::activeId($event->sender->owner$event->params['attribute']);
            
    $options['height'] = 500;

            if (
    $event->params['attribute'] == 'common') {
                
    $options['fullPage'] = true;
                
    $options['allowedContent'] = true;
            }

            if (
    $event->params['attribute'] == 'notification_message') {
                
    $options['height'] = 100;
            }

            if (
    $event->params['attribute'] == 'welcome_email_content') {
                
    $options['height'] = 300;
            }
            
            if (
    $event->params['attribute'] == 'quota_notify_email_content') {
                
    $options['height'] = 200;
            }

            
    $event->params['htmlOptions']->add('wysiwyg_editor_options'$options);
        }

        
    /**
         * Callback method to set the editor options for email footer in campaigns
         */
        
    public function _addCustomerCampaignEmailFooterEditor(CEvent $event)
        {
            if (!
    in_array($event->params['attribute'], array('email_footer'))) {
                return;
            }

            
    $options = array();
            if (
    $event->params['htmlOptions']->contains('wysiwyg_editor_options')) {
                
    $options = (array)$event->params['htmlOptions']->itemAt('wysiwyg_editor_options');
            }
            
    $options['id'] = CHtml::activeId($event->sender->owner$event->params['attribute']);
            
    $event->params['htmlOptions']->add('wysiwyg_editor_options'$options);
        }
    }
    here is the OptionLicense.php
    PHP:
    <?php defined('MW_PATH') || exit('No direct script access allowed');

    /**
     * OptionLicense
     *

    class OptionLicense extends OptionBase
    {
        // settings category
        protected $_categoryName = 'system.license';

        public $first_name;

        public $last_name;

        public $email;

        public $market_place;

        public $purchase_code;

        public function rules()
        {
            $rules = array(
                array('first_name, last_name, email, market_place, purchase_code', 'required'),
                array('first_name, last_name, email, market_place, purchase_code', 'length', 'max' => 255),
                array('email', 'email', 'validateIDN' => true),
            );

            return CMap::mergeArray($rules, parent::rules());
        }

        public function attributeLabels()
        {
            $labels = array(
                'first_name'    => Yii::t('settings', 'First name'),
                'last_name'     => Yii::t('settings', 'Last name'),
                'email'         => Yii::t('settings', 'Email'),
                'market_place'  => Yii::t('settings', 'Market place'),
                'purchase_code' => Yii::t('settings', 'Purchase code'),
            );

            return CMap::mergeArray($labels, parent::attributeLabels());
        }

        public function attributeHelpTexts()
        {
            $texts = array();
            return CMap::mergeArray($texts, parent::attributeHelpTexts());
        }
    }
     
  2. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    Just do at line 237


    Code:
    <?php
    
    base6473_encode("Script is mine");
    
    
    This should work.
     
  3. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,456
    Likes Received:
    11,161
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    What's this script from?
     
  4. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    on which file
     
  5. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    mailwizz
     
    • Thanks Thanks x 1
  6. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    Oh yeah you are expert with "mailwizz" I'll leave it to you buddy.
     
  7. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    i do like this
    replace
    PHP:
    $notify->addSuccess(Yii::t('app''Your form has been successfully saved!'));

    with your code but it didn't work because there is another file
    WelcomeController.php
    PHP:
    <?php defined('MW_INSTALLER_PATH') || exit('No direct script access allowed');

    /**
     * WelcomeController
     *
     * @package MailWizz EMA
     * @author Serban George Cristian <[email protected]>
     * @link http://www.mailwizz.com/
     * @copyright 2013-2017 MailWizz EMA (http://www.mailwizz.com)
     * @license http://www.mailwizz.com/license/
     * @since 1.0
     */
     
    class WelcomeController extends Controller
    {
        public function 
    actionIndex()
        {
            
    // start clean
            
    $_SESSION = array();
           
            
    $this->validateRequest();
           
            if (
    getSession('welcome')) {
                
    redirect('index.php?route=requirements');
            }
           
            
    $this->data['marketPlaces'] = $this->getMarketPlaces();
           
            
    $this->data['pageHeading'] = 'Welcome';
            
    $this->data['breadcrumbs'] = array(
                
    'Welcome' => 'index.php?route=welcome',
            );
           
            
    $this->render('welcome');
        }
       
        protected function 
    validateRequest()
        {
            if (!
    getPost('next')) {
                return;
            }
           
            
    $firstName      getPost('first_name');
            
    $lastName       getPost('last_name');
            
    $email          getPost('email');
            
    $marketPlace    getPost('market_place');
            
    $purchaseCode   getPost('purchase_code');

            if (empty(
    $firstName)) {
                
    $this->addError('first_name''Please supply your first name!');
            } elseif (
    strlen($firstName) < || strlen($firstName) > 100) {
                
    $this->addError('first_name''First name length must be between 2 and 100 chars!');
            }
           
            if (empty(
    $lastName)) {
                
    $this->addError('last_name''Please supply your last name!');
            } elseif (
    strlen($lastName) < || strlen($lastName) > 100) {
                
    $this->addError('last_name''Last name length must be between 2 and 100 chars!');
            }
           
            if (empty(
    $email)) {
                
    $this->addError('email''Please supply your email address!');
            } elseif (!
    filter_var($emailFILTER_VALIDATE_EMAIL)) {
                
    $this->addError('email''Please provide a valid email address!');
            }
           
            if (empty(
    $marketPlace)) {
                
    $this->addError('market_place''Please enter the market place from where you have bought the license!');
            }
           
            if (
    $marketPlace == 'envato' && empty($purchaseCode)) {
                
    $this->addError('purchase_code''Please enter the purchase code!');
            }
           
            if (
    $this->hasErrors()) {
                return 
    $this->addError('general''Your form has a few errors, please fix them and try again!');
            }
           
            
    // license check.
            
    $postData = array(
                
    'first_name'    => $firstName,
                
    'last_name'     => $lastName,
                
    'email'         => $email,
                
    'purchase_code' => $purchaseCode,
            );
           
            
    $url        'https://www.mailwizz.com/api/license/' $marketPlace;
            
    $request    AppInitHelper::simpleCurlPost($url$postData);
           
            if (
    $request['status'] == 'error') {
                return 
    $this->addError('general'$request['message']);
            }

            
    $response = @json_decode($request['message'], true);
            if (empty(
    $response['status'])) {
                return 
    $this->addError('general''Invalid response, please contact support!');
            }
           
            if (
    $response['status'] != 'success') {
                if (isset(
    $response['message'])) {
                    return 
    $this->addError('general'$response['message']);  
                }
                if (isset(
    $response['error']) && is_string($response['error'])) {
                    return 
    $this->addError('general'$response['error']);  
                }
                return 
    $this->addError('general''Invalid response, please contact support!');
            }
           
            
    $licenseData $response['license_data'];
           
            
    setSession('license_data'$licenseData);
            
    setSession('welcome'1);
        }
       
        public function 
    getMarketPlaces()
        {
            return array(
                
    'envato'    => 'Envato Market Places',
                
    'mailwizz'  => 'Mailwizz Website',
            );
        }

    }
     
  8. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,456
    Likes Received:
    11,161
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    I have no idea.
     
  9. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
  10. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    Don't be shy now... I know your work with nulled stuff...
     
    • Thanks Thanks x 1
  11. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,456
    Likes Received:
    11,161
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    Please no I swear I'm 12 and I've never....
     
  12. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    but he said he have no idea
     
  13. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    Yeah and when you've nulled google code in 1995 that was cool right. Well be a man! Do it again with this! You can do it!
     
  14. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    He is faking it like every 12th girl does.
     
  15. ased2235

    ased2235 Newbie

    Joined:
    Feb 23, 2017
    Messages:
    14
    Likes Received:
    1
    so can't you help me ?
     
  16. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    Buddy this is not type of forum that does this kind of thing. This is IM forum, not hacking forum. You should ask this question or on completely different type of forum.

    I've nulled a lot of scripts myself in the past but I'm in no way proud of that now when I realize what I've been doing to the original owners.

    In this case, if you can't afford $54 for that script you should probably pause and earn $54, buy a script and work as work your way up.
     
  17. scnonah

    scnonah Jr. VIP Jr. VIP

    Joined:
    Jan 2, 2017
    Messages:
    224
    Likes Received:
    124
    Gender:
    Male
  18. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,456
    Likes Received:
    11,161
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    Sigh. Gotta admit I can't do it.
     
    • Thanks Thanks x 1
  19. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,706
    Likes Received:
    1,036
    Occupation:
    Occupation
    Location:
    Location
    To me, it's important that you've tried.
     
    • Thanks Thanks x 1
  20. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,456
    Likes Received:
    11,161
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    I've tried and I failed, master.