More Adventures in Custom Programming...

09 Nov

Lately I've been working on an interesting project - a time management system for one of the organizations I work with at UAB. The need was to have a system to track the hours of the 50+ employees in this organization, and then run reports that calculated the hours automatically. All their work is done on a computer (survey research), so having the system online is the way to go. Nothing out there did exactly what we wanted (custom calculations for production hours vs. logged hours, etc) so for the first time in a long time I fired up Wordpad and started cranking out some handwritten code. Yes, Wordpad. Using php's mktime, date, and datediff, I quickly got all the functions I needed working with a 2 table mysql database. Then I moved all the functions except the log in and log out forms into a Drupal install so that I could use the built in user access controls to lock out the employees from the administration section. That's one of the great things about Drupal - I can set it to accept php code, so when I create a "block" that is only visible to authenticated users, I can put my custom php functions in it. In this case, I put all the administrative functions (signing in an employee that forgot, creating reports, exporting to excel, etc) behind the Drupal user log in.

Increase your website traffic with Attracta.com