assign('row', $row);
$smarty->assign('msg', $msg);
GetTemplate($smarty, 'auditoria/logFullDetalhes.tpl');
} else {
throw new Exception();
}
} catch (Exception $ex) {
$msg = $ex->getMessage("Não foi encontrado os logs com as características.");
}
function GetQuery($idFull) {
$query = sprintf("SELECT full_log AS dados
FROM pbx_audita_full a
WHERE full_id = %s", $idFull);
return $query;
}
function GetMontageTable($tableRow) {
foreach ($tableRow as $key => $value) {
$rowTable .= "
";
$rowTable .= sprintf("%s | ", $key);
if (!is_array($value)) {
unset($tableRow["$value"]);
$rowTable .= sprintf("%s | ", $value);
} else {
$rowTable .= "" . GerarArray($value) . " | ";
}
$rowTable .= "
";
}
return $rowTable;
}
function GerarArray($arrayRes) {
foreach ($arrayRes as $value) {
$rowTable .= $value . " | ";
}
return $rowTable;
}
function GetMontageArray($json) {
if ($json['request']) {
$json = $json['request'];
}
foreach ($json as $key => $value) {
$arrayJ["$key"] = $value;
if (is_array($value)) {
GetMontageArray($value);
}
}
return $arrayJ;
}