Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.6.0
- * @ Author : DeZender
- * @ Release on : 02.06.2013
- * @ Official site : http://DeZender.Net
- *
- */
- if (!defined( '_PS_VERSION_' )) {
- exit( );
- }
- class DMTCountDown extends Module {
- public $prefix = null;
- public function __construct() {
- $this->name = 'dmtcountdown';
- $this->tab = 'others';
- $this->version = '1.0';
- $this->author = 'DMT - Development Team';
- $this->prefix = strtoupper( $this->name );
- $this->need_instance = 0;
- parent::__construct( );
- $this->displayName = $this->l( 'Count Down Banner' );
- $this->description = $this->l( 'Display Banners with count down' );
- $this->confirmUninstall = $this->l( 'Are you sure you want to uninstall?' );
- $this->setLisence( 'rezvanghab.ir' );
- }
- public function setLisence($domain = false) {
- if (!$domain) {
- return false;
- }
- if (( Tools::getshopdomain( ) != $domain && Tools::getshopdomain( ) != 'www.' . $domain )) {
- echo '' . '<div style=\'background:#FFBABA;border:1px solid #CC0000;padding:10px;\'>
- Lisence for module <strong>' . $this->displayName . '</strong> is not valid.<br />
- Please purchase lisence for new domain.<br />
- <a href=\'http://www.prestastore.ir\' target=\'_blank\'>www.prestastore.ir</a>
- </div>';
- exit( );
- }
- }
- public function install() {
- if (!$this->installConfig( )) {
- return false;
- }
- if (!$this->installDb( )) {
- return false;
- }
- $id = Tab::getidfromclassname( 'AdminParentModules' );
- if (!$this->addTab( $this->name, $this->name, 'Count down banners', 'AdminCountDown', $id )) {
- return false;
- }
- $this->setTabName( );
- if (( !parent::install( ) || !$this->registerHook( 'displayHome' ) )) {
- return false;
- }
- return true;
- }
- public function uninstall() {
- if (!$this->uninstallConfig( )) {
- return false;
- }
- if (!$this->uninstallDb( )) {
- return false;
- }
- if (!$this->removeTab( 'AdminCountDown' )) {
- return false;
- }
- if (!parent::uninstall( )) {
- return false;
- }
- return true;
- }
- .......................................................
- ....................
- .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement