function ss_mikrotik_qusers($hostid, $cmd = 'index', $arg1 = '', $arg2 = '') { if ($cmd == 'index') { $return_arr = ss_mikrotik_qusers_getnames($hostid, $arg1); for ($i = 0; $i < sizeof($return_arr); $i++) { print $return_arr[$i] . "\n"; } } elseif ($cmd == 'query') { $arr_index = ss_mikrotik_qusers_getnames($hostid, $arg1); $arr = ss_mikrotik_qusers_getinfo($hostid, $arg1, $arg2); for ($i = 0; $i < sizeof($arr_index); $i++) { if (isset($arr[$arr_index[$i]])) { print $arr_index[$i] . '!' . $arr[$arr_index[$i]] . "\n"; } } } elseif ($cmd == 'get') { $arg = $arg1; $index = $arg2; return ss_mikrotik_qusers_getvalue($hostid, $index, $arg); } }
function ss_mikrotik_qusers($hostid, $cmd = "index", $arg1 = "", $arg2 = "") { if ($cmd == "index") { $return_arr = ss_mikrotik_qusers_getnames($hostid, $arg1); for ($i = 0; $i < sizeof($return_arr); $i++) { print $return_arr[$i] . "\n"; } } elseif ($cmd == "query") { $arr_index = ss_mikrotik_qusers_getnames($hostid, $arg1); $arr = ss_mikrotik_qusers_getinfo($hostid, $arg1, $arg2); for ($i = 0; $i < sizeof($arr_index); $i++) { if (isset($arr[$arr_index[$i]])) { print $arr_index[$i] . "!" . $arr[$arr_index[$i]] . "\n"; } } } elseif ($cmd == "get") { $arg = $arg1; $index = $arg2; return ss_mikrotik_qusers_getvalue($hostid, $index, $arg); } }