Made currentCardID a global variable

This is in preparation of improving how card switching works
debugging api with var_dump
debugging api with var_dump
debugging api with var_dump
debugging api with var_dump
debugging api with var_dump
debugging api with var_dump
debugging api with var_dump
convert some INSERT statements to REPLACE statements
Merge branch 'master' of str.at:/var/repo/rj
debugging api with var_dump
debugging api with var_dump
Switch SQL Syntax to ON DUPLICATE KEY

Provides insert or update fuctionality
Merge branch 'master' of str.at:/var/repo/rj