Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../../../init.php';
- use WHMCS\Product\Server;
- use WHMCS\Service\Service;
- $serviceId = $_GET['serviceId'];
- $service = Service::find($serviceId);
- // Deny access if no serviceId is specified, if the client is not logged in or if the client does not own the service
- if(!$serviceId OR !$_SESSION['uid'] OR $service->clientId !== $_SESSION['uid']){
- throw new Exception('Access denied');
- }
- $server = Server::find($service->serverId);
- header('Content-Type: application/json');
- //echo $array
-
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement