The mysql_* functions are deprecated per PHP 5.5; let's switch to mysqli_*. Needs testing!

Signed-off-by: Aaron van Geffen <aaron@aaronweb.net>
Install and upgrade updates to mysqli.

Signed-off-by: Norv <a.w.norv@gmail.com>
Fixes for mysqli. Add $connection param, add connection instance stored in db class.

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove $db_connection global. The default connection is $db->connection().

Signed-off-by: Norv <a.w.norv@gmail.com>
Login tokens weren't generated in a couple places

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>

Signed-off-by: Norv <a.w.norv@gmail.com>