/admin/controller/setting/setting.php

https://gitlab.com/hazelnuts23/unitedfoodstuff · PHP · 1162 lines · 976 code · 186 blank · 0 comment · 279 complexity · c750aed2b6294cd01f26ed5480983e59 MD5 · raw file

  1. <?php
  2. class ControllerSettingSetting extends Controller {
  3. private $error = array();
  4. public function index() {
  5. $this->load->language('setting/setting');
  6. $this->document->setTitle($this->language->get('heading_title'));
  7. $this->load->model('setting/setting');
  8. if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {
  9. $this->model_setting_setting->editSetting('config', $this->request->post);
  10. if ($this->config->get('config_currency_auto')) {
  11. $this->load->model('localisation/currency');
  12. $this->model_localisation_currency->refresh();
  13. }
  14. $this->session->data['success'] = $this->language->get('text_success');
  15. $this->response->redirect($this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL'));
  16. }
  17. $data['heading_title'] = $this->language->get('heading_title');
  18. $data['text_edit'] = $this->language->get('text_edit');
  19. $data['text_enabled'] = $this->language->get('text_enabled');
  20. $data['text_disabled'] = $this->language->get('text_disabled');
  21. $data['text_select'] = $this->language->get('text_select');
  22. $data['text_none'] = $this->language->get('text_none');
  23. $data['text_yes'] = $this->language->get('text_yes');
  24. $data['text_no'] = $this->language->get('text_no');
  25. $data['text_product'] = $this->language->get('text_product');
  26. $data['text_review'] = $this->language->get('text_review');
  27. $data['text_voucher'] = $this->language->get('text_voucher');
  28. $data['text_tax'] = $this->language->get('text_tax');
  29. $data['text_account'] = $this->language->get('text_account');
  30. $data['text_checkout'] = $this->language->get('text_checkout');
  31. $data['text_stock'] = $this->language->get('text_stock');
  32. $data['text_affiliate'] = $this->language->get('text_affiliate');
  33. $data['text_return'] = $this->language->get('text_return');
  34. $data['text_shipping'] = $this->language->get('text_shipping');
  35. $data['text_payment'] = $this->language->get('text_payment');
  36. $data['text_mail'] = $this->language->get('text_mail');
  37. $data['text_smtp'] = $this->language->get('text_smtp');
  38. $data['text_google_analytics'] = $this->language->get('text_google_analytics');
  39. $data['text_google_captcha'] = $this->language->get('text_google_captcha');
  40. $data['entry_name'] = $this->language->get('entry_name');
  41. $data['entry_owner'] = $this->language->get('entry_owner');
  42. $data['entry_address'] = $this->language->get('entry_address');
  43. $data['entry_geocode'] = $this->language->get('entry_geocode');
  44. $data['entry_email'] = $this->language->get('entry_email');
  45. $data['entry_telephone'] = $this->language->get('entry_telephone');
  46. $data['entry_fax'] = $this->language->get('entry_fax');
  47. $data['entry_image'] = $this->language->get('entry_image');
  48. $data['entry_open'] = $this->language->get('entry_open');
  49. $data['entry_comment'] = $this->language->get('entry_comment');
  50. $data['entry_location'] = $this->language->get('entry_location');
  51. $data['entry_meta_title'] = $this->language->get('entry_meta_title');
  52. $data['entry_meta_description'] = $this->language->get('entry_meta_description');
  53. $data['entry_meta_keyword'] = $this->language->get('entry_meta_keyword');
  54. $data['entry_layout'] = $this->language->get('entry_layout');
  55. $data['entry_template'] = $this->language->get('entry_template');
  56. $data['entry_country'] = $this->language->get('entry_country');
  57. $data['entry_zone'] = $this->language->get('entry_zone');
  58. $data['entry_language'] = $this->language->get('entry_language');
  59. $data['entry_admin_language'] = $this->language->get('entry_admin_language');
  60. $data['entry_currency'] = $this->language->get('entry_currency');
  61. $data['entry_currency_auto'] = $this->language->get('entry_currency_auto');
  62. $data['entry_length_class'] = $this->language->get('entry_length_class');
  63. $data['entry_weight_class'] = $this->language->get('entry_weight_class');
  64. $data['entry_product_limit'] = $this->language->get('entry_product_limit');
  65. $data['entry_product_description_length'] = $this->language->get('entry_product_description_length');
  66. $data['entry_limit_admin'] = $this->language->get('entry_limit_admin');
  67. $data['entry_product_count'] = $this->language->get('entry_product_count');
  68. $data['entry_review'] = $this->language->get('entry_review');
  69. $data['entry_review_guest'] = $this->language->get('entry_review_guest');
  70. $data['entry_review_mail'] = $this->language->get('entry_review_mail');
  71. $data['entry_voucher_min'] = $this->language->get('entry_voucher_min');
  72. $data['entry_voucher_max'] = $this->language->get('entry_voucher_max');
  73. $data['entry_tax'] = $this->language->get('entry_tax');
  74. $data['entry_tax_default'] = $this->language->get('entry_tax_default');
  75. $data['entry_tax_customer'] = $this->language->get('entry_tax_customer');
  76. $data['entry_customer_online'] = $this->language->get('entry_customer_online');
  77. $data['entry_customer_group'] = $this->language->get('entry_customer_group');
  78. $data['entry_customer_group_display'] = $this->language->get('entry_customer_group_display');
  79. $data['entry_customer_price'] = $this->language->get('entry_customer_price');
  80. $data['entry_login_attempts'] = $this->language->get('entry_login_attempts');
  81. $data['entry_account'] = $this->language->get('entry_account');
  82. $data['entry_account_mail'] = $this->language->get('entry_account_mail');
  83. $data['entry_invoice_prefix'] = $this->language->get('entry_invoice_prefix');
  84. $data['entry_api'] = $this->language->get('entry_api');
  85. $data['entry_cart_weight'] = $this->language->get('entry_cart_weight');
  86. $data['entry_checkout_guest'] = $this->language->get('entry_checkout_guest');
  87. $data['entry_checkout'] = $this->language->get('entry_checkout');
  88. $data['entry_order_status'] = $this->language->get('entry_order_status');
  89. $data['entry_processing_status'] = $this->language->get('entry_processing_status');
  90. $data['entry_complete_status'] = $this->language->get('entry_complete_status');
  91. $data['entry_order_mail'] = $this->language->get('entry_order_mail');
  92. $data['entry_stock_display'] = $this->language->get('entry_stock_display');
  93. $data['entry_stock_warning'] = $this->language->get('entry_stock_warning');
  94. $data['entry_stock_checkout'] = $this->language->get('entry_stock_checkout');
  95. $data['entry_affiliate_approval'] = $this->language->get('entry_affiliate_approval');
  96. $data['entry_affiliate_auto'] = $this->language->get('entry_affiliate_auto');
  97. $data['entry_affiliate_commission'] = $this->language->get('entry_affiliate_commission');
  98. $data['entry_affiliate'] = $this->language->get('entry_affiliate');
  99. $data['entry_affiliate_mail'] = $this->language->get('entry_affiliate_mail');
  100. $data['entry_return'] = $this->language->get('entry_return');
  101. $data['entry_return_status'] = $this->language->get('entry_return_status');
  102. $data['entry_logo'] = $this->language->get('entry_logo');
  103. $data['entry_icon'] = $this->language->get('entry_icon');
  104. $data['entry_image_category'] = $this->language->get('entry_image_category');
  105. $data['entry_image_thumb'] = $this->language->get('entry_image_thumb');
  106. $data['entry_image_popup'] = $this->language->get('entry_image_popup');
  107. $data['entry_image_product'] = $this->language->get('entry_image_product');
  108. $data['entry_image_additional'] = $this->language->get('entry_image_additional');
  109. $data['entry_image_related'] = $this->language->get('entry_image_related');
  110. $data['entry_image_compare'] = $this->language->get('entry_image_compare');
  111. $data['entry_image_wishlist'] = $this->language->get('entry_image_wishlist');
  112. $data['entry_image_cart'] = $this->language->get('entry_image_cart');
  113. $data['entry_image_location'] = $this->language->get('entry_image_location');
  114. $data['entry_width'] = $this->language->get('entry_width');
  115. $data['entry_height'] = $this->language->get('entry_height');
  116. $data['entry_ftp_hostname'] = $this->language->get('entry_ftp_hostname');
  117. $data['entry_ftp_port'] = $this->language->get('entry_ftp_port');
  118. $data['entry_ftp_username'] = $this->language->get('entry_ftp_username');
  119. $data['entry_ftp_password'] = $this->language->get('entry_ftp_password');
  120. $data['entry_ftp_root'] = $this->language->get('entry_ftp_root');
  121. $data['entry_ftp_status'] = $this->language->get('entry_ftp_status');
  122. $data['entry_mail_protocol'] = $this->language->get('entry_mail_protocol');
  123. $data['entry_mail_parameter'] = $this->language->get('entry_mail_parameter');
  124. $data['entry_mail_smtp_hostname'] = $this->language->get('entry_mail_smtp_hostname');
  125. $data['entry_mail_smtp_username'] = $this->language->get('entry_mail_smtp_username');
  126. $data['entry_mail_smtp_password'] = $this->language->get('entry_mail_smtp_password');
  127. $data['entry_mail_smtp_port'] = $this->language->get('entry_mail_smtp_port');
  128. $data['entry_mail_smtp_timeout'] = $this->language->get('entry_mail_smtp_timeout');
  129. $data['entry_mail_alert'] = $this->language->get('entry_mail_alert');
  130. $data['entry_secure'] = $this->language->get('entry_secure');
  131. $data['entry_shared'] = $this->language->get('entry_shared');
  132. $data['entry_robots'] = $this->language->get('entry_robots');
  133. $data['entry_file_max_size'] = $this->language->get('entry_file_max_size');
  134. $data['entry_file_ext_allowed'] = $this->language->get('entry_file_ext_allowed');
  135. $data['entry_file_mime_allowed'] = $this->language->get('entry_file_mime_allowed');
  136. $data['entry_maintenance'] = $this->language->get('entry_maintenance');
  137. $data['entry_password'] = $this->language->get('entry_password');
  138. $data['entry_encryption'] = $this->language->get('entry_encryption');
  139. $data['entry_seo_url'] = $this->language->get('entry_seo_url');
  140. $data['entry_compression'] = $this->language->get('entry_compression');
  141. $data['entry_error_display'] = $this->language->get('entry_error_display');
  142. $data['entry_error_log'] = $this->language->get('entry_error_log');
  143. $data['entry_error_filename'] = $this->language->get('entry_error_filename');
  144. $data['entry_google_analytics'] = $this->language->get('entry_google_analytics');
  145. $data['entry_google_captcha_public'] = $this->language->get('entry_google_captcha_public');
  146. $data['entry_google_captcha_secret'] = $this->language->get('entry_google_captcha_secret');
  147. $data['entry_status'] = $this->language->get('entry_status');
  148. $data['help_geocode'] = $this->language->get('help_geocode');
  149. $data['help_open'] = $this->language->get('help_open');
  150. $data['help_comment'] = $this->language->get('help_comment');
  151. $data['help_location'] = $this->language->get('help_location');
  152. $data['help_currency'] = $this->language->get('help_currency');
  153. $data['help_currency_auto'] = $this->language->get('help_currency_auto');
  154. $data['help_product_limit'] = $this->language->get('help_product_limit');
  155. $data['help_product_description_length'] = $this->language->get('help_product_description_length');
  156. $data['help_limit_admin'] = $this->language->get('help_limit_admin');
  157. $data['help_product_count'] = $this->language->get('help_product_count');
  158. $data['help_review'] = $this->language->get('help_review');
  159. $data['help_review_guest'] = $this->language->get('help_review_guest');
  160. $data['help_review_mail'] = $this->language->get('help_review_mail');
  161. $data['help_voucher_min'] = $this->language->get('help_voucher_min');
  162. $data['help_voucher_max'] = $this->language->get('help_voucher_max');
  163. $data['help_tax_default'] = $this->language->get('help_tax_default');
  164. $data['help_tax_customer'] = $this->language->get('help_tax_customer');
  165. $data['help_customer_online'] = $this->language->get('help_customer_online');
  166. $data['help_customer_group'] = $this->language->get('help_customer_group');
  167. $data['help_customer_group_display'] = $this->language->get('help_customer_group_display');
  168. $data['help_customer_price'] = $this->language->get('help_customer_price');
  169. $data['help_login_attempts'] = $this->language->get('help_login_attempts');
  170. $data['help_account'] = $this->language->get('help_account');
  171. $data['help_account_mail'] = $this->language->get('help_account_mail');
  172. $data['help_api'] = $this->language->get('help_api');
  173. $data['help_cart_weight'] = $this->language->get('help_cart_weight');
  174. $data['help_checkout_guest'] = $this->language->get('help_checkout_guest');
  175. $data['help_checkout'] = $this->language->get('help_checkout');
  176. $data['help_invoice_prefix'] = $this->language->get('help_invoice_prefix');
  177. $data['help_order_status'] = $this->language->get('help_order_status');
  178. $data['help_processing_status'] = $this->language->get('help_processing_status');
  179. $data['help_complete_status'] = $this->language->get('help_complete_status');
  180. $data['help_order_mail'] = $this->language->get('help_order_mail');
  181. $data['help_stock_display'] = $this->language->get('help_stock_display');
  182. $data['help_stock_warning'] = $this->language->get('help_stock_warning');
  183. $data['help_stock_checkout'] = $this->language->get('help_stock_checkout');
  184. $data['help_affiliate_approval'] = $this->language->get('help_affiliate_approval');
  185. $data['help_affiliate_auto'] = $this->language->get('help_affiliate_auto');
  186. $data['help_affiliate_commission'] = $this->language->get('help_affiliate_commission');
  187. $data['help_affiliate'] = $this->language->get('help_affiliate');
  188. $data['help_affiliate_mail'] = $this->language->get('help_affiliate_mail');
  189. $data['help_commission'] = $this->language->get('help_commission');
  190. $data['help_return'] = $this->language->get('help_return');
  191. $data['help_return_status'] = $this->language->get('help_return_status');
  192. $data['help_icon'] = $this->language->get('help_icon');
  193. $data['help_ftp_root'] = $this->language->get('help_ftp_root');
  194. $data['help_mail_protocol'] = $this->language->get('help_mail_protocol');
  195. $data['help_mail_parameter'] = $this->language->get('help_mail_parameter');
  196. $data['help_mail_smtp_hostname'] = $this->language->get('help_mail_smtp_hostname');
  197. $data['help_mail_alert'] = $this->language->get('help_mail_alert');
  198. $data['help_secure'] = $this->language->get('help_secure');
  199. $data['help_shared'] = $this->language->get('help_shared');
  200. $data['help_robots'] = $this->language->get('help_robots');
  201. $data['help_seo_url'] = $this->language->get('help_seo_url');
  202. $data['help_file_max_size'] = $this->language->get('help_file_max_size');
  203. $data['help_file_ext_allowed'] = $this->language->get('help_file_ext_allowed');
  204. $data['help_file_mime_allowed'] = $this->language->get('help_file_mime_allowed');
  205. $data['help_maintenance'] = $this->language->get('help_maintenance');
  206. $data['help_password'] = $this->language->get('help_password');
  207. $data['help_encryption'] = $this->language->get('help_encryption');
  208. $data['help_compression'] = $this->language->get('help_compression');
  209. $data['help_google_analytics'] = $this->language->get('help_google_analytics');
  210. $data['help_google_captcha'] = $this->language->get('help_google_captcha');
  211. $data['button_save'] = $this->language->get('button_save');
  212. $data['button_cancel'] = $this->language->get('button_cancel');
  213. $data['tab_general'] = $this->language->get('tab_general');
  214. $data['tab_store'] = $this->language->get('tab_store');
  215. $data['tab_local'] = $this->language->get('tab_local');
  216. $data['tab_option'] = $this->language->get('tab_option');
  217. $data['tab_image'] = $this->language->get('tab_image');
  218. $data['tab_ftp'] = $this->language->get('tab_ftp');
  219. $data['tab_mail'] = $this->language->get('tab_mail');
  220. $data['tab_server'] = $this->language->get('tab_server');
  221. $data['tab_google'] = $this->language->get('tab_google');
  222. if (isset($this->error['warning'])) {
  223. $data['error_warning'] = $this->error['warning'];
  224. } else {
  225. $data['error_warning'] = '';
  226. }
  227. if (isset($this->error['name'])) {
  228. $data['error_name'] = $this->error['name'];
  229. } else {
  230. $data['error_name'] = '';
  231. }
  232. if (isset($this->error['owner'])) {
  233. $data['error_owner'] = $this->error['owner'];
  234. } else {
  235. $data['error_owner'] = '';
  236. }
  237. if (isset($this->error['address'])) {
  238. $data['error_address'] = $this->error['address'];
  239. } else {
  240. $data['error_address'] = '';
  241. }
  242. if (isset($this->error['email'])) {
  243. $data['error_email'] = $this->error['email'];
  244. } else {
  245. $data['error_email'] = '';
  246. }
  247. if (isset($this->error['telephone'])) {
  248. $data['error_telephone'] = $this->error['telephone'];
  249. } else {
  250. $data['error_telephone'] = '';
  251. }
  252. if (isset($this->error['meta_title'])) {
  253. $data['error_meta_title'] = $this->error['meta_title'];
  254. } else {
  255. $data['error_meta_title'] = '';
  256. }
  257. if (isset($this->error['country'])) {
  258. $data['error_country'] = $this->error['country'];
  259. } else {
  260. $data['error_country'] = '';
  261. }
  262. if (isset($this->error['zone'])) {
  263. $data['error_zone'] = $this->error['zone'];
  264. } else {
  265. $data['error_zone'] = '';
  266. }
  267. if (isset($this->error['customer_group_display'])) {
  268. $data['error_customer_group_display'] = $this->error['customer_group_display'];
  269. } else {
  270. $data['error_customer_group_display'] = '';
  271. }
  272. if (isset($this->error['login_attempts'])) {
  273. $data['error_login_attempts'] = $this->error['login_attempts'];
  274. } else {
  275. $data['error_login_attempts'] = '';
  276. }
  277. if (isset($this->error['voucher_min'])) {
  278. $data['error_voucher_min'] = $this->error['voucher_min'];
  279. } else {
  280. $data['error_voucher_min'] = '';
  281. }
  282. if (isset($this->error['voucher_max'])) {
  283. $data['error_voucher_max'] = $this->error['voucher_max'];
  284. } else {
  285. $data['error_voucher_max'] = '';
  286. }
  287. if (isset($this->error['processing_status'])) {
  288. $data['error_processing_status'] = $this->error['processing_status'];
  289. } else {
  290. $data['error_processing_status'] = '';
  291. }
  292. if (isset($this->error['complete_status'])) {
  293. $data['error_complete_status'] = $this->error['complete_status'];
  294. } else {
  295. $data['error_complete_status'] = '';
  296. }
  297. if (isset($this->error['ftp_hostname'])) {
  298. $data['error_ftp_hostname'] = $this->error['ftp_hostname'];
  299. } else {
  300. $data['error_ftp_hostname'] = '';
  301. }
  302. if (isset($this->error['ftp_port'])) {
  303. $data['error_ftp_port'] = $this->error['ftp_port'];
  304. } else {
  305. $data['error_ftp_port'] = '';
  306. }
  307. if (isset($this->error['ftp_username'])) {
  308. $data['error_ftp_username'] = $this->error['ftp_username'];
  309. } else {
  310. $data['error_ftp_username'] = '';
  311. }
  312. if (isset($this->error['ftp_password'])) {
  313. $data['error_ftp_password'] = $this->error['ftp_password'];
  314. } else {
  315. $data['error_ftp_password'] = '';
  316. }
  317. if (isset($this->error['image_category'])) {
  318. $data['error_image_category'] = $this->error['image_category'];
  319. } else {
  320. $data['error_image_category'] = '';
  321. }
  322. if (isset($this->error['image_thumb'])) {
  323. $data['error_image_thumb'] = $this->error['image_thumb'];
  324. } else {
  325. $data['error_image_thumb'] = '';
  326. }
  327. if (isset($this->error['image_popup'])) {
  328. $data['error_image_popup'] = $this->error['image_popup'];
  329. } else {
  330. $data['error_image_popup'] = '';
  331. }
  332. if (isset($this->error['image_product'])) {
  333. $data['error_image_product'] = $this->error['image_product'];
  334. } else {
  335. $data['error_image_product'] = '';
  336. }
  337. if (isset($this->error['image_additional'])) {
  338. $data['error_image_additional'] = $this->error['image_additional'];
  339. } else {
  340. $data['error_image_additional'] = '';
  341. }
  342. if (isset($this->error['image_related'])) {
  343. $data['error_image_related'] = $this->error['image_related'];
  344. } else {
  345. $data['error_image_related'] = '';
  346. }
  347. if (isset($this->error['image_compare'])) {
  348. $data['error_image_compare'] = $this->error['image_compare'];
  349. } else {
  350. $data['error_image_compare'] = '';
  351. }
  352. if (isset($this->error['image_wishlist'])) {
  353. $data['error_image_wishlist'] = $this->error['image_wishlist'];
  354. } else {
  355. $data['error_image_wishlist'] = '';
  356. }
  357. if (isset($this->error['image_cart'])) {
  358. $data['error_image_cart'] = $this->error['image_cart'];
  359. } else {
  360. $data['error_image_cart'] = '';
  361. }
  362. if (isset($this->error['image_location'])) {
  363. $data['error_image_location'] = $this->error['image_location'];
  364. } else {
  365. $data['error_image_location'] = '';
  366. }
  367. if (isset($this->error['error_filename'])) {
  368. $data['error_error_filename'] = $this->error['error_filename'];
  369. } else {
  370. $data['error_error_filename'] = '';
  371. }
  372. if (isset($this->error['product_limit'])) {
  373. $data['error_product_limit'] = $this->error['product_limit'];
  374. } else {
  375. $data['error_product_limit'] = '';
  376. }
  377. if (isset($this->error['product_description_length'])) {
  378. $data['error_product_description_length'] = $this->error['product_description_length'];
  379. } else {
  380. $data['error_product_description_length'] = '';
  381. }
  382. if (isset($this->error['limit_admin'])) {
  383. $data['error_limit_admin'] = $this->error['limit_admin'];
  384. } else {
  385. $data['error_limit_admin'] = '';
  386. }
  387. if (isset($this->error['encryption'])) {
  388. $data['error_encryption'] = $this->error['encryption'];
  389. } else {
  390. $data['error_encryption'] = '';
  391. }
  392. $data['breadcrumbs'] = array();
  393. $data['breadcrumbs'][] = array(
  394. 'text' => $this->language->get('text_home'),
  395. 'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
  396. );
  397. $data['breadcrumbs'][] = array(
  398. 'text' => $this->language->get('text_stores'),
  399. 'href' => $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL')
  400. );
  401. $data['breadcrumbs'][] = array(
  402. 'text' => $this->language->get('heading_title'),
  403. 'href' => $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL')
  404. );
  405. if (isset($this->session->data['success'])) {
  406. $data['success'] = $this->session->data['success'];
  407. unset($this->session->data['success']);
  408. } else {
  409. $data['success'] = '';
  410. }
  411. $data['action'] = $this->url->link('setting/setting', 'token=' . $this->session->data['token'], 'SSL');
  412. $data['cancel'] = $this->url->link('setting/store', 'token=' . $this->session->data['token'], 'SSL');
  413. $data['token'] = $this->session->data['token'];
  414. if (isset($this->request->post['config_name'])) {
  415. $data['config_name'] = $this->request->post['config_name'];
  416. } else {
  417. $data['config_name'] = $this->config->get('config_name');
  418. }
  419. if (isset($this->request->post['config_owner'])) {
  420. $data['config_owner'] = $this->request->post['config_owner'];
  421. } else {
  422. $data['config_owner'] = $this->config->get('config_owner');
  423. }
  424. if (isset($this->request->post['config_address'])) {
  425. $data['config_address'] = $this->request->post['config_address'];
  426. } else {
  427. $data['config_address'] = $this->config->get('config_address');
  428. }
  429. if (isset($this->request->post['config_geocode'])) {
  430. $data['config_geocode'] = $this->request->post['config_geocode'];
  431. } else {
  432. $data['config_geocode'] = $this->config->get('config_geocode');
  433. }
  434. if (isset($this->request->post['config_email'])) {
  435. $data['config_email'] = $this->request->post['config_email'];
  436. } else {
  437. $data['config_email'] = $this->config->get('config_email');
  438. }
  439. if (isset($this->request->post['config_telephone'])) {
  440. $data['config_telephone'] = $this->request->post['config_telephone'];
  441. } else {
  442. $data['config_telephone'] = $this->config->get('config_telephone');
  443. }
  444. if (isset($this->request->post['config_fax'])) {
  445. $data['config_fax'] = $this->request->post['config_fax'];
  446. } else {
  447. $data['config_fax'] = $this->config->get('config_fax');
  448. }
  449. if (isset($this->request->post['config_image'])) {
  450. $data['config_image'] = $this->request->post['config_image'];
  451. } else {
  452. $data['config_image'] = $this->config->get('config_image');
  453. }
  454. $this->load->model('tool/image');
  455. if (isset($this->request->post['config_image']) && is_file(DIR_IMAGE . $this->request->post['config_image'])) {
  456. $data['thumb'] = $this->model_tool_image->resize($this->request->post['config_image'], 100, 100);
  457. } elseif ($this->config->get('config_image') && is_file(DIR_IMAGE . $this->config->get('config_image'))) {
  458. $data['thumb'] = $this->model_tool_image->resize($this->config->get('config_image'), 100, 100);
  459. } else {
  460. $data['thumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  461. }
  462. $data['placeholder'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  463. if (isset($this->request->post['config_open'])) {
  464. $data['config_open'] = $this->request->post['config_open'];
  465. } else {
  466. $data['config_open'] = $this->config->get('config_open');
  467. }
  468. if (isset($this->request->post['config_comment'])) {
  469. $data['config_comment'] = $this->request->post['config_comment'];
  470. } else {
  471. $data['config_comment'] = $this->config->get('config_comment');
  472. }
  473. $this->load->model('localisation/location');
  474. $data['locations'] = $this->model_localisation_location->getLocations();
  475. if (isset($this->request->post['config_location'])) {
  476. $data['config_location'] = $this->request->post['config_location'];
  477. } elseif ($this->config->get('config_location')) {
  478. $data['config_location'] = $this->config->get('config_location');
  479. } else {
  480. $data['config_location'] = array();
  481. }
  482. if (isset($this->request->post['config_meta_title'])) {
  483. $data['config_meta_title'] = $this->request->post['config_meta_title'];
  484. } else {
  485. $data['config_meta_title'] = $this->config->get('config_meta_title');
  486. }
  487. if (isset($this->request->post['config_meta_description'])) {
  488. $data['config_meta_description'] = $this->request->post['config_meta_description'];
  489. } else {
  490. $data['config_meta_description'] = $this->config->get('config_meta_description');
  491. }
  492. if (isset($this->request->post['config_meta_keyword'])) {
  493. $data['config_meta_keyword'] = $this->request->post['config_meta_keyword'];
  494. } else {
  495. $data['config_meta_keyword'] = $this->config->get('config_meta_keyword');
  496. }
  497. if (isset($this->request->post['config_layout_id'])) {
  498. $data['config_layout_id'] = $this->request->post['config_layout_id'];
  499. } else {
  500. $data['config_layout_id'] = $this->config->get('config_layout_id');
  501. }
  502. $this->load->model('design/layout');
  503. $data['layouts'] = $this->model_design_layout->getLayouts();
  504. if (isset($this->request->post['config_template'])) {
  505. $data['config_template'] = $this->request->post['config_template'];
  506. } else {
  507. $data['config_template'] = $this->config->get('config_template');
  508. }
  509. $data['templates'] = array();
  510. $directories = glob(DIR_CATALOG . 'view/theme/*', GLOB_ONLYDIR);
  511. foreach ($directories as $directory) {
  512. $data['templates'][] = basename($directory);
  513. }
  514. if (isset($this->request->post['config_country_id'])) {
  515. $data['config_country_id'] = $this->request->post['config_country_id'];
  516. } else {
  517. $data['config_country_id'] = $this->config->get('config_country_id');
  518. }
  519. $this->load->model('localisation/country');
  520. $data['countries'] = $this->model_localisation_country->getCountries();
  521. if (isset($this->request->post['config_zone_id'])) {
  522. $data['config_zone_id'] = $this->request->post['config_zone_id'];
  523. } else {
  524. $data['config_zone_id'] = $this->config->get('config_zone_id');
  525. }
  526. if (isset($this->request->post['config_language'])) {
  527. $data['config_language'] = $this->request->post['config_language'];
  528. } else {
  529. $data['config_language'] = $this->config->get('config_language');
  530. }
  531. $this->load->model('localisation/language');
  532. $data['languages'] = $this->model_localisation_language->getLanguages();
  533. if (isset($this->request->post['config_admin_language'])) {
  534. $data['config_admin_language'] = $this->request->post['config_admin_language'];
  535. } else {
  536. $data['config_admin_language'] = $this->config->get('config_admin_language');
  537. }
  538. if (isset($this->request->post['config_currency'])) {
  539. $data['config_currency'] = $this->request->post['config_currency'];
  540. } else {
  541. $data['config_currency'] = $this->config->get('config_currency');
  542. }
  543. if (isset($this->request->post['config_currency_auto'])) {
  544. $data['config_currency_auto'] = $this->request->post['config_currency_auto'];
  545. } else {
  546. $data['config_currency_auto'] = $this->config->get('config_currency_auto');
  547. }
  548. $this->load->model('localisation/currency');
  549. $data['currencies'] = $this->model_localisation_currency->getCurrencies();
  550. if (isset($this->request->post['config_length_class_id'])) {
  551. $data['config_length_class_id'] = $this->request->post['config_length_class_id'];
  552. } else {
  553. $data['config_length_class_id'] = $this->config->get('config_length_class_id');
  554. }
  555. $this->load->model('localisation/length_class');
  556. $data['length_classes'] = $this->model_localisation_length_class->getLengthClasses();
  557. if (isset($this->request->post['config_weight_class_id'])) {
  558. $data['config_weight_class_id'] = $this->request->post['config_weight_class_id'];
  559. } else {
  560. $data['config_weight_class_id'] = $this->config->get('config_weight_class_id');
  561. }
  562. $this->load->model('localisation/weight_class');
  563. $data['weight_classes'] = $this->model_localisation_weight_class->getWeightClasses();
  564. if (isset($this->request->post['config_product_limit'])) {
  565. $data['config_product_limit'] = $this->request->post['config_product_limit'];
  566. } else {
  567. $data['config_product_limit'] = $this->config->get('config_product_limit');
  568. }
  569. if (isset($this->request->post['config_product_description_length'])) {
  570. $data['config_product_description_length'] = $this->request->post['config_product_description_length'];
  571. } else {
  572. $data['config_product_description_length'] = $this->config->get('config_product_description_length');
  573. }
  574. if (isset($this->request->post['config_limit_admin'])) {
  575. $data['config_limit_admin'] = $this->request->post['config_limit_admin'];
  576. } else {
  577. $data['config_limit_admin'] = $this->config->get('config_limit_admin');
  578. }
  579. if (isset($this->request->post['config_product_count'])) {
  580. $data['config_product_count'] = $this->request->post['config_product_count'];
  581. } else {
  582. $data['config_product_count'] = $this->config->get('config_product_count');
  583. }
  584. if (isset($this->request->post['config_review_status'])) {
  585. $data['config_review_status'] = $this->request->post['config_review_status'];
  586. } else {
  587. $data['config_review_status'] = $this->config->get('config_review_status');
  588. }
  589. if (isset($this->request->post['config_review_guest'])) {
  590. $data['config_review_guest'] = $this->request->post['config_review_guest'];
  591. } else {
  592. $data['config_review_guest'] = $this->config->get('config_review_guest');
  593. }
  594. if (isset($this->request->post['config_review_mail'])) {
  595. $data['config_review_mail'] = $this->request->post['config_review_mail'];
  596. } else {
  597. $data['config_review_mail'] = $this->config->get('config_review_mail');
  598. }
  599. if (isset($this->request->post['config_voucher_min'])) {
  600. $data['config_voucher_min'] = $this->request->post['config_voucher_min'];
  601. } else {
  602. $data['config_voucher_min'] = $this->config->get('config_voucher_min');
  603. }
  604. if (isset($this->request->post['config_voucher_max'])) {
  605. $data['config_voucher_max'] = $this->request->post['config_voucher_max'];
  606. } else {
  607. $data['config_voucher_max'] = $this->config->get('config_voucher_max');
  608. }
  609. if (isset($this->request->post['config_tax'])) {
  610. $data['config_tax'] = $this->request->post['config_tax'];
  611. } else {
  612. $data['config_tax'] = $this->config->get('config_tax');
  613. }
  614. if (isset($this->request->post['config_tax_default'])) {
  615. $data['config_tax_default'] = $this->request->post['config_tax_default'];
  616. } else {
  617. $data['config_tax_default'] = $this->config->get('config_tax_default');
  618. }
  619. if (isset($this->request->post['config_tax_customer'])) {
  620. $data['config_tax_customer'] = $this->request->post['config_tax_customer'];
  621. } else {
  622. $data['config_tax_customer'] = $this->config->get('config_tax_customer');
  623. }
  624. if (isset($this->request->post['config_customer_online'])) {
  625. $data['config_customer_online'] = $this->request->post['config_customer_online'];
  626. } else {
  627. $data['config_customer_online'] = $this->config->get('config_customer_online');
  628. }
  629. if (isset($this->request->post['config_customer_group_id'])) {
  630. $data['config_customer_group_id'] = $this->request->post['config_customer_group_id'];
  631. } else {
  632. $data['config_customer_group_id'] = $this->config->get('config_customer_group_id');
  633. }
  634. $this->load->model('sale/customer_group');
  635. $data['customer_groups'] = $this->model_sale_customer_group->getCustomerGroups();
  636. if (isset($this->request->post['config_customer_group_display'])) {
  637. $data['config_customer_group_display'] = $this->request->post['config_customer_group_display'];
  638. } elseif ($this->config->get('config_customer_group_display')) {
  639. $data['config_customer_group_display'] = $this->config->get('config_customer_group_display');
  640. } else {
  641. $data['config_customer_group_display'] = array();
  642. }
  643. if (isset($this->request->post['config_customer_price'])) {
  644. $data['config_customer_price'] = $this->request->post['config_customer_price'];
  645. } else {
  646. $data['config_customer_price'] = $this->config->get('config_customer_price');
  647. }
  648. if (isset($this->request->post['config_login_attempts'])) {
  649. $data['config_login_attempts'] = $this->request->post['config_login_attempts'];
  650. } elseif ($this->config->has('config_login_attempts')) {
  651. $data['config_login_attempts'] = $this->config->get('config_login_attempts');
  652. } else {
  653. $data['config_login_attempts'] = 5;
  654. }
  655. if (isset($this->request->post['config_account_id'])) {
  656. $data['config_account_id'] = $this->request->post['config_account_id'];
  657. } else {
  658. $data['config_account_id'] = $this->config->get('config_account_id');
  659. }
  660. $this->load->model('catalog/information');
  661. $data['informations'] = $this->model_catalog_information->getInformations();
  662. if (isset($this->request->post['config_account_mail'])) {
  663. $data['config_account_mail'] = $this->request->post['config_account_mail'];
  664. } else {
  665. $data['config_account_mail'] = $this->config->get('config_account_mail');
  666. }
  667. if (isset($this->request->post['config_api_id'])) {
  668. $data['config_api_id'] = $this->request->post['config_api_id'];
  669. } else {
  670. $data['config_api_id'] = $this->config->get('config_api_id');
  671. }
  672. $this->load->model('user/api');
  673. $data['apis'] = $this->model_user_api->getApis();
  674. if (isset($this->request->post['config_cart_weight'])) {
  675. $data['config_cart_weight'] = $this->request->post['config_cart_weight'];
  676. } else {
  677. $data['config_cart_weight'] = $this->config->get('config_cart_weight');
  678. }
  679. if (isset($this->request->post['config_checkout_guest'])) {
  680. $data['config_checkout_guest'] = $this->request->post['config_checkout_guest'];
  681. } else {
  682. $data['config_checkout_guest'] = $this->config->get('config_checkout_guest');
  683. }
  684. if (isset($this->request->post['config_checkout_id'])) {
  685. $data['config_checkout_id'] = $this->request->post['config_checkout_id'];
  686. } else {
  687. $data['config_checkout_id'] = $this->config->get('config_checkout_id');
  688. }
  689. if (isset($this->request->post['config_invoice_prefix'])) {
  690. $data['config_invoice_prefix'] = $this->request->post['config_invoice_prefix'];
  691. } elseif ($this->config->get('config_invoice_prefix')) {
  692. $data['config_invoice_prefix'] = $this->config->get('config_invoice_prefix');
  693. } else {
  694. $data['config_invoice_prefix'] = 'INV-' . date('Y') . '-00';
  695. }
  696. if (isset($this->request->post['config_order_status_id'])) {
  697. $data['config_order_status_id'] = $this->request->post['config_order_status_id'];
  698. } else {
  699. $data['config_order_status_id'] = $this->config->get('config_order_status_id');
  700. }
  701. if (isset($this->request->post['config_processing_status'])) {
  702. $data['config_processing_status'] = $this->request->post['config_processing_status'];
  703. } elseif ($this->config->get('config_processing_status')) {
  704. $data['config_processing_status'] = $this->config->get('config_processing_status');
  705. } else {
  706. $data['config_processing_status'] = array();
  707. }
  708. if (isset($this->request->post['config_complete_status'])) {
  709. $data['config_complete_status'] = $this->request->post['config_complete_status'];
  710. } elseif ($this->config->get('config_complete_status')) {
  711. $data['config_complete_status'] = $this->config->get('config_complete_status');
  712. } else {
  713. $data['config_complete_status'] = array();
  714. }
  715. $this->load->model('localisation/order_status');
  716. $data['order_statuses'] = $this->model_localisation_order_status->getOrderStatuses();
  717. if (isset($this->request->post['config_order_mail'])) {
  718. $data['config_order_mail'] = $this->request->post['config_order_mail'];
  719. } else {
  720. $data['config_order_mail'] = $this->config->get('config_order_mail');
  721. }
  722. if (isset($this->request->post['config_stock_display'])) {
  723. $data['config_stock_display'] = $this->request->post['config_stock_display'];
  724. } else {
  725. $data['config_stock_display'] = $this->config->get('config_stock_display');
  726. }
  727. if (isset($this->request->post['config_stock_warning'])) {
  728. $data['config_stock_warning'] = $this->request->post['config_stock_warning'];
  729. } else {
  730. $data['config_stock_warning'] = $this->config->get('config_stock_warning');
  731. }
  732. if (isset($this->request->post['config_stock_checkout'])) {
  733. $data['config_stock_checkout'] = $this->request->post['config_stock_checkout'];
  734. } else {
  735. $data['config_stock_checkout'] = $this->config->get('config_stock_checkout');
  736. }
  737. if (isset($this->request->post['config_affiliate_auto'])) {
  738. $data['config_affiliate_approval'] = $this->request->post['config_affiliate_approval'];
  739. } elseif ($this->config->has('config_affiliate_commission')) {
  740. $data['config_affiliate_approval'] = $this->config->get('config_affiliate_approval');
  741. } else {
  742. $data['config_affiliate_approval'] = '';
  743. }
  744. if (isset($this->request->post['config_affiliate_auto'])) {
  745. $data['config_affiliate_auto'] = $this->request->post['config_affiliate_auto'];
  746. } elseif ($this->config->has('config_affiliate_auto')) {
  747. $data['config_affiliate_auto'] = $this->config->get('config_affiliate_auto');
  748. } else {
  749. $data['config_affiliate_auto'] = '';
  750. }
  751. if (isset($this->request->post['config_affiliate_commission'])) {
  752. $data['config_affiliate_commission'] = $this->request->post['config_affiliate_commission'];
  753. } elseif ($this->config->has('config_affiliate_commission')) {
  754. $data['config_affiliate_commission'] = $this->config->get('config_affiliate_commission');
  755. } else {
  756. $data['config_affiliate_commission'] = '5.00';
  757. }
  758. if (isset($this->request->post['config_affiliate_mail'])) {
  759. $data['config_affiliate_mail'] = $this->request->post['config_affiliate_mail'];
  760. } elseif ($this->config->has('config_affiliate_mail')) {
  761. $data['config_affiliate_mail'] = $this->config->get('config_affiliate_mail');
  762. } else {
  763. $data['config_affiliate_mail'] = '';
  764. }
  765. if (isset($this->request->post['config_affiliate_id'])) {
  766. $data['config_affiliate_id'] = $this->request->post['config_affiliate_id'];
  767. } else {
  768. $data['config_affiliate_id'] = $this->config->get('config_affiliate_id');
  769. }
  770. if (isset($this->request->post['config_return_id'])) {
  771. $data['config_return_id'] = $this->request->post['config_return_id'];
  772. } else {
  773. $data['config_return_id'] = $this->config->get('config_return_id');
  774. }
  775. if (isset($this->request->post['config_return_status_id'])) {
  776. $data['config_return_status_id'] = $this->request->post['config_return_status_id'];
  777. } else {
  778. $data['config_return_status_id'] = $this->config->get('config_return_status_id');
  779. }
  780. $this->load->model('localisation/return_status');
  781. $data['return_statuses'] = $this->model_localisation_return_status->getReturnStatuses();
  782. if (isset($this->request->post['config_logo'])) {
  783. $data['config_logo'] = $this->request->post['config_logo'];
  784. } else {
  785. $data['config_logo'] = $this->config->get('config_logo');
  786. }
  787. if (isset($this->request->post['config_logo']) && is_file(DIR_IMAGE . $this->request->post['config_logo'])) {
  788. $data['logo'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
  789. } elseif ($this->config->get('config_logo') && is_file(DIR_IMAGE . $this->config->get('config_logo'))) {
  790. $data['logo'] = $this->model_tool_image->resize($this->config->get('config_logo'), 100, 100);
  791. } else {
  792. $data['logo'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  793. }
  794. if (isset($this->request->post['config_icon'])) {
  795. $data['config_icon'] = $this->request->post['config_icon'];
  796. } else {
  797. $data['config_icon'] = $this->config->get('config_icon');
  798. }
  799. if (isset($this->request->post['config_icon']) && is_file(DIR_IMAGE . $this->request->post['config_icon'])) {
  800. $data['icon'] = $this->model_tool_image->resize($this->request->post['config_logo'], 100, 100);
  801. } elseif ($this->config->get('config_icon') && is_file(DIR_IMAGE . $this->config->get('config_icon'))) {
  802. $data['icon'] = $this->model_tool_image->resize($this->config->get('config_icon'), 100, 100);
  803. } else {
  804. $data['icon'] = $this->model_tool_image->resize('no_image.png', 100, 100);
  805. }
  806. if (isset($this->request->post['config_image_category_width'])) {
  807. $data['config_image_category_width'] = $this->request->post['config_image_category_width'];
  808. } else {
  809. $data['config_image_category_width'] = $this->config->get('config_image_category_width');
  810. }
  811. if (isset($this->request->post['config_image_category_height'])) {
  812. $data['config_image_category_height'] = $this->request->post['config_image_category_height'];
  813. } else {
  814. $data['config_image_category_height'] = $this->config->get('config_image_category_height');
  815. }
  816. if (isset($this->request->post['config_image_thumb_width'])) {
  817. $data['config_image_thumb_width'] = $this->request->post['config_image_thumb_width'];
  818. } else {
  819. $data['config_image_thumb_width'] = $this->config->get('config_image_thumb_width');
  820. }
  821. if (isset($this->request->post['config_image_thumb_height'])) {
  822. $data['config_image_thumb_height'] = $this->request->post['config_image_thumb_height'];
  823. } else {
  824. $data['config_image_thumb_height'] = $this->config->get('config_image_thumb_height');
  825. }
  826. if (isset($this->request->post['config_image_popup_width'])) {
  827. $data['config_image_popup_width'] = $this->request->post['config_image_popup_width'];
  828. } else {
  829. $data['config_image_popup_width'] = $this->config->get('config_image_popup_width');
  830. }
  831. if (isset($this->request->post['config_image_popup_height'])) {
  832. $data['config_image_popup_height'] = $this->request->post['config_image_popup_height'];
  833. } else {
  834. $data['config_image_popup_height'] = $this->config->get('config_image_popup_height');
  835. }
  836. if (isset($this->request->post['config_image_product_width'])) {
  837. $data['config_image_product_width'] = $this->request->post['config_image_product_width'];
  838. } else {
  839. $data['config_image_product_width'] = $this->config->get('config_image_product_width');
  840. }
  841. if (isset($this->request->post['config_image_product_height'])) {
  842. $data['config_image_product_height'] = $this->request->post['config_image_product_height'];
  843. } else {
  844. $data['config_image_product_height'] = $this->config->get('config_image_product_height');
  845. }
  846. if (isset($this->request->post['config_image_additional_width'])) {
  847. $data['config_image_additional_width'] = $this->request->post['config_image_additional_width'];
  848. } else {
  849. $data['config_image_additional_width'] = $this->config->get('config_image_additional_width');
  850. }
  851. if (isset($this->request->post['config_image_additional_height'])) {
  852. $data['config_image_additional_height'] = $this->request->post['config_image_additional_height'];
  853. } else {
  854. $data['config_image_additional_height'] = $this->config->get('config_image_additional_height');
  855. }
  856. if (isset($this->request->post['config_image_related_width'])) {
  857. $data['config_image_related_width'] = $this->request->post['config_image_related_width'];
  858. } else {
  859. $data['config_image_related_width'] = $this->config->get('config_image_related_width');
  860. }
  861. if (isset($this->request->post['config_image_related_height'])) {
  862. $data['config_image_related_height'] = $this->request->post['config_image_related_height'];
  863. } else {
  864. $data['config_image_related_height'] = $this->config->get('config_image_related_height');
  865. }
  866. if (isset($this->request->post['config_image_compare_width'])) {
  867. $data['config_image_compare_width'] = $this->request->post['config_image_compare_width'];
  868. } else {
  869. $data['config_image_compare_width'] = $this->config->get('config_image_compare_width');
  870. }
  871. if (isset($this->request->post['config_image_compare_height'])) {
  872. $data['config_image_compare_height'] = $this->request->post['config_image_compare_height'];
  873. } else {
  874. $data['config_image_compare_height'] = $this->config->get('config_image_compare_height');
  875. }
  876. if (isset($this->request->post['config_image_wishlist_width'])) {
  877. $data['config_image_wishlist_width'] = $this->request->post['config_image_wishlist_width'];
  878. } else {
  879. $data['config_image_wishlist_width'] = $this->config->get('config_image_wishlist_width');
  880. }
  881. if (isset($this->request->post['config_image_wishlist_height'])) {
  882. $data['config_image_wishlist_height'] = $this->request->post['config_image_wishlist_height'];
  883. } else {
  884. $data['config_image_wishlist_height'] = $this->config->get('config_image_wishlist_height');
  885. }
  886. if (isset($this->request->post['config_image_cart_width'])) {
  887. $data['config_image_cart_width'] = $this->request->post['config_image_cart_width'];
  888. } else {
  889. $data['config_image_cart_width'] = $this->config->get('config_image_cart_width');
  890. }
  891. if (isset($this->request->post['config_image_cart_height'])) {
  892. $data['config_image_cart_height'] = $this->request->post['config_image_cart_height'];
  893. } else {
  894. $data['config_image_cart_height'] = $this->config->get('config_image_cart_height');
  895. }
  896. if (isset($this->request->post['config_image_location_width'])) {
  897. $data['config_image_location_width'] = $this->request->post['config_image_location_width'];
  898. } else {
  899. $data['config_image_location_width'] = $this->config->get('config_image_location_width');
  900. }
  901. if (isset($this->request->post['config_image_location_height'])) {
  902. $data['config_image_location_height'] = $this->request->post['config_image_location_height'];
  903. } else {
  904. $data['config_image_location_height'] = $this->config->get('config_image_location_height');
  905. }
  906. if (isset($this->request->post['config_ftp_hostname'])) {
  907. $data['config_ftp_hostname'] = $this->request->post['config_ftp_hostname'];
  908. } elseif ($this->config->get('config_ftp_hostname')) {
  909. $data['config_ftp_hostname'] = $this->config->get('config_ftp_hostname');
  910. } else {
  911. $data['config_ftp_hostname'] = str_replace('www.', '', $this->request->server['HTTP_HOST']);
  912. }
  913. if (isset($this->request->post['config_ftp_port'])) {
  914. $data['config_ftp_port'] = $this->request->post['config_ftp_port'];
  915. } elseif ($this->config->get('config_ftp_port')) {
  916. $data['config_ftp_port'] = $this->config->get('config_ftp_port');
  917. } else {
  918. $data['config_ftp_port'] = 21;
  919. }
  920. if (isset($this->request->post['config_ftp_username'])) {
  921. $data['config_ftp_username'] = $this->request->post['config_ftp_username'];
  922. } else {
  923. $data['config_ftp_username'] = $this->config->get('config_ftp_username');
  924. }
  925. if (isset($this->request->post['config_ftp_password'])) {
  926. $data['config_ftp_password'] = $this->request->post['config_ftp_password'];
  927. } else {
  928. $data['config_ftp_password'] = $this->config->get('config_ftp_password');
  929. }
  930. if (isset($this->request->post['config_ftp_root'])) {
  931. $data['config_ftp_root'] = $this->request->post['config_ftp_root'];
  932. } else {
  933. $data['config_ftp_root'] = $this->config->get('config_ftp_root');
  934. }
  935. if (isset($this->request->post['config_ftp_status'])) {
  936. $data['config_ftp_status'] = $this->request->post['config_ftp_status'];
  937. } else {
  938. $data['config_ftp_status'] = $this->config->get('config_ftp_status');
  939. }
  940. if (isset($this->request->post['config_mail_protocol'])) {
  941. $data['config_mail_protocol'] = $this->request->post['config_mail_protocol'];
  942. } else {
  943. $data['config_mail_protocol'] = $this->config->get('config_mail_protocol');
  944. }
  945. if (isset($this->request->post['config_mail_parameter'])) {
  946. $data['config_mail_parameter'] = $this->request->post['config_mail_parameter'];
  947. } else {
  948. $data['config_mail_parameter'] = $this->config->get('config_mail_parameter');
  949. }
  950. if (isset($this->request->post['config_mail_smtp_hostname'])) {
  951. $data['config_mail_smtp_hostname'] = $this->request->post['config_mail_smtp_hostname'];
  952. } else {
  953. $data['config_mail_smtp_hostname'] = $this->config->get('config_mail_smtp_hostname');
  954. }
  955. if (isset($this->request->post['config_mail_smtp_username'])) {
  956. $data['config_mail_smtp_username'] = $this->request->post['config_mail_smtp_username'];
  957. } else {
  958. $data['config_mail_smtp_username'] = $this->config->get('config_mail_smtp_username');
  959. }
  960. if (isset($this->request->post['config_mail_smtp_password'])) {
  961. $data['config_mail_smtp_password'] = $this->request->post['config_mail_smtp_password'];
  962. } else {
  963. $data['config_mail_smtp_password'] = $this->config->get('config_mail_smtp_password');
  964. }
  965. if (isset($this->request->post['config_mail_smtp_port'])) {
  966. $data['config_mail_smtp_port'] = $this->request->post['config_mail_smtp_port'];
  967. } elseif ($this->config->has('config_mail_smtp_port')) {
  968. $data['config_mail_smtp_port'] = $this->config->get('config_mail_smtp_port');
  969. } else {
  970. $data['config_mail_smtp_port'] = 25;
  971. }
  972. if (isset($this->request->post['config_mail_smtp_timeout'])) {
  973. $data['config_mail_smtp_timeout'] = $this->request->post['config_mail_smtp_timeout'];
  974. } elseif ($this->config->has('config_mail_smtp_timeout')) {
  975. $data['config_mail_smtp_timeout'] = $this->config->get('config_mail_smtp_timeout');
  976. } else