<? global $vis_language;?>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<? if($staff[0]['image_name']!='' && is_file(VIS_PATH_PROFILE.$staff[0]['image_name']) && $staff[0]['image_name']!='default.jpg'){?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<img src="<?= VIS_PATH_PROFILE.$staff[0]['image_name'];?>" class="sm">
</div>
<? }else{ ?>
<div class="l-avatar pull-left" id="vis_header_profile_img">
<? if($staff[0]['first_name']!=''){
	$firstname=preg_split('//u', $staff[0]['first_name'], -1, PREG_SPLIT_NO_EMPTY);
$lastname=preg_split('//u', $staff[0]['last_name'], -1, PREG_SPLIT_NO_EMPTY);
	?>
<div class="sm"><? echo ucfirst($firstname[0]).ucfirst($lastname[0]);?></div>
    <? }else{ ?>
    <img class="sm" src="<?= VIS_PATH_PROFILE.'default.jpg';?>">
    <? }?>

</div>
<? }?>
 <?= $staff[0]['first_name'].' '.$staff[0]['last_name']; ?> <b class="caret"></b>
</a>
<ul class="dropdown-menu animated fadeInRight">
	<li>
		<span class="arrow top"></span> <a href="#/home/profile_view/<? echo $vis_language['TXTPROFILE']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTPROFILE']; ?>', {'vis_module':'home', 'vis_operation':'profile_view'});"><? echo $vis_language['TXTPROFILE']; ?></a>
	</li>
	<?php if(VIS_ALERT_ACCESS==1) { ?>
	<li>
		<a href="#/home/view_alerts/<? echo $vis_language['TXTALERTS']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTALERTS']; ?>', {'vis_module':'home', 'vis_operation':'view_alerts'});"><? echo $vis_language['TXTALERTS']; ?></a>
	</li><? } ?>
	<li>
		<a href="#/home/view_views/<? echo $vis_language['TXTVIEWS']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTVIEWS']; ?>', {'vis_module':'home', 'vis_operation':'view_views'});"><? echo $vis_language['TXTVIEWS']; ?></a>
	</li>
	<li>
		<a href="#/home/view_macros/<? echo $vis_language['TXTMACROS']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module', '<? echo $vis_language['TXTMACROS']; ?>', {'vis_module':'home', 'vis_operation':'view_macros'});"><? echo $vis_language['TXTMACROS']; ?></a>
	</li>
	<li class="divider"></li>
	<li>
		<a href="javascript:void(0);" onclick="$('#vis_main_panel_div').visExecution('load_area', {'vis_module':'home', 'vis_operation':'logout'});"><? echo$vis_language['TXTLOGOUT']; ?></a>
	</li>
</ul>
