top.window.location = '../../index.php'"; exit(); } require_once __DIR__ . "/" . "../../includes/include_geral_new.inc.php"; require_once __DIR__ . "/" . "../../includes/classes/ConnectPDO.php"; require_once __DIR__ . "/" . "../../includes/components/html2text-master/vendor/autoload.php"; use includes\classes\ConnectPDO; $conn = ConnectPDO::getInstance(); $auth = new AuthNew($_SESSION['s_logado'], $_SESSION['s_nivel'], 2, 1); /* Para manter a compatibilidade com versões antigas */ $table = getTableCompat($conn); $sysConfig = getConfig($conn); $mailConfig = getMailConfig($conn); $isAdmin = $_SESSION['s_nivel'] == 1; $version4 = $sysConfig['conf_updated_issues']; $allowAddTreatersTimes = true; ?> <?= APP_NAME; ?> <?= VERSAO; ?> "; echo message('danger', 'Ooops!', TRANS('MSG_ALERT_OCCO_IS_LOCKED_UP'), '', 'ticket_show.php?numero=' . $numero, 1); exit; } if (hasDependency($conn, $numero)) { echo "
"; echo message('danger', 'Ooops!', TRANS('MSG_ALERT_OCCO_NOT_LOCKED_UP'), '', 'ticket_show.php?numero=' . $numero, 1); exit; } } if (!isset($_POST['submit'])) { if (!isset($_GET['numero'])) { exit(); } $numero = (int)$_GET['numero']; $row = getTicketData($conn, $numero); $issue_selected_data = []; $issue_selected = ""; /* Posicionamento do campo de descrição do chamado: default | top | bottom */ $fieldDescriptionPosition = getConfigValue($conn, 'TICKET_DESCRIPTION_POS') ?? 'default'; $description = toHtml(nl2br($row['descricao'])); $description = (new \Html2Text\Html2Text($description))->getText(); $isRequester = false; if ($_SESSION['s_uid'] == $row['aberto_por']) { $isRequester = true; } /* Checagem para saber se o usuário logado pode tratar o chamado (edição e encerramento) */ $allowTreat = false; if ($_SESSION['s_nivel'] != 1) { if ($_SESSION['s_nivel'] > 2) { /* Somente-abertura não pode tratar */ $allowTreat = false; } elseif ($isRequester && !$sysConfig['conf_allow_op_treat_own_ticket']) { /* Se for operador solicitante, então depende da configuração sobre se o usuário operador pode tratar chamados abertos por ele mesmo*/ $allowTreat = false; } else { $allowTreat = true; } } else { /* Admin sempre pode tratar */ $allowTreat = true; } if (!$allowTreat) { redirect('ticket_show.php?numero=' . $numero); exit; } /* Controle para evitar acesso ao chamado por usuarios operadores que não fazem parte da area do chamado */ if (!$isAdmin) { $uareas = explode(',', $_SESSION['s_uareas']); if (!in_array($row['sistema'], $uareas)) { ?>

'.TRANS('MSG_TICKET_NOT_ALLOWED_TO_BE_VIEWED'), '', '', true); exit; } } $headerText = TRANS('SUBTTL_CLOSING_OCCO'); // $closingRequesterMode = $sysConfig['conf_closing_mode'] == 2; // if ($closingRequesterMode) { // $headerText = TRANS('TREATING_DONE_HEADER'); // } $headerText = TRANS('TREATING_DONE_HEADER'); if (!empty($row['problema']) && $row['problema'] != "-1") { $issue_selected_data = getIssueById($conn, $row['problema']); $issue_selected = $issue_selected_data['problema']; } /* ASSENTAMENTOS */ if ($_SESSION['s_nivel'] < 3) { $entries = getTicketEntries($conn, $numero, true); } else $entries = getTicketEntries($conn, $numero); $assentamentos = count($entries); /* ARQUIVOS */ $files = getTicketFiles($conn, $numero); $hasFiles = count($files); /* Checagem para identificar chamados relacionados */ $relatives = getTicketRelatives($conn, $numero); $hasRelatives = count($relatives); ?>
 " . $numero . ""; ?>
id="mailUS" >

' : ''); ?>
>
placeholder="" >
autocomplete="off" > autocomplete="off" > autocomplete="off" > autocomplete="off" >
.
.
.
0 ? '' : ' disabled'); $ariaDisabledAssent = ($assentamentos > 0 ? '' : ' true'); $classDisabledFiles = ($hasFiles > 0 ? '' : ' disabled'); $ariaDisabledFiles = ($hasFiles > 0 ? '' : ' true'); $classDisabledSubs = ($hasRelatives > 0 ? '' : ' disabled'); $ariaDisabledSubs = ($hasRelatives > 0 ? '' : ' true'); ?>
>
"; } else { $viewImage = ""; } ?>
#
k  
" . TRANS('CHILD_TICKET') . ""; // $comDeps = false; if ($rowSubPai['dep_pai'] != $numero) { $key = $rowSubPai['dep_pai']; $label = "" . TRANS('PARENT_TICKET') . ""; } // $sqlStatus = "select o.*, s.* from ocorrencias o, `status` s where o.numero=" . $key . " and o.`status`=s.stat_id and s.stat_painel not in (3) "; // $execStatus = $conn->query($sqlStatus); // $regStatus = $execStatus->rowCount(); // if ($regStatus > 0) { // $comDeps = true; // } // if ($comDeps) { // $imgSub = ICONS_PATH . "view_tree_red.png"; // } else { // $imgSub = ICONS_PATH . "view_tree_green.png"; // } $qryDetail = $QRY["ocorrencias_full_ini"] . " WHERE o.numero = " . $key . " "; $execDetail = $conn->query($qryDetail); $rowDetail = $execDetail->fetch(); $texto = trim($rowDetail['descricao']); if (strlen((string)$texto) > 200) { $texto = substr($texto, 0, 195) . " ..... "; }; ?>
" . TRANS('COL_PHONE'); ?> " . TRANS('DESCRIPTION'); ?> " . TRANS('COL_STATUS'); ?>
  " . $rowDetail['telefone']; ?> " . $texto; ?> " . $rowDetail['chamado_status']; ?>  
' /> ' />