Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Het controleren hoeveel reseller pakketen een gebruiker heeft.
- * Geschreven door Julian van Schijndel
- */
- use Illuminate\Database\Capsule\Manager as Capsule;
- use WHMCS\View\Menu\Item as MenuItem;
- add_hook("ClientAreaPage", 1, function ($vars) {
- $client = Menu::context('client');
- $resellerAmount = Capsule::table('tblhosting')
- ->join('tblproducts', 'tblhosting.packageid', '=', 'tblproducts.id')
- ->whereIn('tblproducts.type', array("reselleraccount"))
- ->where('userid', $client->id)
- ->count();
- return array("totalreseller" => $resellerAmount);
- });
- ?>
Advertisement
Add Comment
Please, Sign In to add comment