$req = explode('/', substr($_SERVER['REQUEST_URI'], 1)); $get = array_shift( $req ) ?: 'index'; $dat = array_pop( $req ); ?>
eppbphoto
include 'fetcher.php'; $eppbphoto = new eppbphoto( $get, $dat, false ); $fetcherResponse = $eppbphoto->get(); /* error_log(print_r([ $get, $dat, $fetcherResponse ], 1)); */ switch ( $get ) { case 'index': foreach ( $fetcherResponse['images'] AS $imgInfo ) { $rewrite = $eppbphoto->rewrite( $imgInfo['GalleryName'] ); $titlealt = "{$imgInfo['GalleryName']} — © eppbphoto.com"; echo "
{$imgInfo['GalleryName']}
"; } break; case 'gallery': foreach ( $fetcherResponse['images'] AS $imgInfo ) { $rewrite = $eppbphoto->rewrite( $imgInfo['PhotoName'] ?: basename($imgInfo['PhotobasePath']) ); $titlealt = implode(' — ', array_filter([ $imgInfo['PhotoName'], $imgInfo['PhotoCaption'], $imgInfo['PhotobaseFileDate'], '© eppbphoto.com' ])); echo "
"; } break; case 'photo': $imgInfo = $fetcherResponse['image']; $titlealt = implode(' — ', array_filter([ $imgInfo['PhotoName'], $imgInfo['PhotoCaption'], $imgInfo['PhotobaseFileDate'], '© eppbphoto.com' ])); echo "
"; break; } ?>