Created
January 29, 2025 20:08
-
-
Save cPFence/9590cdbe9e341dee226fde206778c3f9 to your computer and use it in GitHub Desktop.
Whmcs Module Enhancement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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