Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
laksa19 authored Mar 20, 2019
1 parent 2508bd6 commit 836340d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 3 additions & 8 deletions hotspot/adduser.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
}else{
$usermode = "up-";
}
if (!empty($chkvalid)){

$comment = $usermode.$comment;
}

$API->comm("/ip/hotspot/user/add", array(
"server" => "$server",
"name" => "$name",
Expand Down Expand Up @@ -160,11 +160,10 @@ function PassUser(){
</td>
</tr>
<tr>
<td class="align-middle"><?= $_comment ?></td><td><input class="form-control" type="text" title="No special characters" id="comment" autocomplete="off" name="comment" value=""><input class="form-control" type="hidden" title="No special characters" id="valid" autocomplete="off" name="valid" value=""></td>
<td class="align-middle"><?= $_comment ?></td><td><input class="form-control" type="text" title="No special characters" id="comment" autocomplete="off" name="comment" value=""></td>
</tr>
<tr >
<td colspan="4" class="align-middle" id="GetValidPrice"></td>
<div style="display:none" id="tempvalid"></div>
</tr>
</table>
</form>
Expand Down Expand Up @@ -197,10 +196,6 @@ function PassUser(){
function GetVP(){
var prof = document.getElementById('uprof').value;
$("#GetValidPrice").load("./process/getvalidprice.php?name="+prof+"&session=<?= $session; ?> #getdata");
$("#tempvalid").load("./process/getvalidprice.php?name="+prof+"&session=<?= $session; ?> #validity");
setTimeout(function() {
document.getElementById('valid').value = document.getElementById('validity').innerHTML;
}, 500);
}
</script>
</div>
8 changes: 6 additions & 2 deletions hotspot/userbyname.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
echo "<script>window.location='./?hotspot=users&profile=all&session=" . $session . "'</script>";
}

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';
}

Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 836340d

Please sign in to comment.