Advertisement
Guest User

Untitled

a guest
Mar 6th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 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.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function parseMainDomain($domen)
  15. {
  16. if (strpos($domen, '://') !== false) {
  17. $explode_protocol = explode('://', $domen);
  18. unset($explode_protocol[0]);
  19. $explode_point = explode('.', $explode_protocol[1]);
  20.  
  21. if ($explode_point[0] == 'www') {
  22. unset($explode_point[0]);
  23. }
  24. }
  25. else {
  26. $explode_point = explode('.', $domen);
  27.  
  28. if ($explode_point[0] == 'www') {
  29. unset($explode_point[0]);
  30. }
  31. }
  32.  
  33. $domen = array_values($explode_point);
  34.  
  35. if (count($domen) == 2) {
  36. return implode('.', $domen);
  37. }
  38. else if (count($domen) == 3) {
  39. if (((mb_strlen($domen[1], 'UTF-8') == 2) || (mb_strlen($domen[1], 'UTF-8') == 3)) && ((mb_strlen($domen[2], 'UTF-8') == 2) || (mb_strlen($domen[2], 'UTF-8') == 3))) {
  40. return implode('.', $domen);
  41. }
  42. else {
  43. unset($domen[0]);
  44. return implode('.', $domen);
  45. }
  46. }
  47. else if (count($domen) == 4) {
  48. unset($domen[0]);
  49. return implode('.', $domen);
  50. }
  51. }
  52.  
  53. session_start();
  54. define('unisitecms', true);
  55. $config = require 'config.php';
  56. include_once 'systems/classes/UniSite.php';
  57. $Main = new Main();
  58. $Profile = new Profile();
  59. $Geo = new Geo();
  60. $Banners = new Banners();
  61. $Banners->click();
  62.  
  63. if (isset($_GET['logout'])) {
  64. unset($_SESSION['profile']);
  65. }
  66.  
  67. if ($_SESSION['profile']) {
  68. $checkUser = findOne('uni_clients', 'clients_id=?', [intval($_SESSION['profile']['id'])]);
  69.  
  70. if (!$checkUser) {
  71. unset($_SESSION['profile']);
  72. }
  73. }
  74.  
  75. $pathinfo = pathinfo(explode('?', $_SERVER['REQUEST_URI'])[0], PATHINFO_EXTENSION);
  76.  
  77. if ($pathinfo) {
  78. (new Main())->response(404);
  79. }
  80. if (isset($_GET['search']) && !$_GET['search']) {
  81. $link = ($_SESSION['geo']['alias'] ? _link($_SESSION['geo']['alias']) : _link($settings['country_default']));
  82. header('Location: ' . $link);
  83. exit();
  84. }
  85.  
  86. if ($config['https']) {
  87. if (strpos($_SERVER['HTTP_CF_VISITOR'], 'https') === false) {
  88. if (!isset($_SERVER['HTTPS']) || ($_SERVER['HTTPS'] == 'off')) {
  89. $redirect_url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
  90. ...................................................................................
  91. ......................................................
  92. ...........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement