<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
<div class="row">
    <div class="col-md-12">
        <div class="hs_heading medium">
            <h3>Contact Us (<?php if(!empty($all_contacts)){ echo count($all_contacts); }else{ echo 0; } ?>)</h3>
        </div>
        <div class="hs_datatable_wrapper">
            <table class="hs_datatable table table-bordered">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>First Name</th>
                        <th>Last Name</th>
                        <th>Contact Email</th>
						<th>Contact Subject</th>
                        <th>Contact Query</th>
			            <th>Action</th>
                    </tr>
                </thead>
                <tbody>
				<?php
				$i= 0;
				if(!empty($all_contacts)){ 
				   foreach($all_contacts as $contact){
				?>
				 <tr>
                        <td><?php echo ++$i; ?></td>
                        <td width="200">
                            <div class="hs_user">
                                <div class="user_name">
                                    <p><?php echo $contact->contact_fname; ?></p>
                                     
                                </div>
                            </div>
                        </td>
                        <td><?php echo $contact->contact_lname; ?></td>
                        <td><?php echo $contact->contact_email; ?></td>
						<td><?php echo $contact->contact_subject; ?></td>
						<td><?php 
							if(strlen($contact->contact_comment) >= 100) {
							echo substr($contact->contact_comment, 0, 100); ?>
							 <br><a href="javascript:;" onclick="read_more_comment('<?php echo $contact->contact_comment; ?>')">Read More...</a>
						<?php }else{
								echo $contact->contact_comment;
							 }
						?>
						<td width="200">
                            <a href="<?php echo base_url().'admin/delete_contact/'.$contact->contact_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>




 

<!-- read more contact query content popup start -->
<div class="modal_box">
<div id="readmore_comment" 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>Read</span> Query</h4>
            </div>
            <div class="modal-body">
				<div class="hs_input">
                    <label>Query</label>
                    <textarea rows="8" cols=""class="form-control" name="rm_content" id="rm_content" disabled></textarea>
                </div>
			</div>
		</div>
    </div>
</div>
</div>
<!-- read more contact query content popup start -->


