Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- function emby_MetaData()
- {
- return ['DisplayName' => 'Aurora Emby Module', 'APIVersion' => '1.2', 'RequiresServer' => true, 'DefaultNonSSLPort' => '8096', 'DefaultSSLPort' => '443'];
- }
- function emby_ConfigOptions()
- {
- try {
- if (!WHMCS\Database\Capsule::schema()->hasTable('mod_emby_connect_user')) {
- WHMCS\Database\Capsule::schema()->create('mod_emby_connect_user', function($table) {
- $table->increments('id');
- $table->integer('serviceid');
- $table->string('emby_userid');
- });
- }
- if (!WHMCS\Database\Capsule::schema()->hasTable('mod_emby_connect_passwords')) {
- WHMCS\Database\Capsule::schema()->create('mod_emby_connect_passwords', function($table) {
- $table->increments('id');
- $table->integer('clientid');
- $table->string('password');
- });
- }
- }
- catch (Exception $e) {
- logActivity('Emby Error: Unable to create custom tables. ' . $e->getMessage());
- }
- $licenseInfo = emby_LicenseCheck();
- $desc = (isset($licenseInfo['description']) ? $licenseInfo['description'] : 'Invalid or Expired license key.');
- $desc = '<span style=\'color:red;\'>' . $desc . '</span>';
- if ($licenseInfo['status'] != 'Active') {
- return [
- 'LicenseKey' => ['FriendlyName' => 'License Key Error', 'Type' => '', 'Description' => $desc]
- ];
- }
- $configarray = [
- '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'],
- 'IsAdministrator' => ['FriendlyName' => 'Administrator', 'Type' => 'yesno', 'Description' => 'Tick to make this user an admin'],
- 'IsDisabled' => ['FriendlyName' => 'Disabled', 'Type' => 'yesno', 'Description' => 'Tick to make this user disabled '],
- 'EnableUserPreferenceAccess' => ['FriendlyName' => 'Enable User Preference Access', 'Type' => 'yesno', 'Description' => 'Tick to enable user preference access', 'Default' => 'on'],
- 'EnableRemoteControlOfOtherUsers' => ['FriendlyName' => 'Enable Remote Control Of Other Users', 'Type' => 'yesno', 'Description' => 'Tick to enable remote control of other users'],
- 'EnableSharedDeviceControl' => ['FriendlyName' => 'Enable Shared Device Control', 'Type' => 'yesno', 'Description' => 'Tick to enable shared device control'],
- 'EnableRemoteAccess' => ['FriendlyName' => 'Enable Remote Access', 'Type' => 'yesno', 'Description' => 'Tick to enable remote access', 'Default' => 'on'],
- 'EnableLiveTvManagement' => ['FriendlyName' => 'Enable Live Tv Management', 'Type' => 'yesno', 'Description' => 'Tick to enable live TV management', 'Default' => 'on'],
- 'EnableLiveTvAccess' => ['FriendlyName' => 'Enable Live Tv Access', 'Type' => 'yesno', 'Description' => 'Tick to enable live TV access', 'Default' => 'on'],
- 'EnableMediaPlayback' => ['FriendlyName' => 'Enable Media Playback', 'Type' => 'yesno', 'Description' => 'Tick to enable media playback', 'Default' => 'on'],
- 'EnableAudioPlaybackTranscoding' => ['FriendlyName' => 'Enable Audio Playback Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable audio playback transcoding'],
- 'EnableVideoPlaybackTranscoding' => ['FriendlyName' => 'Enable Video Playback Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable video playback transcoding'],
- 'EnablePlaybackRemuxing' => ['FriendlyName' => 'Enable Playback Remuxing', 'Type' => 'yesno', 'Description' => 'Tick to enable playback remuxing', 'Default' => 'on'],
- 'EnableContentDeletion' => ['FriendlyName' => 'Enable Content Deletion', 'Type' => 'yesno', 'Description' => 'Tick to enable content deletion'],
- 'EnableContentDownloading' => ['FriendlyName' => 'Enable Content Downloading', 'Type' => 'yesno', 'Description' => 'Tick to enable content downloading'],
- 'EnableSyncTranscoding' => ['FriendlyName' => 'Enable Sync Transcoding', 'Type' => 'yesno', 'Description' => 'Tick to enable sync transcoding'],
- 'EnableMediaConversion' => ['FriendlyName' => 'Enable Media Conversion', 'Type' => 'yesno', 'Description' => 'Tick to enable media conversion'],
- 'EnableAllDevices' => ['FriendlyName' => 'Enable All Devices', 'Type' => 'yesno', 'Description' => 'Tick to enable all devices', 'Default' => 'on'],
- 'EnableAllChannels' => ['FriendlyName' => 'Enable All Channels', 'Type' => 'yesno', 'Description' => 'Tick to enable all channels', 'Default' => 'on'],
- 'EnableAllFolders' => ['FriendlyName' => 'Enable All Folders', 'Type' => 'yesno', 'Description' => 'Tick to enable all folders', 'Default' => 'on'],
- 'InvalidLoginAttemptCount' => ['FriendlyName' => 'Invalid Login Attempt Count', 'Type' => 'text', 'Size' => '30', 'Description' => '', 'Default' => '0'],
- 'EnablePublicSharing' => ['FriendlyName' => 'Enable Public Sharing', 'Type' => 'yesno', 'Description' => 'Tick to enable public sharing'],
- 'SimultaneousStreamLimit' => ['FriendlyName' => 'Simultaneous Stream Limit', 'Type' => 'text', 'Size' => '30', 'Description' => 'Streams at once Limit', 'Default' => '2'],
- 'IsHidden' => ['FriendlyName' => 'Is Hidden', 'Type' => 'yesno', 'Description' => 'Tick to hide the user from login screen', 'Default' => 'on']
- ];
- return $configarray;
- }
- function emby_CreateAccount(array $params)
- {
- $licenseInfo = emby_LicenseCheck();
- if ($licenseInfo['status'] != 'Active') {
- return 'Invalid or expired license key.';
- }
- include_once dirname(__FILE__) . '/includes/class.emby.php';
- $hostname = $params['serverhttpprefix'] . '://' . $params['serverhostname'];
- if (!empty($params['serverport'])) {
- $hostname .= ':' . $params['serverport'];
- }
- $username = $params['serverusername'];
- $password = $params['serverpassword'];
- $apiClient = new EmbyApiClient($hostname, $username, $password);
- .........................................................................................
- ........................................................
- .........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement