Created
January 22, 2020 18:26
-
-
Save msaulohenrique/cbe7015e2b08e0e47a6c16e0dbfe0bea to your computer and use it in GitHub Desktop.
Criar arquivo no diretório /includes/hooks/
This file contains 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
<?php | |
if ($unblockip_isactive){ | |
use WHMCS\View\Menu\Item; | |
add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) | |
{ | |
$form_unlockip = <<<EOT | |
<p><strong> | |
{$unblockip_alerts}</p> | |
<p><form name='ipaddresscheck' method='POST' action='index.php?m=unblockip'> | |
<input type="text" size="25" name="ip_address" style="text-align: center;" value="{$smarty.server.REMOTE_ADDR}" class="form-control"> | |
<input type="hidden" name="action" value="remove_ip_block" /><br/> | |
<input class="btn btn-primary" type="submit" name="unblock" value="{$unblock_lang.request_removal_of_block}" /> | |
</form> | |
EOT; | |
$homePagePanels->addChild('unlockip_form', array( | |
'label' => 'Desbloquear IP', | |
'icon' => 'fa-unlock', | |
'order' => 20, | |
'bodyHtml' => $form_unlockip, | |
)); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment