Advertisement
Guest User

Untitled

a guest
May 25th, 2022
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2. include '../../../init.php';
  3.  
  4. use WHMCS\Product\Server;
  5. use WHMCS\Service\Service;
  6.  
  7. $serviceId = $_GET['serviceId'];
  8. $service = Service::find($serviceId);
  9.  
  10. // Deny access if no serviceId is specified, if the client is not logged in or if the client does not own the service
  11. if(!$serviceId OR !$_SESSION['uid'] OR $service->clientId !== $_SESSION['uid']){
  12.     throw new Exception('Access denied');
  13. }
  14. $server = Server::find($service->serverId);
  15.  
  16. header('Content-Type: application/json');
  17.  
  18. //echo $array
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement