Time remaining popup window
I've found several topics in here that touch on this, but none that actually tell how to do it.
I'd like to have my customers know how much time they have remaining before they must renew their subscription. I'm sure it's php code, but I'm danged if I even have a clue how to do this. I'm using mysql with pfsense 2.x . Anyone here feel generous enough to throw this old dog a bone?
Rampage last edited by
i was also interested in this sort of hack, but first of all i need to figure out what's the software used as NAS for the captive portal, is it chillispot? covachilli? or something internally developed?
the NAS might be able to provide the information with proper query.
As I said, I'm using pfSense. That is the NAS.
Stay away from Coova. It's like crack. Looks good at first, but then your teeth go bad and someone turns the light and… well, you get the picture. ;D
Rampage last edited by
yep, but i thought pfsense was running some sort of daemon for the captive portal functionality
what i mean is that i don't know how it is implemented enaugh in details to think of a way to accomplish the task
pfSense is both the NAS and the captive portal, among many other things.
All right, I finally finally got this working.
First things first; during this process I somehow "broke" the redirurl/popup aspect of the login success page. Don't know what I did, but when ever I load the simplest html via "services -> captive portal", the whole thing shows up as the next page. redirurl is not working. I'm sure this is something I've done, and I don't actually care that the window isn't a popup – I rather like it the way it is, but I would like the redirurl working again.
At any rate, what I have now is a page that shows up on log in success that greets the user, informs the user their log in was successful, tells them how may days they have left to use the service, and presents them with a clickable link to wherever it was they were going in the first place. I like it.
I'd be glad to help anyone else going through this issue, just drop a reply into here.
EDIT: In case it isn't clear from my rambling here, the process is very straightforward -- build your php code (whatever that might be) and when it's debugged, upload it via Services -> Captive Portal -> Logout page contents. Debug your code thoroughly from the command line in pfSense before doing this!
basewireless last edited by
Hi Thanks for your post
Cab you tell me were you querying your mysql database directly from the pfsense box or from a server?
We are trying to avoid opening MySQl access to more than one host and we have multiple pfsense captive portals..
Is there a way to pass variables from a hosted server page back to the portal popup logout page (such as overwriting the $PORTAL_REDIRURL$ on a successful connection based on interaction on the portal?
hopefully this makes sense. Just trying to know what variables are available on the portal logout page
I am querying a mysql server that is NOT running on the pfsense machine. Pretty straightforward stuff.