| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/b2bzend/application/views/scripts/customer/ |
Upload File : |
<?php //print_r($this->chatSenderDetails['AgencyDetails']); ?>
<style> .error { color:#F00;bottom:14px;left:32px; }</style>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/lib/jquery-1.11.min.js');?>"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl('public/assets/js/jquery.validate.min.js'); ?>"></script>
<?php $isMobile = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->isMobile(); ?>
<div class="affix pop_up chat_window " data-spy="affix" <?php echo ($isMobile) ? 'data-offset-top="0"' : 'data-offset-top="197"'; ?> style="top:185px; padding: 5px;">
<?php if(isset($this->chatSenderDetails['AgencyDetails'])){ ?>
<div class="col-md-12 leadeBorder">
<h5 class="bold alert alert-info" style="margin-bottom:10px; padding:7px 10px;"><?php echo !empty($this->chatSenderDetails['AgencyDetails']['DisplayTitle'])?trim(stripslashes($this->chatSenderDetails['AgencyDetails']['DisplayTitle'])):trim(stripslashes($this->chatSenderDetails['AgencyDetails']['Title'])); ?></h5>
<h6 style="line-height:18px;"><?php if(isset($this->messageDetails)){ echo trim($this->messageDetails); } ?></h6>
</div>
<div class="clear"> </div>
<?php } ?>
<div class="panel panel-dark">
<div class="panel-heading">
<h3 class="panel-title"><strong>Message/Chat With Agent 1 </strong><button type="button" class="close Crose" data-dismiss="modal" aria-hidden="true">×</button></h3>
<ul class="panel-control">
<!--<li><a class="refresh" href="javascript:void(0)"><i class="fa fa-refresh"></i></a></li>-->
</ul>
</div>
<div class="panel-body" style="background:#2c3e50;">
<div class="nano nano-chat-widget chatloadbox">
<div class="nano-content nano-chat-box">
<?php
$s=1;
$data=$this->chatHistoryDetail;
if(is_array($data) && count($data)>0){
for($i=0;$i<count($data);$i++){
if($data[$i]['IsAgent']==1){
?>
<div class="ls-chat">
<span class="right rounded" style="color:#ffffff;">Agent</span>
<img style="display:none;" class="right rounded" alt="<?php echo stripslashes($data[$i]['AgentFirstName'])."".stripslashes($data[$i]['AgentLastName']); ?>" src="<?php echo $this->baseUrl('public/assets/images/demo/avatar-80.png'); ?>">
<div class="triangle-right" style="display:none;"></div>
<div class="text text-right">
<p class="msg msg-alter"><?php echo stripslashes($data[$i]['Message']); ?> <span class="date"><?php echo $data[$i]['UpdateDate']->format('M,d Y H:i:s'); ?></span> </p>
</div>
</div>
<?php } else { ?>
<div class="ls-chat">
<span class="rounded" style="color:#ffffff;">You</span>
<img style="display:none;" class="rounded" alt="<?php echo stripslashes($data[$i]['FirstName'])."".stripslashes($data[$i]['LastName']); ?>" src="<?php echo $this->baseUrl('public/assets/images/demo/avatar-80.png'); ?>">
<div class="triangle"></div>
<div class="text">
<p class="msg"><?php echo stripslashes($data[$i]['Message']); ?> <span class="date"><?php echo $data[$i]['UpdateDate']->format('M,d Y H:i:s'); ?></span> </p>
</div>
</div>
<?php
}
}
} else {
?>
<div class="ls-chat">
<div class="triangle"></div>
<div class="text">
<p class="msg">No record available</p>
</div>
</div>
<?php
}
?>
</div>
</div>
<hr/>
<div>
<form class="ls_form" action="" method="post" name="chatWithAgentEmailForm" id="chatWithAgentEmailForm">
<div class="input-group input-group-message">
<input type="text" placeholder="Write a message" name="message" id="message" class="form-control textColor">
<span class="input-group-btn">
<button type="submit" class="btn ls-light-green-btn pleaseWait"> <i class="fa fa-location-arrow"></i></button>
<input type="hidden" name="planId" id="planId" value="<?php echo base64_encode($this->chatSenderDetails['TPSysId']);?>">
<input type="hidden" name="agencyId" id="agencyId" value="<?php echo $this->chatSenderDetails['AgencySysId']?base64_encode($this->chatSenderDetails['AgencySysId']):'';?>">
<input type="hidden" name="senderId" id="senderId" value="<?php echo $this->chatSenderDetails['CustomerSysId']?base64_encode($this->chatSenderDetails['CustomerSysId']):'';?>">
<input type="hidden" name="recieverId" id="recieverId" value="<?php echo $this->chatSenderDetails['AgentSysId']?base64_encode($this->chatSenderDetails['AgentSysId']):'';?>">
<input type="hidden" value="<?php echo $this->chatSenderDetails['EmailId']?trim($this->chatSenderDetails['EmailId']):'';?>" id="emailid" name="emailid">
</span> </div>
<label class="alert alert-success successResponse" style="display:none;width:100%;padding:5px;"></label>
</form>
</div>
</div>
</div>
</div>
<script>
$("#chatWithAgentEmailForm").validate({
highlight: function (error, element) {
var name = $(element).attr("name");
$("input[name=" + name + "]").removeClass('error');
},
rules:{
'message':{
required:true,
},
},
submitHandler:function(){
var planId=$("#planId").val();
var agencyId=$("#agencyId").val();
var senderId=$("#senderId").val();
var recieverId=$("#recieverId").val();
var emailid=$("#emailid").val();
var message=$("#message").val();
$.ajax({
url: '/proposal/send-email-to-agent',
type: 'POST',
data: {'planId': planId,'agencyId': agencyId,'senderId':senderId,'recieverId':recieverId,'message': message,'emailid':emailid},
dataType:'json',
beforeSend:function(){
$(".successResponse").show();
//$(".successResponse").html('Thanks for your response. we\'ll get back to you. ');
$(".successResponse").html('Wait...');
$('.pleaseWait').attr('disabled',true);
//$('.pleaseWait').html('Wait...');
},
success: function(result){
if(result.response == 'success'){
$(".successResponse").show();
$(".successResponse").html('Thanks for your response. we\'ll get back to you. ');
$( ".chatloadbox" ).load("<?php echo $this->baseUrl('/proposal/customer-chat-public-page/id');?>/"+planId+"/cid/"+senderId+"", function() {
$("#message").val('');
$("#message").focus();
});
//$('.pleaseWait').html(' Message Sent ');
$('.pleaseWait').removeAttr('disabled');
} else{
$(".successResponse").html('Please try after some time.');
$('.pleaseWait').removeAttr('disabled');
}
},error:function(){
$(".successResponse").show();
$(".successResponse").html('Please try after some time.');
$('.pleaseWait').removeAttr('disabled');
}
});
}
});
</script>