Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function cloudberry_ConfigOptions()
  15. {
  16. $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'cbusername' );
  17. $row = $rs->get( );
  18. $username = $row[0]->value;
  19. $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'cbpassword' );
  20. $row = $rs->get( );
  21. $password = $row[0]->value;
  22. $rs = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->where( 'setting', 'whmcsusername' );
  23. $row = $rs->get( );
  24. $whmcsusername = $row[0]->value;
  25. $auth = new \Cloudberry\Provider( $username, $password );
  26. $request = $auth->getToken( );
  27. $token = $request->access_token;
  28. $request = new \Cloudberry\Packages( $token );
  29. $storageLimits = $request->getPackages( );
  30. $request = new \Cloudberry\Destinations( $token );
  31. $destinations = $request->getDestinations( );
  32. $request = new \Cloudberry\Accounts( $token );
  33. $storageAccounts = $request->getAccounts( );
  34. $storageList = array( );
  35. $destinationList = array( );
  36.  
  37. foreach ($storageAccounts as $k => $v) {
  38. $storageList[] = $v->DisplayName;
  39. }
  40.  
  41. foreach ($storageLimits as $k => $v) {
  42. $limitsList[] = $v->Name;
  43. }
  44.  
  45. foreach ($destinations as $k => $v) {
  46. $destinationList[] = $v->Destination;
  47. }
  48.  
  49. $configarray = array(
  50. 'Storage account' => array(
  51. 'Type' => 'dropdown',
  52. 'Options' => implode( ',', $storageList )
  53. ),
  54. 'Storage limit' => array(
  55. 'Type' => 'dropdown',
  56. 'Options' => implode( ',', $limitsList )
  57. ),
  58. 'Destination' => array(
  59. 'Type' => 'dropdown',
  60. 'Options' => implode( ',', $destinationList )
  61. ),
  62. 'License type' => array(
  63. 'Type' => 'dropdown',
  64. '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 )'
  65. ),
  66. 'Delete data' => array(
  67. 'Type' => 'yesno',
  68. 'Description' => 'Check to delete the client backup data when an account is terminated'
  69. )
  70. );
  71. return $configarray;
  72. }
  73.  
  74. function cloudberry_CreateAccount($params)
  75. {
  76. try {
  77. $computers = ((isset( $params['configoptions']['Computers'] ) ? $params['configoptions']['Computers'] : 1));
  78. $row = \Illuminate\Database\Capsule\Manager::table( 'tbladdonmodules' )->where( 'module', 'cloudberry' )->get( );
  79.  
  80. foreach ($row as $setting) {
  81. ${_obfuscate_JHNldHRpbmctPnNldHRpbmc} = $setting->value;
  82. }
  83.  
  84. $row = \Illuminate\Database\Capsule\Manager::table( 'tblhosting' )->where( 'userid', $params['userid'] )->where( 'domainstatus', 'Active' )->get( );
  85. $rewritePassword = ((count( $row ) ? $row[0]->password : false));
  86. $licenseType = $params['configoption4'];
  87. ..............................................................................
  88. .....................................
  89. ..........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement