/** * Returns Vlan online detection form * * @return string */ protected function getVlanOnline() { $result = ''; if ($this->alterCfg['VLAN_ONLINE_IN_PROFILE']) { $vlanGen = new VlanGen(); $vlan = $vlanGen->GetVlan($this->login); if (!empty($vlan)) { $history = new VlanMacHistory(); $cells = wf_TableCell(__('Detect online'), '30%', 'row2'); $cells .= wf_TableCell($history->GetUserVlanOnline($this->login, $vlanGen->GetVlan($this->login))); $rows = wf_TableRow($cells, 'row3'); $result = wf_TableBody($rows, '100%', '0'); } } return $result; }
<?php $altcfg = rcms_parse_ini_file(CONFIG_PATH . 'alter.ini'); if ($altcfg['VLANGEN_SUPPORT']) { if (cfr('PLVLANGEN')) { if (isset($_GET['username'])) { $VlanGen = new VlanGen(); $login = $_GET['username']; $cur_vlan = $VlanGen->GetVlan($login); $form = wf_Link("?module=vlan_mac_history&username="******"&vlan=" . $cur_vlan, __('Users MAC and VLAN history'), false, 'ubButton'); show_window(__('Actions'), $form); if (isset($_POST['DeleteVlanHost'])) { $VlanGen->DeleteVlanHost($login); $VlanGen->DeleteVlanHostQinQ($login); rcms_redirect(VlanGen::MODULE_URL . "&username="******"&username="******"both" />'); show_window('', $VlanGen->ChangeForm()); show_window('', wf_JSAlert(VlanGen::MODULE_URL . "&username="******"&DeleteVlanHost=true", $VlanGen->DeleteForm(), __('Removing this may lead to irreparable results'))); if ($altcfg['SWITCH_AUTOCONFIG']) { show_window('', $VlanGen->ChangeOnPortForm()); } if ($altcfg['ONUAUTO_CONFIG']) { show_window('', $VlanGen->ChangeOnOnuForm()); } if (isset($_POST['ChangeVlanOnPort'])) {