<?php $altCfg = $ubillingConfig->getAlter(); if ($altCfg['PON_ENABLED']) { if (cfr('PON')) { $pon = new PONizer(); //getting ONU json data for list if (wf_CheckGet(array('ajaxonu'))) { die($pon->ajaxOnuData()); } //creating new ONU device if (wf_CheckPost(array('createnewonu', 'newoltid', 'newmac'))) { $onuCreateResult = $pon->onuCreate($_POST['newonumodelid'], $_POST['newoltid'], $_POST['newip'], $_POST['newmac'], $_POST['newserial'], $_POST['newlogin']); if ($onuCreateResult) { multinet_rebuild_all_handlers(); rcms_redirect('?module=ponizer'); } else { show_error(__('This MAC have wrong format')); } } //edits existing ONU in database if (wf_CheckPost(array('editonu', 'editoltid', 'editmac'))) { $pon->onuSave($_POST['editonu'], $_POST['editonumodelid'], $_POST['editoltid'], $_POST['editip'], $_POST['editmac'], $_POST['editserial'], $_POST['editlogin']); multinet_rebuild_all_handlers(); rcms_redirect('?module=ponizer&editonu=' . $_POST['editonu']); } //deleting existing ONU if (wf_CheckGet(array('deleteonu'))) { $pon->onuDelete($_GET['deleteonu']); multinet_rebuild_all_handlers(); rcms_redirect('?module=ponizer');
sp_SnmpPollDevice($eachDevice['ip'], $eachDevice['snmp'], $allTemplates, $deviceTemplate, $allusermacs, $alladdress, true); print date("Y-m-d H:i:s") . ' ' . $eachDevice['ip'] . ' [OK]' . "\n"; } else { print date("Y-m-d H:i:s") . ' ' . $eachDevice['ip'] . ' [FAIL]' . "\n"; } } } } die('OK:SWPOLL'); } else { die('ERROR:SWPOLL_NODEVICES'); } } if ($_GET['action'] == 'oltpoll') { if ($alterconf['PON_ENABLED']) { $pony = new PONizer(); $pony->oltDevicesPolling(); die('OK:OLTPOLL'); } else { die('ERROR:PON_DISABLED'); } } /* * Switch ICMP reping to fill dead cache */ if ($_GET['action'] == 'swping') { $currenttime = time(); $deadSwitches = zb_SwitchesRepingAll(); zb_StorageSet('SWPINGTIME', $currenttime); //store dead switches log data if (!empty($deadSwitches)) {