Photo repository with view function. -mysql,php