Butterflyknife Updates

Updates to users.php, site_settings.php, other api files as well, fixed a few errors missing variables/globals and a php short tag found in db_functions.php. Transferred some variables to the new validator class as well in the api pages. Permissions on user update not working as of yet.