<?php
// $Id: breadcrumb.inc 14850 2006-10-15 15:26:56Z jenst $
?>
<?php
global $breadcrumb, $gallery;

if(!includeTemplate('breadcrumb')
  && (!empty($breadcrumb['text']) || $gallery->user->isLoggedIn())) {
?>

<table class="g-breadcrumb" cellspacing="0" cellpadding="0">
<tr>
	<?php
	if ($gallery->user->isLoggedIn()) {
	    $name = $gallery->user->getFullName();
	    if (!$name) {
	        $name = $gallery->user->getUsername();
	    }
	    echo "\t". '<td class="left">'. sprintf(gTranslate('core', "Logged in as: %s"), $name) .'</td>';
	}
	?>

	<td class="right">
	<?php
	if (isset($breadcrumb['text'])) {
	    foreach($breadcrumb["text"] as $nr => $text) {
	        echo "\t\t$text\n";
	    }
	}
	?>
	</td>
</tr>
</table>

<?php
}
?>
