mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-21 17:08:52 +02:00
#7950 Fixed last_contact
This commit is contained in:
parent
a2ef804cec
commit
5bf70f876c
@ -3964,6 +3964,7 @@ function html_print_image(
|
|||||||
'onkeypress',
|
'onkeypress',
|
||||||
'onkeydown',
|
'onkeydown',
|
||||||
'onkeyup',
|
'onkeyup',
|
||||||
|
'onload',
|
||||||
'pos_tree',
|
'pos_tree',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -13,9 +13,31 @@
|
|||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Login check
|
// Login check.
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function get_last_contact(source) {
|
||||||
|
var params = {};
|
||||||
|
params["get_last_contact"] = 1;
|
||||||
|
params["page"] = "enterprise/include/ajax/log_viewer.ajax";
|
||||||
|
params["source"] = source;
|
||||||
|
|
||||||
|
jQuery.ajax ({
|
||||||
|
data: params,
|
||||||
|
dataType: "html",
|
||||||
|
type: "POST",
|
||||||
|
url: "ajax.php",
|
||||||
|
success: function (data) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
$agent_id = get_parameter_get('id_agente', 0);
|
$agent_id = get_parameter_get('id_agente', 0);
|
||||||
|
|
||||||
$table = new stdClass();
|
$table = new stdClass();
|
||||||
@ -46,9 +68,18 @@ $logs = mysql_db_get_all_rows_sql($sql);
|
|||||||
foreach ($logs as $log) {
|
foreach ($logs as $log) {
|
||||||
$row['source'] = $log['source'];
|
$row['source'] = $log['source'];
|
||||||
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
$row['review'] = '<a href="javascript:void(0)">'.html_print_image('images/zoom.png', true, ['title' => __('Review in log viewer'), 'alt' => '', 'onclick' => "send_form('".$log['source'].'-'.$agent_id."')"]).'</a>';
|
||||||
$row['last_contact'] = human_time_comparation($log['last_contact']);
|
$row['last_contact'] = html_print_image(
|
||||||
|
'images/spinner.gif',
|
||||||
|
true,
|
||||||
|
[
|
||||||
|
'border' => '0',
|
||||||
|
'width' => '20px',
|
||||||
|
'heigth' => '20px',
|
||||||
|
'onload' => "get_last_contact('".$log['source']."')",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$table->data[] = $row;
|
$table->data[$log['source']] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user