Update DB.php

grabs classes from the DB in php and sorts via JS