*/ if(Configuration::get('SEI_BLOCK_pricewars2') == 1 || !extension_loaded('ionCube Loader') || ioncube_loader_iversion() < 100202 || PHP_VERSION_ID < 50600 || PHP_VERSION_ID > 70499){ class pricewars2 extends Module { public function __construct() { $this->name = 'pricewars2'; $this->version = 'x.x.x'; $this->author = 'SEIGI Grzegorz Zawadzki'; $this->need_instance = 1; parent::__construct(); $this->displayName = 'pricewars2'; $this->description = 'Nie można było zainstalować modułu / Unable to install module'; } public function install() { // Blokada jest tylko po to, ażeby klient napewno odinstalował moduł. // Znając życie, to nikt nie przeczyta tego do końca, a procedury instalacyjne muszę zostać wykonane Configuration::updateGlobalValue('SEI_BLOCK_pricewars2', 1); return parent::install(); } public function uninstall() { Configuration::deleteByName('SEI_BLOCK_pricewars2'); return parent::uninstall(); } public function getContent() { $minimum_io_v = '10.2.2'; $is_ok = true; $return = ''; $return .= '
Prosimy o zapoznanie się z wymagniami modułu Więcej informacji na temat wymagań zanajduje się pod tym adresem
'; $ic_version = 0; if(!function_exists('ioncube_loader_iversion') || !function_exists('ioncube_loader_version')){ $ic_message = 'BŁĄD: IonCube jest albo bardzo bardzo stary, albo w ogóle nie jest zainstalowany'; $is_ok = false; }else if(intval('100202') > ioncube_loader_iversion()){ $ic_version = ioncube_loader_iversion(); $ic_message = 'BŁĄD: Zainstalowana wersja IonCube Loader jest zbyt stara.'; $is_ok = false; } else { $ic_version = ioncube_loader_iversion(); $ic_message = 'OK: Wersja IonCube Loader jest odpowiednia'; } if(PHP_VERSION_ID < intval('50600')){ $php_message = 'BŁĄD: Wersja jest zbyt stara. '; $is_ok = false; } elseif(PHP_VERSION_ID > intval('70499')){ $php_message = 'BŁĄD: Wersja jest zbyt wysoka. Jeszcze jej nie wspieramy. '; $is_ok = false; } else { $php_message = 'OK: Wersja jest odpowiednia'; } $return .= '| Wymagana | Zainstalowana | Status | |
|---|---|---|---|
| Ioncube | '.$minimum_io_v.' | '.implode('.', array_map('intval',str_split(str_pad($ic_version, 6, 0, STR_PAD_LEFT),2))).' | '. $ic_message .' |
| PHP | 5.6.0 - 7.4.99 | '.phpversion(). ' | '.$php_message.' |
Testing {$domain} / IP: ".gethostbyname($domain).': '; $return .= (Tools::file_get_contents('http://'.$domain.'/xyz.txt') == 'xyz' ? 'Connection OK' : 'Not xyz - connection error'); $return .= "
"; }; $return .= $test_xyz('pl.seigi.eu'); $return .= $test_xyz('s1.license.seigi.eu'); $return .= $test_xyz('s2.license.seigi.eu'); if($is_ok && Configuration::get('SEI_BLOCK_seigirequestreview') == 1){ $return .= 'Wszystko wydaje się być OK. Prosimy odinstalować i zainstalować moduł ponownie!!!!!!!!'; } else { $return .= 'Prosimy poprawić błędy/problemy i zainstalować ponownie moduł. Prosimy odinstalować i zainstalować moduł ponownie'; } $return .= '