some minor clean up fixes

don't make use of deprecated mysql function anymore
code cleanup
fixed bug in pChart rendering
log current visitors