setMenu('/ip hotspot user profile'); if(strtolower($session_timeout) == 'none') $session_timeout = '00:00:00'; $util->add( array( 'name' => "$profile_name", 'rate-limit' => "$rate_limit", 'shared-users' => "$shared_users", 'status-autorefresh' => "1m", 'transparent-proxy' => "yes", 'on-login' => "$login_script", ) ); /* Old version array( 'name' => "$profile_name", 'rate-limit' => "$rate_limit", 'session-timeout' => "$session_timeout", 'shared-users' => "$shared_users", 'mac-cookie-timeout' => "$mac_cookie_timeout", 'keepalive-timeout' => "$keepalive_timeout", 'status-autorefresh' => "1m", 'transparent-proxy' => "yes", 'on-login' => "$login_script", ) */ /* if(strtolower($session_timeout) == 'none') { $id = $client->sendSync(new Request('/ip/hotspot/user/profile/print .proplist=.id', null, Query::where('name', $profile_name)))->getArgument('.id'); $util->setMenu('/ip hotspot user profile'); $util->unsetValue($id, 'session-timeout'); } */ echo 2; //Success } else { echo 1; //Profile name/Session Timeout Empty } } else { echo 0; //Not Authorised } ?>