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/customers.php
<script src="theme/black/tooltips/3/tooltip.js" type="text/javascript"></script>
<link href="theme/black/tooltips/3/tooltip.css" rel="stylesheet" type="text/css" />
<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
   
   $objCustomer = object;
   
   // Assing object 
   $objCustomer = $objDB->objController;
   
   // Assign all variable's value
   $pg 			= $objCustomer->pg;
   $acn 			= $objCustomer->acn;
   $v 				= $objCustomer->v;
   $State 			= $objCustomer->State;
   $ReligionName 	= $objCustomer->ReligionName;
   $sort			= $objCustomer->sort;
   $ReligionID		= $objCustomer->ReligionID;
   $field			= $objCustomer->field;
   $error 			= $objCustomer->error;
   $msg 			= $objCustomer->msg;
   $perpage 		= $objCustomer->perpage;
   $start	 		= $objCustomer->start;
   $limit	 		= $objCustomer->limit;
   $SearchValue	= $objCustomer->SearchValue;
   $s				= $objCustomer->s;
   
   $CustomerID		= $objCustomer->CustomerID;
   $SurveyID	= $objCustomer->SurveyID;
   $TokenID	= $objCustomer->TokenID;
   
   $OrgID	= $objCustomer->OrgID;
   $BranchID	= $objCustomer->BranchID;
   $IndustryID	= $objCustomer->IndustryID;
   $FromDate 		 = $objCustomer->FromDate;
   $ToDate 		 = $objCustomer->ToDate;
   
   
   //$rsCustomerInfo = $objCustomer->FetchCustomerData("All");
   
   if($start == 1)
   	$limit = 0;
   else if($start == 2)
   	$limit = $perpage;
   else
   	$limit = ($start-1) * $perpage;
   
   $objCustomer->limit = $limit;
   
   //$nume = count($rsCustomerInfo);
   
   //$totalpage = @ceil(count($rsCustomerInfo)/$perpage);	
   
   
   //$rsCustomerInfo = $objCustomer->FetchCustomerData();
   // print_r($rsCustomerInfo);
   // echo "string";
   // die();
   
   
   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">
   <?php
      if( strtolower($v)=='add'|| strtolower($v)=='edit')
      {
      if( strtolower($v)=='edit'){}
      
      
        ?>
   <section class="content-header">
      <?php  if(strtolower($v) == 'add'){ ?>
      <h1><i class="fa fa-plus-square"></i>&nbsp;Add new religions</h1>
      <ol class="breadcrumb">
         <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
         <li><a href="customers.html?v=add"><i class="fa fa-external-link"></i>Other</a></li>
         <li><a href="customers.html?v=add"><i class="fa  fa-tree"></i>Religions</a></li>
         <li class="active">Add new Religions</li>
      </ol>
      <?php }else if(strtolower($v) == 'edit'){ ?>
      <h1><i class="fa fa-edit"></i>&nbsp;Edit religions</h1>
      <ol class="breadcrumb">
         <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
         <li><a href="customers.html?v=add"><i class="fa fa-external-link"></i>Other</a></li>
         <li><a href="customers.html?v=add"><i class="fa  fa-tree"></i>Religions</a></li>
         <li class="active">Edit Religions</li>
      </ol>
      <?php } ?>
   </section>
   <div class="col-md-12">
      <?php
         // Error or success message display
         $objDB->NotificaitonForResult($msg,$error)
         ?>	
   </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">
                     <div class="form-group col-md-1 col-xs-3 pull-left no-padding">
                        <a class="btn btn-info btn-sm" href="customers.html"> <i class="fa fa-long-arrow-left"></i> Back </a>
                     </div>
                     <form action="manage.php" name="frmLogin" method="post" onSubmit="javascript: return ValidateForm(this);" >
                        <input type="hidden" name="pg" value="users" id="pg"/>
                        <?php
                           if( strtolower($v) == 'edit' ){ ?>
                        <input type="hidden" name="acn" value="EditReligionData" id="acn"/>
                        <input type="hidden" name="v" value="Edit" id="v"/>
                        <input type="hidden" name="ReligionID" value="<?php echo $ReligionID?>" id="ReligionID"/>
                        <? }else if( strtolower($v) == 'add' ){ ?>
                        <input type="hidden" name="acn" value="AddUserInfo" id="acn"/>			
                        <input type="hidden" name="v" value="add" id="v"/>
                        <?	}else{ ?>
                        <? }
                           ?>
                        <div class="row">
                           <div class="col-md-12 col-xs-12 col-sm-12 no-padding">
                              <label class="col-md-4 col-sm-4 control-label text-sm-left text-xl-right text-md-right">Name of Religion<span class="text-red">*</span> :</label>
                              <div class="col-md-5 col-xs-12 col-sm-5 form-group">
                                 <input  type="text" re-required="true"  id="Religion" name="ReligionName" placeholder="Religion Name (required)" class="form-control" value="<?php echo $ReligionName?>" >
                                 <div class="error-div" id="err-EmpID"> </div>
                              </div>
                           </div>
                        </div>
                        <div class="row">
                           <div class="col-md-12 col-xs-12 col-sm-12 no-padding">
                              <label class="col-md-4 col-sm-4 control-label text-sm-left text-xl-right text-md-right">Is Active :</label>
                              <div class="col-md-3 col-sm-3 col-xs-12 form-group"> 
                                 <label class="control-label"><input  type="radio" re-required="true"   id="IsActive" name="IsActive" checked="checked" <?php if($ReligionActive == 'Y') echo 'checked="checked"';?> value="Y"  >&nbsp;Yes</label>&nbsp;&nbsp;
                                 <label class="control-label"><input  type="radio" re-required="true"  id="IsActive" name="IsActive" value="N"  >&nbsp;No</label>
                              </div>
                           </div>
                        </div>
                        <div id="captcha" class="row">
                           <div class="col-md-12 col-sm-12 no-padding">
                              <div class="col-md-8 col-md-offset-4 col-sm-8 col-sm-offset-4">
                                 <input class="btn bg-navy" type="submit" value="<?php echo ucfirst($v); ?> Now" />
                              </div>
                           </div>
                        </div>
                     </form>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section>
   <?php 
      } 
      
      else if($v=='list'){ ?>
   <section class="content-header">
      <?php  if(strtolower($v) == 'list'){?>
      <?php if(empty($CustomerID)) {?>
      <h1>&nbsp;List of customers </h1>
      <ol class="breadcrumb">
         <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
         <li class="active">Customer List</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="customers.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)
      ?>
   <section class="content customer-profile" >
      <div class="row">
         <div class="col-md-12">
            <div class="box box-primary" style="border:none; border-top:2px solid #3c8dbc;">
               <div class="box-header">
                  <div class="col-md-12 col-xs-12 no-padding">
                     <?php if(empty($CustomerID) && empty($SurveyID)) { ?>
                     <div class="row">
                        <div class="col-md-12">
                           <form method="post" action="customers.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-md-1 col-xs-3 col-sm-2 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-md-3 col-xs-12 col-lg-2 form-group">
                                 <?php $rsOrganization = $objCustomer->fetchOrganization(); 
                                 // echo "<pre>";
                                 // print_r($rsOrganization);
                                 ?>
                                 <!--<span id="span_select" style="width:120px; 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 style="font-weight:bold;" <?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-md-3 col-xs-12 col-lg-2 form-group" id="branch_list" >
                                 <?php $rsBranches = $objCustomer->fetchBranches();  ?>
                                 <!--<span id="span_select" style="width:120px; height:35px; float:right;">-->
                                 <select class="form-control input-md" name="Branches">
                                    <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-md-3 col-xs-12 col-lg-2 form-group" id="industry_list">
                                 <!--<span id="span_select" style="width:120px; height:35px; float:right;">-->
                                 <?php $rsIndustrys = $objCustomer->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 any ind. found</option>
                                    <?php } ?>
                                 </select>
                                 <!--</span>-->
                              </div>
                              <!--<div class="col-md-2 customers-clear-both"></div>-->
                              <div class=" col-xs-6 col-md-1 col-lg-1  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-xs-6 col-md-1 col-lg-1  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-3 col-md-2 col-lg-1  pull-right text-right form-group">
                                 <a class="btn btn-sm btn-danger "  href="customers.html"> <i class="fa fa-refresh"></i> Reset  </a>
                              </div>
                              <div class="col-xs-6 col-sm-3 col-md-2 col-lg-1 pull-right text-right ">
                                 <div class="input-group input-group-sm">
                                    <!--<input type="text" id="s" name="s" placeholder="Search content here .." class="form-control" value=""> -->                      
                                    <span class="input-group-btn">
                                    <button class="btn btn-block btn-success btn-md no-padding" type="submit"><i class="fa fa-search" aria-hidden="true"></i> Search</button>
                                    </span>
                                 </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="customers.html?v=add"> <i class="fa fa-plus"></i>&nbsp;Add Religions  </a> 
                                 </div> -->
                           </form>
                        </div>
                     </div>
                     <div class="row">
                        <!---- List of customers-table-start---->
                        <div class="customers-list--">
                           <!--
                              <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
                              <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>--->
                           <?php if(!empty($OrgID) && !empty($BranchID) && !empty($IndustryID) ){ ?>
                           <?php $rsCustomerInfo = $objCustomer->FetchCustomerData(); ?>
                           <div class="">
                              <div class="col-md-12 " id="club_plan" >
                                 <!--------------------------------------------------------------------------------->
                                 <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css">
                                 <table id="example90" class=" cust_all cust_aaa display nowrap" style="width:100%">
                                    <thead>
                                       <tr>
                                          <th>Sr.No.</th>                                    
                                          <th>User ID</th>
                                          <th>User Name</th>
                                          <th>Phone No.</th>
                                          <th>Organization</th>
                                          <th>Branch</th>
                                          <th>Industry</th>
                                          <th>Date</th>
                                       </tr>
                                    </thead>
                                    <tbody id="dmhd">
                                       <?php 
                                          //print_r($_SESSION);
                                          //echo "<pre>";
                                          //print_r($rsCustomerInfo);
                                          //echo "</pre>";
                                          
                                          
                                          if(count($rsCustomerInfo)>0){
                                          
                                          if(!empty($FromDate))
                                          $lnk = "&FromDate=".$FromDate;
                                          if(!empty($ToDate))
                                          $lnk .= "&ToDate=".$ToDate;
                                          
                                          for ($i=0;$i< count($rsCustomerInfo);$i++)
                                          {
                                          	   if($i%2)
                                          			$bgclass='altrow';
                                          		else
                                          			$bgclass='oddrow';
                                          			
                                          ?>
                                       <tr class="<?php echo $bgclass;?>" onmouseover="tooltip.pop(this, '#sub1', {offsetY:-10, smartPosition:false})" >
                                          <td class="text-center"><label name="No"><?php echo $i+1; ?></label></td>
                                          <td class=" text-center"><label name="User ID"><a 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>
                                          </td>
                                          <td class="hed-a cust_name" class="text-center">
                                             <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>
                                          <td class="  text-center"><label name="User ID"><?php echo $rsCustomerInfo[$i]['db_phone'];?></label></td>
                                          <td class=" text-center"><label name="Organization Name"><?php echo $objCustomer->FetchOrganizationName($rsCustomerInfo[$i]['orgid']);  ?></label></td>
                                          <td class=" text-center"><label name="Branch Name"><?php echo  $objCustomer->FetchBranchName($rsCustomerInfo[$i]['db_surveyBranchid']); ?></label></td>
                                          <td class="text-center"><label name="Industry Name"><?php echo $objCustomer->FetchIndustryName($rsCustomerInfo[$i]['db_surveyIndId']); ?></label></td>
                                          <td class="text-center"><label name="Date"><?php echo date("d/m/Y H:i A",strtotime($rsCustomerInfo[$i]['created_date'])); ?></label>
                                          </td>
                                          <div style="display:none;">
                                             <div id="sub1">
                                                <div class="" id="dataexample">
                                                   <div class="col-md-12">
                                                      <div class="column_box">
                                                         <img class=" col-lg-4 profile-user-img img-responsive img-circle" src="theme/black/images/blank_man.png" alt="User profile picture" style="padding:5px;">  
                                                      </div>
                                                      <div class="column_box">
                                                         <div class="panel-body">
                                                            <p>Train No.&nbsp; : &nbsp;<strong>22988</strong></p>
                                                            <p>Platform Number&nbsp; : &nbsp;<strong>4/5</strong></p>
                                                            <p>Gender &nbsp; : &nbsp;<strong>m</strong></p>
                                                            <p>Keyword 4 &nbsp; : &nbsp;<strong>NA</strong></p>
                                                            <!---<p>Total Visits&nbsp; : &nbsp;<strong></strong></p>--->
                                                         </div>
                                                      </div>
                                                   </div>
                                                   <br>
                                                   <div class="cust_review">
                                                      <div class="panel-body">
                                                         <h4 class="box-title"> <i class="fa fa-hand-o-right" aria-hidden="true"></i> About You I Say </h4>
                                                         <p>servise is awesome</p>
                                                      </div>
                                                   </div>
                                                </div>
                                             </div>
                                          </div>
                                       </tr>
                                       <?php }
                                          }else{
                                           ?>
                                       <tr class="altrow" >
                                          <td colspan="8" align="center"> No any record found. </td>
                                       </tr>
                                       <?php } ?>
                                    </tbody>
                                 </table>
                                 <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() {
                                       $('#example90').DataTable( {
                                    	"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
                                    	
                                           "scrollY": 650,
                                           "scrollX": true,
                                    	
                                    	
                                    	
                                          
                                       } );
                                    } );
                                 </script>
                                 <!--
                                    <script>
                                    $(document).ready(function() {
                                       $('#example90').DataTable( {
                                    	 
                                           dom: 'Bfrtip',
                                           buttons: [
                                               'copy', 'csv', 'excel', 'pdf', 'print'
                                           ]
                                    	
                                       } );
                                    } );
                                    </script>---> 
                              </div>
                           </div>
                           <?php }else{ ?>
                        </div>
                     </div>
                     <table class="table table-striped table-bordered" >
                        <tbody>
                           <tr>
                              <td class="text-center">
                                 <img src="theme/black/images/searchfeedback4.png" style="width:100%;">
                              </td>
                           </tr>
                        </tbody>
                     </table>
                     <?php }?>
                  </div>
                  <br>
                  <br>
                  <?php } else{ ?>
                  <?php $rsCustomerInfo = $objCustomer->FetchCustomerData(); 
                 
                  ?>
                  
                  <div class="row"  >
                     <div class="col-md-12">
                        <form method="post" action="customers.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?>" />
                           <input type="hidden" name="cid" id="cid" value="<?php echo $CustomerID?>" />
                           <!----  <div class="col-md-1 col-xs-1 col-sm-1 pull-left form-group no-padding ">
                              <a class="btn btn-info btn-sm" href="customers.html?v=list"> <i class="fa fa-long-arrow-left"></i> Back </a>
                                                      </div>--->
                           <div class="col-md-3 col-xs-3 form-group text-bold" style="margin-top:-15px;">
                              <h3 style="color:green; font-size: 1.3vw;"><?php echo  date("d/m/Y H:i A (l)",strtotime($rsCustomerInfo[0]['created_date']));?></h3>
                              <!--<input type="text" readonly="readonly" style="background:#fff;" id="FromDate" name="FromDate" placeholder="Start date.." class="form-control input-md" value="<?php //echo $FromDate;?>"> -->
                          
                           </div>
                           <div class="col-md-3 col-xs-3 form-group text-bold" style="margin-top:-15px;">
                              <h3 style="color:green; font-size: 1.3vw;"><?php echo $rsCustomerInfo[0][tokenid]; ?></h3>
                              <!--<input type="text" readonly="readonly" style="background:#fff;" id="FromDate" name="FromDate" placeholder="Start date.." class="form-control input-md" value="<?php //echo $FromDate;?>"> -->
                          
                           </div>
                           <div class="col-md-6 col-xs-6 col-sm-6 pull-left form-group no-padding fidbak_path">
                              <p>Organization:<span><?php echo $objCustomer->FetchOrganizationName($rsCustomerInfo[0]['orgid']);  ?></span>
                                 &nbsp;<b>|</b>&nbsp;
                                 Branch:<span><?php echo  $objCustomer->FetchBranchName($rsCustomerInfo[0]['db_surveyBranchid']); ?></span>&nbsp;<b>|</b>&nbsp;
                                 Industry:<span><?php echo $objCustomer->FetchIndustryName($rsCustomerInfo[0]['db_surveyIndId']); ?></span>
                              </p>
                           </div>
                        </form>
                     </div>
                  </div>
                  <div class="row" id="dataexample">
                     <div class="col-md-12">
                        <div class="col-lg-5 col-md-6 col-sm-12">
                           <div class="box-body box-profile">
                              <?php
                                 if(!empty($rsCustomerInfo[0]['webprofileimage']) && fopen(UPLOAD_WEBPROFILEIMAGE.$rsCustomerInfo[0]['webprofileimage'],'r')) { ?>
                              <img class=" col-lg-4 profile-user-img img-responsive img-circle" src="<?php echo UPLOAD_WEBPROFILEIMAGE.$rsCustomerInfo[0]['webprofileimage']; ?>" alt="User profile picture" style="padding:5px;">  
                              <?php }else{ ?>
                              <img class=" col-lg-4 profile-user-img img-responsive img-circle" src="theme/black/images/blank_man.png" alt="User profile picture" style="padding:5px;">
                              <?php }
                                 ?>
                              
                              <div class="col-lg-8 col-xs-8">
                                 <div class="col-lg-12 col-xs-12">
                                    <h3 class="profile-username text-right"><b> User ID: </b></h3>
                                    <h3 class="profile-username text-left"> 
                                       <?php //echo $rsCustomerInfo[0]['db_phone'];
                                          if(!empty($rsCustomerInfo[0]['db_userLoginName'])) echo $rsCustomerInfo[0]['db_userLoginName']; else echo $rsCustomerInfo[0]['db_phone'];
                                          ?>
                                    </h3>
                                 </div>
                                 <div class="col-lg-12 col-xs-12">
                                    <h3 class="profile-username text-right"> <b>Full Name : </b></h3>
                                    <h3 class="profile-username text-left">  <?php echo $rsCustomerInfo[0]['db_username'];?> </h3>
                                 </div>
                                 <div class="col-lg-12 col-xs-12">
                                    <h3 class="profile-username text-right">  <b>Phone no:</b></h3>
                                    <h3 class="profile-username text-left">  <?php echo $rsCustomerInfo[0]['db_phone'];?></h3>
                                 </div>
                                 <div class="col-lg-12 col-xs-12">
                                    <h3 class="profile-username text-right"> <b> Email id: </b></h3>
                                    <h3 class="profile-username text-left">  <?php echo $rsCustomerInfo[0]['db_email'];?></h3>
                                 </div>
                                 <div class="col-lg-12 col-xs-12">
                                    <h3 class="profile-username text-right"> <b> Address:</b></h3>
                                    <h3 class="profile-username text-left">
                                       <?php echo $rsCustomerInfo[0]['db_address'].",".$objCustomer->fetchCityName($rsCustomerInfo[0]['db_city'])." ".$objCustomer->fetchStateName($rsCustomerInfo[0]['db_state']).", ".$rsCustomerInfo[0]['db_pincode'];
                                          ?> 
                                    </h3>
                                 </div>
                                 <!--<p class="text-muted text-center"><i class="fa fa-mobile-phone" aria-hidden="true"></i> &nbsp; </p> -->
                              </div>
                           </div>
                        </div>
                        <div class="col-lg-2 col-md-6 col-sm-12 col-xs-6 ">
                           <div class="box cust_data" style="min-height:170px !important; margin-bottom: 8px; ">
                              <div class="box-header rating-title main-title" style="background:#222d32 !important;">
                                 <h3 class="box-title"> <i class="fa fa-hand-o-right" aria-hidden="true" style="color: #ffffff !IMPORTANT;" ></i> Table Info </h3>
                              </div>
                              <div class="box-body main-sub">
                                 <div class="panel-body">
                                    <p><?php if($objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordName']==""){echo "Keyword 1";}else{echo $objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordName'];} ?>&nbsp; : &nbsp;<strong><?php if(!empty($rsCustomerInfo[0]['keyword'])) echo $rsCustomerInfo[0]['keyword']; else echo "NA"; ?></strong></p>
                                    <p><?php if($objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordServer']==""){echo "Keyword 2";}else{echo $objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordServer'];} ?>&nbsp; : &nbsp;<strong><?php if(!empty($rsCustomerInfo[0]['servername'])) echo $rsCustomerInfo[0]['servername']; else echo "NA"; ?></strong></p>
                                    <p><?php if($objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordPax']==""){echo "Keyword 3";}else{echo $objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keywordPax'];} ?> &nbsp; : &nbsp;<strong><?php if(!empty($rsCustomerInfo[0]['paxNo'])) echo $rsCustomerInfo[0]['paxNo']; else echo "NA"; ?></strong></p>
                                    <p><?php if($objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keyword4']==""){echo "Keyword 4";}else{echo $objCustomer->FetchIndustryKeywords($rsCustomerInfo[0]['db_surveyIndId'])['keyword4'];} ?> &nbsp; : &nbsp;<strong><?php if(!empty($rsCustomerInfo[0]['totalBill'])) echo $rsCustomerInfo[0]['totalBill']; else echo "NA"; ?></strong></p>
                                    <!--<p>Total Visits&nbsp; : &nbsp;<strong><?php echo $rsTotalVisits;?></strong></p>-->
                                 </div>
                              </div>
                           </div>
                        </div>
                        <div class="col-lg-3 col-md-6 col-sm-12 col-xs-6 q_a_info ">
                           <div class="box cust_data" style="min-height:170px !important;margin-bottom: 8px;">
                              <div class="box-header rating-title main-title" style="background:#222d32 !important;">
                                 <h3 class="box-title"><i class="fa fa-hand-o-right" aria-hidden="true"></i> Q & A </h3>
                              </div>
                              <?php 
                                 $rsQuestionData = $objCustomer->fetchContentDetails($CustomerID,'question');
                                 //echo "<pre>";
                                 //print_r($rsQuestionData);
                                                                 ?>
                              <div class="box-body main-sub">
                                 <div class="panel-body">
                                    <?php if(count($rsQuestionData) > 0) {
                                       for($i=0; $i<count($rsQuestionData); $i++) { ?>
                                    <p><?php  echo $objCustomer->SelectPageContentName($rsQuestionData[$i]['db_surveyContentId']);?>&nbsp; : &nbsp;<strong><?php echo $rsQuestionData[$i]['db_surveyValue'];?></strong></p>
                                    <?php }  
                                       } else{ ?>
                                    <p>No any data found.</p>
                                    <?php }?>
                                 </div>
                              </div>
                              <!-- /.box-body -->
                           </div>
                        </div>
                        <?php $rsSummeray = $objCustomer->fetchContentAboutISay($CustomerID);?>
                        <div class="col-lg-2 col-md-6 col-sm-12 col-xs-12">
                           <div class="box cust_data" style="min-height:170px !important;margin-bottom: 8px;">
                              <div class="box-header rating-title main-title">
                                 <h3 class="box-title"> <i class="fa fa-hand-o-right" aria-hidden="true"></i> <?php echo $rsSummeray[0]; ?> </h3>
                              </div>
                              <div class="box-body main-sub">
                                 <div class="slimScrollDiv">
                                    <div class="media">
                                       <?php echo $rsSummeray[1];?>
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
                  <script type="text/javascript">
                     $(document).ready(function () {
                     
                     	$("#example1").click(function(){
                     		$("#dataexample").printMe();
                     	});
                     
                     	$("#example2").click(function(){
                     		$("#dataexample2").printMe({
                     			"path" : ["example.css","example2.css"]
                     		});
                     	});
                     
                     	$("#example3").click(function(){
                     		$("#dataexample3").printMe({
                     			"path" : ["example.css"],
                     			"title" : "Document title"
                     		});
                     	});
                     
                     
                     });
                  </script>
                  
                  <div class="row">
                     <div class="col-md-12 MAIN-PART-retings">
                        <div class="box retings">
                           <div class="box-header main-title">
                              <h3 class="box-title"><i class="fa fa-share fa-fw m-r-xs" aria-hidden="true"></i> &nbsp; Ratings</h3>
                              <br>
                           </div>
                           <!-- /.box-header -->
                           <?php
                              $rsContentData = $objCustomer->fetchContentDetails($CustomerID,'content');
                              
                              //$rsQA = $objCustomer->fetchCustomersQA($CustomerID,'question',$rsPages[0]['PageIDS']);
                              if(!empty($rsContentData[0]['PageIDS']))
                              $ContentArr = explode(',',$rsContentData[0]['PageIDS']);
                              else $ContentArr = array();
                              
                              if(count($ContentArr ) > 0) {
                              for($i=0; $i<count($ContentArr); $i++) {
                                                              ?>
                           <div class="row col-lg-4 col-md-6 col-xs-4 spt">
                              <h3 class="box-title title-box"><?php echo $pname = $objCustomer->SelectPageName($ContentArr[$i]);?></h3>
                              <span id="rating-<?php echo $pname;?>" class="badge"></span>
                              <div class="box-body">
                                 <?php 
                                    $rsPageCon = $objCustomer->fetchCustomersQA($CustomerID,'content',$ContentArr[$i]);
                                    
                                    if(count($rsPageCon) > 0) {
                                    $avgSum = 0;
                                    $noZeroPageConCount = 0;
                                    for($j=0; $j<count($rsPageCon); $j++ ) {
                                    	if($rsPageCon[$j]['db_surveyValue'] != 0){
                                             		$noZeroPageConCount++;	
                                             	}
                                    	
                                    	$avgSum = $avgSum + $rsPageCon[$j]['db_surveyValue'];
                                    ?>
                                 <div class="box-body main-sub box-spt ">
                                    <p class=" widthp"><?php echo $objCustomer->SelectPageContentName($rsPageCon[$j]['db_surveyContentId']);?>
                                       <strong>
                                       <span class="badge bg-<?php if($rsPageCon[$j]['db_surveyValue'] <= 2) echo 'red'; else echo 'green';?> pull-right"><?php echo $rsPageCon[$j]['db_surveyValue'];?></span>
                                       </strong>
                                    </p>
                                 </div>
                                 <?php } 
                                    //$avgSum = round($avgSum/$j,2);
                                    $avgSum = round($avgSum/$noZeroPageConCount,2); ?>
                                 <script>
                                    var avgSum = '<?php echo $avgSum;?>';
                                    document.getElementById("rating-<?php echo $pname?>").innerHTML = '<?php echo $avgSum;?>';
                                    if( parseFloat(avgSum) <= 2){
                                    	$("#rating-<?php echo $pname?>").addClass("bg-red");
                                    }else{
                                    	$("#rating-<?php echo $pname?>").addClass("bg-green");
                                    }
                                    
                                                                          
                                 </script>
                                 <?php	}else{ ?>
                                 No any data found.
                                 <?php }
                                    ?>
                              </div>
                           </div>
                           <?php } 
                              }else {
                              		echo "No any data found";
                              } ?>
                           <!-- /.box-body -->
                        </div>
                     </div>
                  </div>
                  <!-----<div class="col-lg-3 col-md-6 col-sm-12">
                     <div class="box" style="min-height:170px !important;">
                       <div class="box-header rating-title main-title">
                         <h3 class="box-title"> <i class="fa fa-hand-o-right" aria-hidden="true"></i> VISIT </h3>
                       </div>
                       
                       <div class="box-body main-sub">
                            <div class="slimScrollDiv">
                         <div class="media">
                         <div class="tle-box-bottom">
                     <span><i class="fa fa-eye" aria-hidden="true"></i></span> <span><strong>10</strong></span>
                     
                     </div>
                     </div>
                       </div>
                       
                     </div>
                     
                     </div>
                     </div>---->
                  <?php } ?>
               </div>
            </div>
         </div>
      </div>
</div>
<? } ?> 

</section>

</div>
<style>
   div.dataTables_wrapper { width: 100% !IMPORTANT; margin: 0 auto; padding: 0px !IMPORTANT;}
   .dataTables_scrollHeadInner { padding: 0px !IMPORTANT; width: 100% !IMPORTANT;margin: 0 auto !IMPORTANT;}
   table.display.nowrap.dataTable.no-footer {width: 100% !IMPORTANT; text-align: center !IMPORTANT; margin: 0 auto;padding: 0pc;}
   table.display.nowrap.dataTable.no-footer thead th {text-align: center;}
   .dataTables_scrollBody {  height: auto !IMPORTANT; max-height: 50vw !IMPORTANT;}
   .dataTables_scroll {  border: 1px solid #909090; border-radius: 3px;}
   .col-md-12.MAIN-PART-retings .box-header.main-title h3.box-title {
   color: white !IMPORTANT;
   }
   .col-md-12.MAIN-PART-retings .box-header.main-title h3.box-title i {
   color: white !IMPORTANT;
   }
   .box-header {
   color: #ffffff !important;}
   .main-title { background: #f6f8f8;}
   .main-sub { color: BLACK;}
   .box { border: 1px solid #DDD;}
   .box-body.box-profile IMG { FLOAT: LEFT;}
   .box-body.main-sub.box-spt{ margin-right: 5px;}
   .title-box {  background: #8c8585; padding: 6px 10px; border-radius: 9px; color: white; margin: 11px 5px;}
   .row.col-md-3.spt { margin-top: 15px;}
   h3.box-title.title-box { margin-bottom: 7px;}
   .box.box-primary { background: #fffcf7;}
   .panel-body { padding: 0PX !important;}
   .panel-body {  MARGIN: 0PX; PADDING: 0PX;}
   table.table.table-bordered TD {  WIDTH: 71PX;}
   .box-header.rating-title.main-title H3 i{
   color: #fff !IMPORTANT;
   }
   table.table.table-bordered td { margin: 0px !IMPORTANT; padding: 0px;}
   .box-body.main-sub .panel-body p { margin: 0px;}
   .box-body.main-sub .panel-body { margin-bottom: 7px;}
   .bg-success { color: #c6efd0; background-color: #27c24c;}
   .box.retings { border: 1pxsolid #DDD; float: left;}
   .row.col-lg-4.col-md-6.spt SPAN {  BORDER-RADIUS: 3PX !important; margin-top: 4px;}
   .box-body.main-sub.box-spt { padding: 0px !IMPORTANT;}
   p.widthp {  width: 100%;}
   p.widthp { MARGIN: 0 0 6px 0;}
   p.widthp {FONT-FAMILY: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #58666e;}
   body.sidebar-mini.skin-blue.pace-done{ color: #58666e;}
   .box-header.rating-title.main-title H3 {FONT-WEIGHT: 700; FONT-SIZE: 17PX; color:#fff !important;}
   .panel-body P {  FONT-SIZE: 15PX !important;FONT-FAMILY: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;}
   .row.col-lg-4.col-md-6.spt {
   padding: 22px 5px 22px 5px;
   float: left;
   margin: 0px;
   }
   .row.col-md-3.spt { width: 33.33%;}
   h3.box-title.title-box { background: #7266ba !IMPORTANT;}
   .row.col-md-3.spt span { border-radius: 3px;}
   h3.box-title.title-box { background: #7266ba !IMPORTANT; border-radius: 3px; FONT-SIZE: 12PX; FONT-WEIGHT: 700 !important;}
   .row.col-md-3.spt {  padding: 0 45px;}
   body.ng-scope {
   font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif !IMPORTANT;
   font-size: 14px;
   -webkit-font-smoothing: antialiased !IMPORTANT;
   line-height: 1.42857143 !IMPORTANT;;
   color: #58666e !IMPORTANT;
   }
   .box-body.main-sub.box-spt {
   border-bottom: 1px dotted #DDD;
   padding: 0px;
   margin: 0 0 5px 0;
   border-radius: 0px;
   }
   label {
   color: #080808;
   }
   .main {margin: 0 auto; width: 740px; color:#AAA;}
   #dmhd tr:hover {color:#EEEEEE; background:#3c4448;}
   #vWrapper {margin-top:80px; padding:6px; width:140px; opacity:0.5; filter:alpha(opacity=50); background:#666;}
   #vWrapper tr:hover {color:#FFF; text-decoration:underline; background:#333;}
   .column_box { float:left; padding:0 20px;}
   tbody#dmhd td.text-center.sorting_1 {
   background: none;
   }
   #dmhd tr:hover td label a , #dmhd tr:hover td label {
   color: #fff !important;
   }
   .column_box p {
   margin: 0px;
   }
   .cust_review {
   float: left;
   width: 100%;
   }
   .cust_review h4.box-title {
   margin: 10px 0 0 0;
   }
   .cust_review p {
   font-size: 19px !IMPORTANT;
   font-weight: 100;
   margin: 0px !IMPORTANT;
   padding: 0px !IMPORTANT;
   }
   div#mcTooltip {
   margin-bottom: 0px !IMPORTANT;
   padding-bottom: 10px;
   }
</style>



<div class="new_cust_profile"></div>