A small/preview project on what the https://fullcalendar.io/ is able to do.
Short description :
When visitor is not logged-in, view full calendar, with read only permissions.
When admin logged-in (login.php)
has the :
point3 – add worker
point2 – drag the workers to calendar, added from point3 (saved to local sqlite)
point4 - can move the event(s).
point1 – anchor drives to login.php / when logged-in drives to logout.php
the application runs on index.php, all workers are available to view the calendar.
when a worker dropped to a date this modal appears
and is one other, when the draggable events r-clicked!
-keep in mind login.php has 3 login attempts validation, when admin logged-in, there is a 24h validation!
ps to create the admin, you have to unrem the lines at login.php once, the rem again!!
sqlite doesnt have date field type, using yyyy-mm-dd on TEXT field type, we are able to execute a query (get_events.php) like :
select * from days_off
left join users on users.user_id=days_off.user_id
where date_occur between '2016-09-23' and '2016-09-29'
alternative, universal solution when have timestamp using sqlite builtin function strftime
--http://www.pipiscrew.com/2017/05/sqlite-query-datetime-between/
select * from days_off
left join users on users.user_id=days_off.user_id
where strftime('%s', date_occur) between strftime('%s', '2016-09-23 00:00') and strftime('%s', '2016-09-29 23:59')
more at https://www.sqlite.org/lang_datefunc.html
Alternative - Life Calendar – Your Life in Weeks https://life-calendar-in-weeks.vercel.app/