			<?php 
				if(count($notams) > 0) {
					?>
			
			<table id="" class="table table-bordered table-striped table-hover"style="width:100%" >
				<thead>
					 <th>Code</th>
                     <th>Title</th>
                     <th>Validity</th>
                     <th>Status</th>
                     <th>View</th>
                     
				</thead>
				<tbody>
				<?php
                     foreach($notams as $notam) {
                     	
                     	
                     ?>
                  <tr>
                     <td><code><?php echo $notam->code; ?></code></td>
                     <td><?php echo $notam->title; ?><br><span class="label label-info"><?php echo NotamsData::getSeries($notam->series); ?></span></td>
                     <td><?php echo date(DATE_FORMAT, strtotime($notam->valid_from)); ?> - <?php echo date(DATE_FORMAT, strtotime($notam->valid_till)); ?></td>
                     
                     <td><?php if(NotamsData::readStatus($notam->id, Auth::$userinfo->pilotid)) echo "<span class='label label-success'>Read</span>"; else echo "<span class='label label-danger'>Unread</span>"; ?></td>
                     
                   
                     <td>
                        <a href="<?php echo url('notams/view/'.$notam->id); ?>" style="text-decoration: none;" class="btn btn-warning btn-sm">View</a>
                     </td>
                     
                   
                  </tr>
                  <?php
                     }
                     ?>
				</tbody>
			</table>
			
			<?php 
				}
			else {
				?>
					
					<div class="alert alert-success">
						<strong>NO ACTIVE NOTAMS</strong><br>
						All crew are to resume operations normally. <br>
						- Flight Operations, <?php echo SITE_NAME; ?>
					</div>
					
				<?php
			}
		?>