Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.7.0
- * @ Author : DeZender
- * @ Release on : 22.06.2017
- * @ Official site : http://DeZender.Net
- *
- */
- if (!(defined( '_CAN_LOAD_FILES_' ))) {
- exit( );
- }
- class Emsetting extends Module
- {
- public function __construct()
- {
- $this->name = 'emsetting';
- $this->tab = 'others';
- $this->version = '1';
- $this->author = 'mypresta.ir';
- $this->bootstrap = true;
- parent::__construct( );
- $this->displayName = $this->l( 'THEME color SETTING' );
- $this->description = $this->l( 'Allows you config theme color' );
- $this->ps_versions_compliancy = array(
- 'min' => '1.6',
- 'max' => _PS_VERSION_
- );
- }
- public function install()
- {
- return parent::install( ) && Configuration::updateValue( 'MAIN_COLOR', '#666666' ) && Configuration::updateValue( 'RESPONCIVE_OK', 1 ) && Configuration::updateValue( 'FARSI_FONT', 1 ) && Configuration::updateValue( 'LONG_NAME', 0 ) && Configuration::updateValue( 'UPD_DATE', 1 ) && Configuration::updateValue( 'GREY_EFFECT', 1 ) && Configuration::updateValue( 'SEARCH_OTHER', 0 ) && Configuration::updateValue( 'TEXT_COLOR', '#ffffff' ) && Configuration::updateValue( 'HIDE_PRICE', 0 ) && Configuration::updateValue( 'OLD_FEATURED', 1 ) && Configuration::updateValue( 'OLDI', 1 ) && $this->registerHook( 'DisplayHeader' );
- }
- public function uninstall()
- {
- return Configuration::deleteByName( 'MAIN_COLOR' ) && Configuration::deleteByName( 'RESPONCIVE_OK' ) && Configuration::deleteByName( 'OLDI' ) && Configuration::deleteByName( 'FARSI_FONT' ) && Configuration::deleteByName( 'TEXT_COLOR' ) && Configuration::deleteByName( 'LONG_NAME' ) && Configuration::deleteByName( 'UPD_DATE' ) && Configuration::deleteByName( 'GREY_EFFECT' ) && Configuration::deleteByName( 'SEARCH_OTHER' ) && Configuration::deleteByName( 'HIDE_PRICE' ) && Configuration::deleteByName( 'OLD_FEATURED' ) && parent::uninstall( );
- }
- public function getContent()
- {
- include_once dirname( __FILE__ ) . '/classes/ModuleActivation.php';
- $moduleLicense = new Serial( 4 );
- if ($moduleLicense->validateModule( 'electromarket', 'bah_elec_2014', true ) !== true) {
- return $moduleLicense->licenseCodeForm( 'electromarket' ) . $moduleLicense->getRandomProducts( );
- }
- $output = '';
- if (Tools::isSubmit( 'submitModule' )) {
- Configuration::updateValue( 'MAIN_COLOR', Tools::getValue( 'main_color', '' ) );
- Configuration::updateValue( 'TEXT_COLOR', Tools::getValue( 'text_color', '' ) );
- Configuration::updateValue( 'RESPONCIVE_OK', (int) Tools::getValue( 'responcive_ok' ) );
- Configuration::updateValue( 'FARSI_FONT', (int) Tools::getValue( 'farsi_font' ) );
- Configuration::updateValue( 'LONG_NAME', (int) Tools::getValue( 'long_name' ) );
- Configuration::updateValue( 'UPD_DATE', (int) Tools::getValue( 'upd_date' ) );
- Configuration::updateValue( 'GREY_EFFECT', (int) Tools::getValue( 'grey_effect' ) );
- Configuration::updateValue( 'SEARCH_OTHER', (int) Tools::getValue( 'search_other' ) );
- Configuration::updateValue( 'HIDE_PRICE', (int) Tools::getValue( 'hide_price' ) );
- Configuration::updateValue( 'OLD_FEATURED', (int) Tools::getValue( 'old_featured' ) );
- Tools::redirectAdmin( $this->context->link->getAdminLink( 'AdminModules' ) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&conf=4&module_name=' . $this->name );
- $this->_clearCache( 'emsetting.tpl' );
- }
- return $output . $this->renderForm( ) . $moduleLicense->getRandomProducts( );
- }
- public function renderForm()
- {
- $fields_form = array( 'form' => array(
- 'legend' => array(
- ...................................................................................
- .................................................
- ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement