. */ session_start(); // hide all error error_reporting(0); if (!isset($_SESSION["mikhmon"])) { header("Location:../admin.php?id=login"); } else { $getprofile = $API->comm("/ip/hotspot/user/profile/print"); $srvlist = $API->comm("/ip/hotspot/print"); if (isset($_POST['name'])) { $server = ($_POST['server']); $name = ($_POST['name']); $password = ($_POST['pass']); $profile = ($_POST['profile']); $disabled = ($_POST['disabled']); $timelimit = ($_POST['timelimit']); $datalimit = ($_POST['datalimit']); $comment = ($_POST['comment']); $chkvalid = ($_POST['valid']); $mbgb = ($_POST['mbgb']); if ($timelimit == "") { $timelimit = "0"; } else { $timelimit = $timelimit; } if ($datalimit == "") { $datalimit = "0"; } else { $datalimit = $datalimit * $mbgb; } if ($name == $password) { $usermode = "vc-"; }else{ $usermode = "up-"; } $comment = $usermode.$comment; $API->comm("/ip/hotspot/user/add", array( "server" => "$server", "name" => "$name", "password" => "$password", "profile" => "$profile", "disabled" => "no", "limit-uptime" => "$timelimit", "limit-bytes-total" => "$datalimit", "comment" => "$comment", )); $getuser = $API->comm("/ip/hotspot/user/print", array( "?name" => "$name", )); $uid = $getuser[0]['.id']; echo ""; } } ?>

".$_close.""; } else { echo " ".$_close.""; } ?>
Server