I'm setting up a system where individual users can log in to a "web portal". However, I want to implement an administrative control that can let me "deactivate" or "lock out" certain sections, so that new logins are prevented, but current transactions are permitted to complete. So basically, I'm thinking about something where I have:
Section Status
Books Open
Toys Open
Cameras Shutting Down
Sports Closed
A status of Open means that people can sign in and do transactions. A status of Shutting Down means that people who are signed in can still do stuff EXCEPT start new transactions (so you can browse the shelves but you can't actually put things into a shopping cart that was empty. People who have items in a shopping cart BEFORE the "Shutting Down" status is started can still checkout. And Closed means no one gets in and no transactions are done.
Is there a mechanism that PHP has that allows for this sort of thing?
I could use a database, but I'm wondering whether I'd get a big performance hit with all the reads to check the status when people are doing their browsing/interaction. A straight variable lookup would be faster, I expect, but I don't know how to have a set of variables that's shared between a lot of simultaneous sessions.