HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/taxicamera/application/views/admin/notification/notification_list.php
<div class="main-content">
  <div class="content-wrapper">
    <div class="container-fluid">
      <!-- Basic form layout section start -->
      <section id="basic-form-layouts">
      	<div class="row">
      		<div class="col-md-12">
      			<div class="card">
      				<div class="card-header">
      					<div class="page-title-wrap">
      						<h4 class="card-title">Notification List</h4>      						
      					</div>
      				</div>
      				<div class="card-body">
      					<div class="px-3">      						
                  <div id="report_list_div">
                    <div class="row">
                      <div class="table-responsive custom_table_area export_table_area">
                        <table class="table table-striped table-bordered export_btn_dt c_table_style notification_table">
                            <thead>
                                <tr>
                                  <th>SL No.</th>                                
                                  <th>Notification Id</th>
                                  <th>Title</th>
                                  <th>Description</th>
                                  <th>Status</th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php if(!empty($notification_details)): ?>
                            <?php   foreach($notification_details as $key => $list): ?>
                                  <tr>
                                      <td><?php echo $key+1; ?></td>
                                      <td><?php echo "#N00".$list['notification_id']; ?></td>
                                    <?php  if($list['notification_flag'] =='0'): ?>
                                    <?php   $url_class      = 'notification_url'; ?>
                                    <?php   $url            = 'javascript:void(0);'; ?>                                    
                                    <?php   $status         = 'Unread'; ?>
                                    <?php   $status_class   = 'btn mr-1 btn-danger'; ?>
                                    <?php  else: ?>  
                                    <?php   $url_class      = ''; ?>
                                    <?php   $url            = base_url().$list['notification_link']; ?>
                                    <?php   $status         = 'Read'; ?>
                                    <?php   $status_class   = 'btn mr-1 btn-success'; ?> 
                                    <?php  endif; ?>
                                      <td><?php echo $list['notification_title']; ?></td>
                                      <td><?php echo $list['notification_description']; ?></td>                                   
                                      <td><a href="<?php echo $url; ?>" rel ="<?php echo $list['notification_type']."|".$list['notification_id']."|".$list['referrence_id']."|".$list['notification_link']; ?>"  class="<?php echo $status_class.' '.$url_class; ?> "><?php echo $status; ?></a></td>
                                  </tr>
                            <?php   endforeach; ?>
                            <?php else: ?>
                                    <tr>
                                        <td colspan="4">No data found</td>
                                    </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                      </div>
                    </div>
                  </div>
      					</div>                
      				</div>
      			</div>            
      		</div>
      	</div>
      </section>
      <!-- // Basic form layout section end -->      
    </div>
  </div>
</div>
<script>
$(document).ready(function() {
  
  $('.notification_table').DataTable();
})
</script>