Advertisement
Guest User

Untitled

a guest
Jul 26th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 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.5.0.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2018
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. if (!defined('WHMCS')) {
  15. exit('This file cannot be accessed directly');
  16. }
  17.  
  18. define('WHMCSLAB_ESXADDON_VERSION', '5.4.1');
  19. /**
  20. * Esx Addon Module
  21. *
  22. * @package WHMCSLAB
  23. * @author WHMCSLAB <info@whmcslab.com>
  24. * @copyright Copyright (c) WHMCSLAB 2013
  25. * @license -
  26. * @version 5.4.1
  27. * @link http://www.whmcslab.com/
  28. */
  29.  
  30. function esxaddon_config()
  31. {
  32. $configarray = array('name' => 'ESX Addon', 'description' => 'ESX virtual machine management', 'version' => WHMCSLAB_ESXADDON_VERSION, 'author' => 'WHMCSLAB', 'language' => 'english');
  33.  
  34. return $configarray;
  35. }
  36.  
  37. function esxaddon_output($vars)
  38. {
  39. if (isset($_POST['licensekey'])) {
  40. $sql = "UPDATE mod_whmcslab_addons SET licensekey = '" . mysql_real_escape_string($_POST['licensekey']) . "' WHERE modname = 'esx'";
  41. $result = mysql_query($sql);
  42. esxaddon_redirect();
  43.  
  44. exit();
  45. }
  46.  
  47. $docurl = 'https://www.whmcslab.com/modulesdatajson.php';
  48. $sql = "SELECT * FROM mod_whmcslab_addons WHERE modname = 'esx' LIMIT 1";
  49. $result = mysql_query($sql);
  50. $dbdata = mysql_fetch_object($result);
  51. $dbdata->config = unserialize($dbdata->config);
  52. $licensekeystatus = esxaddon_check_license($dbdata->licensekey, $dbdata->localkey);
  53. $licensekeystatus = (is_array($licensekeystatus) && isset($licensekeystatus['status']) ? $licensekeystatus['status'] : $licensekeystatus);
  54. $languagefiles = array();
  55. $lang_dir = '../modules/addons/esxaddon/lang/';
  56.  
  57. if (is_dir($lang_dir) && ($dh = opendir($lang_dir))) {
  58. while (($file = readdir($dh)) !== false) {
  59. if (!($file != '.' && $file != '..')) {
  60. continue;
  61. }
  62.  
  63. $languagefiles[] = str_replace('.php', '', $file);
  64. }
  65. closedir($dh);
  66. }
  67.  
  68. $language = $dbdata->language;
  69.  
  70. if (empty($language) || !file_exists($lang_dir . $language . '.php')) {
  71. $language = 'english';
  72. }
  73.  
  74. include $lang_dir . $language . '.php';
  75.  
  76. if ($licensekeystatus != 'Active') {
  77. $htmloutput = '<div id="tabs"><ul style="list-style-type: none; padding-left: 0;"><li id="tab3" class="tab"><a href="javascript:;">' . $_ESXADDON_LANG['LICENSEKEY'] . '</a></li></ul></div>';
  78. $htmloutput .= "<div id=\"tab3box\" class=\"tabbox\"><div id=\"tab_content\">\n <form method=\"post\">\n <table class=\"form\" width=\"100%\" border=\"0\" cellspacing=\"2\" cellpadding=\"3\">\n <tbody>\n <tr>\n <td width=\"23%\" class=\"fieldlabel\">" . $_ESXADDON_LANG['LICENSEKEY'] . "</td>\n <td class=\"fieldarea\"><input class=\"form-control\" style=\"width: 40%\" type=\"text\" name=\"licensekey\" size=\"50\"></td>\n </tr>\n <tr>\n <td class=\"fieldlabel\">" . $_ESXADDON_LANG['STATUS'] . "</td>\n <td class=\"fieldarea\">" . $licensekeystatus . "</td>\n </tr>\n </tbody>\n </table>\n <img src=\"images/spacer.gif\" width=\"1\" height=\"10\"><br>\n <div align=\"center\"><input class=\"btn btn-default\" type=\"submit\" value=\"" . $_ESXADDON_LANG['SAVE'] . "\"></div>\n </form>\n </div></div>";
  79. } else {
  80. include '../modules/addons/esxaddon/functions.php';
  81.  
  82. if (isset($_POST['language'])) {
  83. $sql = "UPDATE mod_whmcslab_addons SET language = '" . mysql_real_escape_string($_POST['language']) . "' WHERE modname = 'esx'";
  84. $result = mysql_query($sql);
  85. esxaddon_redirect();
  86.  
  87. exit();
  88. }
  89.  
  90. if (isset($_POST['colors'])) {
  91. $configdata = mysql_real_escape_string(serialize(array('colors' => $_POST['colors'], 'piecharttype' => $_POST['piecharttype'])));
  92. $sql = "UPDATE mod_whmcslab_addons SET config = '" . $configdata . "' WHERE modname = 'esx'";
  93. $result = mysql_query($sql);
  94. esxaddon_redirect();
  95.  
  96. exit();
  97. }
  98.  
  99. $modulelink = $vars['modulelink'];
  100. $LANG = $vars['_lang'];
  101. $sql = "SELECT id, name, ipaddress, username, password FROM tblservers WHERE type = 'esx' ORDER BY id ASC";
  102. $result = mysql_query($sql);
  103. $servers = array();
  104.  
  105. while ($row = mysql_fetch_object($result)) {
  106. $row->port = 22;
  107.  
  108. if (strpos($row->ipaddress, ':') !== false) {
  109. $ipaddress = explode(':', $row->ipaddress);
  110. ....................................................................
  111. ...........................................
  112. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement