ptvui.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. if (ubRouting::get('action') == 'ptvui') {
  3. if ($ubillingConfig->getAlterParam('PTV_ENABLED')) {
  4. $ptv = new PTV();
  5. if (ubRouting::checkGet('subdata')) {
  6. $ptv->usReplyUserData(ubRouting::get('subdata'));
  7. }
  8. if (ubRouting::checkGet('tardata')) {
  9. $ptv->usReplyTariffs();
  10. }
  11. if (ubRouting::checkGet('fulldata')) {
  12. $ptv->usReplyUserFullData(ubRouting::get('fulldata'));
  13. }
  14. if (ubRouting::checkGet('newdev')) {
  15. $ptv->createDevice(ubRouting::get('newdev'));
  16. }
  17. if (ubRouting::checkGet(array('deldev', 'subid'))) {
  18. $ptv->deleteDevice(ubRouting::get('subid', 'int'), ubRouting::get('deldev'));
  19. }
  20. if (ubRouting::checkGet('newpl')) {
  21. $ptv->createPlayList(ubRouting::get('newpl'));
  22. }
  23. if (ubRouting::checkGet(array('delpl', 'subid'))) {
  24. $ptv->deletePlaylist(ubRouting::get('subid', 'int'), ubRouting::get('delpl'));
  25. }
  26. if (ubRouting::checkGet(array('unsub', 'subid'))) {
  27. $ptv->usUnsubscribe(ubRouting::get('subid', 'int'), ubRouting::get('unsub', 'int'));
  28. }
  29. if (ubRouting::checkGet(array('subserv', 'sublogin'))) {
  30. $ptv->usSubscribe(ubRouting::get('sublogin'), ubRouting::get('subserv', 'int'));
  31. }
  32. } else {
  33. $replyError = array('error' => 'ERROR: PTV_DISABLED');
  34. die(json_encode($replyError));
  35. }
  36. }