<?php if($noticelist) { foreach($noticelist as &$_notice) { ?>
<li class="notice media text-small <?php echo $_notice['isread'] == 1 ? 'isread' : '';?>" data-nid="<?php echo $_notice['nid']?>" >

 	<?php if($_notice['type'] == 1 || $_notice['type'] == 3 || $_notice['type'] == 99){?>
 	 	<div tabindex="-1" class="ml-1 mt-1 mr-3"><img class="avatar-3" src="<?php echo $_notice['from_user_avatar_url'];?>"></div>
 	<?php }else{?>
 	 	<div tabindex="-1" class="ml-1 mt-1 mr-3"><a href="<?php echo url("user-$_notice[fromuid]");?>"><img class="avatar-3" src="<?php echo $_notice['from_user_avatar_url'];?>"></a></div> 	   
 	<?php }?>

 	<div class="media-body">
 	 	 	
 	 	 	<div class="subject break-all">
 	 	 	 	
 	 	 	 	<?php if($_notice['type'] == 1 || $_notice['type'] == 3 || $_notice['type'] == 99){?>
 	 	 	 	 	<div>
 	 	 	 	 	 	<span class="username text-grey font-weight-bold mr-1"><?php echo $_notice['name'];?></span>
 	 	 	 	 	 	<span class="date text-grey"><?php echo $_notice['create_date_fmt'];?></span> 	 	 	 	 	 	   
 	 	 	 	 	</div>
 	 	 	 	<?php }else{?>
 	 	 	 	 	<div>
 	 	 	 	 	 	<span class="username text-grey font-weight-bold mr-1"><a class="text-grey" href="<?php echo url("user-$_notice[fromuid]");?>"><?php echo $_notice['from_username'];?></a></span>
 	 	 	 	 	 	<span class="time1"><?php echo $_notice['create_date_fmt'];?></span> 	 	 	  
 	 	 	 	 	</div>
 	 	 	 	<?php }?>
 	 	 	 	
 	 	 	</div>
 	 	 	<div class="message break-all mt-1">
 <?php echo $_notice['message'];?>
 	 	 	</div>
			
			<div>
 	 	 	 	 	<?php echo $_notice['isread'] == 1 ? '<button type="button" class="btn btn-small btn-light ml-2-1">'.lang('notice_my_update_readed').'</button>' : '<button type="button" class="readbtn btn btn-small btn-light ml-2-1" data-nid="'.$_notice['nid'].'">'.lang('notice_my_marked_read').'</button>';?>
 	 	 	 	 	<button type="button" class="deletebtn btn btn-small btn-light ml-2-2" data-nid="<?php echo $_notice['nid']?>"><?php echo lang('delete');?></button>
 	 	 	 	</div>
 	</div>
</li>
 
<?php }} else { ?>

<li class="notice media text-small">
 	 	 	<?php echo lang('none');?>
 	</li>
 	
<?php } ?>


