I would suggest you to try open source script like this one hosted on github to execute the staff scheduling app that supports employees attendance monitoring for the selected period (1 week, 1 month, last 2month or last 3 months and so on..)

Note that the github hosted project was a utility, written in Python, for scheduling N number of employees with the objective of both satisfying the workers’ scheduling requests and fulfilling the organization’s needs for workers per shift. The app does few good things you will need as a business.

Another option is to develop it in PHP and Mysql on your own. But you must take security issue seriously of you want to develop it in PHP, because writing a simple app in PHP is more volnurable to many attacks. Also I would suggest you to use some Php based frameworks to achieve this. On the other hand, I was also searching for similar alternative from long time, I have tried to build similar apps inspired by the some online service providers. I like eWorksManager's staff scheduling app because of its simplicity and ease of use. I don't know the technical stuff behind this web based app but I would love to do similar app for my business requirements.