<?php
$cadaccion = '';
switch ($D->n_typenotifications) {
	case 1:
		$D->txtaction = $this->lang('global_txt_follow');
		break;
	case 2:
		$urlpost = $C->SITE_URL.$D->n_usernamePost.'/posts/'.$D->n_postcode;
		$D->txtaction = $this->lang('global_txt_like').' <span class="linkblue"><a href="'.$urlpost.'">'.$this->lang('global_txt_post').'</a></span>.';
		break;
	case 3:
		$urlpost = $C->SITE_URL.$D->n_usernamePost.'/posts/'.$D->n_postcode;
		$D->txtaction = $this->lang('global_txt_comment').' <span class="linkblue"><a href="'.$urlpost.'">'.$this->lang('global_txt_post').'</a></span>.';
		break;
	case 5:
		$D->txtaction = $this->lang('global_txt_wantsyourfried');
		break;
	case 6:
		$D->txtaction = $this->lang('global_txt_nowisyourfried');
		break;	
	case 7:
		$urlpost = $C->SITE_URL.$D->n_username.'/posts/'.$D->n_postcode;
		$D->txtaction = $this->lang('global_txt_shared').' <span class="linkblue"><a href="'.$urlpost.'">'.$this->lang('global_txt_post').'</a></span>.';
		break;	
	case 9:
		$urlpost = $C->SITE_URL.$D->n_urlpage;
		$D->txtaction = $this->lang('global_txt_like').' <span class="linkblue"><a href="'.$urlpost.'">'.$this->lang('global_txt_page').'</a></span>.';
		break;
	case 10:
		$urlpost = $C->SITE_URL.'dashboard/groups/requests/g:'.$D->n_codegroup;
		$D->txtaction = $this->lang('global_txt_request_join1').' <span class="linkblue"><a href="'.$urlpost.'">'.$this->lang('global_txt_request_join2').'</a></span>.';
		break;
	case 11:
		$urlpost = $C->SITE_URL.$D->n_urlgroup;
		$D->txtaction = '<span>'.$this->lang('global_txt_group_accepted').'</span>.';
		break;
	case 12:
		$urlpost = $C->SITE_URL.$D->n_urlgroup;
		$D->txtaction = $this->lang('global_txt_group_joinedyou').' <span class="linkblue"><a href="'.$urlpost.'">'.$D->n_namegroup.'</a></span>.';
		break;		
}
?>
	<?php if ($D->n_typenotifications == 11) { ?>
	<div class="itemalertnot">
		<div class="avatar"><a href="<?php echo $urlpost?>"><img src="<?php echo $C->SITE_URL.'themes/'.$C->THEME?>/imgs/ok-join-group.png" class="rounded"></a></div>
		<div class="info">
        	<div class="txtaccion"><span class="linkblue"><a href="<?php echo $urlpost?>"><?php echo $D->n_namegroup?></a></span> <?php echo $D->txtaction?></div>

            <div class="txtwhen"><abbr class="timeago" title="<?php echo date("c", $D->n_fdate); ?>"><?php echo date($this->lang('global_format_date'),$D->n_fdate);?></abbr></div>
        </div>
        <div class="sh"></div>
	</div>
    
    <?php } else { ?>
    
	<div class="itemalertnot">
		<div class="avatar"><a href="<?php echo $C->SITE_URL.$D->n_username?>"><img src="<?php echo $C->SITE_URL.$C->FOLDER_AVATAR.'min3/'.(empty($D->n_avatar)?$C->AVATAR_DEFAULT:$D->n_avatar)?>" class="rounded"></a></div>
		<div class="info">
        	<div class="txtaccion"><span class="linkblue"><a href="<?php echo $C->SITE_URL.$D->n_username?>"><?php echo $D->n_nameUser?></a></span> <?php echo $D->txtaction?></div>

            <div class="txtwhen"><abbr class="timeago" title="<?php echo date("c", $D->n_fdate); ?>"><?php echo date($this->lang('global_format_date'),$D->n_fdate);?></abbr></div>
        </div>
        <div class="sh"></div>
	</div>
    
    <?php } ?>