Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.79 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.7.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (!(defined( '_CAN_LOAD_FILES_' ))) {
  15. exit( );
  16. }
  17.  
  18. class Emsetting extends Module
  19. {
  20. public function __construct()
  21. {
  22. $this->name = 'emsetting';
  23. $this->tab = 'others';
  24. $this->version = '1';
  25. $this->author = 'mypresta.ir';
  26. $this->bootstrap = true;
  27. parent::__construct( );
  28. $this->displayName = $this->l( 'THEME color SETTING' );
  29. $this->description = $this->l( 'Allows you config theme color' );
  30. $this->ps_versions_compliancy = array(
  31. 'min' => '1.6',
  32. 'max' => _PS_VERSION_
  33. );
  34. }
  35.  
  36. public function install()
  37. {
  38. 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' );
  39. }
  40.  
  41. public function uninstall()
  42. {
  43. 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( );
  44. }
  45.  
  46. public function getContent()
  47. {
  48. include_once dirname( __FILE__ ) . '/classes/ModuleActivation.php';
  49. $moduleLicense = new Serial( 4 );
  50.  
  51. if ($moduleLicense->validateModule( 'electromarket', 'bah_elec_2014', true ) !== true) {
  52. return $moduleLicense->licenseCodeForm( 'electromarket' ) . $moduleLicense->getRandomProducts( );
  53. }
  54.  
  55. $output = '';
  56.  
  57. if (Tools::isSubmit( 'submitModule' )) {
  58. Configuration::updateValue( 'MAIN_COLOR', Tools::getValue( 'main_color', '' ) );
  59. Configuration::updateValue( 'TEXT_COLOR', Tools::getValue( 'text_color', '' ) );
  60. Configuration::updateValue( 'RESPONCIVE_OK', (int) Tools::getValue( 'responcive_ok' ) );
  61. Configuration::updateValue( 'FARSI_FONT', (int) Tools::getValue( 'farsi_font' ) );
  62. Configuration::updateValue( 'LONG_NAME', (int) Tools::getValue( 'long_name' ) );
  63. Configuration::updateValue( 'UPD_DATE', (int) Tools::getValue( 'upd_date' ) );
  64. Configuration::updateValue( 'GREY_EFFECT', (int) Tools::getValue( 'grey_effect' ) );
  65. Configuration::updateValue( 'SEARCH_OTHER', (int) Tools::getValue( 'search_other' ) );
  66. Configuration::updateValue( 'HIDE_PRICE', (int) Tools::getValue( 'hide_price' ) );
  67. Configuration::updateValue( 'OLD_FEATURED', (int) Tools::getValue( 'old_featured' ) );
  68. Tools::redirectAdmin( $this->context->link->getAdminLink( 'AdminModules' ) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&conf=4&module_name=' . $this->name );
  69. $this->_clearCache( 'emsetting.tpl' );
  70. }
  71.  
  72. return $output . $this->renderForm( ) . $moduleLicense->getRandomProducts( );
  73. }
  74.  
  75. public function renderForm()
  76. {
  77. $fields_form = array( 'form' => array(
  78. 'legend' => array(
  79. ...................................................................................
  80. .................................................
  81. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement