<style>
    .icon {width:24px;}
    .item{text-align: right; font-size: 16px; padding-top:5px;}
    .headings {text-align: center; vertical-align: middle;}
    .next {margin-top:15px;}
    
    @media (max-width: 991px){
        .icon {width:32px;}
        .item{text-align: left;}
    }

    <?php if(isset($config) && $config!==null){?>
    .btn-pink {
        background-color: <?php echo $config->pink_replacement; ?> !important;
        border: 1px solid <?php echo $config->pink_replacement; ?>  !important;
      }
      .btn-pink:hover,
      .btn-pink:focus,
      .btn-pink:active {
        background-color: #ff70c1 !important;
        border: 1px solid #ff70c1 !important;
      }
        
    
    
    <?php } ?>
    
</style>
<div class="wrapper">
    <div class="container">
        <div class='row'>
            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
                <h2>Feedback of <?php echo date('F', mktime(0, 0, 0, $month, 10)).'-'.$year;?></h2>
            </div>
        </div>
        <div class="row">
            
             <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
                 <div class="card-box">
                    <table id="tablefeedback" class="table table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
                        <thead>
                              <tr>
                                 
                                  <th>Date</th>
                                  <th>Customer</th>
                                  <th>Cell</th>
                                  <th>Service/QoS</th>
                                  <th>Staff/Atmosphere</th>
                                  <th>Actual Rate/Experience</th>
                                  <th>Final Rate/Value for Money</th>
                                  <th>Skill/Overall Rating</th>
                                  <th>Knowledge</th>
                                  <th>Hospitality</th>
                                  <th>Satisfaction</th>
                                  <th>Comment</th>
                              </tr>
                       
                        </thead>
                        <tbody>
                            <?php $img=[
                                         '',
                                         '<img  class="icon icon-atmosphere" src="'.base_url().'assets/images/feedback/angry_80x80.png" alt="pathetic" >',
                                         '<img  class="icon icon-atmosphere" src="'.base_url().'assets/images/feedback/sad-80x80.png" alt="poor" >',
                                         '<img  class="icon icon-atmosphere" src="'.base_url().'assets/images/feedback/puzzled80x80.png" alt="average" >',
                                         '<img  class="icon icon-atmosphere" src="'.base_url().'assets/images/feedback/happy-80x80.png" alt="good" >',
                                         '<img  class="icon icon-atmosphere" src="'.base_url().'assets/images/feedback/celebrity-80x80.png" alt="excelent" >'
                                         
                                       ];
                            
                                     ?>
                                     
                        <?php $feedbackid=0; foreach($feedback_listing as $fl){ ?>
                            <?php if($feedbackid !== $fl['id_feedback']){?>
                            
                             <tr>
                                 
                                 <td style="border-top:1px solid #000;"><?php echo $fl['created_on'];?></td>
                                 <td style="border-top:1px solid #000;"><?php echo $fl['customer_name'];?></td>
                                 <td style="border-top:1px solid #000;"><?php echo $fl['customer_cell'];?></td>
                                 <?php $tot = (float)$fl['qos'] + (float)$fl['atmosphere'] + (float)$fl['experience'] + (float)$fl['valueformoney'];?>
                                 <?php $overall=$tot > 0 ? round(((float)$fl['qos']+ (float)$fl['atmosphere']+ (float)$fl['experience']+ (float)$fl['valueformoney'])/4) : 0;?>
                                 
                                 <td  style="border-top:1px solid #000; background: #fafafa; color:#000;" > <?php echo 'QoS: '.$fl['qos'].' '.$img[$fl['qos']];?></td>
                                 <td  style="border-top:1px solid #000;  background: #fafafa; color:#000;" > <?php echo 'Atmosphere: '.$fl['atmosphere'].' '.$img[$fl['atmosphere']];?></td>
                                 <td  style="border-top:1px solid #000; background: #fafafa; color:#000;" > <?php echo 'Experience: '.$fl['experience'].' '.$img[$fl['experience']];?></td>
                                 <td  style="border-top:1px solid #000; background: #fafafa; color:#000;" > <?php echo 'Value for Money: '.$fl['valueformoney'].' '.$img[$fl['valueformoney']];?></td>
                                 <td  style="border-top:1px solid #000; background: #fafafa; color:#000;" > <?php echo 'Over All: '.$overall.' '.$img[$overall];?></td>
<!--                                 <td style="border-top:1px solid #000;" colspan="8">
                                     <?php echo 'QoS: '.$fl['qos'].' '.$img[$fl['qos']].'&nbsp;|&nbsp;Atmosphere: '.$fl['atmosphere'].' '.$img[$fl['atmosphere']].'&nbsp;|&nbsp;Experience: '.$fl['experience'].' '.$img[$fl['experience']].'&nbsp;|&nbsp;Value for Money: '.$fl['valueformoney'].' '.$img[$fl['valueformoney']].'&nbsp;|&nbsp;Over All: '.$overall.' '.$img[$overall].'';?>
                                 </td>-->
                                 <td style="border-top:1px solid #000;"></td>
                                 <td style="border-top:1px solid #000;"></td>
                                 <td style="border-top:1px solid #000;"></td>
                                 <td style="border-top:1px solid #000;"><?php echo $fl['comment'];?></td>
                             </tr>
                             <tr>
                                   
                                    <td></td>
                                    <td></td>   
                                    <td></td>   
                                 <td><?php echo $fl['service_name'];?></td>
                                 <td><?php echo $fl['staff'];?></td>
                                 <td><?php echo $fl['service_rate'];?></td>
                                 <td><?php echo $fl['final_price'];?></td>
                                 <td><?php echo $fl['skill'];?></td>
                                 <td><?php if($fl['feedback_type']=='Short'){ echo '';} else{ echo $fl['knowledge'];}?></td>
                                 <td><?php if($fl['feedback_type']=='Short'){ echo '';} else{ echo $fl['hospitality'];}?></td>
                                 <td><?php if($fl['feedback_type']=='Short'){ echo '';} else{ echo $fl['satisfaction'];}?></td>
                                 <td><?php echo $fl['service_comment'];?></td>
                            <?php } else { ?>
                                <tr>
                                   
                                    <td></td>
                                    <td></td>   
                                    <td></td>   
                                 <td><?php echo $fl['service_name'];?></td>
                                 <td><?php echo $fl['staff'];?></td>
                                 <td><?php echo $fl['service_rate'];?></td>
                                 <td><?php echo $fl['final_price'];?></td>
                                 <td><?php echo $fl['skill'];?></td>
                                 <td><?php echo $fl['knowledge'];?></td>
                                 <td><?php echo $fl['hospitality'];?></td>
                                 <td><?php echo $fl['satisfaction'];?></td>
                                 <td><?php echo $fl['service_comment'];?></td>
                             </tr>
                             
                            <?php }  
                            $feedbackid=$fl['id_feedback'];
                            ?>
                         <?php } ?>
                        </tbody>
                     </table>
                 </div>
             </div>
        </div>
        
    </div>
    
    <script>
        $(document).ready(function () {
            $('#tablefeedback').DataTable({
                    lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
                    stateSave: true, 
                    
                    dom: "Bfrtlip",
                    buttons: [{extend: "copy", className: "btn-sm"}, {extend: "csv", className: "btn-sm"},
                        {extend: "pdf", className: "btn-sm"}, {extend: "print", className: "btn-sm"}],
                    responsive: !0,
                    ordering: false
                })
            });
        </script>