Community discussions

MikroTik App
 
ccmks
just joined
Topic Author
Posts: 21
Joined: Sun May 31, 2020 7:51 pm

Display Expire Date on Hotspot Status Page

Sun May 31, 2020 8:13 pm

Hello,

I have setup hotpsot + user manager. After customizing the hotspot page, I am very satisfied with it overall, except I need to have a way to display user the expire date on status page. Currently, I have been looking on Google and the Mikrotik forum, and looks like everyone just only talked about how much the up time left the user has. I didn't find anything related to display user expire date.

What would be the variable in HTML code for user expire date?

Since the user creation was done through User Manager, I would like the user can see the end time / till time set on user manager on hotspot status page

Please refer to the attachment for the end time / till time.

Thank you
You do not have the required permissions to view the files attached to this post.
 
ee406621
just joined
Posts: 2
Joined: Thu Sep 29, 2016 8:34 pm

Re: Display Expire Date on Hotspot Status Page

Fri Oct 30, 2020 11:08 pm

Same Problem
 
User avatar
icdbhh
just joined
Posts: 1
Joined: Fri Mar 19, 2021 3:22 pm

Re: Display Expire Date on Hotspot Status Page

Fri Mar 19, 2021 5:58 pm

Hello Friend's For This problem I Create a Solution , Follow Below Step


1> add below Script Into "status.html" page

<script>
var seconds = '$(session-time-left-secs)';
var newDate = new Date(Date.now()+ seconds*1000);
var expire_date = newDate.toDateString();
document.getElementById("Expire_date").innerHTML = expire_date;
</script>

2> then add below paragraph tag into your expire date section , where you show the expire data ...

<p id="Expire_date"></p>

have fun .... now refresh you can see your plan expire date ..........
Last edited by icdbhh on Fri Mar 19, 2021 5:59 pm, edited 1 time in total.
 
VanzJ13
just joined
Posts: 2
Joined: Wed May 12, 2021 6:41 am

Re: Display Expire Date on Hotspot Status Page

Sat Jul 31, 2021 8:11 pm

Hello Friend's For This problem I Create a Solution , Follow Below Step


1> add below Script Into "status.html" page

<script>
var seconds = '$(session-time-left-secs)';
var newDate = new Date(Date.now()+ seconds*1000);
var expire_date = newDate.toDateString();
document.getElementById("Expire_date").innerHTML = expire_date;
</script>

2> then add below paragraph tag into your expire date section , where you show the expire data ...

<p id="Expire_date"></p>

have fun .... now refresh you can see your plan expire date ..........
Hello, Sir thank you so much for sharing, by the way, can expiry time also be displayed?

Who is online

Users browsing this forum: No registered users and 7 guests