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
const wb_expiry = new function(){ | |
self.load_time = 99999999999999; //set automatically | |
self.page_expiry = 60; //minutes | |
self.reload_timer = {}; | |
this.hidden = 'hidden'; | |
this.vis_change = 'visibilitychange'; | |
this.hidden_state = 'visibilityState'; | |
this.currently_visible = true; |
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
// Smoothscroll | |
function ssc_init() { | |
if (!document.body) return; | |
var e = document.body; | |
var t = document.documentElement; | |
var n = window.innerHeight; | |
var r = e.scrollHeight; | |
ssc_root = document.compatMode.indexOf("CSS") >= 0 ? t : e; | |
ssc_activeElement = e; | |
ssc_initdone = true; |
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 (!defined("WHMCS")) | |
die("This file cannot be accessed directly"); | |
use WHMCS\Database\Capsule; | |
/* | |
* Copies account details from parent accounts to sub-accounts | |
*/ | |
add_hook('ContactAdd', 1, "wb_setup_sub_accounts"); |
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 (!defined("WHMCS")) | |
die("This file cannot be accessed directly"); | |
use WHMCS\Database\Capsule; | |
function wb_mark_zero_invoices_paid(){ | |
//get all unpaid invoices | |
$unpaid_invoices = Capsule::table('tblinvoices')->where('status', 'Unpaid')->get(); | |
foreach( $unpaid_invoices as $inv ){ |
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 (!defined("WHMCS")) | |
die("This file cannot be accessed directly"); | |
use WHMCS\Database\Capsule; | |
function disable_00_invoices($vars) { | |
$merge_fields = array(); | |
$email_template_name = $vars['messagename']; # Email template name being sent |
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 (!defined("WHMCS")) | |
die("This file cannot be accessed directly"); | |
use WHMCS\Database\Capsule; | |
/* | |
* Temporarily updates the primary account's email address to that of the | |
* company's Billing contact upon creation of a new invoice so that invoices | |
* are not sent to the primary account holder. |