Guest User

Untitled

a guest
Nov 1st, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.23 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. tcadmin_advanced version 1.05
  5. Copyright (c) 2009 Luis Alvarenga
  6. http://www.tcadmin.com
  7.  
  8. Change Log
  9. v1.05 : Added TS3 upload and download quota attributes
  10. v1.04 : Values are no longet sent with HTML encoding
  11. v1.03 : Service password is updated when using a custom field for the TCAdmin password.
  12. v1.02 : Self signed certificates are supported.
  13. v1.01 : Added support for WHMCS 3.8.1.
  14. Service password is updated correctly.
  15. v1.0 : Initial release.
  16.  
  17. Permission is hereby granted, free of charge, to any person obtaining
  18. a copy of this software and associated documentation files (the
  19. "Software"), to deal in the Software without restriction, including
  20. without limitation the rights to use, copy, modify, merge, publish,
  21. distribute, sublicense, and/or sell copies of the Software, and to
  22. permit persons to whom the Software is furnished to do so, subject to
  23. the following conditions:
  24.  
  25. The above copyright notice and this permission notice shall be included
  26. in all copies or substantial portions of the Software.
  27.  
  28. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  29. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  30. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  31. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  32. CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  33. TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  34. SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  35. */
  36.  
  37. if(count(get_included_files()) ==1) exit("Direct access not permitted.");
  38.  
  39. $billing_api_values = array();
  40.  
  41.  
  42. /* ********************************************************************************** */
  43. /* TCAdmin V2 Values */
  44. /* To create a reseller package make a copy of this file. */
  45. /* Set the value of your reseller role id and the package id that you want to assign. */
  46. /* In your product configuration set the config file to the file that you created. */
  47. /* ********************************************************************************** */
  48. $billing_api_values["role_id"]="";
  49. $billing_api_values["package_id"]="";
  50.  
  51. /* ********************************************************************************* */
  52. /* Custom variables: You can specify custom variable values in the following format: */
  53. /* //$billing_api_values["gamevar_VariableName"] = "value" (for game servers) */
  54. /* //$billing_api_values["voicevar_VariableName"] = "value" (for voice servers) */
  55. /* ********************************************************************************* */
  56.  
  57. /* *************** */
  58. /* Advanced Values */
  59. /* *************** */
  60.  
  61. $billing_api_values["game_additional_slots"]="0";
  62. $billing_api_values["voice_additional_slots"]="0";
  63. $billing_api_values["voice_additional_arguments"]="";
  64. $billing_api_values["voice_upload_quota"]="";
  65. $billing_api_values["voice_download_quota"]="";
  66.  
  67. /* ************************** */
  68. /* Client UserId and Password */
  69. /* ************************** */
  70.  
  71. $billing_api_values["user_name"] = $params["username"];
  72. $billing_api_values["user_password"] = $params["password"];
  73.  
  74. /* *************************************************************************************** */
  75. /* DON'T CHANGE BELLOW THIS LINE */
  76. /* *************************************************************************************** */
  77.  
  78.  
  79. /* **************************************** */
  80. /* Values found in the module settings page */
  81. /* **************************************** */
  82.  
  83. $billing_api_values["game_package_id"] = $params["serviceid"];
  84. $billing_api_values["voice_package_id"] = $params["serviceid"];
  85. $billing_api_values["package_package_id"] = $params["serviceid"];
  86. $billing_api_values["client_package_id"] = $params["serviceid"];
  87.  
  88.  
  89. $billing_api_values["game_id"] = $params["configoption3"];
  90. $billing_api_values["game_slots"] = $params["configoption5"];
  91. $billing_api_values["game_private"] = $params["configoption7"];
  92. $billing_api_values["game_branded"] = $params["configoption9"];
  93. $billing_api_values["game_datacenter"] = $params["configoption11"];
  94. $billing_api_values["game_hostname"] = $params["configoption13"];
  95. $billing_api_values["game_rcon_password"] = $params["configoption15"];
  96. $billing_api_values["game_private_password"] = $params["configoption17"];
  97.  
  98. $billing_api_values["voice_id"] = $params["configoption4"];
  99. $billing_api_values["voice_slots"] = $params["configoption6"];
  100. $billing_api_values["voice_private"] = $params["configoption8"];
  101. $billing_api_values["voice_branded"] = $params["configoption10"];
  102. $billing_api_values["voice_datacenter"] = $params["configoption12"];
  103. $billing_api_values["voice_hostname"] = $params["configoption14"];
  104. $billing_api_values["voice_rcon_password"] = $params["configoption16"];
  105. $billing_api_values["voice_private_password"] = $params["configoption18"];
  106.  
  107. $billing_api_values["skip_page"]="1";
  108.  
  109. /* ****************** */
  110. /* Client Information */
  111. /* ****************** */
  112.  
  113. $billing_api_values["client_id"] = $params["clientsdetails"]["userid"];
  114. $billing_api_values["user_email"] = $params["clientsdetails"]["email"];
  115. $billing_api_values["user_fname"] = $params["clientsdetails"]["firstname"];
  116. $billing_api_values["user_lname"] = $params["clientsdetails"]["lastname"];
  117. $billing_api_values["user_address1"] = $params["clientsdetails"]["address1"];
  118. $billing_api_values["user_address2"] = $params["clientsdetails"]["address2"];
  119. $billing_api_values["user_city"] = $params["clientsdetails"]["city"];
  120. $billing_api_values["user_state"] = $params["clientsdetails"]["state"];
  121. $billing_api_values["user_zip"] = $params["clientsdetails"]["postcode"];
  122. $billing_api_values["user_country"] = $params["clientsdetails"]["country"];
  123. $billing_api_values["user_phone1"] = $params["clientsdetails"]["phonenumber"];
  124. $billing_api_values["user_phone2"] = "";
  125.  
  126. /* ****************************** */
  127. /* Billing API Login and Password */
  128. /* ****************************** */
  129. $billing_api_values["response_type"] = "text";
  130. $billing_api_values["tcadmin_username"] = $params["serverusername"];
  131. $billing_api_values["tcadmin_password"] = $params["serverpassword"];
  132.  
  133. ?>
Advertisement
Add Comment
Please, Sign In to add comment