Advertisement
Guest User

Untitled

a guest
Mar 7th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (!defined( '_PS_VERSION_' )) {
  15. exit( );
  16. }
  17.  
  18. class DMTCountDown extends Module {
  19. public $prefix = null;
  20.  
  21. public function __construct() {
  22. $this->name = 'dmtcountdown';
  23. $this->tab = 'others';
  24. $this->version = '1.0';
  25. $this->author = 'DMT - Development Team';
  26. $this->prefix = strtoupper( $this->name );
  27. $this->need_instance = 0;
  28. parent::__construct( );
  29. $this->displayName = $this->l( 'Count Down Banner' );
  30. $this->description = $this->l( 'Display Banners with count down' );
  31. $this->confirmUninstall = $this->l( 'Are you sure you want to uninstall?' );
  32. $this->setLisence( 'rezvanghab.ir' );
  33. }
  34.  
  35. public function setLisence($domain = false) {
  36. if (!$domain) {
  37. return false;
  38. }
  39.  
  40.  
  41. if (( Tools::getshopdomain( ) != $domain && Tools::getshopdomain( ) != 'www.' . $domain )) {
  42. echo '' . '<div style=\'background:#FFBABA;border:1px solid #CC0000;padding:10px;\'>
  43. Lisence for module <strong>' . $this->displayName . '</strong> is not valid.<br />
  44. Please purchase lisence for new domain.<br />
  45. <a href=\'http://www.prestastore.ir\' target=\'_blank\'>www.prestastore.ir</a>
  46. </div>';
  47. exit( );
  48. }
  49.  
  50. }
  51.  
  52. public function install() {
  53. if (!$this->installConfig( )) {
  54. return false;
  55. }
  56.  
  57.  
  58. if (!$this->installDb( )) {
  59. return false;
  60. }
  61.  
  62. $id = Tab::getidfromclassname( 'AdminParentModules' );
  63.  
  64. if (!$this->addTab( $this->name, $this->name, 'Count down banners', 'AdminCountDown', $id )) {
  65. return false;
  66. }
  67.  
  68. $this->setTabName( );
  69.  
  70. if (( !parent::install( ) || !$this->registerHook( 'displayHome' ) )) {
  71. return false;
  72. }
  73.  
  74. return true;
  75. }
  76.  
  77. public function uninstall() {
  78. if (!$this->uninstallConfig( )) {
  79. return false;
  80. }
  81.  
  82.  
  83. if (!$this->uninstallDb( )) {
  84. return false;
  85. }
  86.  
  87.  
  88. if (!$this->removeTab( 'AdminCountDown' )) {
  89. return false;
  90. }
  91.  
  92.  
  93. if (!parent::uninstall( )) {
  94. return false;
  95. }
  96.  
  97. return true;
  98. }
  99. .......................................................
  100. ....................
  101. .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement