#7950 Fixed last_contact 2

This commit is contained in:
Daniel Maya 2021-09-07 14:47:54 +02:00
parent 5bf70f876c
commit 24670da399
1 changed files with 14 additions and 13 deletions

View File

@ -19,20 +19,21 @@ check_login();
?> ?>
<script type="text/javascript"> <script type="text/javascript">
function get_last_contact(source) { function get_last_contact(source, agent_id) {
var params = {}; var params = {};
params["get_last_contact"] = 1; params["get_last_contact"] = 1;
params["page"] = "enterprise/include/ajax/log_viewer.ajax"; params["page"] = "enterprise/include/ajax/log_viewer.ajax";
params["source"] = source; params["source"] = source;
params["agent_id"] = agent_id;
jQuery.ajax ({ jQuery.ajax ({
data: params, data: params,
dataType: "html", dataType: "html",
type: "POST", type: "POST",
url: "ajax.php", url: "ajax.php",
success: function (data) { success: function (data) {
} }
}); });
} }
</script> </script>
@ -75,7 +76,7 @@ foreach ($logs as $log) {
'border' => '0', 'border' => '0',
'width' => '20px', 'width' => '20px',
'heigth' => '20px', 'heigth' => '20px',
'onload' => "get_last_contact('".$log['source']."')", 'onload' => "get_last_contact('".$log['source']."', '".$agent_id."')",
] ]
); );