       
      <!-- start page content -->
            <div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">All News List</div>
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.html">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="">Users</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li class="active">All News List</li>
                            </ol>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                                                 
                                <div class="tab-content">
                                    <div class="tab-pane active fontawesome-demo" id="tab1">
                                        <div class="row">
					                        <div class="col-md-12">
					                            <div class="card card-box">
					                                <div class="card-head">
					                                    <header>All News List</header>
					                                    <div class="tools">
					                                        <a class="fa fa-repeat btn-color box-refresh" href="javascript:;"></a>
						                                    <a class="t-collapse btn-color fa fa-chevron-down" href="javascript:;"></a>
						                                    <a class="t-close btn-color fa fa-times" href="javascript:;"></a>
					                                    </div>
					                                </div>
					                                <div class="card-body ">
					                                    <div class="row">
														    <div class="col-md-6 col-sm-6 col-6">
					                                            <?php $user_type = $this->session->userdata('user_type');	
																if($user_type==1){
																?>
																<div class="btn-group">
					                                                <a href="<?=base_url();?>admin/add_news" id="addRow" class="btn btn-info">
					                                                    Add News <i class="fa fa-plus"></i>
					                                                </a>
					                                            </div>
																<?php } ?>
					                                        </div>														
					                                        <div class="col-md-6 col-sm-6 col-6">
					                                            <div class="btn-group pull-right">
					                                               
					                                            </div>
					                                        </div>
					                                    </div>
					                                    <div class="table-scrollable">
					                                    <table class="table table-striped table-bordered table-hover table-checkable order-column valign-middle" id="example4">
					                                        <thead>
					                                            <tr>
					                                            	<th>S No.</th>
					                                                <th>News Title</th>
					                                                <th> Date </th>					                                                
					                                                <th> Status</th>
					                                                <th> Action</th>
																</tr>
					                                        </thead>
					                                        <tbody>
															<?php $i=1; foreach ($news_n_events as $key):?>
																<tr class="odd gradeX">
																	<td class="patient-img">
																			<?=$i?>
																	</td>
																	<td class="left"><?=ucfirst(substr($key->news_heading,0,50));?>...</td>
																	<td><?=date("d-m-Y",strtotime($key->date_news));?></td>
																	<td class="left">
																	<?php if($user_type==1){ ?>
																	<?php if($key->status==1){ ?>	
																	<a href="<?=base_url();?>admin/news_status/<?=$key->id; ?>/2"><label class="btn btn-primary disable-node">Active</label></a>
																	<?php } else { ?>
																		<a href="<?=base_url();?>admin/news_status/<?=$key->id; ?>/1"><label class="btn btn-danger disable-node">Inactive</label></a>
																	<?php } ?>	
																	<?php } ?>	
																	</td>
																	<td>
																	<?php if($user_type==1){ ?>
																		<a href="<?=base_url();?>admin/edit_news/<?=$key->id; ?>" class="btn btn-primary btn-xs">
																			<i class="fa fa-pencil"></i>
																		</a>
																		<?php } ?>
																		<a href="<?=base_url();?>admin/view_news/<?=$key->id; ?>" class="btn btn-primary btn-xs">
																			<i class="fa fa-eye"></i>
																		</a>																	
																	</td>
																</tr>
															 <?php $i++; endforeach ?>
															</tbody>
					                                    </table>
					                                    </div>
					                                </div>
					                            </div>
					                        </div>
					                    </div>
                                    </div>
                                </div>
                           
                        </div>
                    </div>
                </div>
            </div>
            <!-- end page content -->      