index.php 936 B

123456789101112131415161718192021222324
  1. <?php
  2. if ($ubillingConfig->getAlterParam('MG_ENABLED')) {
  3. if (cfr('MEGOGO')) {
  4. if (ubRouting::get('username')) {
  5. $userLogin = ubRouting::get('username', 'mres');
  6. $subscribers = new nya_mg_subscribers();
  7. $subscribers->where('login', '=', $userLogin);
  8. $assignedSubscriber = $subscribers->getAll();
  9. if (!empty($assignedSubscriber)) {
  10. $subscriberProfileUrl = MegogoInterface::URL_ME . '&' . MegogoInterface::URL_SUBVIEW . '&subid=' . $assignedSubscriber[0]['id'];
  11. ubRouting::nav($subscriberProfileUrl);
  12. } else {
  13. show_warning(__('This user account is not associated with any existing Megogo subscriber'));
  14. show_window('', web_UserControls($userLogin));
  15. }
  16. }
  17. } else {
  18. show_error(__('Access denied'));
  19. }
  20. } else {
  21. show_error(__('This module disabled'));
  22. }