<?php if (cfr('NEWMAC')) { show_window(__('Unknown MAC address'), zb_NewMacShow()); } else { show_error(__('You cant control this module')); }
//show error when MAC is in usage show_error(__('This MAC is currently used')); //debuglog log_register("MACDUPLICATE TRY (" . $login . ")"); } } $userip = zb_UserGetIP($login); $current_mac = zb_MultinetGetMAC($userip); $useraddress = zb_UserGetFullAddress($login) . ' (' . $login . ')'; // Edit form construct $fieldnames = array('fieldname1' => __('Current MAC'), 'fieldname2' => __('New MAC')); $fieldkey = 'newmac'; if ($newmacselector and !isset($_GET['oldform'])) { // new mac selector $form = web_EditorStringDataFormMACSelect($fieldnames, $fieldkey, $useraddress, $current_mac); } else { // old school mac input $form = web_EditorStringDataFormMAC($fieldnames, $fieldkey, $useraddress, $current_mac); } $form .= wf_Link('?module=macedit&username='******'', 'Simple MAC selector', false, 'ubButton'); $form .= wf_Link('?module=macedit&username='******'&oldform=true', 'Manual MAC input', false, 'ubButton'); $form .= wf_delimiter(); if ($newmac_report) { $form .= wf_tag('h2') . __('Unknown MAC address') . wf_tag('h2', true) . zb_NewMacShow(); } $form .= web_UserControls($login); show_window(__('Edit MAC'), $form); } } else { show_error(__('You cant control this module')); }