* CaTV fee processing */ if ($_GET['action'] == 'catvfeeprocessing') { $currentYear = date("Y"); //previous month charge fee if ($alterconf['CATV_BACK_FEE']) { $currentMonth = date("m"); if ($currentMonth == 1) { $currentMonth = 12; } else { $currentMonth = $currentMonth - 1; } } else { $currentMonth = date("m"); } if (catv_FeeChargeCheck($currentMonth, $currentYear)) { catv_FeeChargeAllUsers($currentMonth, $currentYear); } else { die('ERROR:ALREADY_CHARGED'); } log_register("REMOTEAPI CATVFEEPROCESSING " . $currentMonth . " " . $currentYear); die('OK:CATVFEEPROCESSING'); } /* * Virtualservices charge fee */ if ($_GET['action'] == 'vserviceschargefee') { if (wf_CheckGet(array('param'))) { if ($_GET['param'] == 'nofrozen') { $vservicesChargeFrozen = false; } else {
//show user list if ($_GET['action'] == 'showusers') { if ($alter_conf['CATV_HP_MODE']) { if (isset($_GET['ajax'])) { catv_AjaxOnlineDataSource(); } catv_UsersShowList_hp(); } else { catv_UsersShowList(); } } //fee charge form if ($_GET['action'] == 'fees') { // charge fee subroutine if (wf_CheckPost(array('newcharge'))) { if (catv_FeeChargeCheck($_POST['chargemonthfee'], $_POST['chargeyear'])) { catv_FeeChargeAllUsers($_POST['chargemonthfee'], $_POST['chargeyear']); rcms_redirect("?module=catv&action=fees"); } else { show_window(__('Error'), __('This month has already been assessed fee')); } } // tariff change subroutine if (wf_CheckPost(array('newtarchange'))) { catv_TariffChangeAllPlanned(); rcms_redirect("?module=catv&action=fees"); } //construct tariff change form $tarchangeinputs = wf_HiddenInput('newtarchange', 'true'); $tarchangeinputs .= wf_Submit('Change tariff for all users'); $tarform = wf_Form('', 'POST', $tarchangeinputs, 'glamour', '');