File: /home/barbeatleanalyti/public_html/manage.beatleanalytics.com/site/template/customers.php 7-12-18
<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();
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> 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> 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" > Yes</label>
<label class="control-label"><input type="radio" re-required="true" id="IsActive" name="IsActive" value="N" > 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> 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> 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(); ?>
<!--<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 ">
<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-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-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> 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>--->
<div class="">
<div class="col-md-12 " id="club_plan" >
<!--------------------------------------------------------------------------------->
<table id="example90" class="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>
<?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;?>" >
<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>
</tr>
<?php }
}else{
?>
<tr class="altrow" > <td colspan="6" align="center"> No any record found. </td> </tr>
<?php } ?>
</tbody>
</table>
<script>
$(document).ready(function() {
$('#example90').DataTable( {
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
"scrollY": 650,
"scrollX": true
} );
} );
</script>
<!--------------------------------------------------------------------------------->
</div>
</div>
<!---//-List of customers-table-end--->
<!--- <div class="col-md-12">
<div class="table-responsive">
<table class="table table-striped table-bordered">
<tbody>
<tr>
<th class="text-center">Sr.No.</th>
<th class="text-center">User ID</th>
<th class="text-center">Organization</th>
<th class="text-center">Branch</th>
<th class="text-center">Industry</th>
<th class="text-center">Date</th>
</tr>
<?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;?>" >
<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']; ?></a></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>
</tr>
<?php }
}else{
?>
<tr class="altrow" > <td colspan="6" align="center"> No any record found. </td> </tr>
<?php } ?>
</tbody>
</table>
</div>
</div>------------->
</div>
<br>
<br>
<?php } else{ ?>
<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-4 col-xs-4 form-group text-bold" style="margin-top:-15px;">
<h3 style="color:green;"><?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-7 col-xs-7 col-sm-7 pull-left form-group no-padding fidbak_path">
<p>Organization:<span><?php echo $objCustomer->FetchOrganizationName($rsCustomerInfo[0]['orgid']); ?></span></p>
<p>Branch:<span><?php echo $objCustomer->FetchBranchName($rsCustomerInfo[0]['db_surveyBranchid']); ?></span></p>
<p style="border-right: 1px solid #ffffff;">Industry:<span><?php echo $objCustomer->FetchIndustryName($rsCustomerInfo[0]['db_surveyIndId']); ?></span></p>
</div>
<!--<div class="col-md-1 col-xs-6 form-group">
<input type="text" readonly="readonly" style="background:#fff;" id="ToDate" name="ToDate" placeholder="End date.." class="form-control input-md" value="<?php echo $ToDate;?>">
</div> -->
<!--<div class="col-md-1 col-xs-12">
<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> Go!</button>
</span>
</div>
</div> -->
<!-- <div class="col-md-1 col-xs-3 col-sm-2 pull-right text-right form-group no-padding">
<a class="btn btn-sm btn-danger " href="customers.html"> <i class="fa fa-refresh"></i> Reset </a>
</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> Add Religions </a>
</div> -->
</form>
</div>
</div>
<div class="row">
<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">
<div class="col-lg-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">
<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">
<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">
<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">
<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> </p> -->
</div>
</div>
</div>
<div class="col-lg-2 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> Table Info </h3>
</div>
<div class="box-body main-sub">
<div class="panel-body">
<p>Table No. : <strong><?php if(!empty($rsCustomerInfo[0]['keyword'])) echo $rsCustomerInfo[0]['keyword']; else echo "NA"; ?></strong></p>
<p>Served By : <strong><?php if(!empty($rsCustomerInfo[0]['servername'])) echo $rsCustomerInfo[0]['servername']; else echo "NA"; ?></strong></p>
<p>Bill Amount : <strong><?php if(!empty($rsCustomerInfo[0]['totalBill'])) echo $rsCustomerInfo[0]['totalBill']; else echo "NA"; ?></strong></p>
<p>Number of Pax : <strong><?php if(!empty($rsCustomerInfo[0]['paxNo'])) echo $rsCustomerInfo[0]['paxNo']; else echo "NA"; ?></strong></p>
<p>Total Visits : <strong><?php echo $rsTotalVisits;?></strong></p>
</div>
</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> Q & A </h3>
</div>
<?php
$rsQuestionData = $objCustomer->fetchContentDetails($CustomerID,'question');
//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']);?> : <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">
<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> <?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>
<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> 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 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;
for($j=0; $j<count($rsPageCon); $j++ ) {
$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); ?>
<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;}
</style>
<style>
.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;}
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;}
.box-body.main-sub.box-spt { padding: 0px !IMPORTANT;}
p.widthp { width: 70%;}
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;}
.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: 30px;}
.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;
}
.col-md-12.MAIN-PART-retings { WIDTH: 98%; MARGIN: 0 AUTO; FLOAT: NONE;}
</style>