All files - changed sql query calls

Also working on checkin.php currently. Work in progress.
Merge remote-tracking branch 'origin/master'

Conflicts:
	friends.php
Merge branch 'master' of https://github.com/navrav/RedWedding