Skip to content

Instantly share code, notes, and snippets.

@cPFence
Created January 29, 2025 20:08
Show Gist options
  • Save cPFence/9590cdbe9e341dee226fde206778c3f9 to your computer and use it in GitHub Desktop.
Save cPFence/9590cdbe9e341dee226fde206778c3f9 to your computer and use it in GitHub Desktop.
Whmcs Module Enhancement
function enhance_ClientArea($params)
{
$systemurl = Setting::getValue('SystemURL');
$webmailLink = 'https://webmail.enhance.com/';
// Fetch domain IP
$domain = $params['domain'];
$domainIP = gethostbyname($domain);
// Construct the HTML code
$code = '<form action="'.$systemurl.'/clientarea.php" method="POST" target="_blank">
<input type="hidden" name="action" value="productdetails">
<input type="hidden" name="id" value="' . $params['serviceid'] . '">
<input type="hidden" name="dosinglesignon" value="1">
<input type="submit" value="Login to Control Panel">
<input type="button" value="Login to Webmail" onclick="window.open(\''.$webmailLink.'\')">
</form>';
// Add domain and server IP information
$code .= '<br ><p>Your Domain : ' . $domain . '</p>';
$code .= '<p>Your Server\'s IP : ' . $domainIP . '</p>';
return $code;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment