lots of updates to the purchases.php
working rankup function for attributes and skills