 <input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
<div class="row">
    <div class="col-md-12">
        <div class="hs_heading medium">
            <h3>Partners (<?php if(!empty($all_partners)){ echo count($all_partners); }else{ echo 0;  } ?>) <a href="#add_new_partner" class="btn" data-toggle="modal"  onclick="add_category()">Add new</a></h3>
        </div>
        <div class="hs_datatable_wrapper">
            <table class="hs_datatable table table-bordered">
                <thead>
                    <tr>
                        <th>#</th> 
                        <th>Partner Image</th>
                        <th>Status</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
				<?php 
				$i=0;
				if(!empty($all_partners)) {
					foreach($all_partners as $partner){ ?>
					<tr>
						<td><?php echo ++$i; ?></td>
					 
						<td>
							<div class="hs_category_icon">
								<img src="<?php echo base_url().$partner->partner_image; ?>" alt="icon">
							</div>                            
						</td>
						<td>
							<label class="switch">
								<input id="partstatus_<?php echo $partner->partner_id; ?>" onclick="change_partner_status(<?php echo $partner->partner_id; ?>);"   type="checkbox" value="" <?php if($partner->partner_status == 1){ echo "checked"; } ?> >
								<span class="slider"></span>
							</label>
							
						</td>
						<td width="200">
						    <a onclick="edit_partner(<?php echo $partner->partner_id; ?>,'<?php echo $partner->partner_image; ?>')" class="btn" title="Edit" data-name="Business Statistics"><i class="fa fa-pencil" aria-hidden="true"></i></a>
							<a  href="<?php echo base_url().'admin/delete_partners_image/'.$partner->partner_id;  ?>" class="btn" title="Delete" onclick="return delete_confirmation()"><i class="fa fa-trash" aria-hidden="true"></i></a>
						</td>
					</tr>
					<?php 
					  }
					} 
					?>
				</tbody>
            </table>
        </div>
    </div>
</div>

<br>
<br>
<br>
<br>

<!-- Add New partner popup start -->
<div class="modal_box">
 <div id="add_new_partner" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title"><span>Add New</span> Partner</h4>
            </div>
            <div class="modal-body">
			<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
			<form method="post" enctype="multipart/form-data" id="addpartners">
                <div class="hs_input">
                    <label>Partner Image</label>
                    <input type="file" class="form-control" name="partners_image" id="partner_image_id">
                </div>
                <div class="hs_input">
					<button type="submit" id="add"  class="btn">ADD</button>
                </div>
            </div>
			</form>
        </div>
    </div>
</div>
</div>
<!-- Add New Partner popup end -->     
 

<!-- update partner popup start -->
<div class="modal_box">
 <div id="update_partner_model" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title"><span>Update</span> Partner</h4>
            </div>
            <div class="modal-body">
			<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
			<form method="post" enctype="multipart/form-data" id="update_partners">
                <div class="hs_input">
                    <label>Partner Image</label>
                    <input type="file" class="form-control" name="update_partner_image" id="update_partner_image">
                </div>
                <div class="hs_input">
					<input type="hidden" value="" name="old_partnerid" id="old_partnerid">
					<button type="submit" id="add"  class="btn">Update</button>
                </div>
            </div>
			</form>
        </div>
    </div>
</div>
</div>
<!-- update Partner popup end -->
 
	 

 
	
	
	