Page 1 of 1

Online Status Indicator?

Posted: Tue Aug 08, 2017 8:08 pm
by ggkthx
Hey Red, thought you might have a solution to this conundrum.

I have a question on how to do a thing. I think it's a relatively simple thing, but it's weird enough that I'm not sure how to implement it. Basically I want a status indicator, on a web page, like a server online status, but instead of it being automated I need it to be manual and it needs to be able to be toggled by multiple different people. Seems easy, but I can't figure out how I'd do that and google searching has been unhelpful. Msg me if you think you might know where to start.

Ideally I'd then figure out how to make it so it can't be changed by just anyone, so it might need a log in of some sort. And it would be good if it showed who has set it to active.

Archived topic from AOV, old topic ID:6709, old post ID:39085

Online Status Indicator?

Posted: Tue Aug 08, 2017 11:42 pm
by Red Squirrel
I would implement a login system, basic system where hash + salt is stored in DB with username. When user successfully logs in, they would just get a form with a toggle button, maybe a radio button for on/off. It could then simply edit a text file value or a row in the DB. But if it's just one single indicator a text file may work ok.

If you want something simpler and it's not too critical, you could just hard code a password for each user and then have it accessible through a hidden url. So they enter the password and hit submit and it writes to the file.

Not sure how familiar you are with php so I can go in more details if you want.

If you have a forum or other existing system that already has authentication you can probably tie it into that as well.

Archived topic from AOV, old topic ID:6709, old post ID:39086

Online Status Indicator?

Posted: Wed Aug 09, 2017 8:39 pm
by ggkthx
I can muddle through editing someone else's PHP code usually if I'm trying to tweak something but that's about it.

What the issue is is that we have a single quickbooks company file that multiple people need to access at times. but only one person can access it at a time or it causes a problem. so I was thinking if I could park a status online everyone could check that/update to see if it was clear or who was using it. but I wasn't sure how to go about this and google was being unhelpful.

Each local instance of QB fiddles with the company file on the server. but it creates corrupted copies if more than one person touches it at a time. you can even accidentally do it yourself if you close and reopen and it hadn't finished syncing. and there's no way to tell if someone is doing that unless you ask everyone and get a response or after the fact you see that you have a corrupted copy. right now we just have to ask everyone if they're out of there and wait for a reply which is fairly awful. we just added another person potentially using QB so I figured I needed to improve the current terrible method. but I need it simple enough that everyone will do it. So I just wanted a thing people can check that says if it's in use without having to ask everyone and who is using it in case they forget to 'log out'.

There's QB company file hosting services that will block access as soon as one person accesses the file, and that would solve the problem, but they have monthly fees. And QB Online would work, but its kind of a pain and also monthly fees.

Archived topic from AOV, old topic ID:6709, old post ID:39087

Online Status Indicator?

Posted: Thu Aug 10, 2017 2:26 am
by Red Squirrel
Hmmm enable hidden/system file viewing just to see if it creates a temp file when it is open. You could maybe rig something that looks for that file and then updates the online status. A really crude way would be a secret GET url that just toggles a flat on/off. You'd also need a script running on the server that houses the QB file though. I'm not familiar enough with windows scripting if it uses windows but I presume it's doable.

logic kinda like this:

If file eixsts
open this url
else
open this url
end

The url itself could just be a basic php script that sets a text file value to 0 or 1, then the online status page reads that file and displays something based on the value.

The url would be something like http://example.com/script/somecomlicate ... nline=true

This has no security whatsoever though but if it's implimented properly there is not much harm someone could do anyway other than setting the status.

Archived topic from AOV, old topic ID:6709, old post ID:39088