Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2020
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 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. function emby_MetaData()
  15. {
  16. return ['DisplayName' => 'Aurora Emby Module', 'APIVersion' => '1.2', 'RequiresServer' => true, 'DefaultNonSSLPort' => '8096', 'DefaultSSLPort' => '443'];
  17. }
  18.  
  19. function emby_ConfigOptions()
  20. {
  21. try {
  22. if (!WHMCS\Database\Capsule::schema()->hasTable('mod_emby_connect_user')) {
  23. WHMCS\Database\Capsule::schema()->create('mod_emby_connect_user', function($table) {
  24. $table->increments('id');
  25. $table->integer('serviceid');
  26. $table->string('emby_userid');
  27. });
  28. }
  29.  
  30. if (!WHMCS\Database\Capsule::schema()->hasTable('mod_emby_connect_passwords')) {
  31. WHMCS\Database\Capsule::schema()->create('mod_emby_connect_passwords', function($table) {
  32. $table->increments('id');
  33. $table->integer('clientid');
  34. $table->string('password');
  35. });
  36. }
  37. }
  38. catch (Exception $e) {
  39. logActivity('Emby Error: Unable to create custom tables. ' . $e->getMessage());
  40. }
  41.  
  42. $licenseInfo = emby_LicenseCheck();
  43. $desc = (isset($licenseInfo['description']) ? $licenseInfo['description'] : 'Invalid or Expired license key.');
  44. $desc = '<span style=\'color:red;\'>' . $desc . '</span>';
  45.  
  46. if ($licenseInfo['status'] != 'Active') {
  47. return [
  48. 'LicenseKey' => ['FriendlyName' => 'License Key Error', 'Type' => '', 'Description' => $desc]
  49. ];
  50. }
  51.  
  52. $configarray = [
  53. 'EmbyConnect' => ['FriendlyName' => 'Emby Connect', 'Type' => 'yesno', 'Description' => 'Tick to send emby connect invitation to user.This will only work if you have subscribed to Emby Connect'],
  54. 'IsAdministrator' => ['FriendlyName' => 'Administrator', 'Type' => 'yesno', 'Description' => 'Tick to make this user an admin'],
  55. 'IsDisabled' => ['FriendlyName' => 'Disabled', 'Type' => 'yesno', 'Description' => 'Tick to make this user disabled '],
  56. 'EnableUserPreferenceAccess' => ['FriendlyName' => 'Enable User Preference Access', 'Type' => 'yesno', 'Description' => 'Tick to enable user preference access', 'Default' => 'on'],
  57. 'EnableRemoteControlOfOtherUsers' => ['FriendlyName' => 'Enable Remote Control Of Other Users', 'Type' => 'yesno', 'Description' => 'Tick to enable remote control of other users'],
  58. 'EnableSharedDeviceControl' => ['FriendlyName' => 'Enable Shared Device Control', 'Type' => 'yesno', 'Description' => 'Tick to enable shared device control'],
  59. 'EnableRemoteAccess' => ['FriendlyName' => 'Enable Remote Access', 'Type' => 'yesno', 'Description' => 'Tick to enable remote access', 'Default' => 'on'],
  60. 'EnableLiveTvManagement' => ['FriendlyName' => 'Enable Live Tv Management', 'Type' => 'yesno', 'Description' => 'Tick to enable live TV management', 'Default' => 'on'],
  61. 'EnableLiveTvAccess' => ['FriendlyName' => 'Enable Live Tv Access', 'Type' => 'yesno', 'Description' => 'Tick to enable live TV access', 'Default' => 'on'],
  62. 'EnableMediaPlayback' => ['FriendlyName' => 'Enable Media Playback', 'Type' => 'yesno', 'Description' => 'Tick to enable media playback', 'Default' => 'on'],
  63. 'EnableAudioPlaybackTranscoding' => ['FriendlyName' => 'Enable Audio Playback Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable audio playback transcoding'],
  64. 'EnableVideoPlaybackTranscoding' => ['FriendlyName' => 'Enable Video Playback Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable video playback transcoding'],
  65. 'EnablePlaybackRemuxing' => ['FriendlyName' => 'Enable Playback Remuxing', 'Type' => 'yesno', 'Description' => 'Tick to enable playback remuxing', 'Default' => 'on'],
  66. 'EnableContentDeletion' => ['FriendlyName' => 'Enable Content Deletion', 'Type' => 'yesno', 'Description' => 'Tick to enable content deletion'],
  67. 'EnableContentDownloading' => ['FriendlyName' => 'Enable Content Downloading', 'Type' => 'yesno', 'Description' => 'Tick to enable content downloading'],
  68. 'EnableSyncTranscoding' => ['FriendlyName' => 'Enable Sync Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable sync transcoding'],
  69. 'EnableMediaConversion' => ['FriendlyName' => 'Enable Media Conversion', 'Type' => 'yesno', 'Description' => 'Tick to enable media conversion'],
  70. 'EnableAllDevices' => ['FriendlyName' => 'Enable All Devices', 'Type' => 'yesno', 'Description' => 'Tick to enable all devices', 'Default' => 'on'],
  71. 'EnableAllChannels' => ['FriendlyName' => 'Enable All Channels', 'Type' => 'yesno', 'Description' => 'Tick to enable all channels', 'Default' => 'on'],
  72. 'EnableAllFolders' => ['FriendlyName' => 'Enable All Folders', 'Type' => 'yesno', 'Description' => 'Tick to enable all folders', 'Default' => 'on'],
  73. 'InvalidLoginAttemptCount' => ['FriendlyName' => 'Invalid Login Attempt Count', 'Type' => 'text', 'Size' => '30', 'Description' => '', 'Default' => '0'],
  74. 'EnablePublicSharing' => ['FriendlyName' => 'Enable Public Sharing', 'Type' => 'yesno', 'Description' => 'Tick to enable public sharing'],
  75. 'SimultaneousStreamLimit' => ['FriendlyName' => 'Simultaneous Stream Limit', 'Type' => 'text', 'Size' => '30', 'Description' => 'Streams at once Limit', 'Default' => '2'],
  76. 'IsHidden' => ['FriendlyName' => 'Is Hidden', 'Type' => 'yesno', 'Description' => 'Tick to hide the user from login screen', 'Default' => 'on']
  77. ];
  78. return $configarray;
  79. }
  80.  
  81. function emby_CreateAccount(array $params)
  82. {
  83. $licenseInfo = emby_LicenseCheck();
  84.  
  85. if ($licenseInfo['status'] != 'Active') {
  86. return 'Invalid or expired license key.';
  87. }
  88.  
  89. include_once dirname(__FILE__) . '/includes/class.emby.php';
  90. $hostname = $params['serverhttpprefix'] . '://' . $params['serverhostname'];
  91.  
  92. if (!empty($params['serverport'])) {
  93. $hostname .= ':' . $params['serverport'];
  94. }
  95.  
  96. $username = $params['serverusername'];
  97. $password = $params['serverpassword'];
  98. $apiClient = new EmbyApiClient($hostname, $username, $password);
  99. .........................................................................................
  100. ........................................................
  101. .........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement