top.window.location = '../../index.php'"; exit; } require_once __DIR__ . "/" . "../../includes/include_geral_new.inc.php"; require_once __DIR__ . "/" . "../../includes/classes/ConnectPDO.php"; use includes\classes\ConnectPDO; $conn = ConnectPDO::getInstance(); $auth = new AuthNew($_SESSION['s_logado'], $_SESSION['s_nivel'], 2, 2); $_SESSION['s_page_invmon'] = $_SERVER['PHP_SELF']; $json = 0; $json2 = 0; $json3 = 0; ?> <?= APP_NAME; ?> <?= VERSAO; ?>
 
0) { $filteredUnitsNames .= ", "; } else { $filteredUnitsNames .= TRANS('FILTERED_BY_FOLLOW_UNITS') . ': '; } $filteredUnitsNames .= $filteredUnit['inst_nome'] . '(' . $filteredUnit['nickname']. ')'; } } /* Final do Bloco de controle de visualização */ $sqlTotalCount = $QRY["total_equip"] . " WHERE comp_inst NOT IN (" . INST_TERCEIRA . ") {$termsTotalAllowedUnits}"; $resTotalCount = $conn->query($sqlTotalCount); $total = $resTotalCount->fetch()['total']; if ($total == 0) { echo message('info', 'Ooops!', TRANS('NO_RECORDS_FOUND'), '', '', 1); return; } $terms = ""; $query = "SELECT count(*) as Quantidade, count(*)*100/" . $total . " as Percentual, T.tipo_nome AS Equipamento, T.tipo_cod AS tipo, F.fab_nome AS fabricante, M.marc_nome AS modelo, M.marc_cod AS modelo_cod FROM equipamentos AS C, tipo_equip AS T, marcas_comp AS M, fabricantes AS F WHERE C.comp_tipo_equip = T.tipo_cod AND C.comp_inst not in (" . INST_TERCEIRA . ") AND F.fab_cod = C.comp_fab AND C.comp_marca = M.marc_cod {$termsAllowedUnits} GROUP BY fabricante, modelo, modelo_cod, tipo, Equipamento ORDER BY Quantidade desc, Equipamento LIMIT 0,10 "; $resultado = $conn->query($query); $linhas = $resultado->rowCount(); if ($linhas == 0) { echo message('info', '', TRANS('MSG_NO_DATA_IN_PERIOD'), ''); return; } $data = []; // $data2 = []; // $data3 = []; ?>

fetchall() as $row) { $data[] = $row; ?>
.º %