Skip to content

Instantly share code, notes, and snippets.

@msaulohenrique
Created January 22, 2020 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save msaulohenrique/cbe7015e2b08e0e47a6c16e0dbfe0bea to your computer and use it in GitHub Desktop.
Save msaulohenrique/cbe7015e2b08e0e47a6c16e0dbfe0bea to your computer and use it in GitHub Desktop.
Criar arquivo no diretório /includes/hooks/
<?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