Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP8 Decoder for ionCube Encoder)
- *
- * @ Version : 8.1.0.9
- * @ Author : DeZender
- * @ Release on : 27.10.2023
- * @ Official site : http://DeZender.Net
- *
- */
- function azuracast_MetaData()
- {
- return ['DisplayName' => 'Azuracast', 'APIVersion' => '1.2', 'RequiresServer' => true, 'DefaultNonSSLPort' => '1111', 'DefaultSSLPort' => '1112', 'ServiceSingleSignOnLabel' => 'Login to Panel as User', 'AdminSingleSignOnLabel' => 'Login to Panel as Admin'];
- }
- /**
- * Define product configuration options.
- *
- * The values you return here define the configuration options that are
- * presented to a user when configuring a product for use with the module. These
- * values are then made available in all module function calls with the key name
- * configoptionX - with X being the index number of the field from 1 to 24.
- *
- * You can specify up to 24 parameters, with field types:
- * * text
- * * password
- * * yesno
- * * dropdown
- * * radio
- * * textarea
- *
- * Examples of each and their possible configuration parameters are provided in
- * this sample function.
- *
- * @see https://developers.whmcs.com/provisioning-modules/config-options/
- *
- * @return array
- */
- function azuracast_ConfigOptions()
- {
- return [
- 'Transmission Type' => [
- 'Type' => 'dropdown',
- 'Options' => ['shoutcast2' => 'Shoutcast 2', 'icecast' => 'Icecast'],
- 'Description' => 'Choose one'
- ],
- 'Transmission Bitrate' => [
- 'Type' => 'dropdown',
- 'Options' => [32 => '32 Kbps', 48 => '48 Kbps', 64 => '64 Kbps', 96 => '96 Kbps', 128 => '128 Kbps', 192 => '192 Kbps', 256 => '256 Kbps', 320 => '320 Kbps'],
- 'Description' => 'In Kbps'
- ],
- 'Media Storage' => ['Type' => 'text', 'Default' => '2 GB', 'Description' => 'Size in GB'],
- 'Recording Storage' => ['Type' => 'text', 'Default' => '2 GB', 'Description' => 'Size in GB'],
- 'Podcast Storage' => ['Type' => 'text', 'Default' => '2 GB', 'Description' => 'Size in GB'],
- 'Max listeners' => ['Type' => 'text', 'Default' => '64', 'Description' => 'Size per unit'],
- 'Audio Type' => [
- 'Type' => 'dropdown',
- 'Options' => ['mp3' => 'MP3', 'ogg' => 'OGG Vorbis', 'opus' => 'OGG Opus', 'aac' => 'AAC+ (MPEG4 HE-AAC v2)', 'flac' => 'FLAC (OGG FLAC)'],
- 'Description' => 'Select an audio protocol'
- ],
- 'Permissions' => ['Type' => 'textarea', 'Rows' => '6', 'Cols' => '60', 'Description' => join('<br>', ['(Copy and paste the permissions for this product into the text box above, one per line.)', 'Manage Station Automation', 'Manage Station Broadcasting', 'Manage Station Media', 'Manage Station Podcasts', 'Manage Station Streamers', 'Manage Station Web Hooks', 'View Station Logs', 'View Station Reports', 'View Station Management', 'Manage Station Profile', 'Manage Station Mounts', 'Manage Station Remotes'])]
- ];
- }
- /**
- * Provision a new instance of a product/service.
- *
- * Attempt to provision a new instance of a given product/service. This is
- * called any time provisioning is requested inside of WHMCS. Depending upon the
- * configuration, this can be any of:
- * * When a new order is placed
- * * When an invoice for a new order is paid
- * * Upon manual request by an admin user
- *
- * @param array $params common module parameters
- *
- * @see https://developers.whmcs.com/provisioning-modules/module-parameters/
- *
- * @return string "success" or an error message
- */
- function azuracast_CreateAccount(array $params)
- {
- try {
- explodeIfInvalidLicense($params);
- $endpoint = $params['serverhostname'];
- $token = $params['serverpassword'];
- $station_name = $params['customfields']['name'];
- $transmission_type = useUserFieldIfPresent($params['customfields']['transmissionType'], $params['configoption1']);
- $permissions = $params['configoption8'];
- $permissions = strtolower($permissions);
- ................................................................
- .......................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement