Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. define('INSTALLATION_PAGE', true);
  15. require_once '../load.php';
  16. if (defined('SYSTEM_INSTALLED') && (SYSTEM_INSTALLED !== false)) {
  17. do_deny_access();
  18. }
  19. if (empty($DATA) || !is_array($DATA)) {
  20. $DATA = [];
  21. }
  22. if (empty($NOTICES) || !is_array($NOTICES)) {
  23. $NOTICES = [];
  24. }
  25.  
  26. $DATA['install'] = [];
  27. $DATA['install']['input'] = [];
  28. $_TEMPLATE = [];
  29. $DATA['install']['site_url'] = rtrim(explode('/install', $_OPTIONS['inline']['request_url'])[0], '/');
  30. $DATA['install']['url'] = $DATA['install']['site_url'] . '/install/index.php';
  31. $_TEMPLATE['template_url'] = $DATA['install']['site_url'] . '/install/template';
  32. $_TEMPLATE['template_path'] = dirname(__FILE__) . '/template';
  33. $_TEMPLATE['file'] = 'home.html';
  34. $go = 'home';
  35.  
  36. if (session_status() == PHP_SESSION_NONE) {
  37. session_start();
  38. }
  39.  
  40. if (empty($_SESSION[SESSION_PREFIX . '_post_token'])) {
  41. $_SESSION[SESSION_PREFIX . '_post_token'] = md5(time() . rand(100, 1000));
  42. $DATA['install']['post_token'] = $_SESSION[SESSION_PREFIX . '_post_token'];
  43. }
  44. else {
  45. $DATA['install']['post_token'] = $_SESSION[SESSION_PREFIX . '_post_token'];
  46. }
  47. if (!empty($_REQUEST['post_token']) && ($_REQUEST['post_token'] == $DATA['install']['post_token'])) {
  48. $_SESSION[SESSION_PREFIX . '_post_token'] = md5(time() . rand(100, 1000));
  49. $DATA['install']['post_token'] = $_SESSION[SESSION_PREFIX . '_post_token'];
  50. $go = 'process';
  51. }
  52.  
  53. $inputData = $_REQUEST;
  54.  
  55. switch ($go) {
  56. case 'home':
  57. break;
  58. case 'process':
  59. $installationValid = false;
  60. if (is_file(dirname(__FILE__) . '/tables.php') && is_file(dirname(__FILE__) . '/mails.php')) {
  61. $installationValid = true;
  62. require_once dirname(__FILE__) . '/tables.php';
  63. include dirname(__FILE__) . '/mails.php';
  64.  
  65. foreach (['installation_check_sql_connection', 'installation_create_sql_tables', 'installation_drop_sql_tables'] as $key) {
  66. if (!function_exists($key)) {
  67. $installationValid = false;
  68. }
  69. }
  70. if ($installationValid && (empty($installMailTemplates) || !is_array($installMailTemplates) || empty($installMailPartials) || !is_array($installMailPartials))) {
  71. $installationValid = false;
  72. }
  73. }
  74.  
  75. if (!$installationValid) {
  76. do_add_notice('Corrupted installation source', 'danger');
  77. break;
  78. }
  79.  
  80. if (!installation_check_sql_connection()) {
  81. do_add_notice('Couldn\'t open mySQL Connection, please check config.php', 'danger');
  82. break;
  83. }
  84.  
  85. $v = new validator($_POST);
  86. $v->rule('required', ['site_info', 'admin']);
  87. $v->rule('array', ['site_info', 'admin']);
  88. $v->rule('in', 'license_method', ['key', 'file']);
  89. if (!empty($_REQUEST['license_method']) && ($_REQUEST['license_method'] == 'key')) {
  90. $v->rule('required', 'license_key');
  91. $v->rule('regex', 'license_key', '/^[0-9A-Za-z]{1,20}$/');
  92. ..................................................................................
  93. .................................................
  94. ...................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement