From 836340dccdebe817395efe016ec7e70b500a8c4a Mon Sep 17 00:00:00 2001 From: Laksamadi Guko Date: Wed, 20 Mar 2019 21:05:17 +0700 Subject: [PATCH] Add files via upload --- hotspot/adduser.php | 11 +++-------- hotspot/userbyname.php | 8 ++++++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hotspot/adduser.php b/hotspot/adduser.php index 59387cf..98c16e4 100644 --- a/hotspot/adduser.php +++ b/hotspot/adduser.php @@ -51,9 +51,9 @@ }else{ $usermode = "up-"; } - if (!empty($chkvalid)){ + $comment = $usermode.$comment; - } + $API->comm("/ip/hotspot/user/add", array( "server" => "$server", "name" => "$name", @@ -160,11 +160,10 @@ function PassUser(){ - + - @@ -197,10 +196,6 @@ function PassUser(){ function GetVP(){ var prof = document.getElementById('uprof').value; $("#GetValidPrice").load("./process/getvalidprice.php?name="+prof+"&session= #getdata"); - $("#tempvalid").load("./process/getvalidprice.php?name="+prof+"&session= #validity"); - setTimeout(function() { - document.getElementById('valid').value = document.getElementById('validity').innerHTML; -}, 500); } \ No newline at end of file diff --git a/hotspot/userbyname.php b/hotspot/userbyname.php index e58d1ff..a4187c2 100644 --- a/hotspot/userbyname.php +++ b/hotspot/userbyname.php @@ -76,7 +76,7 @@ echo ""; } - if((substr($ucomment,3,1) == "/" && substr($ucomment,6,1) == "/") || substr($ucomment,0,3) == "vc-" || substr($ucomment,0,3) == "up-"){ + if((substr($ucomment,3,1) == "/" && substr($ucomment,6,1) == "/")){ $commt = 'disabled'; } @@ -215,9 +215,13 @@ }else{ $usermode = "up-"; } - if (empty($comment)){ + + if((substr($comment,3,1) == "/" && substr($comment,6,1) == "/") || substr($comment,0,3) == "vc-" || substr($comment,0,3) == "up-"){ + $comment = $comment; + }else{ $comment = $usermode.$comment; } + $API->comm("/ip/hotspot/user/set", array( ".id" => "$uid", "server" => "$server",