HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.52.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 15 06:39:08 EDT 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/barbeatleanalyti/public_html/manage.beatleanalytics.com/site/template/reports.php 5-3-2019
<script>
	$(document).ready(function(){
		$("#FromDate").datepicker({format:'dd-mm-yyyy'});
		$("#ToDate").datepicker({format:'dd-mm-yyyy'});
	});

		function validateDate(){
			
			var D1 = document.getElementById("ToDate");
			var D2 = document.getElementById("FromDate");
			
			if(D1.value.trim() == ""){
				D1.style.border = "1px solid red";
				return false;
			}
			
			if(D2.value.trim() == ""){
				D2.style.border = "1px solid red";
				return false;
			}
		}	

</script>
		
	
<?php
	// Declare new object

	$objReports = object;
	
	// Assing object 
	$objReports = $objDB->objController;
	
	// Assign all variable's value
	$pg 			= $objReports->pg;
	$acn 			= $objReports->acn;
	$v 				= $objReports->v;
	$State 			= $objReports->State;
	$ReligionName 	= $objReports->ReligionName;
	$sort			= $objReports->sort;
	$ReligionID		= $objReports->ReligionID;
	$field			= $objReports->field;
	$error 			= $objReports->error;
	$msg 			= $objReports->msg;
	$perpage 		= $objReports->perpage;
	$start	 		= $objReports->start;
	$limit	 		= $objReports->limit;
	$SearchValue	= $objReports->SearchValue;
	$s				= $objReports->s;
	
	$CustomerID		= $objReports->CustomerID;
	$SurveyID		= $objReports->SurveyID;
	$TokenID		= $objReports->TokenID;
	$pType			= $objReports->pType;

	$OrgID			= $objReports->OrgID;
	$BranchID		= $objReports->BranchID;
	$IndustryID		= $objReports->IndustryID;
	$FromDate 		= $objReports->FromDate;
	$ToDate 		= $objReports->ToDate;
	

	$valck[] = array();
										   
	/*$rsCustomerInfo = $objReports->FetchCustomerData("All");
	
	if($start == 1)
		$limit = 0;
	else if($start == 2)
		$limit = $perpage;
	else
		$limit = ($start-1) * $perpage;
	
	$objReports->limit = $limit;
	
	$nume = count($rsCustomerInfo);
	
	$totalpage = @ceil(count($rsCustomerInfo)/$perpage);	 */
	
	$rsCustomerInfo = $objReports->FetchCustomerData();
	$rsPerm = explode(",",$uInfo___[0]['db_pagepermistion']);
										
	if($sort == '0'){                         	
		$sort = '1';                        
	}
	else{	
		$sort = '0';
		}
	

	$link = "";
	if( $start != "" && $start != 0 ){
		$link .= "&start={$start}";
	}
	if( $perpage != "" && $perpage != 0 ){
		$link .= "&perpage={$perpage}";
	}
	if(trim($s) != ""){
		$link .= "&s={$s}";
	}
		
	
	$Dash = "";
	if($_SESSION['UserInfo']['UType'] == 'MasterAdmin'){
	
	$Dash = "dashboardma";
	
	}else if($_SESSION['UserInfo']['UType'] == 'Admin'){
	
	$Dash = "dashboardadmin";
	}
	
?>




<div class="content-wrapper cust_hight normal_report">

<?php
		
		if( strtolower($v)=='add'|| strtolower($v)=='edit')
		{} 
			  
	else if($v=='list'){  ?>

<section class="content-header">
<?php  if(strtolower($v) == 'list'){?>
    
	<?php if(empty($CustomerID)) {?>
    <h1>Reports </h1>
    <ol class="breadcrumb">
        <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
        <li class="active">Reports      </li>
    </ol>
  	<?php }else{ ?>
    <h1>&nbsp;Customer Profile </h1>
    <ol class="breadcrumb">
        <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
        <li><a href="reports.html"><i class="fa fa-user"></i> Customer</a></li>
        <li class="active">Profile</li>
      </ol>
	<?php } ?>
  
  <?php } ?>
 </section>
 	
 
 <?php
	// Error or success message display
	$objDB->NotificaitonForResult($msg,$error);
	
	$objReports->setDefineValue();
	
	
?>


	 <!--Fetching Data loder---->
							<div class="loader head_loader" style="display:none;">
								<div class="sk-double-bounce" style="margin-bottom:10px; margin-top:10px;">
									<div class="sk-child sk-double-bounce1"></div>
									<div class="sk-child sk-double-bounce2"></div>
								</div>			
								<h3 style="text-align: center;  margin-top: 0px; padding-top: 0px;">Fetching Data...</h3>	 
							</div>
							
							
							
 <section class="content">
     <div class="row">
        <div class="col-md-12">
          <div class="box box-primary">
            <div class="box-header">
               <div class="col-md-12 col-xs-12 no-padding">  	
    							
								
							
								
                                <?php if(empty($CustomerID) && empty($SurveyID)) {
								$rsPagesIDS = IndustryPageIDS($pType,$BranchID,$IndustryID);	
								 ?>
    						     <div class="row">
                                 <div class="col-md-12">
                                <form method="post" action="reports.html" name="frmSearch" id="frmSearch">
								<input type="hidden" name="start" id="start" value="<?php echo $start?>" />
								<input type="hidden" name="perpage" id="perpage" value="<?php echo $perpage?>" />
                                
                           
								  <div class=" col-xs-3 col-sm-2 col-md-1 col-lg-1 pull-left form-group no-padding ">
										<a class="btn btn-info btn-sm" href="dashboardma.html"> <i class="fa fa-long-arrow-left"></i> Back </a>
                                  </div>
                                  
                                  
                                  <div class=" col-xs-12 col-md-3 col-lg-2 form-group">
                                  <?php $rsOrganization = $objReports->fetchOrganization(); ?>
                                    <!--<span id="span_select" style="width:120pf; height:35px; float:right;">-->
                                        <select class="form-control input-md" id="org_list" onchange="javascript: getBranchData(this.value)" name="Organization">
                                           <option value="0">Select Organization</option> 
										   <?php if(count($rsOrganization) > 0) { ?>
                                           <option <?php if(!empty($OrgID)) echo 'selected="selected"'; ?>  value="<?php echo $rsOrganization[0]['OrgId']?>"><?php echo $rsOrganization[0]['db_Orgname']?></option>
                                           <?php  }else{ ?>
											   <option value="0">No any org. found</option>
											<?php  } ?>
										</select>
                                    <!--</span>-->
                                  </div>
                                  
                                  <script>
								  	function getBranchData(orgid){
										
										  var xhttp = new XMLHttpRequest();
										  xhttp.onreadystatechange = function() {
											if (xhttp.readyState == 4 && xhttp.status == 200) {
													document.getElementById("branch_list").innerHTML = xhttp.responseText;
												}
										  };
										  xhttp.open("GET", "runajax.php?acn=FetchBranchDetails&orgid="+orgid, true);
										  xhttp.send();
									}
									
									function FetchIndustryDetails(branchid){
										
										  var xhttpI = new XMLHttpRequest();
										  xhttpI.onreadystatechange = function() {
											if (xhttpI.readyState == 4 && xhttpI.status == 200) {
													document.getElementById("industry_list").innerHTML = xhttpI.responseText;
												}
										  };
										  xhttpI.open("GET", "runajax.php?acn=FetchIndustryDetails&branchid="+branchid, true);
										  xhttpI.send();
									}
									
									
                                  </script>
                                  
                                  
                                  
                                  <div class="col-xs-12 col-md-3 col-lg-2 form-group" id="branch_list" >
                                  
                                  <?php $rsBranches = $objReports->fetchBranches();  ?>
                                    <!--<span id="span_select" style="width:120px; height:35px; float:right;">-->
                                        <select class="form-control input-md" name="Branches" onchange="javascript: getBranchData(this.value)">
                                            <option value="0"> Select Branch </option> 
                                            <?php if(count($rsBranches) > 0) { for($b=0; $b<count($rsBranches); $b++) { ?>
                                            <option <?php if($BranchID === $rsBranches[$b]['branchId']) echo 'selected="selected"'; ?> value="<?php echo $rsBranches[$b]['branchId']?>"><?php echo $rsBranches[$b]['db_branchName']?></option>
                                            
                                            <?php }
											
											}else{ ?>
                                            <option value="0">No any branch found</option>
                                            <?php } ?>
                                            
										</select>
                                    <!--</span>-->
                                  </div>
                                  
                                  <div class="col-xs-12 col-md-3 col-lg-2 form-group" id="industry_list">
                                    <!--<span id="span_select" style="width:120px; height:35px; float:right;">-->
                                    <?php $rsIndustrys = $objReports->fetchIndustrys($OrgID,$BranchID,$IndustryID);  ?>
                                  <select class="form-control input-md" id="state_list" name="Industrys">
                                            <option value="0"> Select Industry </option> 
                                            <?php if(count($rsIndustrys) > 0) { for($b=0; $b<count($rsIndustrys); $b++) { ?>
                                            <option <?php if($IndustryID === $rsIndustrys[$b]['IndId']) echo 'selected="selected"'; ?> value="<?php echo $rsIndustrys[$b]['IndId']?>"><?php echo $rsIndustrys[$b]['db_industry']?></option>
                                            
                                            <?php }
											
											}else{ ?>
                                            <option value="0">No Data Found</option>
                                            <?php } ?>
                                            
										</select>
                                                                
                                    <!--</span>-->
                                  </div>
                                  
                                  <div class="col-xs-12 col-md-2 col-lg-2 form-group">
                                    <!--<span id="span_select" style="width:120px; height:35px; float:right;">-->
                                        <select class="form-control input-md" id="pType" name="ptype">
                                           <option <?php if($pType == 'content') echo 'selected="selected"'; ?>  value="content">Content</option>
                                           <option <?php if($pType == 'question') echo 'selected="selected"'; ?>  value="question">Question</option>
										</select>
                                    <!--</span>-->
                                  </div>
								  
								     
								  
                                  
                                  <div class="col-xs-6 col-sm-2 col-md-2 col-lg-1 pull-right text-right form-group ">
                                    	<a class="btn btn-sm btn-danger pull-left text-left "  href="reports.html"> <i class="fa fa-refresh"></i> Reset  </a>
                                  </div>
                                  
                                 
                  
                  				  <div class="col-xs-6 col-sm-2 col-md-2 col-lg-1 pull-right text-right">
                  
                   <div class="input-group input-group-sm pull-right text-right">
                    <!--<input type="text" id="s" name="s" placeholder="Search content here .." class="form-control" value=""> -->                      
                    <span class="pull-right text-right form-group no-padding">
                             <!--<button class="btn btn-block btn-success btn-md no-padding" type="submit"><i class="fa fa-search" aria-hidden="true"></i> &nbsp; GO !</button> -->
                             <a class="btn btn-success btn-sm" onclick="myFunction()" href="#"> <i class="fa fa-search"></i> GO  </a>
                             <script>
							 
							 function myFunction() {
								$(".loader").show();
								document.getElementById("frmSearch").submit();
								
								}
							$(window).bind("load", function() {
								//$(".loader").hide();
							});
							 </script>
                    </span>
                  </div>        
                   
                </div>
                <div class="clearfix"></div>
				
                <div class="col-md-12 no-padding">
                
                 <div class="col-md-2 col-xs-6 form-group">
                          <input type="text" readonly="readonly" id="FromDate" name="FromDate" placeholder="Start date.." class="form-control input-md" value="<?php echo $FromDate;?>">
                      </div>
                      
                      <div class="col-md-2 col-xs-6 form-group">
                          <input type="text" readonly="readonly" id="ToDate" name="ToDate" placeholder="End date.." class="form-control input-md" value="<?php echo $ToDate;?>">
                      </div>
                       
                      <!--<div class="col-xs-6 col-sm-2 col-md-2 col-lg-1 form-group pull-right">
                      <?php if(!empty($OrgID) && !empty($BranchID) && !empty($IndustryID)) { ?>
                      <input class="btn btn-info pull-right " type="button" name="sendemailall" onclick="javascript: return validateCheckboxToEmail();"   id="sendemailall" value="Email" style="width:100%;"  />
					 
					 <?php } ?>
                      
                      </div>--->
					  	
                </div>
                                  
                                    
                                  
                                    
								  <!--<div class="col-md-2 col-xs-6 col-sm-4 form-group "><a class="btn btn-sm btn-success col-xs-12" href="reports.html?v=add"> <i class="fa fa-plus"></i>&nbsp;Add Religions  </a> 
                                    </div> -->
                                    
                                  
                                  
                                <?php if($pType == 'content') { ?></form> <?php } ?>
                                </div>
                                <?php if($pType == 'question') { ?>
                                <div class="col-md-12">
                                 <?php 
										echo $titleQue =  $objReports->SelectPageNameFilter($rsPagesIDS); 
								 ?>
                                
                                </form>
								
									
									
									<a href="#"  class="btn btn-success btn-sm report2" >Trend Report</a>
                                    <a href="#"  class="btn btn-success btn-sm report1" style="display:none;" >Regular Report</a>
								
					
                                </div>
								
								
                                <?php } ?>
                                
                                 <?php if($pType == 'content') { ?>
                                 
								
                                 <?php } ?>
                                </div>
                                
                                
                                <div class="question">	
			
								<div class="row">
         			<?php
					
					
					
						if(count($rsCustomerInfo) > 0 ) {
							//echo   pagination_log($s,$perpage,$start,$nume,$totalpage,$pg,$v);  
						}
						
						//$rsPagesIDS = IndustryPageIDS($pType,$BranchID,$IndustryID);
                    ?>
                   	   		   
		   
		
				
			
		<div id="holder">
		
           


		
                    <div class="col-md-12 " id="scroll--">
                    <div  class="table-responsive-- table_download" id="propertyThumbnails--" >
                    
                    	<?php if(!empty($OrgID) && !empty($BranchID) && !empty($IndustryID) ){ ?>
                    	
							 <?php if($pType == 'content') {?>
							 
							
			  
			  <?php if(count($rsPagesIDS) > 0) {?>
			  
			   
			   
			   
							<div class="col-md-12">
                                  <div class="col-md-12 col-xs-12 form-group">
                                    
									 
									 <button class="badge bg-red"  id="low_rating" style="    display: block; float: left; padding: 8px 7px; border: none; margin: 13px 0px;">&nbsp;&nbsp;BETWEEN 1.00 TO 2.00&nbsp;&nbsp;</button>&nbsp;&nbsp;
									 
									 <button class="badge bg-green" id="high_rating" style="    display: block; float: left; padding: 8px 7px; border: none; margin: 13px 15px;">&nbsp;&nbsp;BETWEEN 2.01 TO 5.00&nbsp;&nbsp;</button>

									<button class="badge bg-gold"  id="not_applicable" style="background: #f39c12;display: block; float: left; padding: 8px 7px; border: none; margin: 13px 15px;">&nbsp;&nbsp;NOT APPLICABLE 0.00&nbsp;&nbsp;</button>&nbsp;&nbsp;
																		 

									<button class="badge one_to_four" id="all_rating" style="    display: block;  float: left;  padding: 8px 7px;  border: none;  margin: 13px 0px; background:linear-gradient(to bottom right, #4162a9 , #83b6de,#44b8ec) !IMPORTANT;">&nbsp;&nbsp;BETWEEN 1.00 TO 5.00&nbsp;&nbsp;</button>
									 
									 
									 <button class="content_report1 conte_report1" type="button" style="display:none;" ><img src="theme/black/images/haje.png"></button>
									 <button class="content_report2 conte_report2" type="button"  ><img src="theme/black/images/per.png"></button>
									 
									 <input  class="btn btn-success btn-md" type="hidden" id="btnExport" value="Excel Export" />
									 
									 <?php if (in_array('excel', $rsPerm)) { ?>
									 	  <input type="button" class="content_report_btn" onclick="tableToExcel('printtable', 'beatle')" value="Excel">
										<?php } ?>
	
								</div>
                            </div>
		
<!--<table  id="" class="content_report">-->
<!-- Latest compiled and minified CSS -->



<div id="printtable">
								 
									
<table id="content_report" class="display content_report" style="width:100%">
 
	
 <thead class="">
 
      <?php $keywordName = $objReports->industryKeywordName($IndustryID);?>
	  

	
      <tr>
         <th rowspan="2" style="text-align:center; border:1px solid; line-height: 8;">Sr.No.</th>
         <th style="text-align:center; border:1px solid !important; border-right:1px solid;" colspan="<?php if(empty($keywordName[0]['keywordName'])){ echo '4';}else{echo '5';}?>">FEEDBACK DETAILS</th>
         <?php
            foreach($rsPagesIDS as $val) {
            ?>
         <th style="border:1px solid;" id="tbl-<?php echo $val;?>"><?php echo $objReports->SelectPageName($val);?></th>
         <?php  } ?>
      </tr>
      <tr>
		 <th style="border:1px solid !important;">Date</th>
         <th style="border:1px solid !important;">Customer ID</th>
         <th style="border:1px solid !important;">Customer Name</th>
         <?php if(!empty($keywordName[0]['keywordName'])){ ?>
         <th style="border:1px solid !important;"><?php echo $keywordName[0]['keywordName']?></th>
         <?php }else{
            //echo $keywordName[0]['keywordName'];
            }?>
         <th style="border:1px solid !important;">Overall Score</th>
         <?php
            foreach($rsPagesIDS as $val) {
            ?>
         <!--<th class="text-center"> -->
         <?php  $rsPagesContent = $objReports->fetchPageList($val); ?>
         <script>
            $("#tbl-<?php echo $val;?>").attr("colspan",<?php echo count($rsPagesContent);?>);
         </script>
         <?php for($pgc=0;$pgc<count($rsPagesContent); $pgc++){ 
            $styBorder = '';
            if($pgc == count($rsPagesContent)-1){
            	$styBorder = 'style="border-right:1px solid;"';
            }
            ?>
         <th style="border:1px solid; padding: 9px 6px; "<?php echo $styBorder;?>><?php echo $rsPagesContent[$pgc]['db_pageConTitle'] ?> </th>
         <?php	} ?>
         <?php  } ?>
      </tr>
   
	
	
	
	<tr style="font-size:12px; text-align: center; ">
         <td colspan="<?php if(empty($keywordName[0]['keywordName'])){ echo '4';}else{echo '5';}?>" style="border:0px solid !important;"><b style=" color: #000000; font-weight: 500; font-size: 15px;">Average</b></td>
		 
	
		 <td style="border: none;" class="">
		 <div class="totalAvgVerNormal"></div>
		 <div class="totalAvgVerNew" style="border: none;display:none;"></div>
		 </td>
		


         <?php
            foreach($rsPagesIDS as $val) {
            ?>
        
         <?php  $rsPagesContent = $objReports->fetchPageList($val); ?>
         <script>
            $("#tbl-<?php echo $val;?>").attr("colspan",<?php echo count($rsPagesContent);?>);
         </script>
         <?php for($pgc=0;$pgc<count($rsPagesContent); $pgc++){ 
            $styBorder = '';
            if($pgc == count($rsPagesContent)-1){
            	$styBorder = 'style="border-right:0px solid;"';
            }
            ?>
         <?php
            $pageId = $rsPagesContent[$pgc]['pageConId'];
            $totalAvg = $objReports->FetchContentAvg($OrgID,$BranchID,$IndustryID,$pageId);
            $totalAvgName = $objReports->FetchContentAvgName($totalAvg,$pageId);
            ?>
         <td>										
           
			   
			   
			   
			   
			   
			   
			    <div title="<?php echo $totalAvgName;?>" style="border:0px solid ; border-top:0px solid #fff; border-bottom:0px solid #fff;" <?php echo $styBorder;?> class="content_report_noraml c_average">										
            <?php
               //$totalAvg = 3.55;
                  if($totalAvg <= 2){
               				
               				echo $span = '<span class="badge bg-red" >'.$totalAvg.'</span>';
  
                  }else{
                          echo $span = '<span class="badge bg-green">'.$totalAvg.'</span>';
                  }
               ?>
			   
			   
			   </div>
			   
			   
			 <div title="<?php echo $totalAvgName;?>"  aria-label="Customer Name: activate to sort column ascending" class="had_b content_report_new c_average " style="border:0px solid; display:none" <?php echo $styBorder;?>>										
            <?php
               if($totalAvg <= 2){
               	
               	echo $span = '<span class="badge bg-red" >'.($totalAvg*100) / 5 .'%</span>';
               
                                                      }else{
                                                          echo $span = '<span class="badge bg-green">'.($totalAvg*100)/5 .'%</span>';
               	//echo $FromDate.' to '.$ToDate;
                                                      }
               ?>
         </div>   
			   
         </td>
         
         <?php	} ?>
         <?php  } ?>
		
    </tr>
	
   
  
   </thead>
   
   
   
  

   <tbody>
    
    
      <?php 
      
         if(count($rsCustomerInfo)>0){
         ?> 
     
	    
		 
	    

	  
	 
	 
	 
	 
         <?php
            $idArr = array();
            for ($i=0;$i< count($rsCustomerInfo);$i++)
            {
                   if($i%2)
                        $bgclass='altrow';
                    else
                        $bgclass='oddrow';
                        
                    $objReports->FromDate = date("Y-m-d",strtotime($rsCustomerInfo[$i]['created_date']));
                    $objReports->ToDate = date("Y-m-d",strtotime($rsCustomerInfo[$i]['created_date']));
            
            //$dis = 'N';
            //if(!in_array($rsCustomerInfo[$i]['db_surveyUserid'],$idArr)){
            //	$dis = 'Y';
            //	$idArr[] = $rsCustomerInfo[$i]['db_surveyUserid'];
            //}
            ?>
			
			
   
   
   
         <tr  class="<?php echo $bgclass;?>" >
            <td><label name="No"><?php echo $i+1; ?></label></td>
            <td><label name="Date"><?php echo date("d/m/Y",strtotime($rsCustomerInfo[$i]['created_date'])); ?></label></td>
            <td><label name="User ID"><a target="_blank" href="customers.html?v=list&cid=<?php echo $rsCustomerInfo[$i]['db_surveyUserid']."&tid=".$rsCustomerInfo[$i]['tokenid']."&Industrys=".$rsCustomerInfo[$i]['db_surveyIndId'].$lnk;?>">
               <?php if(!empty($rsCustomerInfo[$i]['db_userLoginName'])) echo $rsCustomerInfo[$i]['db_userLoginName']; else echo $rsCustomerInfo[$i]['db_phone']; ?></a><?php //echo $rsCustomerInfo[$i]['db_phone']; ?></label>
            </td>
            <td style="border-right:0px solid;" ><label name="User ID"><a target="_blank" href="customers.html?v=list&cid=<?php echo $rsCustomerInfo[$i]['db_surveyUserid']."&tid=".$rsCustomerInfo[$i]['tokenid']."&Industrys=".$rsCustomerInfo[$i]['db_surveyIndId'].$lnk;?>">
               <?php if(!empty($rsCustomerInfo[$i]['db_username'])) echo $rsCustomerInfo[$i]['db_username']; else echo "NA"; ?></a><?php //echo $rsCustomerInfo[$i]['db_phone']; ?></label>
            </td>
            <?php if(!empty($keywordName[0]['keywordName'])){ ?>
            <td style="border-right:0px solid;" ><?php if(!empty($rsCustomerInfo[$i]['keyword'])) echo $rsCustomerInfo[$i]['keyword']; else echo "NA"; ?></td>
            <?php }else{
               //echo $keywordName[0]['keywordName'];
               }?>
            <td style="border-right:0px solid;" ><label id="oavg_<?php echo $i?>" name="Overall Avg."></label></td>
            <?php
               $totalAvg = 0;
               $noZeroPageCount = 0;
               
                                          foreach($rsPagesIDS as $val) {
                                         ?>
            
            <?php  $rsPagesContent = $objReports->fetchPageList($val); 
               $avgSum = 0;
               $noZeroPageConCount = 0;
               for($pgc=0;$pgc<count($rsPagesContent); $pgc++){ 
               
               $styBorder = '';
               if($pgc == count($rsPagesContent)-1){
               $styBorder = 'style="border-right:1px solid;"';
               }
               ?>
            <?php $avgVal = $objReports->FetchOverAllAvg($rsCustomerInfo[$i]['db_surveyUserid'],$OrgID,$BranchID,$IndustryID,$pType,$rsPagesContent[$pgc]['pageConId'],$rsCustomerInfo[$i]['tokenid']);?>
            <?php $avgName = $objReports->FetchContentName($avgVal,$rsPagesContent[$pgc]['pageConId']);?>
            <td id="rating_gr_re" title="<?php echo $avgName;?>" style="padding: 9px 6px;" <?php echo $styBorder;?> class="text-center"><?php
            	if($avgVal != 0){
            		$noZeroPageConCount++;
            	} 
            	//echo "<br />";  
               $avgSum = $avgSum + $avgVal;
               //echo $avgVal;
               $span = '';
               // if($avgVal <= 2){
               
               // echo $span = '<span class="badge bg-red" >'.$avgVal.'</span>';
               
               
               // }else{
                   // echo $span = '<span class="badge bg-green">'.$avgVal.'</span>';
               // }
			   
			   
			   if($avgVal == 0){
				   echo $span = '<span class="badge bg-gold" >'.$avgVal.'</span>';
			   }elseif($avgVal >0 && $avgVal <= 2){
				  echo $span = '<span class="badge bg-red" >'.$avgVal.'</span>';
			   }else{
				  echo $span = '<span class="badge bg-green" >'.$avgVal.'</span>'; 
			   }
               
               //echo $avgSum;
               
               ?> 
			  
			   </td>
			   
			  
			   
			   
            <?php	} 

				//echo count($rsPagesContent);
               //echo "<br />";
               //die(); 
               //$totalAvg += round($avgSum/count($rsPagesContent),2);
            if($avgSum != 0){
            	$noZeroPageCount++;
            }
            $totalAvg += round($avgSum/$noZeroPageConCount,2);
            /*echo $avgSum;
            	echo "<br>";*/
               ?>

            <?php  } 


            	/*echo "noZeroPageCount ".$noZeroPageCount;
            	echo "<br>";
            	echo "rsPagesIDS ".count($rsPagesIDS);
            	echo "<br><br>";*/
               //$totalAvg = round($totalAvg/count($rsPagesIDS),2);
               $totalAvg = round($totalAvg/$noZeroPageCount,2);
               
               //echo "<br />";
               //die();                         
               $totalAvgVer = $totalAvgVer + $totalAvg;
               $totalAvgVerCount++; 
               if($totalAvg <= 2){
               
               $span = '<span class="badge bg-red" >'.$totalAvg.'</span>';
               
               
               }else{
               $span = '<span class="badge bg-green">'.$totalAvg.'</span>';
               }
               ?>			
            <script>
               $("#oavg_<?php echo $i?>").html('<?php echo $span ;?>');
                                        
            </script>
			
			
			
			
         </tr>
         <?php   } 
		 
		 
		 
		 
		 
		 

         $finalTotalAvgVer = round($totalAvgVer/$totalAvgVerCount,2);
         if($finalTotalAvgVer <= 2){
               $spanVer = '<span class="badge bg-red" >'.$finalTotalAvgVer.'</span>';
          }else{

               	$spanVer = '<span class="badge bg-green">'.$finalTotalAvgVer.'</span>';
               	
           }

           if($finalTotalAvgVer <= 2){
               $spanVerPer = '<span class="badge bg-red" >'.($finalTotalAvgVer*100) / 5 .'%</span>';
          	}else{
               $spanVerPer = '<span class="badge bg-green">'.($finalTotalAvgVer*100) / 5 .'%</span>';
           }
          ?> 
      	<script>
		$(".totalAvgVerNormal").html('<?php echo $spanVer; ?>');
		$(".totalAvgVerNew").html('<?php echo $spanVerPer; ?>');
			</script>

   
   
   
   
			
      <?php
         }else{
          ?>
      <tr class="altrow" style="width:100%;" >
         <td colspan="26" align="center"> No record found.</td>
      </tr>
      <?php } ?>
  



   


  

  </tbody>
  
  
  
  
  <?php }else{ ?>
   <tbody>
      <tr>
         <td class="text-center">No data found.</td>
      </tr>
   </tbody>
   <?php } ?>
</table>		
								
</div>								
							 
							 
							 
							 <script>
$(document).ready(function(){
    $("#high_rating").click(function(){
        $("table span.badge.bg-red").hide();
         $("table span.badge.bg-green").show();
		 $("table span.badge.bg-gold").hide(); 
    });
    $("#low_rating").click(function(){
        $("table span.badge.bg-green").hide();
         $("table span.badge.bg-red").show();
		  $("table span.badge.bg-gold").hide(); 
		   
    });
	 $("#all_rating").click(function(){
        $("table span.badge.bg-green").show();
         $("table span.badge.bg-red").show();
		 $("table span.badge.bg-gold").show(); 
    });
	$("#not_applicable").click(function(){
        $("table span.badge.bg-green").hide();
         $("table span.badge.bg-red").hide();
		 $("table span.badge.bg-gold").show();
    });
});



</script>
							 
							 
							 
		
<!---<script>
$('span.badge.bg-green').each(function() {
    if ($(this).text() == "3.00") {
        $(this).parent().addClass("mmm");
		
    }
});
</script>
<script>
$('span.badge.bg-green').each(function() {
    if ($(this).text() == "4.00") {
        $(this).parent().addClass("mmm");
    }
});
</script>-->






			 <!--//Fetching Data loder---->				
							
                             <?php } else { ?>
							 
							 
							 
							</div>
							 </div> 
							  
				
							  
							  <div class="total_out_of_data">
							  <div class="col-md-12 col-xs-12 form-group">
                                     
                            <span class="badge bg-green">Filtered <span><?php echo count($rsCustomerInfo);?></span> out of <span><?php $rsTotalRows = $objReports->FetchTotalRows($FromDate,$ToDate); echo $rsTotalRows;?></span></span>
							 
									 
									
									  
                                  </div>
							  
							  
							  </div>
							  
							 

					    	<div class="col-md-12"  id="scroll----" >
                    <div  class="table-responsive--" id="propertyThumbnails" >
				              
<table id="question_report" class="display question_report" style="width:100%">
   <?php  if(count($rsPagesIDS) > 0) {?>
   <thead>
      <tr>
         <th rowspan="2" style="border:1px solid !important;">Sr.No.</th>
         <th rowspan="2" style="border:1px solid !important;">Date</th>
         <th rowspan="2" style="border:1px solid !important;">Customer ID</th>
         <th id="cust_name" rowspan="2" style="border:1px solid !important;" >Customer Name</th>
         <?php $keywordName = $objReports->industryKeywordName($IndustryID);?>
         <?php if(!empty($keywordName[0]['keywordName'])){ ?>
         <th rowspan="2" style="border:1px solid !important;" ><?php echo $keywordName[0]['keywordName'];?></th>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keywordServer'])){ ?>
         <th rowspan="2" style="border:1px solid !important;"> <?php  if($keywordName[0]['keywordServer']==""){echo "keyword 2";}else{echo $keywordName[0]['keywordServer'];}?></th>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keywordPax'])){ ?>
         <th rowspan="2" style="border:1px solid !important;"><?php  if($keywordName[0]['keywordPax']==""){echo "keyword 3";}else{echo $keywordName[0]['keywordPax'];}?></th>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keyword4'])){ ?>
         <th rowspan="2" style="border:1px solid !important;"><?php  if($keywordName[0]['keyword4']==""){echo "keyword 4";}else{echo $keywordName[0]['keyword4'];}?></th>
         <?php } ?>
         <th rowspan="2" style="border:1px solid !important;">Total Visits</th>
         <?php
            foreach($rsPagesIDS as $val) {
            $valck[] = $val;
            ?>
         <th class="<?php echo $val;?>" style="border:1px solid;" id="tbl-<?php echo $val;?>"><?php 
            echo $titleQue =  $objReports->SelectPageName($val);
            $fltverVal = 0;
            //echo $val;
            //echo $val."#".$titleQue."#<br />".QUESTION_DEFAULT_SENTENCE_FILTER;
            if(strtolower($titleQue) == strtolower(QUESTION_DEFAULT_SENTENCE_FILTER)){
            $fltverVal = $val;
            }
            
            ?></th>
         <?php  } ?>
      </tr>
      <tr  style="font-size:12px; font-weight:bold !important;">
         <?php
            foreach($rsPagesIDS as $val) {
            ?>
         <?php  $rsPagesContent = $objReports->fetchPageList($val);
			// echo "<pre>";
			// print_r($rsPagesContent);
		 ?>
         <script>
            $("#tbl-<?php echo $val;?>").attr("colspan",<?php echo count($rsPagesContent);?>);
         </script>
         <?php for($pgc=0;$pgc<count($rsPagesContent); $pgc++){ 
            $styBorder = 'style="border:1px solid; "';
            if($pgc == count($rsPagesContent)-1){
            $styBorder = 'style="border:1px solid; "';
            }
            ?>
         <th id="<?php echo $rsPagesContent[$pgc]['db_pageid']; ?>" class="que_c one6 <?php echo $val;?>"  align="center" <?php echo $styBorder;?>>
            <?php
               echo $rsPagesContent[$pgc]['db_pageConTitle']; 
               
               ?> 
         </th>
         <?php	} ?>
         <?php  } ?>
      </tr>
   </thead>
   <tbody>
      <?php 
         //echo "<pre>";
         //print_r($rsCustomerInfo);
         //echo "</pre>";
            
          
                                   
         if(count($rsCustomerInfo)>0){ ?>
      <?php for ($i=0;$i< count($rsCustomerInfo);$i++)
         {
                if($i%2)
                     $bgclass='altrow';
                 else
                     $bgclass='oddrow';
                     
                 $objReports->FromDate = date("Y-m-d",strtotime($rsCustomerInfo[$i]['created_date']));
                 $objReports->ToDate = date("Y-m-d",strtotime($rsCustomerInfo[$i]['created_date']));
         
         //$rsTotalVisits = $objReports->FetchTotalVisits($rsCustomerInfo[$i]['userId']);
         //$rsTotalVisits = $objReports->FetchTotalVisits();
                     
         ?>
      <tr class="<?php echo $bgclass;?>" >
         <td><label name="No"><?php echo $i+1; ?></label></td>
         <td><label name="Date"><?php echo date("d/m/Y",strtotime($rsCustomerInfo[$i]['created_date'])); ?></label></td>
         <td><a target="_blank" href="customers.html?v=list&cid=<?php echo $rsCustomerInfo[$i]['db_surveyUserid']."&tid=".$rsCustomerInfo[$i]['tokenid']."&Industrys=".$rsCustomerInfo[$i]['db_surveyIndId'].$lnk;?>">
            <?php //echo $rsCustomerInfo[$i]['db_phone']; 
               if(!empty($rsCustomerInfo[$i]['db_userLoginName'])) echo $rsCustomerInfo[$i]['db_userLoginName']; else echo $rsCustomerInfo[$i]['db_phone']; ?>
            </a>
            <label name="User ID">
            <?php //echo $rsCustomerInfo[$i]['db_phone']; ?></label>
         </td>
         <td><a target="_blank" href="customers.html?v=list&cid=<?php echo $rsCustomerInfo[$i]['db_surveyUserid']."&tid=".$rsCustomerInfo[$i]['tokenid']."&Industrys=".$rsCustomerInfo[$i]['db_surveyIndId'].$lnk;?>">
            <?php //echo $rsCustomerInfo[$i]['db_phone']; 
               if(!empty($rsCustomerInfo[$i]['db_username'])) echo $rsCustomerInfo[$i]['db_username']; else echo "NA"; ?>
            </a>
         </td>
         <?php if(!empty($keywordName[0]['keywordName'])){ ?>
         <td ><?php if(!empty($rsCustomerInfo[$i]['keyword'])) echo $rsCustomerInfo[$i]['keyword']; else echo "NA"; ?></td>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keywordServer'])){ ?>
         <td><?php if(!empty($rsCustomerInfo[$i]['servername'])) echo $rsCustomerInfo[$i]['servername']; else echo "NA"; ?></td>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keywordPax'])){ ?>
         <td><?php if(!empty($rsCustomerInfo[$i]['paxNo'])) echo $rsCustomerInfo[$i]['paxNo']; else echo "NA"; ?></td>
         <?php } ?>
         <?php if(!empty($keywordName[0]['keyword4'])){ ?>
         <td ><?php if(!empty($rsCustomerInfo[$i]['totalBill'])) echo $rsCustomerInfo[$i]['totalBill']; else echo "NA"; ?></td>
         <?php } ?>
         <?php $rsTotalVisits = $objReports->FetchTotalVisits($rsCustomerInfo[$i]['db_surveyUserid'],$FromDate,$ToDate);?>
         <td><?php echo $rsTotalVisits;?></td>
         <?php
            foreach($rsPagesIDS as $val) {
            
            $rsPagesContent = $objReports->fetchPageList($val); 
            
            for($pgc=0;$pgc<count($rsPagesContent); $pgc++){ $styBorder = '';
            if($pgc == count($rsPagesContent)-1){
            $styBorder = 'style=" "';
            }
            ?>
         <td id="<?php echo $val;?>" <?php echo $styBorder;?>>
            <?php $avgVal = $objReports->FetchQuestionValue($rsCustomerInfo[$i]['db_surveyUserid'],$OrgID,$BranchID,$IndustryID,$pType,$rsPagesContent[$pgc]['pageConId'],$rsCustomerInfo[$i]['tokenid']); 
               //echo $val;
               
               if(strlen($avgVal) > 30) {
               echo substr($avgVal,0,30)."..<a data-toggle='modal' data-target='#modal_".$rsCustomerInfo[$i]['db_surveyUserid'].$OrgID.$BranchID.$IndustryID.$pType.$rsPagesContent[$pgc]['pageConId'].$rsCustomerInfo[$i]['tokenid']."' href=''> more </a>"; ?>
            <div class="modal cust_coment" id="<?php echo "modal_".$rsCustomerInfo[$i]['db_surveyUserid'].$OrgID.$BranchID.$IndustryID.$pType.$rsPagesContent[$pgc]['pageConId'].$rsCustomerInfo[$i]['tokenid'];?>" style="padding-right: 17px;">
               <div class="modal-dialog">
                  <div class="modal-content">
                     <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                        <h4 class="modal-title">More details</h4>
                     </div>
                     <div class="modal-body" style="text-align:left;">
                        <p><?php echo $avgVal; ?></p>
                     </div>
                     <div class="modal-footer">
                        <button type="button" class="btn btn-default pull-right" data-dismiss="modal">Close</button>
                        <!--<button type="button" class="btn btn-primary">Save changes</button> -->
                     </div>
                  </div>
                  <!-- /.modal-content -->
               </div>
               <!-- /.modal-dialog -->
            </div>
            <?php		}
               else
               echo $avgVal;
               
                                                     ?> 
         </td>
         <?php	} ?>
         <?php  } 
            ?>
      </tr>
      <?php } ?>
   </tbody>
   <tbody>
      <?php }else{
         ?>
      <tr class="altrow">
         <td colspan="25" align="center" style="float: none;"> No record found. </td>
      </tr>
      <?php } ?>
   </tbody>
   <?php }else{ ?>
   <tbody>
      <tr>
         <td class="text-center">No data found.</td>
      </tr>
   </tbody>
   <?php } ?>
</table>
                               
                             <?php }?>
                         
                         <?php }else{ ?>
							 </div>
							 
							 
							 
							 
							 
							 </div>
                              <table class="table table-striped table-bordered" >
                              <tbody>
                              <tr>
       <td class="text-center"><img src="theme/black/images/searchfeedback4.jpg" style="width:100%;"></td>
                              </tr>
                              </tbody>
                              </table>
							  
                              
					       

                             
						<?php }?>
                         
					
				
		
					
                <?php
						if(count($rsCustomerInfo) > 0 ) {
				?>
				<?php 	//echo  pagination_log($s,$perpage,$start,$nume,$totalpage,$pg,$v); ?>
				
				<?php
				}
				?>
                    </div>
                    
                    
                    
                   
                    
                    
                    			<?php } else{ ?>
									
          		<?php
					//echo "<pre>";
					//print_r($rsCustomerInfo);
					//echo "</pre>";
                ?>
                
				                

                                
                                
                                

									
								<?php } ?>
                    
				
				</div>
                               </div>
                               
                            
                               
   			 </div>
  	  		</div>
    	</div>
    
     
   
   
   <div class="trand" style="display:none;">
   <!---trand-->
        <div id="holder">
		
			 <?php
				 $rsTrendCustomerInfo = $objReports->FetchTrendCustomerData($FromDate,$ToDate);
				//$rsTrendBill = $objReports->FetchTrendTotalBill('181',$FromDate,$ToDate);
				 //echo "bill total ".$rsTrendBill;
			?>	
							 							  
			<div class="col-md-12"  id="scroll----" >
             <div class="new table trand-report">


<table id="example" class="display" style="width:100%">
 
                            

        <thead class="table_fix_heder">
            <tr>
                <th>Sr.No</th>
                  <th>Customer id</th>
				   <th>cust name</th>
				   <th>No of Pax</th>
                  <th>Total Visit</th>
				   <th>Bill Amount</th>
            </tr>
        </thead>
        <tbody>
            <?php if(count($rsTrendCustomerInfo) > 0) { ?>
					<?php for($b=0; $b<count($rsTrendCustomerInfo); $b++) { ?>

					<?php $rsTrendInfo = $objReports->FetchTrendTotalBill($rsTrendCustomerInfo[$b]['db_surveyUserid'],$FromDate,$ToDate);?>
					<tr>
					  <td></td>
					  <td><?php echo $rsTrendCustomerInfo[$b]['db_surveyUserid']; ?></td>
					  <td><?php if($rsTrendCustomerInfo[$b]['db_username'] == "")echo $rsTrendCustomerInfo[$b]['db_phone'];else echo $rsTrendCustomerInfo[$b]['db_username'];?></td>
					 
					  <td><?php echo $rsTrendInfo['totalPax'];?></td>
					  <td><?php echo $rsTrendInfo['visit']; ?></td>
					   <td><?php echo $rsTrendInfo['totalBill'];?></td>
					</tr>
				
				 <?php }
				 } ?>
				
        </tbody>
        <tfoot>
            <tr>
            
            
            
            
            
              <th></th>
              <th></th>
			  <th></th>
			  <th></th>
               <!-- <th colspan="5" style="text-align:right">Total:</th>-->
                <th></th>
                  <th></th>
            </tr>
        </tfoot>
    </table>
	
	
</div>


</div>
                             
							  


                       
                         
					
    


							 
					
					
                <?php
						if(count($rsCustomerInfo) > 0 ) {
				?>
				<?php 	//echo  pagination_log($s,$perpage,$start,$nume,$totalpage,$pg,$v); ?>
				
				<?php
				}
				?>
                    </div>
   <!---//trand-------->
  
   </div>
       <? } ?>  
       

       </div>
       </div>
        
       
       
    </section>
	
	
	
	
</div>

   
                               
<!--trand report hide and show-->
<script>
$(document).ready(function(){
    $(".report1").click(function(){
        $(".trand").hide();
         $(".question").show();
		 
		 $(".report1").hide();
		 $(".report2").show();
    });
    $(".report2").click(function(){
        $(".trand").show();
        $(".question").hide();
		
		 $(".report2").hide();
		 $(".report1").show();
    });
});
</script>
		


<!--countaint_report-%_#-->
 <script>
$(document).ready(function(){
    $(".content_report1").click(function(){
        $(".content_report_new").hide();
         $(".content_report_noraml").show();
		 $(".conte_report1").hide();
		 $(".conte_report2").show();
		 $(".totalAvgVerNormal").show();
		 $(".totalAvgVerNew").hide();
    });
    $(".content_report2").click(function(){
        $(".content_report_new").show();
        $(".content_report_noraml").hide();
		 $(".conte_report2").hide();
		 $(".conte_report1").show();
		 $(".totalAvgVerNormal").hide();
		 $(".totalAvgVerNew").show();
    });
});
</script>









<!------.tblCustomers--#question_all--#example---------------->
<script><!--total-colum-rupis---imp--->  
	$(document).ready(function() {
    $('#example').DataTable( {
	"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
										
        "footerCallback": function ( row, data, start, end, display ) {
            var api = this.api(), data;
 
            // Remove the formatting to get integer data for summation
            var intVal = function ( i ) {
                return typeof i === 'string' ?
                    i.replace(/[\$,]/g, '')*1 :
                    typeof i === 'number' ?
                        i : 0;
            };
 
            // Total over all pages
            total = api
                .column( 5 )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Total over this page
            pageTotal = api
                .column( 5, { page: 'current'} )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Update footer
            $( api.column( 5 ).footer() ).html(
                ''+pageTotal +' ( '+ total +' Total Amount)'
            );
			
			// Total over all pages
            total = api
                .column( 4 )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Total over this page
            pageTotal = api
                .column( 4, { page: 'current'} )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Update footer
            $( api.column( 4 ).footer() ).html(
                ''+pageTotal +' ( '+ total +' Total Visit)'
            );
			
			// Total over all pages
            total = api
                .column( 3 )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Total over this page
            pageTotal = api
                .column( 3, { page: 'current'} )
                .data()
                .reduce( function (a, b) {
                    return intVal(a) + intVal(b);
                }, 0 );
 
            // Update footer
            $( api.column( 3 ).footer() ).html(
                ''+pageTotal +' ( '+ total +' Total Pax)'
            );
			
        }
		
		
											
											
    } );
} );
	
	
</script>


<script>
	$(document).ready(function() {
    $('.tblCustomers').DataTable( {
		"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
        "scrollY": 500,
        "scrollX": true,
		
		
    } );
} );
</script>
	
	
<script>
								$(document).ready(function() {
										$('#question_all').DataTable( {
											"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
											"scrollY": 700,
											"scrollX": true
										} );
										
										  $('a.toggle-vis').on( 'click', function (e) {
								e.preventDefault();
 
									// Get the column API object
									var column = table.column( $(this).attr('data-column') );
							 
									// Toggle the visibility
									column.visible( ! column.visible() );
								} );
										
										
									} );
							   </script>
							   
							   
		
							   
							   
							   
							   
							   <script><!---number-count---->
$(document).ready(function() {
    var t = $('#example').DataTable( {
		"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
											"scrollY": 700,
											"scrollX": true,
        "columnDefs": [ {
            "searchable": false,
            "orderable": false,
            "targets": 0
        } ],
		
        "order": [[ 1, 'asc' ]]
		 
    } );
 
    t.on( 'order.dt search.dt', function () {
        t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
            cell.innerHTML = i+1;
        } );
    } ).draw();
} );
</script>

	

<script>
$.fn.dataTable.ext.type.detect.unshift(
    function ( d ) {
        return d === 'Low' || d === 'Medium' || d === 'High' ?
            'salary-grade' :
            null;
    }
);
 
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
    switch ( d ) {
        case 'Low':    return 1;
        case 'Medium': return 2;
        case 'High':   return 3;
    }
    return 0;
};
 
 
$(document).ready(function() {
    $('.tblCustomers').DataTable();
} );
</script>



							   
 <style>
th td {border:1px solid !important;}
.fixed .dataTables_scrollHeadInner { width:100% !IMPORTANT; margin:0px !IMPORTANT;}
.fixed table.example420.order-table.table.table-striped.table-bordered.dragscroll.dataTable.no-footer {width: 100% !IMPORTANT; padding-right: 5px; }
.dataTables_scrollBody {height: auto !IMPORTANT; max-height:522px !IMPORTANT;}
.dataTables_scroll { border: 1px solid #909090; border-radius: 3px;}
.table_fix_heder{    background:  #48a9d4;color: #FFF !IMPORTANT;}
.table_fix_heder tr th{ color: #FFF !IMPORTANT;}
tr.average_rating { background: #fff;}
tr.average_rating th { color: #dedede !IMPORTANT;}
.red { color: red !IMPORTANT;}
div#propertyThumbnails-- { position: relative;}
.loader {position: absolute; top: 46%;left: 46%; background: #000000c7; padding: 8px 24px; border-radius: 7px; color: #FFFF;}
.sk-double-bounce .sk-child {background-color: #fff;}
div.dataTables_wrapper {max-width:2000px;min-width:1400px;margin: 0 auto;}
div#propertyThumbnails td {  color: black !IMPORTANT;}
.dataTables_scroll {  box-shadow: 1px 1px 20px 1px #7c7c7c;}

.DTFC_LeftWrapper {
    top: 1px !IMPORTANT;
}
.DTFC_LeftBodyWrapper {
    border-right: 1px solid #bfbfbf !IMPORTANT;
}
.DTFC_ScrollWrapper {
    margin-bottom: 16px;
}
table.dataTable thead th, table.dataTable thead td {
   border-bottom: 0px solid #111;
}

@media print {
  .header-print {
    display: table-header-group;
  }
}
 </style>
							   
													   
							   
			   
							   

<!---	
<script>
$(document).ready(function() {
    var table = $('#content_report').DataTable( {
	
'lengthMenu': [[10, 20, 25, 50, -1], [10, 20, 25, 50, 'All']],
        scrollY:        "300px",
        scrollX:        true,
        scrollCollapse: true,
        paging:         true,
        fixedColumns:   {
            leftColumns: 6
        }
    } );
} );
</script>
---->





<!----
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">

	<script>
$(document).ready(function() {
    $('#content_report').DataTable( {
        dom: 'Bfrtip',
        buttons: [
             'csv', 'excel', 'pdf', 'print'
        ]
    } );
} );
	</script>

	
<script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>

---->

	
	
<!----
	
<script>
	$(document).ready(function() {
    $('#question_report').DataTable( {
		"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
        "scrollY": 200,
        "scrollX": true
    } );
} );
	</script>
	------->

<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">
	
	
<script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script>




<script>
   $(document).ready(function() {
     $('#content_report').DataTable( {
      scrollY:        "900px",
      scrollX:        true,
      
      scrollCollapse: true,
      paging:         true, 
      dom: 'Bfrtip',
      lengthMenu: [
      [ 10, 20, 30, -1 ],
      [ '10 rows', '20 rows', '30 rows', 'Show all' ]
      ],
      
      
      buttons: [
      { extend: 'pageLength', footer: true },
					  // { extend: 'excel', footer: true },
					 //{ extend: 'print', footer: true },
					  
              
              ],
						//	 fixedColumns:   {
						//    leftColumns: 6,
						//  }
              
           } );
  } );
   
</script>
<script type="text/javascript">
var tableToExcel = (function() {
  var uri = 'data:application/vnd.ms-excel;base64,'
    , template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head>[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]</head><body><table>{table}</table></body></html>'
    , base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
    , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) }
  return function(table, name) {
    if (!table.nodeType) table = document.getElementById(table)
    var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML}
    window.location.href = uri + base64(format(template, ctx))
  }
})()
</script>


<script>
   $(document).ready(function() {
     $('.question_report').DataTable( {
      scrollY:        "900px",
      scrollX:        true,
      
      scrollCollapse: true,
      paging:         true, 
      dom: 'Bfrtip',
      lengthMenu: [
      [ 10, 20, 30, -1 ],
      [ '10 rows', '20 rows', '30 rows', 'Show all' ]
      ],
      
      
      buttons: [
      { extend: 'pageLength', footer: true },
              <?php if (in_array('excel', $rsPerm)) { ?>{ extend: 'excel', footer: true },<?php } ?>
              <?php if (in_array('pdf', $rsPerm)) { ?>{ extend: 'print', footer: true }<?php } ?>
              
              
              ]
              
           } );
  } );
   
</script>






<!----
<script>
$(document).ready(function() {
    var table = $('#content_report').DataTable( {
			"lengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
        scrollY:        "300px",
        scrollX:        true,
        scrollCollapse: true,
        paging:         true,
        fixedColumns:   {
            leftColumns: 6,
          
        }
    } );
} );

</script>-->