<div class='mobilemenu mobile'>
	<ul>
		<li class='mobile' style='height:45px !important;'>
			<span style='line-height:45px; class='appname'>
				<a href="./<?php echo ($logedin ? "?mode=home" : ""); ?>" style="font-family: 'patua', serif; font-weight:bold; font-size:20px; text-decoration:none" ><?php echo $setting['appname']; ?></a>
			</span>
		</li>
		<?php if ($logedin): ?>
		<li style='height:40px !important; padding-bottom:10px;' class='account'>
			<div style='z-index:100; width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; align-content: '>
				<div style='width:30px; height:30px; display: block; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; border-radius:15px; background-image:url(<?php echo $info['avatar']?>); background-size:cover;'></div>
				<div style='height:30px; width:100%; display: block; position:relative; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; line-height:1em; border:0px !important;'>
					<div class='fontello' style='position:absolute; right:10px; display:block;'>&#xe830;</div>
					<span style='display:block; font-weight:bold;'><?php echo $info['acct']?></span>
					<span style='display:block; font-size:12px'><?php echo $user_settings['instance']?></span>
				</div>
			</div>
		</li>
		<?php
		$c = 0;
		foreach ($cookie as $elem){
			if(!isset($elem['acct'])){
				continue;
			}
			echo "<a href='?switchaccount=$c'><li style='text-align:left !important; height:40px !important' class='switcher mobile'>
				<div style='width:100%; display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: normal; align-items: normal; align-content: normal; '>
					<div style='width:30px; height:30px; display: block; flex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; border-radius:15px; background-image:url(".$elem['avatar']."); background-size:cover;'></div>
					<div style='height:30px; display: block; lex-grow: 0; flex-shrink: 1; flex-basis: auto; align-self: auto; order: 0; line-height:1em; border:0px !important;'>
						<span style='display:block;'>".$elem['acct']."</span>
						<span style='display:block; font-size:12px'>".$elem['instance']."</span>
					</div>
				</div>
			</li></a>";
			$c++;
		}
		?>
		<li class='switcher'></li>		
		<li><a class='fontello link switcher mobile'  href='./login'>&#xe832; Add account</a></li>
		<li class='switcher'></li>

		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=federated' onClick='return false'>&#xe83c; Federated</a></li>
		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=home' onClick='return false'>&#xe816; Home</a></li>
		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=local' onClick='return false'>&#xf1e0; Local</a></li>
		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=favourites' onClick='return false'>&#xe804; Favourited</a></li>
		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=direct' onClick='return false'>&#xf0e0; Direct</a></li>
		<li class='mobile' style=''><a class='fontello ldr link'  href='?mode=bookmarks' onClick='return false'>&#xe81e; Bookmarks</a></li>
		<li class='mobile' style=''><a class='fontello searchmobiletoggle link'  href='?page=search' onClick='return false;'>&#xe800; Search</a></li>
		<li class='mobile' style=''></li>
		<?php endif; ?>
		<li><a class='fontello ldr link mobile'  href='?page=settings' onClick='return false'>&#xe82d; Settings</a></li>
		<li><a class='fontello link mobile'  href='./logout'>&#xe832; Log Out</a></li>
	</ul>
</div>