UNSPLASH_ACCESSKEY, 'secret' => UNSPLASH_SECRETKEY, 'utmSource' => UNSPLASH_UTMSOURCE ]); $page = 1; if (isset($_GET['page']) && is_numeric($_GET['page'])) { $page = $_GET['page']; } $per_page = 15; $results = null; if (isset($_GET['query']) && $_GET['query'] != "") { $results = Crew\Unsplash\Search::photos($_GET['query'], $page, $per_page, null, null); $images = $results->getArrayObject(); } else { $images = Crew\Unsplash\Photo::all($page, $per_page, 'popular'); } $images-> $htmlout = ""; if (count($images) == 0) { $htmlout = "" . lang("no results", false) . ""; } $htmlout .= '