Updated users and database classes.

Updated database.class.php from MySQL to Mysqli (thanks @Kondou) and
updated methods in users.class.php (and small changes in
settings.class.php)
Bug fixes in users.class.php

The add method works now.