Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.8.0
- * @ Author : DeZender
- * @ Release on : 25.09.2017
- * @ Official site : http://DeZender.Net
- *
- */
- function cloudberry_ConfigOptions()
- {
- $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'cbusername' );
- $row = $rs->get( );
- $username = $row[0]->value;
- $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'cbpassword' );
- $row = $rs->get( );
- $password = $row[0]->value;
- $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'whmcsusername' );
- $row = $rs->get( );
- $whmcsusername = $row[0]->value;
- $auth = new \Cloudberry\Provider( $username, $password );
- $request = $auth->getToken( );
- $token = $request->access_token;
- $request = new \Cloudberry\Packages( $token );
- $storageLimits = $request->getPackages( );
- $request = new \Cloudberry\Destinations( $token );
- $destinations = $request->getDestinations( );
- $request = new \Cloudberry\Accounts( $token );
- $storageAccounts = $request->getAccounts( );
- $storageList = array( );
- $destinationList = array( );
- foreach ($storageAccounts as $k => $v) {
- $storageList[] = $v->DisplayName;
- }
- foreach ($storageLimits as $k => $v) {
- $limitsList[] = $v->Name;
- }
- foreach ($destinations as $k => $v) {
- $destinationList[] = $v->Destination;
- }
- $configarray = array(
- 'Storage account' => array(
- 'Type' => 'dropdown',
- 'Options' => implode( ',', $storageList )
- ),
- 'Storage limit' => array(
- 'Type' => 'dropdown',
- 'Options' => implode( ',', $limitsList )
- ),
- 'Destination' => array(
- 'Type' => 'dropdown',
- 'Options' => implode( ',', $destinationList )
- ),
- 'License type' => array(
- 'Type' => 'dropdown',
- 'Options' => 'Desktop/Server (File Backup),MS SQL Server,MS Exchange,MS SQL Server + MS Exchange,Network (5 shares),Network (20 shares),Bare Metal,Virtual Machine,Virtual Machine Socket,Ultimate,Desktop (File Backup),Google Apps / Office 365,Image Based,No license( trial )'
- ),
- 'Delete data' => array(
- 'Type' => 'yesno',
- 'Description' => 'Check to delete the client backup data when an account is terminated'
- )
- );
- return $configarray;
- }
- function cloudberry_CreateAccount($params)
- {
- try {
- $computers = ((isset( $params['configoptions']['Computers'] ) ? $params['configoptions']['Computers'] : 1));
- $row = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->get( );
- foreach ($row as $setting) {
- ${_obfuscate_JHNldHRpbmctPnNldHRpbmc} = $setting->value;
- }
- $row = \Illuminate\Database\Capsule\Manager::table( 'tblhosting' )->where( 'userid', $params['userid'] )->where( 'domainstatus', 'Active' )->get( );
- $rewritePassword = ((count( $row ) ? $row[0]->password : false));
- $licenseType = $params['configoption4'];
- ..............................................................................
- .....................................
- ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement