Monthly Archives: April 2006

Project Two: Portability

I’m putting the finishing touches on project two. I’ve beautified the code…as much as I’m going to. Sorry, Professor, if it’s a pain to read/grade. The last thing is to remove elements of non-portability. I’ve got a couple of places that use paths specific to my server. I’ve just about cleaned them up using functions like:

  • dirname()
  • basepath()

I’ll be uploading it soon, we’ll see how well it installs. :)

Update: It installed just fine. Only one hitch, the URLs in the RSS feeds still point to my server. I need to change them to use $_SYSTEM. – Done

Project Two: Managers’ Dashboard

I’m finally finished with the managers’ dashboard. I decided to make a single page where the manager could get critical information. It contains the following sections:

  • Outstanding Orders
  • Today’s Deliveries
  • Today’s Scans
  • Historical Deliveries

The first two and the last section display a expandable list of tracking numbers. Clicking on the tracking number opens the item and shows the details and scans items. Clicking on those items then shows the details or shows all of the scans. The third item is a simple table that shows a list of the day’s scans.

The Historical Deliveries shows a month’s worth of deliveries. The manager can select a new month or year to view those deliveries.

This was by far the most difficult page, because it was so multi-purpose. I had to come up with some complicated MySQL queries to find the deliveries that were made during a particular month…finding the ones for a day is much simpler. A typical query looks like:

SELECT * FROM package_scans WHERE (DATE_FORMAT(scan_date, “%Y-%c”)=’2006-4′)

Besides complicated queries, I had to build expandable list supports. I sought inspiration from http://wilsonet.com/mythtv/. To accomplish this, I had to write (copy) a simple javascript, add some simple rules to my CSS and then build the list. Building the list consisted of a bunch of PHP code in a new function. Overall, I’m quite pleased with the result.