XMAS List Tracker

This is a simple perl cgi based application to track gifting year after year.


You can easily see what gifts are on order, backorder or acquired etc.

You can easily see gift totals per person and a grand total for the season.
It has some features that make it useful - gifts can be added to the package without being assigned to 
a season or a specific person.   During the year, you might run across something that you want to remember
at gift time.  Adding it to the list as unassigned, allows you to save the info for the gift without 
having to remember it.

The package has a summary that shows the gift totals over the last five years to see trending

Gift recipients are checked off the list and marked complete by the user so it is easy to see who is left.

There is a note taking utility that is used to track recipients 'likes', 'dislikes', 'needs', 'doesnt need' items. 



1. web server
2. Mysql or Mariadb server
3. dhtmlx suite  - http://dhtmlx.com/docs/products/dhtmlxSuite/
4. perl with the CGI, DBI and Config::Simple perl modules
5. the prototype.js library http://prototypejs.org/download

Setup is simple for anyone remotely familiar with setting up a web based application with a db backend.

1. create database 'xmaslist'
2. create the db tables (I have placed the create table commands in the file table_creates_few_data_recs.sql.
   this file also contains my users and a few data records.   
3. create your gift recipients in the xmas_recipients table.
4. I use the db user account webuser for the app.. You will need to set the username and password for db access in 
   the xmasviewer.conf file.

I use an apache env variable $SERVERTOP to point to the toplevel directory of the webserver.  

This is so that I can easily access a generic utilities library  - utils.pm  
I have this library under a tools/lib subdirectory, and I make reference to the variable in the cgi scripts 
like this - use lib "$ENV{SERVERTOP}/tools/lib";

I am only exporting two routines from utils.pm - 
	logit - which is a debug logging utility.  this wont be used unless debug is enabled in xmasviewer.conf 
	commify - which places commas in numeric values for readability.
I have this in my httpd.conf file - 
## set the global environment variable to be used by any cgi scripts that need a literal system 
## path to a directory or file.  MLS
SetEnv SERVERTOP /var/www

The dhtmlx suite.  I have it under the js subdirectory of DOCUMENT_ROOT.  The generic path is referenced in the 
scripts like "/js/dhtmlxsuite/dhtmlxGrid.." If you have your own path, obviously these references will need to 
be changed in the cgi scripts.  I have made some changes to the css for the theme. 

index.html - simple redirect
table_creates_few_data_recs.sql - table ddl and a few data recs 
xmas_dbupdateall.cgi - backend execute script for the grid
xmas_search.cgi - db search backend script
xmas_summary.cgi - db summary backend script
xmas_totals.cgi - db totals backend script
xmas_usernotes.cgi - user notes handler script
xmasviewer.cgi - main viewer
xmasviewer.conf - config file 
xmasviewer.css - display config css
utils.pm - a small library I use to export a couple of utility routines.  See above note for where I placed the file.
dhtmlxsuite30.tar.gz - archive of my old dhtmlxsuite directory. See above note

Once things are configured, the main page is displayed via xmasviewer.cgi.

Gifts are added to the list via the form below the main table.   Items are submitted and added to the main grid display.

Clicking the 'Save Changes' link above the grid display commits any changes in the grid to the database. 

Users are checked as 'completed' below the grid.  As the users are marked as completed, the color changes to green.

Thats it.

I hope you find it useful

Download the package here - xmaslist.tar.gz