I would create a matrix where the rows are time and the columns the days of the week.
Then I would create an object with four states online, offline, away, closed which would occupy each one of the positions in the matrix. The stated of each element would change based on the interaction between the user and the UI (meaning those buttons)
You can easily send the json information of each element via ajax to the server by compressing it upon status change.
Good luck.
3
solved How can I create the following using Jquery? [closed]