Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.75 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.  
  15. class ControllerExtensionModuleMegasliderpro extends Controller
  16. {
  17. private $error = array( );
  18. public $aleksey_20 = false;
  19. public $aleksey_40 = false;
  20. public $aleksey_34 = '';
  21. public $activation_key_expires = null;
  22. public $secret_key = 'Hx0wEkHxyEPLxpYCdsGX';
  23. public $secret_key_dec = 'Hx0wEkHxyEPLxpYCdsGX1111';
  24. public $aleksey_6 = 'http://validator.waterfilter.in.ua/api.php';
  25. public $remote_port = 80;
  26. public $remote_timeout = 20;
  27. public $local_ua = 'PHP code protect';
  28. public $aleksey_18 = false;
  29. public $use_expires = false;
  30. public $local_key_storage = 'filesystem';
  31. public $aleksey_5 = './';
  32. public $aleksey_24 = 'newstore.php';
  33. public $local_key_transport_order = 'scf';
  34. public $local_key_delay_period = 1;
  35. public $local_key_last = null;
  36. public $release_date = '2016-11-18';
  37. public $user_name = '';
  38. public $status_messages = array(
  39. 'status_1' => '<span style="color:green;">Лицензия Активна. Спасибо! / License activity. Thank you!</span>',
  40. 'status_2' => 'Срок закончился. / The term ended.',
  41. 'status_3' => 'Ожидает повторной активации. / Pending re-activation.',
  42. 'status_4' => 'License suspended.',
  43. 'localhost' => 'Активна на компе / Is active on a computer',
  44. 'pending' => 'Ожидает активации. / Awaiting activation',
  45. 'download_access_expired' => 'Неверный ключ / Invalid key',
  46. 'missing_activation_key' => 'Укажите ключ. / Enter key.',
  47. 'could_not_obtain_local_key' => 'Невозможно получить ключ. / Unable to get the key.',
  48. 'maximum_delay_period_expired' => 'Ключ истек. / The key has expired.',
  49. 'local_key_tampering' => 'Ключ не действителен. / The key is not valid.',
  50. 'local_key_invalid_for_location' => 'Неверный ключ / Invalid key',
  51. 'missing_license_file' => 'Создайте файл и папки / Create files and folders:<br />',
  52. 'license_file_not_writable' => 'Сделайте права для записи 777 / Make the right to record 777<br />',
  53. 'invalid_local_key_storage' => 'не могу удалить я ключ, попросите автора модуля(шаблона) / I can not remove the key, ask the author of the module (template)',
  54. 'could_not_save_local_key' => 'ключ на могу записать, проверьте права на файл',
  55. 'activation_key_string_mismatch' => 'Неверный ключ / Invalid key'
  56. );
  57. private $trigger_delay_period = null;
  58.  
  59. public function install()
  60. {
  61. $this->load->model( 'megasliderpro/megaslider' );
  62. $this->model_megasliderpro_megaslider->CreateTable( );
  63. }
  64.  
  65. public function index()
  66. {
  67. $this->load->language( 'extension/module/megasliderpro' );
  68. $this->document->setTitle( $this->language->get( 'heading_title' ) );
  69. $this->load->model( 'extension/module' );
  70. $this->aleksey_5 = './';
  71. $this->aleksey_24 = 'newstore.php';
  72. $this->aleksey_6 = 'http://validator.waterfilter.in.ua/api.php';
  73. $query_key = $this->db->query( 'SELECT `license_key` FROM ' . DB_PREFIX . 'edit_key_product where `key`=\'local_key\'' );
  74. $query_row = $query_key->row;
  75. $lkey = $query_row['license_key'];
  76. if ($this->aleksey_18 && $this->aleksey_39( ) && $this->isWindows( ) && !(file_exists( $this->aleksey_5 . $this->aleksey_24 ))) {
  77. $this->aleksey_20 = true;
  78. }
  79. else if (empty( $lkey )) {
  80. $url = '';
  81. $this->response->redirect( $this->url->link( 'sale/callback/activation', 'token=' . $this->session->data['token'] . $url, 'SSL' ) );
  82. }
  83.  
  84. $this->aleksey_34 = $lkey;
  85. $this->aleksey_38( );
  86. if ($this->aleksey_20 && ($this->secret_key_dec == 'Hx0wEkHxyEPLxpYCdsGX1111')) {
  87. $license = true;
  88. }
  89. else {
  90. $url = '';
  91. $this->response->redirect( $this->url->link( 'sale/callback/activation', 'token=' . $this->session->data['token'] . $url, 'SSL' ) );
  92. }
  93.  
  94. if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate( )) {
  95. if (!(isset( $this->request->get['module_id'] ))) {
  96. $this->model_extension_module->addModule( 'megasliderpro', $this->request->post );
  97. }
  98. else {
  99. $this->model_extension_module->editModule( $this->request->get['module_id'], $this->request->post );
  100. }
  101.  
  102. $this->session->data['success'] = $this->language->get( 'text_success' );
  103. $this->response->redirect( $this->url->link( 'extension/extension', 'token=' . $this->session->data['token'] . '&type=module', true ) );
  104. }
  105.  
  106. $data['heading_title'] = $this->language->get( 'heading_title' );
  107. $data['text_edit'] = $this->language->get( 'text_edit' );
  108. $data['text_enabled'] = $this->language->get( 'text_enabled' );
  109. $data['text_disabled'] = $this->language->get( 'text_disabled' );
  110. $data['text_ocslideshow_slide'] = $this->language->get( 'text_ocslideshow_slide' );
  111. $data['entry_name'] = $this->language->get( 'entry_name' );
  112. $data['entry_limit'] = $this->language->get( 'entry_limit' );
  113. $data['entry_width'] = $this->language->get( 'entry_width' );
  114. $data['entry_small_width'] = $this->language->get( 'entry_small_width' );
  115. $data['entry_height'] = $this->language->get( 'entry_height' );
  116. $data['entry_small_height'] = $this->language->get( 'entry_small_height' );
  117. $data['entry_status'] = $this->language->get( 'entry_status' );
  118. $data['entry_banner'] = $this->language->get( 'entry_banner' );
  119. $data['entry_store'] = $this->language->get( 'entry_store' );
  120. $data['entry_effect'] = $this->language->get( 'entry_effect' );
  121. $data['button_save'] = $this->language->get( 'button_save' );
  122. $data['button_cancel'] = $this->language->get( 'button_cancel' );
  123.  
  124. if (isset( $this->error['warning'] )) {
  125. $data['error_warning'] = $this->error['warning'];
  126. }
  127. else {
  128. $data['error_warning'] = '';
  129. }
  130.  
  131. if (isset( $this->error['name'] )) {
  132. $data['error_name'] = $this->error['name'];
  133. }
  134. else {
  135. $data['error_name'] = '';
  136. }
  137.  
  138. if (isset( $this->error['width'] )) {
  139. $data['error_width'] = $this->error['width'];
  140. }
  141. else {
  142. $data['error_width'] = '';
  143. }
  144.  
  145. if (isset( $this->error['height'] )) {
  146. $data['error_height'] = $this->error['height'];
  147. }
  148. else {
  149. $data['error_height'] = '';
  150. }
  151.  
  152. $data['breadcrumbs'] = array( );
  153. $data['breadcrumbs'][] = array(
  154. 'text' => $this->language->get( 'text_home' ),
  155. 'href' => $this->url->link( 'common/dashboard', 'token=' . $this->session->data['token'], 'SSL' )
  156. );
  157. $data['breadcrumbs'][] = array(
  158. 'text' => $this->language->get( 'text_module' ),
  159. 'href' => $this->url->link( 'extension/extension', 'token=' . $this->session->data['token'] . '&type=module', true )
  160. );
  161.  
  162. if (!(isset( $this->request->get['module_id'] ))) {
  163. $data['breadcrumbs'][] = array(
  164. 'text' => $this->language->get( 'heading_title' ),
  165. 'href' => $this->url->link( 'extension/module/megasliderpro', 'token=' . $this->session->data['token'], 'SSL' )
  166. );
  167. }
  168. else {
  169. $data['breadcrumbs'][] = array(
  170. 'text' => $this->language->get( 'heading_title' ),
  171. 'href' => $this->url->link( 'extension/module/megasliderpro', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL' )
  172. );
  173. }
  174.  
  175. if (!(isset( $this->request->get['module_id'] ))) {
  176. $data['action'] = $this->url->link( 'extension/module/megasliderpro', 'token=' . $this->session->data['token'], 'SSL' );
  177. }
  178. else {
  179. $data['action'] = $this->url->link( 'extension/module/megasliderpro', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL' );
  180. }
  181.  
  182. $data['cancel'] = $this->url->link( 'extension/extension', 'token=' . $this->session->data['token'] . '&type=module', true );
  183.  
  184. if (isset( $this->request->get['module_id'] ) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
  185. $module_info = $this->model_extension_module->getModule( $this->request->get['module_id'] );
  186. }
  187.  
  188. if (isset( $this->request->post['name'] )) {
  189. $data['name'] = $this->request->post['name'];
  190. }
  191. else if (!(empty( $module_info ))) {
  192. $data['name'] = $module_info['name'];
  193. }
  194. else {
  195. $data['name'] = '';
  196. }
  197.  
  198. if (isset( $this->request->post['banner'] )) {
  199. $data['banner'] = $this->request->post['banner'];
  200. }
  201. else if (!(empty( $module_info ))) {
  202. $data['banner'] = $module_info['banner'];
  203. }
  204. else {
  205. $data['banner'] = 1;
  206. }
  207.  
  208. if (isset( $this->request->post['width'] )) {
  209. $data['width'] = $this->request->post['width'];
  210. }
  211. else if (!(empty( $module_info ))) {
  212. $data['width'] = $module_info['width'];
  213. }
  214. else {
  215. $data['width'] = '';
  216. }
  217.  
  218. if (isset( $this->request->post['height'] )) {
  219. $data['height'] = $this->request->post['height'];
  220. }
  221. else if (!(empty( $module_info ))) {
  222. $data['height'] = $module_info['height'];
  223. }
  224. else {
  225. $data['height'] = '';
  226. }
  227.  
  228. if (isset( $this->request->post['status'] )) {
  229. $data['status'] = $this->request->post['status'];
  230. }
  231. else if (!(empty( $module_info ))) {
  232. $data['status'] = $module_info['status'];
  233. }
  234. else {
  235. $data['status'] = '';
  236. }
  237.  
  238. if (!(isset( $this->request->get['module_id'] ))) {
  239. $data['link_to_banner'] = $this->url->link( 'extension/module/megasliderpro/form', 'token=' . $this->session->data['token'], 'SSL' );
  240. }
  241. else {
  242. $data['link_to_banner'] = $this->url->link( 'extension/module/megasliderpro/form', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL' );
  243. }
  244.  
  245. $this->load->model( 'localisation/language' );
  246. $this->load->model( 'megasliderpro/megaslider' );
  247. $data['languages'] = $this->model_localisation_language->getLanguages( );
  248. $data['megasliders'] = $this->model_megasliderpro_megaslider->getmegasliderpros( );
  249. $data['header'] = $this->load->controller( 'common/header' );
  250. $data['column_left'] = $this->load->controller( 'common/column_left' );
  251. $data['footer'] = $this->load->controller( 'common/footer' );
  252. $this->response->setOutput( $this->load->view( 'extension/module/megasliderpro/megasliderpro.tpl', $data ) );
  253. }
  254.  
  255. protected function validate()
  256. {
  257. if (!($this->user->hasPermission( 'modify', 'extension/module/megasliderpro' ))) {
  258. $this->error['warning'] = $this->language->get( 'error_permission' );
  259. ...........................................................................
  260. ...............................
  261. ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement