<?php if (cfr('WATCHDOG')) { $altercfg = rcms_parse_ini_file(CONFIG_PATH . "alter.ini"); if ($altercfg['WATCHDOG_ENABLED']) { $interface = new WatchDogInterface(); $interface->loadAllTasks(); $interface->loadSettings(); //manual run of existing tasks if (wf_CheckGet(array('manual'))) { $watchdog = new WatchDog(); $watchdog->processTask(); rcms_redirect("?module=watchdog"); } //deleting existing task if (wf_CheckGet(array('delete'))) { $interface->deleteTask($_GET['delete']); rcms_redirect("?module=watchdog"); } //adding new task if (wf_CheckPost(array('newname', 'newchecktype', 'newparam', 'newoperator'))) { if (isset($_POST['newactive'])) { $newActivity = 1; } else { $newActivity = 0; } $interface->createTask($_POST['newname'], $_POST['newchecktype'], $_POST['newparam'], $_POST['newoperator'], $_POST['newcondition'], $_POST['newaction'], $newActivity); rcms_redirect("?module=watchdog"); } //changing task if (wf_CheckPost(array('editname'))) {
log_register('AUTOFREEZE DONE COUNT `' . $freezeCount . '`'); die('OK:AUTOFREEZE'); } else { die('OK:NO_USERS_TO_AUTOFREEZE'); } } else { die('ERROR:NO_AUTOFREEZE_CASH_LIMIT'); } } /* * Watchdog tasks processing */ if ($_GET['action'] == 'watchdog') { if ($alterconf['WATCHDOG_ENABLED']) { $runWatchDog = new WatchDog(); $runWatchDog->processTask(); die('OK:WATCHDOG'); } else { die('ERROR:NO_WATCHDOG_ENABLED'); } } /* * UKV charge fee processing */ if ($_GET['action'] == 'ukvfeeprocessing') { if ($alterconf['UKV_ENABLED']) { $ukvApiRun = new UkvSystem(); $ukvFee = $ukvApiRun->feeChargeAll(); die('OK:UKVFEEPROCESSING:' . $ukvFee); } else { die('ERROR:NO_UKV_ENABLED');