<?php $altCfg = $ubillingConfig->getAlter(); if ($altCfg['MG_ENABLED']) { if (cfr('MEGOGO')) { $interface = new MegogoInterface(); //primary control panelas show_window('', $interface->renderPanel()); //tariffs management if (wf_CheckGet(array('tariffs'))) { //tariff creation if (wf_CheckPost(array('newtariffname'))) { $tariffCreateResult = $interface->tariffCreate(); if (!$tariffCreateResult) { rcms_redirect($interface::URL_ME . '&' . $interface::URL_TARIFFS); } else { show_window(__('Something went wrong'), $tariffCreateResult); } } //tariff editing if (wf_CheckPost(array('edittariffid', 'edittariffname'))) { $tariffSaveResult = $interface->tariffSave(); if (!$tariffSaveResult) { rcms_redirect($interface::URL_ME . '&' . $interface::URL_TARIFFS); } else { show_window(__('Something went wrong'), $tariffSaveResult); } } //tariff deletion if (wf_CheckGet(array('deletetariffid'))) { $tariffDeletionResult = $interface->tariffDelete($_GET['deletetariffid']);
} } //Megogo schedule processing if ($_GET['action'] == 'mgqueue') { if ($alterconf['MG_ENABLED']) { $mgIface = new MegogoInterface(); $mgQueueProcessingResult = $mgIface->scheduleProcessing(); die($mgQueueProcessingResult); } else { die('ERROR: MEGOGO DISABLED'); } } //Megogo fee processing (monthly) if ($_GET['action'] == 'mgprocessing') { if ($alterconf['MG_ENABLED']) { $mgIface = new MegogoInterface(); $mgFeeProcessingResult = $mgIface->subscriptionFeeProcessing(); die($mgFeeProcessingResult); } else { die('ERROR: MEGOGO DISABLED'); } } //// //// End of actions //// /* * Exeptions handling */ } else { die('ERROR:GET_NO_ACTION'); }