im planning on writing a script that involves users submitting content, what i need to do is make the content require admin approval before being listed on the site, this i can do, but the problem is im not going to be the only Admin/Moderator approving submissions.
its more of a thing of convenience but im going to list all the submissions in a list with just the basic title and date etc where the Admin/Mod can click on each individual one and see it in more detail, then if happy approve it for listing, but i want the list only to show submissions that arent currently being reviewed, for example
Admin 1 & Admin 2 both login to submissions panel, Admin one click on Submission 1 to view more details at same time Admin 2 loads the list of submissions but Submissions 1 is not listed as its is currrently being viewed by Admin 1.
following me, i think i know of a way to get it not to appear in the list:
SELECT * FROM listings WHERE Status = 0
where:
0 = Pending Approval
1 = Being Viewed
2 = Approved
3 = Rejected
where being_viewed for Submission 1 is set to 1, so this solves that problem but how can i get being_viewed to default back to 0 (Pending Approval) if Admin 1 closes the window?