added second query to gallery.php
finished coding and debugging sql queries in gallery.php
cleaned up gallery.php, implemented sidebar.php