Advertisement
Guest User

Untitled

a guest
Jan 7th, 2023
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 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. class Flussonic_ModuleControl
  15. {
  16. public $config;
  17. public $dirsep = '\\';
  18.  
  19. public function __construct($config = false)
  20. {
  21. if ($config) {
  22. $this->config = $config;
  23. }
  24. else {
  25. $handler = new PluginHandler('Flussonic', 'server');
  26. $this->config = $handler->config_load();
  27. }
  28.  
  29. if (defined('IS_WINDOWS')) {
  30. $this->dirsep = (IS_WINDOWS ? '\\' : '/');
  31. }
  32. }
  33.  
  34. public function get_ip($id, $serverData = false)
  35. {
  36. global $_SERVER;
  37. global $setting;
  38. global $userdata;
  39. global $db_prefix;
  40. $mediaService = new MediaCP\MediaService($id, false);
  41. return $this->is_cdn($mediaService) ? $mediaService->pluginConfig()['EdgeUrl'] : $setting['host_add'];
  42. }
  43.  
  44. public function get_port($id, $serverData = false)
  45. {
  46. global $_SERVER;
  47. global $db_prefix;
  48. $mediaService = new MediaCP\MediaService($id, false);
  49.  
  50. if ($this->is_cdn($mediaService)) {
  51. return 443;
  52. }
  53.  
  54. return !empty($mediaService->system()->pluginConfig['HttpsPort']) ? $mediaService->system()->pluginConfig['HttpsPort'] : $mediaService->system()->pluginConfig['HttpPort'];
  55. }
  56.  
  57. public function get_address($id, $serverData = false, $full = false, ?MediaCP\MediaService $mediaService = NULL)
  58. {
  59. if (!$mediaService) {
  60. $mediaService = new MediaCP\MediaService($id, false);
  61. }
  62.  
  63. return ($full ? 'http://' : '') . 'localhost' . ($full ? ':' . $mediaService->system()->pluginConfig['StreamingPort'] : '');
  64. }
  65.  
  66. public function get_secure_state($id, $mediaService = NULL)
  67. {
  68. if (!$mediaService) {
  69. $mediaService = new MediaCP\MediaService($id, false);
  70. ................................................................
  71. ......................................
  72. ....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement