name)) echo '[]'; else { $lfmInfo = $lfmInfo[0]; echo json_encode([ 'name' => strval($lfmInfo->name), 'now_playing' => !empty($lfmInfo->nowplaying), 'url' => strval($lfmInfo->url), 'cover' => !empty($lfmInfo->images->large) ? strval($lfmInfo->images->large) : '', 'artist' => [ 'name' => !empty($lfmInfo->artist->name) ? strval($lfmInfo->artist->name) : '', 'url' => explode('/_/', strval($lfmInfo->url))[0], ], ]); } return FM_HIT; } if($reqPath === '/contact') { if($reqMethod !== 'GET') return FM_ERR | 405; $contact = [ [ 'id' => 'contact', 'title' => 'Direct Contact', 'items' => [ [ 'id' => 'email', 'name' => 'E-mail', 'display' => 'me@flash.moe', 'link' => 'mailto:me+contact@flash.moe', ], ], ], [ 'id' => 'communities', 'title' => 'Communities & Social Media', 'items' => [ [ 'id' => 'flashii', 'name' => 'Flashii', 'display' => 'flash', 'link' => '//flashii.net/profile.php?u=1', ], [ 'id' => 'twitter', 'name' => 'Twitter', 'display' => '@smugwave', 'link' => '//twitter.com/smugwave', ], [ 'id' => 'youtube', 'name' => 'YouTube', 'display' => 'flashwave', 'link' => '//youtube.com/c/flashwave', ], [ 'id' => 'github', 'name' => 'Github', 'display' => 'flashwave', 'link' => '//github.com/flashwave', ], [ 'id' => 'twitch', 'name' => 'Twitch.tv', 'display' => 'flashwave0', 'link' => '//twitch.tv/flashwave0', ], [ 'id' => 'lastfm', 'name' => 'Last.fm', 'display' => 'flashwave_', 'link' => '//last.fm/user/flashwave_', ], ], ], [ 'id' => 'gaming', 'title' => 'Gaming', 'items' => [ [ 'id' => 'steam', 'name' => 'Steam', 'display' => 'flashwave_', 'link' => '//steamcommunity.com/id/flashwave_', ], [ 'id' => 'nin-sw', 'name' => 'Nintendo Switch', 'display' => 'SW-7446-8163-4902', ], [ 'id' => 'nin-3ds', 'name' => 'Nintendo 3DS', 'display' => '4013-0352-0648', ], [ 'id' => 'nin-wiiu', 'name' => 'Wii U / NNID', 'display' => 'flashwave0', ], [ 'id' => 'osu', 'name' => 'osu!', 'display' => 'flash', 'link' => '//osu.ppy.sh/u/flash', ], ], ], [ 'id' => 'support', 'title' => 'Support me', 'items' => [ [ 'id' => 'paypal', 'name' => 'Paypal Donation', 'display' => 'flashwave', 'link' => '//paypal.me/flashwave', ], [ 'id' => 'patreon', 'name' => 'Patreon', 'display' => 'flashwave', 'link' => '//patreon.com/flashwave', ], ], ], ]; fm_component('header', [ 'title' => 'flash.moe / contact', ]); foreach($contact as $section) { ?>