Age of Valor
login.php?sid=f91fae72bc04f6cd680e70be68ab7b7b profile.php?mode=register&sid=f91fae72bc04f6cd680e70be68ab7b7b faq.php?sid=f91fae72bc04f6cd680e70be68ab7b7b memberlist.php?sid=f91fae72bc04f6cd680e70be68ab7b7b search.php?sid=f91fae72bc04f6cd680e70be68ab7b7b index.php?sid=f91fae72bc04f6cd680e70be68ab7b7b
Site Links: Home :: Donate :: Features :: Connection Guide




Age of Valor Forum Index » Off Topic » Online Status Indicator?
Post new topic  Reply to topic View previous topic :: View next topic 
Online Status Indicator?
PostPosted: Wed Aug 09, 2017 12:08 am Reply with quote
ggkthx
Joined: 13 Jan 2009
Posts: 894
Location: MN




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.
_________________

I didn't choose the Fel life, the Fel life chose me.
View user's profile Send private message Visit poster's website AIM Address
PostPosted: Wed Aug 09, 2017 3:42 am Reply with quote
Red Squirrel
AoV Owner
Joined: 13 Dec 2006
Posts: 8109
Location: Ontario, Canada




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.
_________________

my blog

Honk if you love Jesus, text if you want to meet Him!
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Thu Aug 10, 2017 12:39 am Reply with quote
ggkthx
Joined: 13 Jan 2009
Posts: 894
Location: MN




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.
_________________

I didn't choose the Fel life, the Fel life chose me.
View user's profile Send private message Visit poster's website AIM Address
PostPosted: Thu Aug 10, 2017 6:26 am Reply with quote
Red Squirrel
AoV Owner
Joined: 13 Dec 2006
Posts: 8109
Location: Ontario, Canada




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/somecomlicatedfile.php?setonline=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.
_________________

my blog

Honk if you love Jesus, text if you want to meet Him!
View user's profile Send private message Visit poster's website MSN Messenger
Online Status Indicator?
Age of Valor Forum Index » Off Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  
Shout Box


Powered by phpBB © 2001-2004 phpBB Group
Designed for Trushkin.net | Themes Database

This website and forum best viewed in a standards compliant browser such as Firefox or Opera.
Internet explorer is not recommended.