Commit c4cd12507085c34c83d7ca732ad75ff05e1a4fe8
1 parent
4200c9a3
Exists in
master
and in
1 other branch
Substituicao da nomenclatura Dominio por Servidor de Autenticacao, para uso no S…
…uporte Remoto Seguro, implementacao de aplicacao opcional da autenticacao do usuario na abertura de sessao de suporte remoto, implementacao de condicao para permissao de desativacao da sessao de Suporte Remoto por parte do usuario final, pequenas correcoes e faxina de codigo. git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@782 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
20 changed files
with
454 additions
and
1264 deletions
Show diff stats
admin/dominios/detalhes_dominio.php
| ... | ... | @@ -1,410 +0,0 @@ |
| 1 | -<? | |
| 2 | - /* | |
| 3 | - Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
| 4 | - | |
| 5 | - Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
| 6 | - | |
| 7 | - O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
| 8 | - publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opnião) qualquer versão. | |
| 9 | - | |
| 10 | - Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
| 11 | - MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
| 12 | - | |
| 13 | - Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
| 14 | - Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 15 | - */ | |
| 16 | -session_start(); | |
| 17 | -require_once('../../include/library.php'); | |
| 18 | - | |
| 19 | -AntiSpy('1,2'); // Permitido somente a estes cs_nivel_administracao... | |
| 20 | - | |
| 21 | -// 1 - Administração | |
| 22 | -// 2 - Gestão Central | |
| 23 | - | |
| 24 | - | |
| 25 | -conecta_bd_cacic(); | |
| 26 | - | |
| 27 | - | |
| 28 | -if ($_POST['ExcluiDominio'] <> '' && $_SESSION['cs_nivel_administracao']==1) | |
| 29 | - { | |
| 30 | - $query = "UPDATE dominios | |
| 31 | - SET in_ativo = 'N' | |
| 32 | - WHERE id_dominio = ".$_POST['frm_id_dominio']; | |
| 33 | - | |
| 34 | - mysql_query($query) or die('Update falhou ou sua sessão expirou!'); | |
| 35 | - GravaLog('UPD',$_SERVER['SCRIPT_NAME'],'dominios'); | |
| 36 | - header ("Location: ../../include/operacao_ok.php?chamador=../admin/dominios/index.php&tempo=1"); | |
| 37 | - } | |
| 38 | -else if ($_POST['GravaAlteracoes'] <> '' && $_SESSION['cs_nivel_administracao']==1) | |
| 39 | - { | |
| 40 | - $query = "UPDATE dominios | |
| 41 | - SET nm_dominio = '".$_POST['frm_nm_dominio'] ."', | |
| 42 | - te_ip_dominio = '".$_POST['frm_te_ip_dominio'] ."', | |
| 43 | - id_tipo_protocolo = '".$_POST['frm_id_tipo_protocolo'] ."', | |
| 44 | - nu_versao_protocolo = '".$_POST['frm_nu_versao_protocolo'] ."', | |
| 45 | - te_base_consulta_raiz = '".$_POST['frm_te_base_consulta_raiz'] ."', | |
| 46 | - te_base_consulta_folha = '".$_POST['frm_te_base_consulta_folha'] ."', | |
| 47 | - te_atributo_identificador = '".$_POST['frm_te_atributo_identificador']."', | |
| 48 | - te_atributo_retorna_nome = '".$_POST['frm_te_atributo_retorna_nome'] ."', | |
| 49 | - te_atributo_retorna_email = '".$_POST['frm_te_atributo_retorna_email']."', | |
| 50 | - te_observacao = '".$_POST['frm_te_observacao'] ."' WHERE id_dominio = ".$_POST['frm_id_dominio']; | |
| 51 | - mysql_query($query) or die('Update falhou ou sua sessão expirou!'); | |
| 52 | - GravaLog('UPD',$_SERVER['SCRIPT_NAME'],'dominios'); | |
| 53 | - header ("Location: ../../include/operacao_ok.php?chamador=../admin/dominios/index.php&tempo=1"); | |
| 54 | - } | |
| 55 | -else | |
| 56 | - { | |
| 57 | - $query = "SELECT * | |
| 58 | - FROM dominios | |
| 59 | - WHERE id_dominio = ".$_GET['id_dominio']; | |
| 60 | - $result = mysql_query($query) or die ('Erro no acesso à tabela dominios ou sua sessão expirou!'); | |
| 61 | - | |
| 62 | - $row = mysql_fetch_array($result); | |
| 63 | - ?> | |
| 64 | - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 65 | - <html> | |
| 66 | - <head> | |
| 67 | - <link rel="stylesheet" type="text/css" href="../../include/cacic.css"> | |
| 68 | - <title>Detalhes de Domínio</title> | |
| 69 | - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| 70 | - <SCRIPT LANGUAGE="JavaScript"> | |
| 71 | - | |
| 72 | - function valida_form() | |
| 73 | - { | |
| 74 | - | |
| 75 | - if ( document.form.frm_nm_dominio.value == "" ) | |
| 76 | - { | |
| 77 | - alert("O nome é obrigatório."); | |
| 78 | - document.form.frm_nm_dominio.focus(); | |
| 79 | - return false; | |
| 80 | - } | |
| 81 | - else if ( document.form.frm_te_ip_dominio.value == "" ) | |
| 82 | - { | |
| 83 | - alert("O IP é obrigatório."); | |
| 84 | - document.form.frm_te_ip_dominio.focus(); | |
| 85 | - return false; | |
| 86 | - } | |
| 87 | - else if ( document.form.frm_id_tipo_protocolo.value == "" ) | |
| 88 | - { | |
| 89 | - alert("Selecione o Tipo de Protocolo."); | |
| 90 | - document.form.frm_id_tipo_protocolo.focus(); | |
| 91 | - return false; | |
| 92 | - } | |
| 93 | - else if ( document.form.frm_te_base_consulta_raiz.value == "" ) | |
| 94 | - { | |
| 95 | - alert("A base para consulta em raiz é obrigatória."); | |
| 96 | - document.form.frm_te_base_consulta_raiz.focus(); | |
| 97 | - return false; | |
| 98 | - } | |
| 99 | - else if ( document.form.frm_te_base_consulta_folha.value == "" ) | |
| 100 | - { | |
| 101 | - alert("A base para consulta em folha é obrigatória."); | |
| 102 | - document.form.frm_te_base_consulta_folha.focus(); | |
| 103 | - return false; | |
| 104 | - } | |
| 105 | - else if ( document.form.frm_te_atributo_retorna_nome.value == "" ) | |
| 106 | - { | |
| 107 | - alert("O atributo para retorno de nome completo é obrigatório."); | |
| 108 | - document.form.frm_te_atributo_retorna_nome.focus(); | |
| 109 | - return false; | |
| 110 | - } | |
| 111 | - else if ( document.form.frm_te_atributo_retorna_email.value == "" ) | |
| 112 | - { | |
| 113 | - alert("O atributo para retorno de email é obrigatório."); | |
| 114 | - document.form.frm_te_atributo_retorna_email.focus(); | |
| 115 | - return false; | |
| 116 | - } | |
| 117 | - else if ( document.form.frm_te_atributo_identificador.value == "" ) | |
| 118 | - { | |
| 119 | - alert("O atributo identificador é obrigatório."); | |
| 120 | - document.form.frm_te_atributo_identificador.focus(); | |
| 121 | - return false; | |
| 122 | - } | |
| 123 | - return true; | |
| 124 | - } | |
| 125 | - </script> | |
| 126 | - <style type="text/css"> | |
| 127 | -<!-- | |
| 128 | -.style2 { font-size: 9px; | |
| 129 | - color: #000099; | |
| 130 | -} | |
| 131 | ---> | |
| 132 | - </style> | |
| 133 | - </head> | |
| 134 | - | |
| 135 | - <body background="../../imgs/linha_v.gif" onLoad="SetaCampo('frm_nm_dominio');"> | |
| 136 | - <script language="JavaScript" type="text/javascript" src="../../include/cacic.js"></script> | |
| 137 | - <table width="90%" border="0" align="center"> | |
| 138 | - <tr> | |
| 139 | - <td class="cabecalho">Detalhes do Domínio "<? echo $row['nm_dominio'];?>"</td> | |
| 140 | - </tr> | |
| 141 | - <tr> | |
| 142 | - <td class="descricao">As informações referem-se a um domínio usado na autenticação de usuários do suporte remoto seguro.</td> | |
| 143 | - </tr> | |
| 144 | - </table> | |
| 145 | - <form action="detalhes_dominio.php" method="post" ENCTYPE="multipart/form-data" name="form"> | |
| 146 | - <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1"> | |
| 147 | - <tr> | |
| 148 | - <td class="label"><br>Nome do Domínio:</td> | |
| 149 | - <td nowrap class="label"><br>Endereço IP do Domínio:</td> | |
| 150 | - </tr> | |
| 151 | - <tr><td height="1" bgcolor="#333333" colspan="3"></td></tr> | |
| 152 | - <tr> | |
| 153 | - <td class="label_peq_sem_fundo"> <input name="frm_nm_dominio" type="text" size="60" maxlength="60" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" value="<? echo $row['nm_dominio'];?>"> | |
| 154 | - <input name="frm_id_dominio" type="hidden" value="<? echo $_GET['id_dominio'];?>"></td> | |
| 155 | - <td class="label_peq_sem_fundo"><input name="frm_te_ip_dominio" type="text" size="30" maxlength="15" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_ip_dominio" value="<? echo $row['te_ip_dominio'];?>"></td> | |
| 156 | - </tr> | |
| 157 | - <tr> | |
| 158 | - <td class="label"><div align="left"><br>Protocolo:</div></td> | |
| 159 | - <td class="label"><div align="left"><br>Versão:</div></td> | |
| 160 | - </tr> | |
| 161 | - <tr> | |
| 162 | - <td height="1" bgcolor="#333333" colspan="3"></td> | |
| 163 | - </tr> | |
| 164 | - <tr> | |
| 165 | - <td nowrap><label> | |
| 166 | - <select name="frm_id_tipo_protocolo" class="opcao_tabela" id="frm_id_tipo_protocolo"> | |
| 167 | - <option value="LDAP" <? if ($row['id_tipo_protocolo']=='LDAP') echo 'selected';?>>LDAP</option> | |
| 168 | - <option value="Open LDAP"<? if ($row['id_tipo_protocolo']=='Open LDAP') echo 'selected';?>>Open LDAP</option> | |
| 169 | - </select> | |
| 170 | - </label></td> | |
| 171 | - <td class="label"><div align="left"><span class="label_peq_sem_fundo" id="frm_nu_versao_protocolo"> | |
| 172 | - <input name="frm_nu_versao_protocolo" type="text" size="60" maxlength="10" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_nu_versao_protocolo" value="<? echo $row['nu_versao_protocolo'];?>" > | |
| 173 | - </span></div></td> | |
| 174 | - </tr> | |
| 175 | - <tr> | |
| 176 | - <td class="label"><p><br> | |
| 177 | - Base para Consulta em Raíz: <span class="normal style2">(Ex.: "dc=br, dc=com, dc=dominio"</span><span class="normal style2">)</span></p></td> | |
| 178 | - <td class="label"><p><br> | |
| 179 | - Base para Consulta em Folha: <span class="normal style2">(Ex.: "ou=pessoas, ou=usuarios"</span><span class="normal style2">)</span></p></td> | |
| 180 | - </tr> | |
| 181 | - <tr> | |
| 182 | - <td height="1" bgcolor="#333333" colspan="3"></td> | |
| 183 | - </tr> | |
| 184 | - <tr> | |
| 185 | - <td><span class="label_peq_sem_fundo"> | |
| 186 | - <input name="frm_te_base_consulta_raiz" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_base_consulta_raiz" value="<? echo $row['te_base_consulta_raiz'];?>" > | |
| 187 | - </span></td> | |
| 188 | - <td><span class="label_peq_sem_fundo"> | |
| 189 | - <input name="frm_te_base_consulta_folha" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_base_consulta_folha" value="<? echo $row['te_base_consulta_folha'];?>" > | |
| 190 | - </span></td> | |
| 191 | - </tr> | |
| 192 | - <tr> | |
| 193 | - <td> </td> | |
| 194 | - <td> </td> | |
| 195 | - </tr> | |
| 196 | - <tr> | |
| 197 | - <td class="label"><p><br> | |
| 198 | - Atributo para Identificação: <span class="normal style2">(Ex.: "uniqueID"</span><span class="normal style2">)</span></p></td> | |
| 199 | - <td> </td> | |
| 200 | - </tr> | |
| 201 | - <tr> | |
| 202 | - <td><span class="label_peq_sem_fundo"> | |
| 203 | - <input name="frm_te_atributo_identificador" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_identificador" value="<? echo $row['te_atributo_identificador'];?>" > | |
| 204 | - </span></td> | |
| 205 | - <td> </td> | |
| 206 | - </tr> | |
| 207 | - | |
| 208 | - <tr> | |
| 209 | - <td class="label"><p><br> | |
| 210 | - Atributo para Retorno de Nome Completo: <span class="normal style2">(Ex.: "fullName"</span><span class="normal style2">)</span></p></td> | |
| 211 | - <td class="label"><p><br> | |
| 212 | - Atributo para Retorno de Email: <span class="normal style2">(Ex: "email"</span><span class="normal style2">)</span></p></td> | |
| 213 | - <td> </td> | |
| 214 | - </tr> | |
| 215 | - <tr> | |
| 216 | - <td><span class="label_peq_sem_fundo"> | |
| 217 | - <input name="frm_te_atributo_retorna_nome" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_retorna_nome" value="<? echo $row['te_atributo_retorna_nome'];?>" > | |
| 218 | - </span></td> | |
| 219 | - <td><span class="label_peq_sem_fundo"> | |
| 220 | - <input name="frm_te_atributo_retorna_email" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_retorna_email" value="<? echo $row['te_atributo_retorna_email'];?>" > | |
| 221 | - </span></td> | |
| 222 | - <td> </td> | |
| 223 | - </tr> | |
| 224 | - <tr> | |
| 225 | - <td colspan="3"> </td> | |
| 226 | - </tr> | |
| 227 | - <tr> | |
| 228 | - <td colspan="2" class="label"><div align="left"><br> | |
| 229 | - Observações:</div></td> | |
| 230 | - <td> </td> | |
| 231 | - </tr> | |
| 232 | - <tr> | |
| 233 | - <td colspan="2"><span class="label_peq_sem_fundo"> | |
| 234 | - <input name="frm_te_observacao" type="text" size="100" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_observacao" value="<? echo $row['te_observacao'];?>" > | |
| 235 | - </span></td> | |
| 236 | - <td> </td> | |
| 237 | - </tr> | |
| 238 | - </table> | |
| 239 | - | |
| 240 | - <br> | |
| 241 | - <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1"> | |
| 242 | - <tr> | |
| 243 | - <td colspan="7" class="label">Redes Associadas ao Domínio:</td> | |
| 244 | - </tr> | |
| 245 | - <tr> | |
| 246 | - <td height="1" bgcolor="#333333" colspan="7"></td> | |
| 247 | - </tr> | |
| 248 | - <? | |
| 249 | - $query = "SELECT count(id_dominio) as Total | |
| 250 | - FROM redes | |
| 251 | - WHERE id_dominio = ".$_GET['id_dominio']; | |
| 252 | - $result = mysql_query($query) or die ('Erro no acesso à tabela redes ou sua sessão expirou!'); | |
| 253 | - $rowRedesDominio = mysql_fetch_array($result); | |
| 254 | - if ($rowRedesDominio['Total'] > 0) | |
| 255 | - { | |
| 256 | - ?> | |
| 257 | - <tr> | |
| 258 | - <td class="cabecalho_tabela"> </td> | |
| 259 | - <td class="cabecalho_tabela"> </td> | |
| 260 | - <td align="left" nowrap class="cabecalho_tabela">Local</td> | |
| 261 | - <td class="cabecalho_tabela"> </td> | |
| 262 | - <td align="left" nowrap class="cabecalho_tabela">IP</td> | |
| 263 | - <td align="left" class="cabecalho_tabela"> </td> | |
| 264 | - <td align="left" class="cabecalho_tabela">Rede</td> | |
| 265 | - </tr> | |
| 266 | - <tr> | |
| 267 | - <td height="1" bgcolor="#333333" colspan="7"></td> | |
| 268 | - </tr> | |
| 269 | - | |
| 270 | - <? | |
| 271 | - | |
| 272 | - $query = "SELECT r.id_ip_rede, | |
| 273 | - r.nm_rede, | |
| 274 | - l.id_local, | |
| 275 | - l.sg_local, | |
| 276 | - l.nm_local | |
| 277 | - FROM redes r, | |
| 278 | - locais l | |
| 279 | - WHERE r.id_dominio = ".$_GET['id_dominio'] ." AND | |
| 280 | - l.id_local = r.id_local | |
| 281 | - ORDER BY l.sg_local,l.nm_local,r.nm_rede"; | |
| 282 | - $result = mysql_query($query) or die ('Erro no acesso à tabela redes ou sua sessão expirou!'); | |
| 283 | - | |
| 284 | - $seq = 1; | |
| 285 | - $Cor = 1; | |
| 286 | - while ($row = mysql_fetch_array($result)) | |
| 287 | - { | |
| 288 | - ?> | |
| 289 | - <tr <? if ($Cor) echo 'bgcolor="#E1E1E1"'; ?>> | |
| 290 | - <td width="3%" align="center" nowrap class="opcao_tabela"><a href="../redes/detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&nm_chamador=dominios"><? echo $seq; ?></a></td> | |
| 291 | - <td width="1%" align="left" nowrap class="opcao_tabela"> </td> | |
| 292 | - <td width="1%" align="left" nowrap class="opcao_tabela"><a href="../locais/detalhes_local.php?id_local=<? echo $row['id_local'];?>&nm_chamador=dominios"><? echo $row['sg_local'].'/'.$row['nm_local']; ?></a></td> | |
| 293 | - <td width="1%" align="left" nowrap class="opcao_tabela"> </td> | |
| 294 | - <td width="3%" align="left" nowrap class="opcao_tabela"><a href="../redes/detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&nm_chamador=dominios"><? echo $row['id_ip_rede']; ?></a></td> | |
| 295 | - <td width="1%" align="left" class="opcao_tabela"> </td> | |
| 296 | - <td width="92%" align="left" class="opcao_tabela"><a href="../redes/detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&nm_chamador=dominios"><? echo $row['nm_rede']; ?></a></td> | |
| 297 | - </tr> | |
| 298 | - <? | |
| 299 | - $seq++; | |
| 300 | - $Cor=!$Cor; | |
| 301 | - } | |
| 302 | - | |
| 303 | - } | |
| 304 | - else | |
| 305 | - echo '<tr><td colspan="5" class="label_vermelho">Ainda não existem redes associadas ao domínio!</td></tr>'; | |
| 306 | - ?> | |
| 307 | - <tr> | |
| 308 | - <td height="1" bgcolor="#333333" colspan="7"></td> | |
| 309 | - </tr> | |
| 310 | - </table> | |
| 311 | - <br> | |
| 312 | - <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1"> | |
| 313 | - <tr> | |
| 314 | - <td colspan="10" class="label">Usuários Associados ao Domínio:</td> | |
| 315 | - </tr> | |
| 316 | - <tr> | |
| 317 | - <td height="1" bgcolor="#333333" colspan="10"></td> | |
| 318 | - </tr> | |
| 319 | - <? | |
| 320 | - $query = "SELECT count(id_dominio) as Total | |
| 321 | - FROM usuarios | |
| 322 | - WHERE id_dominio = ".$_GET['id_dominio']; | |
| 323 | - $result = mysql_query($query) or die ('Erro no acesso à tabela usuários ou sua sessão expirou!'); | |
| 324 | - $rowUsuariosDominio = mysql_fetch_array($result); | |
| 325 | - if ($rowUsuariosDominio['Total'] > 0) | |
| 326 | - { | |
| 327 | - ?> | |
| 328 | - <tr> | |
| 329 | - <td class="cabecalho_tabela"> </td> | |
| 330 | - <td class="cabecalho_tabela"> </td> | |
| 331 | - <td align="left" class="cabecalho_tabela">Local</td> | |
| 332 | - <td class="cabecalho_tabela"> </td> | |
| 333 | - <td align="left" nowrap class="cabecalho_tabela">Nome de Acesso</td> | |
| 334 | - <td align="left" class="cabecalho_tabela"> </td> | |
| 335 | - <td align="left" class="cabecalho_tabela">Nome Completo</td> | |
| 336 | - <td align="left" class="cabecalho_tabela">Email</td> | |
| 337 | - <td align="left" class="cabecalho_tabela">Telefone/Ramal</td> | |
| 338 | - <td align="left" class="cabecalho_tabela"> </td> | |
| 339 | - </tr> | |
| 340 | - <tr> | |
| 341 | - <td height="1" bgcolor="#333333" colspan="10"></td> | |
| 342 | - </tr> | |
| 343 | - | |
| 344 | - <? | |
| 345 | - $query = "SELECT u.id_usuario, | |
| 346 | - u.nm_usuario_acesso, | |
| 347 | - u.nm_usuario_completo, | |
| 348 | - u.te_emails_contato, | |
| 349 | - u.te_telefones_contato, | |
| 350 | - l.sg_local, | |
| 351 | - l.nm_local, | |
| 352 | - l.id_local | |
| 353 | - FROM usuarios u, | |
| 354 | - locais l | |
| 355 | - WHERE u.id_dominio = ".$_GET['id_dominio']." AND | |
| 356 | - u.id_local = l.id_local | |
| 357 | - ORDER BY l.nm_local,u.nm_usuario_acesso"; | |
| 358 | - $result = mysql_query($query) or die ('Erro no acesso à tabela redes ou sua sessão expirou!'); | |
| 359 | - $seq = 1; | |
| 360 | - $Cor = 1; | |
| 361 | - while ($row = mysql_fetch_array($result)) | |
| 362 | - { | |
| 363 | - ?> | |
| 364 | - <tr <? if ($Cor) echo 'bgcolor="#E1E1E1"'; ?>> | |
| 365 | - <td width="3%" align="center" nowrap class="opcao_tabela"><a href="../usuarios/detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&nm_chamador=dominios"><? echo $seq; ?></a></td> | |
| 366 | - <td width="1%" align="left" nowrap class="opcao_tabela"> </td> | |
| 367 | - <td width="1%" align="left" nowrap class="opcao_tabela"><a href="../locais/detalhes_local.php?id_local=<? echo $row['id_local'];?>&nm_chamador=dominios"><? echo $row['sg_local'].'/'.$row['nm_local']; ?></a></td> | |
| 368 | - <td width="1%" align="left" nowrap class="opcao_tabela"> </td> | |
| 369 | - <td width="3%" align="left" nowrap class="opcao_tabela"><a href="../usuarios/detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&nm_chamador=dominios"><? echo $row['nm_usuario_acesso']; ?></a></td> | |
| 370 | - <td width="1%" align="left" class="opcao_tabela"> </td> | |
| 371 | - <td width="92%" align="left" class="opcao_tabela"><a href="../usuarios/detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&nm_chamador=dominios"><? echo $row['nm_usuario_completo']; ?></a></td> | |
| 372 | - <td width="92%" align="left" class="opcao_tabela"><a href="../usuarios/detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&nm_chamador=dominios"><? echo $row['te_emails_contato']; ?></a></td> | |
| 373 | - <td width="92%" align="left" class="opcao_tabela"><a href="../usuarios/detalhes_usuario.php?id_usuario=<? echo $row['id_usuario'];?>&nm_chamador=dominios"><? echo $row['te_telefones_contato']; ?></a></td> | |
| 374 | - <td width="92%" align="left" class="opcao_tabela"> </td> | |
| 375 | - </tr> | |
| 376 | - <? | |
| 377 | - $seq++; | |
| 378 | - $Cor=!$Cor; | |
| 379 | - } | |
| 380 | - } | |
| 381 | - else | |
| 382 | - echo '<tr><td colspan="5" class="label_vermelho">Ainda não existem usuários associados ao domínio!</td></tr>'; | |
| 383 | - ?> | |
| 384 | - <tr> | |
| 385 | - <td height="1" bgcolor="#333333" colspan="10"></td> | |
| 386 | - </tr> | |
| 387 | - </table> | |
| 388 | - | |
| 389 | - <table width="90%" border="0" align="center" cellpadding="0" cellspacing="1"> | |
| 390 | - <tr><td colspan="5" align="center"><? | |
| 391 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 392 | - { | |
| 393 | - ?> | |
| 394 | - <br> | |
| 395 | - <p> | |
| 396 | - <input name="GravaAlteracoes" type="submit" id="GravaAlteracoes" value=" Gravar Alterações " onClick="return Confirma('Confirma Informações para o Domínio?');return valida_form();"> | |
| 397 | - | |
| 398 | - <input name="ExcluiDominio" type="submit" id="ExcluiDominio" onClick="return Confirma('Confirma Exclusão(Desativação) do Domínio?');" value=" Excluir/Desativar Domínio"> | |
| 399 | - </p> | |
| 400 | - <? | |
| 401 | - } | |
| 402 | - ?> | |
| 403 | - </td></tr> | |
| 404 | - </table> | |
| 405 | - </form> | |
| 406 | - </body> | |
| 407 | -</html> | |
| 408 | - <? | |
| 409 | - } | |
| 410 | -?> |
admin/dominios/incluir_dominio.php
| ... | ... | @@ -1,273 +0,0 @@ |
| 1 | -<? | |
| 2 | - /* | |
| 3 | - Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
| 4 | - | |
| 5 | - Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
| 6 | - | |
| 7 | - O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
| 8 | - publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opnião) qualquer versão. | |
| 9 | - | |
| 10 | - Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
| 11 | - MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
| 12 | - | |
| 13 | - Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
| 14 | - Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 15 | - */ | |
| 16 | - session_start(); | |
| 17 | -include_once "../../include/library.php"; | |
| 18 | -AntiSpy('1,2'); // Permitido somente a estes cs_nivel_administracao... | |
| 19 | -// 1 - Administração | |
| 20 | -// 2 - Gestão Central | |
| 21 | - | |
| 22 | - | |
| 23 | -if($_POST['submit']<>'' && $_SESSION['cs_nivel_administracao']==1) | |
| 24 | - { | |
| 25 | - Conecta_bd_cacic(); | |
| 26 | - | |
| 27 | - $query = "SELECT * | |
| 28 | - FROM dominios | |
| 29 | - WHERE nm_dominio = '".$_POST['frm_nm_dominio']."'"; | |
| 30 | - $result = mysql_query($query) or die ('1-Select falhou ou sua sessão expirou!'); | |
| 31 | - | |
| 32 | - if (mysql_num_rows($result) > 0) | |
| 33 | - { | |
| 34 | - header ("Location: ../../include/registro_ja_existente.php?chamador=../admin/dominios/index.php&tempo=1"); | |
| 35 | - } | |
| 36 | - else | |
| 37 | - { | |
| 38 | - $query = "INSERT | |
| 39 | - INTO dominios | |
| 40 | - (nm_dominio, | |
| 41 | - te_ip_dominio, | |
| 42 | - id_tipo_protocolo, | |
| 43 | - nu_versao_protocolo, | |
| 44 | - te_base_consulta_raiz, | |
| 45 | - te_base_consulta_folha, | |
| 46 | - te_atributo_identificador, | |
| 47 | - te_atributo_retorna_nome, | |
| 48 | - te_atributo_retorna_email, | |
| 49 | - te_observacao) | |
| 50 | - VALUES ('".$_POST['frm_nm_dominio']."', | |
| 51 | - '".$_POST['frm_te_ip_dominio']."', | |
| 52 | - '".$_POST['frm_id_tipo_protocolo']."', | |
| 53 | - '".$_POST['frm_nu_versao_protocolo']."', | |
| 54 | - '".$_POST['frm_te_base_consulta_raiz']."', | |
| 55 | - '".$_POST['frm_te_base_consulta_folha']."', | |
| 56 | - '".$_POST['frm_te_atributo_identificador']."', | |
| 57 | - '".$_POST['frm_te_atributo_retorna_nome']."', | |
| 58 | - '".$_POST['frm_te_atributo_retorna_email']."', | |
| 59 | - '".$_POST['frm_te_observacao']."')"; | |
| 60 | - $result = mysql_query($query) or die ('2-Falha na Inserção em Dominios ou sua sessão expirou!'); | |
| 61 | - GravaLog('INS',$_SERVER['SCRIPT_NAME'],'dominios'); | |
| 62 | - | |
| 63 | - header ("Location: index.php"); | |
| 64 | - } | |
| 65 | - } | |
| 66 | -else | |
| 67 | - { | |
| 68 | - ?> | |
| 69 | - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 70 | - <html> | |
| 71 | - <head> | |
| 72 | - <link rel="stylesheet" type="text/css" href="../../include/cacic.css"> | |
| 73 | - <title>Inclusão de Domínio</title> | |
| 74 | - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| 75 | - <SCRIPT LANGUAGE="JavaScript"> | |
| 76 | - | |
| 77 | - function valida_form() | |
| 78 | - { | |
| 79 | - | |
| 80 | - if ( document.form.frm_nm_dominio.value == "" ) | |
| 81 | - { | |
| 82 | - alert("O nome é obrigatório."); | |
| 83 | - document.form.frm_nm_dominio.focus(); | |
| 84 | - return false; | |
| 85 | - } | |
| 86 | - else if ( document.form.frm_te_ip_dominio.value == "" ) | |
| 87 | - { | |
| 88 | - alert("O IP é obrigatório."); | |
| 89 | - document.form.frm_te_ip_dominio.focus(); | |
| 90 | - return false; | |
| 91 | - } | |
| 92 | - else if ( document.form.frm_id_tipo_protocolo.value == "" ) | |
| 93 | - { | |
| 94 | - alert("Selecione o Tipo de Protocolo."); | |
| 95 | - document.form.frm_id_tipo_protocolo.focus(); | |
| 96 | - return false; | |
| 97 | - } | |
| 98 | - else if ( document.form.frm_te_base_consulta_raiz.value == "" ) | |
| 99 | - { | |
| 100 | - alert("A base para consulta em raiz é obrigatória."); | |
| 101 | - document.form.frm_te_base_consulta_raiz.focus(); | |
| 102 | - return false; | |
| 103 | - } | |
| 104 | - else if ( document.form.frm_te_base_consulta_folha.value == "" ) | |
| 105 | - { | |
| 106 | - alert("A base para consulta em folha é obrigatória."); | |
| 107 | - document.form.frm_te_base_consulta_folha.focus(); | |
| 108 | - return false; | |
| 109 | - } | |
| 110 | - else if ( document.form.frm_te_atributo_retorna_nome.value == "" ) | |
| 111 | - { | |
| 112 | - alert("O atributo para retorno de nome completo é obrigatório."); | |
| 113 | - document.form.frm_te_atributo_retorna_nome.focus(); | |
| 114 | - return false; | |
| 115 | - } | |
| 116 | - else if ( document.form.frm_te_atributo_retorna_email.value == "" ) | |
| 117 | - { | |
| 118 | - alert("O atributo para retorno de email é obrigatório."); | |
| 119 | - document.form.frm_te_atributo_retorna_email.focus(); | |
| 120 | - return false; | |
| 121 | - } | |
| 122 | - else if ( document.form.frm_te_atributo_identificador.value == "" ) | |
| 123 | - { | |
| 124 | - alert("O atributo identificador é obrigatório."); | |
| 125 | - document.form.frm_te_atributo_identificador.focus(); | |
| 126 | - return false; | |
| 127 | - } | |
| 128 | - return true; | |
| 129 | - } | |
| 130 | - </script> | |
| 131 | - <script language="JavaScript" type="text/JavaScript"> | |
| 132 | - <!-- | |
| 133 | - function MM_reloadPage(init) { //reloads the window if Nav4 resized | |
| 134 | - if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { | |
| 135 | - document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} | |
| 136 | - else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); | |
| 137 | - } | |
| 138 | - MM_reloadPage(true); | |
| 139 | - //--> | |
| 140 | - </script> | |
| 141 | - <style type="text/css"> | |
| 142 | -<!-- | |
| 143 | -.style2 { | |
| 144 | - font-size: 9px; | |
| 145 | - color: #000099; | |
| 146 | -} | |
| 147 | ---> | |
| 148 | - </style> | |
| 149 | - </head> | |
| 150 | - | |
| 151 | - <body background="../../imgs/linha_v.gif" onLoad="SetaCampo('frm_nm_dominio');"> | |
| 152 | - <script language="JavaScript" type="text/javascript" src="../../include/cacic.js"></script> | |
| 153 | - <table width="90%" border="0" align="center"> | |
| 154 | - <tr> | |
| 155 | - <td class="cabecalho">Inclusão | |
| 156 | - de Domínio</td> | |
| 157 | - </tr> | |
| 158 | - <tr> | |
| 159 | - <td class="descricao">As informações que deverão ser | |
| 160 | - cadastradas abaixo referem-se a um domínio a ser utilizado na autenticação de usuários do suporte remoto seguro. </td> | |
| 161 | - </tr> | |
| 162 | - </table> | |
| 163 | - <form action="incluir_dominio.php" method="post" ENCTYPE="multipart/form-data" name="form" onSubmit="return valida_form()"> | |
| 164 | - <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"> | |
| 165 | - <tr> | |
| 166 | - <td class="label"><br> | |
| 167 | - Nome do Domínio:</td> | |
| 168 | - <td nowrap class="label"><br> | |
| 169 | - Endereço IP do Domínio:</td> | |
| 170 | - </tr> | |
| 171 | - <tr> | |
| 172 | - <td height="1" bgcolor="#333333" colspan="3"></td> | |
| 173 | - </tr> | |
| 174 | - <tr> | |
| 175 | - <td class="label_peq_sem_fundo"> <input name="frm_nm_dominio" type="text" size="60" maxlength="60" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
| 176 | - </td> | |
| 177 | - <td class="label_peq_sem_fundo"><input name="frm_te_ip_dominio" type="text" size="30" maxlength="15" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_ip_dominio" ></td> | |
| 178 | - </tr> | |
| 179 | - <tr> | |
| 180 | - <td class="label"><div align="left"><br> | |
| 181 | - Protocolo:</div></td> | |
| 182 | - <td class="label"><div align="left"><br> | |
| 183 | - Versão:</div></td> | |
| 184 | - </tr> | |
| 185 | - <tr> | |
| 186 | - <td height="1" bgcolor="#333333" colspan="3"></td> | |
| 187 | - </tr> | |
| 188 | - <tr> | |
| 189 | - <td nowrap><label> | |
| 190 | - <select name="frm_id_tipo_protocolo" class="opcao_tabela" id="frm_id_tipo_protocolo"> | |
| 191 | - <option value="LDAP" selected>LDAP</option> | |
| 192 | - <option value="Open LDAP">Open LDAP</option> | |
| 193 | - </select> | |
| 194 | - </label></td> | |
| 195 | - <td class="label"><div align="left"><span class="label_peq_sem_fundo"> | |
| 196 | - <input name="frm_nu_versao_protocolo" type="text" size="30" maxlength="10" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_nu_versao_protocolo" > | |
| 197 | - </span></div></td> | |
| 198 | - </tr> | |
| 199 | - <tr> | |
| 200 | - <td class="label"><p><br> | |
| 201 | - Base para Consulta em Raíz: <span class="normal style2">(Ex.: "dc=br, dc=com, dc=dominio"</span><span class="normal style2">)</span></p></td> | |
| 202 | - <td class="label"><p><br> | |
| 203 | - Base para Consulta em Folha: <span class="normal style2">(Ex.: "ou=pessoas, ou=usuarios"</span><span class="normal style2">)</span></p></td> | |
| 204 | - </tr> | |
| 205 | - <tr> | |
| 206 | - <td height="1" bgcolor="#333333" colspan="3"></td> | |
| 207 | - </tr> | |
| 208 | - <tr> | |
| 209 | - <td><span class="label_peq_sem_fundo"> | |
| 210 | - <input name="frm_te_base_consulta_raiz" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_base_consulta_raiz" > | |
| 211 | - </span></td> | |
| 212 | - <td><span class="label_peq_sem_fundo"> | |
| 213 | - <input name="frm_te_base_consulta_folha" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_base_consulta_folha" > | |
| 214 | - </span></td> | |
| 215 | - </tr> | |
| 216 | - <tr> | |
| 217 | - <td> </td> | |
| 218 | - <td> </td> | |
| 219 | - </tr> | |
| 220 | - <tr> | |
| 221 | - <td class="label"><p><br> | |
| 222 | - Atributo para Identificação: <span class="normal style2">(Ex.: "uniqueID"</span><span class="normal style2">)</span></p></td> | |
| 223 | - <td> </td> | |
| 224 | - </tr> | |
| 225 | - <tr> | |
| 226 | - <td><span class="label_peq_sem_fundo"> | |
| 227 | - <input name="frm_te_atributo_identificador" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_identificador" > | |
| 228 | - </span></td> | |
| 229 | - <td> </td> | |
| 230 | - </tr> | |
| 231 | - | |
| 232 | - <tr> | |
| 233 | - <td class="label"><p><br> | |
| 234 | - Atributo para Retorno de Nome Completo: <span class="normal style2">(Ex.: "fullName"</span><span class="normal style2">)</span></p></td> | |
| 235 | - <td class="label"><p><br> | |
| 236 | - Atributo para Retorno de Email: <span class="normal style2">(Ex: "email"</span><span class="normal style2">)</span></p></td> | |
| 237 | - <td> </td> | |
| 238 | - </tr> | |
| 239 | - <tr> | |
| 240 | - <td><span class="label_peq_sem_fundo"> | |
| 241 | - <input name="frm_te_atributo_retorna_nome" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_retorna_nome" > | |
| 242 | - </span></td> | |
| 243 | - <td><span class="label_peq_sem_fundo"> | |
| 244 | - <input name="frm_te_atributo_retorna_email" type="text" size="60" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_atributo_retorna_email" > | |
| 245 | - </span></td> | |
| 246 | - <td> </td> | |
| 247 | - </tr> | |
| 248 | - <tr> | |
| 249 | - <td colspan="3"> </td> | |
| 250 | - </tr> | |
| 251 | - <tr> | |
| 252 | - <td colspan="2" class="label"><div align="left"><br> | |
| 253 | - Observações:</div></td> | |
| 254 | - <td> </td> | |
| 255 | - </tr> | |
| 256 | - <tr> | |
| 257 | - <td colspan="2"><span class="label_peq_sem_fundo"> | |
| 258 | - <input name="frm_te_observacao" type="text" size="100" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" id="frm_te_observacao" > | |
| 259 | - </span></td> | |
| 260 | - <td> </td> | |
| 261 | - </tr> | |
| 262 | - </table> | |
| 263 | - <p align="center"> | |
| 264 | - <input name="submit" type="submit" value=" Gravar Informações " onClick="return Confirma('Confirma Inclusão de Domínio?');"> | |
| 265 | - </p> | |
| 266 | - </form> | |
| 267 | - <p> | |
| 268 | - <? | |
| 269 | - } | |
| 270 | -?> | |
| 271 | -</p> | |
| 272 | -</body> | |
| 273 | -</html> |
admin/dominios/index.php
| ... | ... | @@ -1,216 +0,0 @@ |
| 1 | -<? | |
| 2 | - /* | |
| 3 | - Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
| 4 | - | |
| 5 | - Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
| 6 | - | |
| 7 | - O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
| 8 | - publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opnião) qualquer versão. | |
| 9 | - | |
| 10 | - Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
| 11 | - MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
| 12 | - | |
| 13 | - Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
| 14 | - Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 15 | - */ | |
| 16 | -session_start(); | |
| 17 | -if ($_POST['submit'] && $_SESSION['cs_nivel_administracao']==1) | |
| 18 | - header ("Location: incluir_dominio.php"); | |
| 19 | - | |
| 20 | -include_once "../../include/library.php"; | |
| 21 | -AntiSpy(); | |
| 22 | - | |
| 23 | -Conecta_bd_cacic(); | |
| 24 | -$query = 'SELECT * | |
| 25 | - FROM dominios | |
| 26 | - ORDER BY '; | |
| 27 | - | |
| 28 | -$query .= ($_GET['cs_ordem']<>''?$_GET['cs_ordem']:'nm_dominio'); | |
| 29 | -$result = mysql_query($query); | |
| 30 | -$msg = '<div align="center"> | |
| 31 | - <font color="#c0c0c0" size="1" face="Verdana, Arial, Helvetica, sans-serif"> | |
| 32 | - Clique nas Colunas para Ordenar</font><br><br></div>'; | |
| 33 | -?> | |
| 34 | - | |
| 35 | -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 36 | -<html> | |
| 37 | -<head> | |
| 38 | -<link rel="stylesheet" type="text/css" href="../../include/cacic.css"> | |
| 39 | -<title>Cadastro de Domínio</title> | |
| 40 | -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| 41 | -</head> | |
| 42 | - | |
| 43 | -<body background="../../imgs/linha_v.gif"> | |
| 44 | -<script language="JavaScript" type="text/javascript" src="../../include/cacic.js"></script> | |
| 45 | -<form name="form1" method="post" action=""> | |
| 46 | -<table width="90%" border="0" align="center"> | |
| 47 | - <tr> | |
| 48 | - <td class="cabecalho">Cadastro de Domínio</td> | |
| 49 | - </tr> | |
| 50 | - <tr> | |
| 51 | - <td class="descricao">Neste módulo deverão ser cadastrados | |
| 52 | - todos os domínios utilizados para autenticação de contas para abertura de sessões de suporte remoto seguro.</td> | |
| 53 | - </tr> | |
| 54 | -</table> | |
| 55 | -<br><table border="0" align="center" cellpadding="0" cellspacing="1"> | |
| 56 | - <tr> | |
| 57 | - <td><div align="center"> | |
| 58 | - <? | |
| 59 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 60 | - { | |
| 61 | - ?> | |
| 62 | - <input name="submit" type="submit" id="submit" value="Incluir Informações de Novo Domínio"> | |
| 63 | - <? | |
| 64 | - } | |
| 65 | - ?> | |
| 66 | - </div></td> | |
| 67 | - </tr> | |
| 68 | - <tr> | |
| 69 | - <td height="10"> </td> | |
| 70 | - </tr> | |
| 71 | - <tr> | |
| 72 | - <td height="10"><? echo $msg;?></td> | |
| 73 | - </tr> | |
| 74 | - | |
| 75 | - <tr> | |
| 76 | - <td height="1" bgcolor="#333333"></td> | |
| 77 | - </tr> | |
| 78 | - <tr> | |
| 79 | - <td> <table border="0" cellpadding="2" cellspacing="0" bordercolor="#333333" align="center"> | |
| 80 | - <tr bgcolor="#E1E1E1" nowrap> | |
| 81 | - <td align="center" nowrap> </td> | |
| 82 | - <td align="center" nowrap><div align="left"></div></td> | |
| 83 | - <td align="center" nowrap> </td> | |
| 84 | - <td align="center" nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=nm_dominio">Nome</a></div></td> | |
| 85 | - <td nowrap > </td> | |
| 86 | - <td nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=te_ip_dominio">Endereço IP</a></div></td> | |
| 87 | - <td nowrap > </td> | |
| 88 | - <td nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=nu_versao_protocolo">Protocolo/Versão</div></td> | |
| 89 | - <td nowrap class="cabecalho_tabela"> </td> | |
| 90 | - <td class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=in_ativo">Ativo?</div></td> | |
| 91 | - <td nowrap class="cabecalho_tabela"> </td> | |
| 92 | - </tr> | |
| 93 | - <tr> | |
| 94 | - <td height="1" bgcolor="#333333" colspan="11"></td> | |
| 95 | - </tr> | |
| 96 | - | |
| 97 | -<? | |
| 98 | -if(mysql_num_rows($result)==0) | |
| 99 | - { | |
| 100 | - $msg = '<div align="center"> | |
| 101 | - <font color="red" size="1" face="Verdana, Arial, Helvetica, sans-serif"> | |
| 102 | - Nenhum domínio cadastrado ou sua sessão expirou!</font><br><br></div>'; | |
| 103 | - } | |
| 104 | -else | |
| 105 | - { | |
| 106 | - $Cor = 0; | |
| 107 | - $NumRegistro = 1; | |
| 108 | - | |
| 109 | - while($row = mysql_fetch_array($result)) | |
| 110 | - { | |
| 111 | - ?> | |
| 112 | - <tr | |
| 113 | - <? if ($Cor) | |
| 114 | - echo 'bgcolor="#E1E1E1"'; | |
| 115 | - ?>> | |
| 116 | - <td nowrap> </td> | |
| 117 | - <td nowrap class="opcao_tabela"><div align="left"><? echo $NumRegistro; ?></div></td> | |
| 118 | - <td nowrap> </td> | |
| 119 | - <td nowrap class="opcao_tabela"><div align="left"> | |
| 120 | - <? | |
| 121 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 122 | - { | |
| 123 | - ?> | |
| 124 | - <a href="detalhes_dominio.php?id_dominio=<? echo $row['id_dominio'];?>"> | |
| 125 | - <? | |
| 126 | - } | |
| 127 | - | |
| 128 | - echo $row['nm_dominio']; | |
| 129 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 130 | - { | |
| 131 | - ?> | |
| 132 | - </a> | |
| 133 | - <? | |
| 134 | - } | |
| 135 | - ?> | |
| 136 | - | |
| 137 | - </div></td> | |
| 138 | - <td nowrap> </td> | |
| 139 | - <td nowrap class="opcao_tabela"><div align="left"> | |
| 140 | - | |
| 141 | - <? | |
| 142 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 143 | - { | |
| 144 | - ?> | |
| 145 | - <a href="detalhes_dominio.php?id_dominio=<? echo $row['id_dominio'];?>"> | |
| 146 | - <? | |
| 147 | - } | |
| 148 | - echo $row['te_ip_dominio']; | |
| 149 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 150 | - { | |
| 151 | - ?> | |
| 152 | - </a> | |
| 153 | - <? | |
| 154 | - } | |
| 155 | - ?> | |
| 156 | - </div></td> | |
| 157 | - <td nowrap> </td> | |
| 158 | - <td nowrap class="opcao_tabela"> | |
| 159 | - | |
| 160 | - <div align="center"> | |
| 161 | - <? | |
| 162 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 163 | - { | |
| 164 | - ?> | |
| 165 | - <a href="detalhes_dominio.php?id_dominio=<? echo $row['id_dominio'];?>"> | |
| 166 | - <? | |
| 167 | - } | |
| 168 | - echo $row['id_tipo_protocolo'] . '/'.$row['nu_versao_protocolo']; | |
| 169 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 170 | - { | |
| 171 | - ?> | |
| 172 | - </a> | |
| 173 | - <? | |
| 174 | - } | |
| 175 | - ?> | |
| 176 | - </div></td> | |
| 177 | - <td nowrap class="opcao_tabela"> </td> | |
| 178 | - <td nowrap class="opcao_tabela"><div align="center"><a href="detalhes_dominio.php?id_dominio=<? echo $row['id_dominio'];?>"> | |
| 179 | - <? | |
| 180 | - echo $row['in_ativo']; | |
| 181 | - if ($_SESSION['cs_nivel_administracao']==1) | |
| 182 | - { | |
| 183 | - ?> | |
| 184 | - </a> | |
| 185 | - <? | |
| 186 | - } | |
| 187 | - ?> | |
| 188 | - </div></td> | |
| 189 | - <td nowrap class="opcao_tabela"> </td> | |
| 190 | - <? | |
| 191 | - $Cor=!$Cor; | |
| 192 | - $NumRegistro++; | |
| 193 | - } | |
| 194 | - } | |
| 195 | - ?> | |
| 196 | - </table></td> | |
| 197 | - </tr> | |
| 198 | - <tr> | |
| 199 | - <td height="1" bgcolor="#333333"></td> | |
| 200 | - </tr> | |
| 201 | - <tr> | |
| 202 | - <td height="10"> </td> | |
| 203 | - </tr> | |
| 204 | - <tr> | |
| 205 | - <td height="10"><? echo $msg;?></td> | |
| 206 | - </tr> | |
| 207 | - <tr> | |
| 208 | - <td><div align="center"> | |
| 209 | - <input name="submit" type="submit" id="submit" value="Incluir Informações de Novo Domínio" <? echo ($_SESSION['cs_nivel_administracao']<>1?'disabled':'')?>> | |
| 210 | - </div></td> | |
| 211 | - </tr> | |
| 212 | - </table> | |
| 213 | - </form> | |
| 214 | - <p> </p> | |
| 215 | - </body> | |
| 216 | - </html> |
admin/log_suporte_remoto.php
| ... | ... | @@ -30,16 +30,19 @@ AntiSpy('1,2,3'); // Permitido somente a estes cs_nivel_administracao... |
| 30 | 30 | |
| 31 | 31 | if (!$_REQUEST['date_input1']) |
| 32 | 32 | { |
| 33 | - $from_usuarios = ''; | |
| 33 | + $from_usuarios = ''; | |
| 34 | 34 | $where_usuarios = ''; |
| 35 | + $where_locais = ''; | |
| 35 | 36 | |
| 36 | 37 | if ($_SESSION['cs_nivel_administracao']<>1 && $_SESSION['cs_nivel_administracao']<>2) |
| 37 | 38 | { |
| 38 | 39 | $from_usuarios = ', usuarios b'; |
| 39 | - $where_usuarios = ' AND a.id_usuario = b.id_usuario AND b.id_local = '.$_SESSION['id_local']; | |
| 40 | - if ($_SESSION['te_locais_secundarios']) | |
| 40 | + $where_usuarios = ' a.id_usuario = b.id_usuario '; | |
| 41 | + $where_locais = ' AND c.id_local = '.$_SESSION['id_local']; | |
| 42 | + if (trim($_SESSION['te_locais_secundarios'])<>'') | |
| 41 | 43 | { |
| 42 | - $whereLocais = 'WHERE id_local = '.$_SESSION['id_local'].' OR id_local IN ('.$_SESSION['te_locais_secundarios'].') '; | |
| 44 | + $where_locais = str_replace(' AND c.id_local',' AND (c.id_local',$where_locais); | |
| 45 | + $where_locais .= ' OR c.id_local IN ('.$_SESSION['te_locais_secundarios'].')) '; | |
| 43 | 46 | } |
| 44 | 47 | } |
| 45 | 48 | |
| ... | ... | @@ -50,6 +53,7 @@ if (!$_REQUEST['date_input1']) |
| 50 | 53 | $from_usuarios .' |
| 51 | 54 | WHERE '. |
| 52 | 55 | $where_usuarios; |
| 56 | + | |
| 53 | 57 | $result_minmax = mysql_query($query_minmax); |
| 54 | 58 | $row_minmax = mysql_fetch_array($result_minmax); |
| 55 | 59 | $date_input1 = date('d/m/Y'); |
| ... | ... | @@ -103,7 +107,7 @@ require_once('../include/selecao_listbox.js'); |
| 103 | 107 | </tr> |
| 104 | 108 | <tr valign="middle"> |
| 105 | 109 | <td width="33%" height="1" nowrap valign="middle"> |
| 106 | - <input name="whereLocais" type="hidden" value="<? echo $whereLocais;?>"> | |
| 110 | + <input name="where_locais" type="hidden" value="<? echo $where_locais;?>"> | |
| 107 | 111 | <input name="date_input1" type="text" size="10" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" value="<? echo $date_input1;?>"> |
| 108 | 112 | <? /* |
| 109 | 113 | <script type="text/javascript" language="JavaScript"> |
| ... | ... | @@ -162,60 +166,63 @@ require_once('../include/selecao_listbox.js'); |
| 162 | 166 | $OrderBy = ($_GET['OrderBy']<>''?$_GET['OrderBy']:'1'); |
| 163 | 167 | $OrderBy = ($OrderBy=='1'?$OrderBy . ' DESC ':$OrderBy); |
| 164 | 168 | |
| 165 | - $where_usuarios = ''; | |
| 169 | + //$where_usuarios = ''; | |
| 170 | + $itens_locais = ''; | |
| 171 | + for ($i =0; $i < count($_POST['list12']);$i++) | |
| 172 | + { | |
| 173 | + if ($itens_locais) | |
| 174 | + $itens_locais .= ','; | |
| 175 | + $itens_locais .= $_POST['list12'][$i]; | |
| 176 | + } | |
| 177 | + //$where_usuarios = ' AND b.id_local IN ('.$itens_locais.')'; | |
| 178 | + if (count($_POST['list12'])==0) | |
| 179 | + $msg = '<div align="center"> | |
| 180 | + <font color="red" size="1" face="Verdana, Arial, Helvetica, sans-serif"> | |
| 181 | + Nenhum suporte remoto realizado no <u>período informado</u> ou nenhum <u>local selecionado</>.</font><br><br></div>'; | |
| 166 | 182 | |
| 167 | - if ($_SESSION['cs_nivel_administracao']<>1 && $_SESSION['cs_nivel_administracao']<>2) | |
| 168 | - { | |
| 169 | - $where_usuarios = ' AND b.id_local = '.$_SESSION['id_local']; | |
| 170 | - } | |
| 171 | - else | |
| 172 | - { | |
| 173 | - $itens_locais = ''; | |
| 174 | - for ($i =0; $i < count($_POST['list12']);$i++) | |
| 175 | - { | |
| 176 | - if ($itens_locais) | |
| 177 | - $itens_locais .= ','; | |
| 178 | - $itens_locais .= $_POST['list12'][$i]; | |
| 179 | - } | |
| 180 | - $where_usuarios = ' AND b.id_local IN ('.$itens_locais.')'; | |
| 181 | - if (count($_POST['list12'])==0) | |
| 182 | - $msg = '<div align="center"> | |
| 183 | - <font color="red" size="1" face="Verdana, Arial, Helvetica, sans-serif"> | |
| 184 | - Nenhum suporte remoto realizado no <u>período informado</u> ou nenhum <u>local selecionado</u>.</font><br><br></div>'; | |
| 185 | - | |
| 186 | - } | |
| 183 | + $where_locais = ' AND c.id_local = '.$_SESSION['id_local']; | |
| 184 | + if ($itens_locais <> '') | |
| 185 | + { | |
| 186 | + $where_locais = str_replace(' AND c.id_local',' AND (c.id_local',$where_locais); | |
| 187 | + $where_locais .= ' OR c.id_local IN ('.$itens_locais.')) '; | |
| 188 | + } | |
| 187 | 189 | |
| 188 | 190 | conecta_bd_cacic(); |
| 189 | 191 | $query = 'SELECT DATE_FORMAT(a.dt_hr_ultimo_contato, "%y-%m-%d %H:%i") as dt_hr_ultimo_contato, |
| 190 | 192 | DATE_FORMAT(a.dt_hr_conexao, "%y-%m-%d %H:%i") as dt_hr_conexao, |
| 193 | + a.te_documento_referencial, | |
| 191 | 194 | a.te_motivo_conexao, |
| 192 | 195 | DATE_FORMAT(aa.dt_hr_inicio_sessao, "%y-%m-%d %H:%i") as dt_hr_inicio_sessao, |
| 193 | - aa.nm_nome_completo_visitado, | |
| 196 | + aa.nm_completo_usuario_visitado, | |
| 194 | 197 | d.te_ip te_ip_visitado, |
| 195 | 198 | d.te_nome_computador te_nome_computador_visitado, |
| 196 | - dd.te_ip te_ip_visitante, | |
| 197 | - dd.te_nome_computador te_nome_computador_visitante, | |
| 198 | 199 | b.nm_usuario_completo, |
| 199 | 200 | b.nm_usuario_acesso, |
| 200 | 201 | b.id_usuario, |
| 201 | - c.sg_local | |
| 202 | + c.sg_local, | |
| 203 | + e.sg_so | |
| 202 | 204 | FROM srcacic_sessoes_logs a, |
| 203 | 205 | srcacic_sessoes aa, |
| 204 | 206 | usuarios b, |
| 205 | 207 | locais c, |
| 206 | 208 | computadores d, |
| 207 | - computadores dd | |
| 209 | + so e | |
| 208 | 210 | WHERE aa.id_sessao = a.id_sessao AND |
| 209 | 211 | a.id_usuario_visitante = b.id_usuario AND |
| 210 | - b.id_local = c.id_local AND | |
| 212 | + b.id_local = c.id_local AND | |
| 211 | 213 | a.dt_hr_ultimo_contato between "' . substr($_REQUEST['date_input1'],-4)."-".substr($_REQUEST['date_input1'],3,2)."-".substr($_REQUEST['date_input1'],0,2).' 00:00" AND "' . substr($_REQUEST['date_input2'],-4)."-".substr($_REQUEST['date_input2'],3,2)."-".substr($_REQUEST['date_input2'],0,2). ' 23:59" '. |
| 212 | 214 | $where . |
| 213 | - $where_usuarios . ' AND | |
| 215 | + $where_locais . ' AND | |
| 214 | 216 | d.te_node_address = aa.te_node_address_visitado AND |
| 215 | 217 | d.id_so = aa.id_so_visitado AND |
| 216 | - dd.te_node_address = a.te_node_address_visitante AND | |
| 217 | - dd.id_so = a.id_so_visitante | |
| 218 | + e.id_so = a.id_so_visitante | |
| 218 | 219 | ORDER BY '.$OrderBy; |
| 220 | +/* | |
| 221 | +... SELECT ... dd.te_nome_computador te_nome_computador_visitante,a.te_ip te_ip_visitante, | |
| 222 | +... FROM ... computadores dd | |
| 223 | +... WHERE ... dd.te_node_address = a.te_node_address_visitante AND | |
| 224 | + dd.id_so = a.id_so_visitante | |
| 225 | +*/ | |
| 219 | 226 | //echo $query . '<br>'; |
| 220 | 227 | $result = mysql_query($query); |
| 221 | 228 | $NumRegistro = mysql_num_rows($result); |
| ... | ... | @@ -240,9 +247,9 @@ require_once('../include/selecao_listbox.js'); |
| 240 | 247 | <td colspan="3"></td> |
| 241 | 248 | <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=1&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('Início de Sessão');?></a></div></td> |
| 242 | 249 | <td></td> |
| 243 | - <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=2&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('Estação Origem');?></a></div></td> | |
| 250 | + <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=3&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('Usuario Tecnico');?></a></div></td> | |
| 244 | 251 | <td></td> |
| 245 | - <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=3&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('Usuário Origem');?></a></div></td> | |
| 252 | + <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=3&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('S.O. do Tecnico');?></a></div></td> | |
| 246 | 253 | <td></td> |
| 247 | 254 | <td nowrap class="cabecalho_tabela"><div align="left"><a href="log_suporte_remoto.php?OrderBy=4&date_input1=<? echo $date_input1;?>&date_input2=<? echo $date_input2;?>"><?=$oTranslator->_('Estação Destino');?></a></div></td> |
| 248 | 255 | <td></td> |
| ... | ... | @@ -276,13 +283,13 @@ require_once('../include/selecao_listbox.js'); |
| 276 | 283 | <td nowrap></td> |
| 277 | 284 | <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $day_inicio_sessao.'/'.$month_inicio_sessao.'/'.$year_inicio_sessao. ' '. substr($hour_inicio_sessao,0,5);?>h</td> |
| 278 | 285 | <td nowrap></td> |
| 279 | - <td nowrap class="opcao_tabela_destaque" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['te_ip_visitante'].'/'.$row['te_nome_computador_visitante'];?></td> | |
| 280 | - <td nowrap></td> | |
| 281 | 286 | <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['nm_usuario_acesso'].'/'.$row['nm_usuario_completo'];?></td> |
| 282 | 287 | <td nowrap></td> |
| 288 | + <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['sg_so'];?></td> | |
| 289 | + <td nowrap></td> | |
| 283 | 290 | <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['te_ip_visitado'].'/'.$row['te_nome_computador_visitado'].' - '.$row['sg_local'];?></td> |
| 284 | 291 | <td nowrap></td> |
| 285 | - <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['nm_nome_completo_visitado'];?></td> | |
| 292 | + <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $row['nm_completo_usuario_visitado'];?></td> | |
| 286 | 293 | <td nowrap></td> |
| 287 | 294 | <td nowrap class="opcao_tabela" title="<? echo $row['te_motivo_conexao'];?>"><? echo $day_conexao.'/'.$month_conexao.'/'.$year_conexao. ' '. substr($hour_conexao,0,5) . 'h - '.$day_ultimo_contato.'/'.$month_ultimo_contato.'/'.$year_ultimo_contato. ' '. substr($hour_ultimo_contato,0,5);?>h</td> |
| 288 | 295 | <td nowrap></td> | ... | ... |
admin/redes/detalhes_rede.php
| ... | ... | @@ -96,7 +96,7 @@ elseif ($_POST['GravaAlteracoes']) |
| 96 | 96 | nm_usuario_login_serv_updates = '".$_POST['frm_nm_usuario_login_serv_updates']."', |
| 97 | 97 | nu_porta_serv_updates = '".$_POST['frm_nu_porta_serv_updates']."', |
| 98 | 98 | nm_usuario_login_serv_updates_gerente = '".$_POST['frm_nm_usuario_login_serv_updates_gerente']."', |
| 99 | - id_dominio = '".$_POST['frm_id_dominio']."', | |
| 99 | + id_servidor_autenticacao = '".$_POST['frm_id_servidor_autenticacao']."', | |
| 100 | 100 | id_local = ".$_POST['frm_id_local']. |
| 101 | 101 | $senhas . " |
| 102 | 102 | WHERE trim(id_ip_rede) = '".trim($_REQUEST['id_ip_rede'])."' AND |
| ... | ... | @@ -312,7 +312,7 @@ $pos = substr_count($_SERVER['HTTP_REFERER'],'navegacao'); |
| 312 | 312 | <td> </td> |
| 313 | 313 | <td class="label"><br>Local:</td> |
| 314 | 314 | <td class="label" colspan="2"><br> |
| 315 | - Domínio:</td> | |
| 315 | + Servidor para Autenticação:</td> | |
| 316 | 316 | </tr> |
| 317 | 317 | <tr> |
| 318 | 318 | <td colspan="4" height="1" bgcolor="#333333"></td> |
| ... | ... | @@ -359,19 +359,19 @@ $pos = substr_count($_SERVER['HTTP_REFERER'],'navegacao'); |
| 359 | 359 | ?> |
| 360 | 360 | <input name="id_local_anterior" type="hidden" id="id_local_anterior" value="<? echo $id_local_anterior; ?>"> |
| 361 | 361 | <input name="id_local" type="hidden" id="id_local" value="<? echo $_GET['id_local']; ?>"> </td> |
| 362 | - <td nowrap><select name="frm_id_dominio" id="frm_id_dominio" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
| 362 | + <td nowrap><select name="frm_id_servidor_autenticacao" id="frm_id_servidor_autenticacao" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
| 363 | 363 | <option value="" selected></option> |
| 364 | 364 | <? |
| 365 | 365 | |
| 366 | - $qry_dominio = "SELECT id_dominio, | |
| 367 | - nm_dominio | |
| 368 | - FROM dominios | |
| 369 | - ORDER BY nm_dominio"; | |
| 366 | + $qry_servidor_autenticacao = "SELECT id_servidor_autenticacao, | |
| 367 | + nm_servidor_autenticacao | |
| 368 | + FROM servidores_autenticacao | |
| 369 | + ORDER BY nm_servidor_autenticacao"; | |
| 370 | 370 | |
| 371 | - $result_dominio = mysql_query($qry_dominio) or die ('Falha na consulta à tabela Dominios ou sua sessão expirou!'); | |
| 371 | + $result_servidor_autenticacao = mysql_query($qry_servidor_autenticacao) or die ('Falha na consulta à tabela Servidores de Autenticação ou sua sessão expirou!'); | |
| 372 | 372 | |
| 373 | - while($row = mysql_fetch_array($result_dominio)) | |
| 374 | - echo '<option value="'.$row['id_dominio'].'" '.(mysql_result($result, 0, 'id_dominio')==$row['id_dominio']?'selected':'').'>'.$row['nm_dominio'].'</option>'; | |
| 373 | + while($row = mysql_fetch_array($result_servidor_autenticacao)) | |
| 374 | + echo '<option value="'.$row['id_servidor_autenticacao'].'" '.(mysql_result($result, 0, 'id_servidor_autenticacao')==$row['id_servidor_autenticacao']?'selected':'').'>'.$row['nm_servidor_autenticacao'].'</option>'; | |
| 375 | 375 | |
| 376 | 376 | ?> |
| 377 | 377 | </select></td> | ... | ... |
admin/redes/incluir_rede.php
| ... | ... | @@ -69,7 +69,7 @@ if($_REQUEST['submit']) |
| 69 | 69 | nm_usuario_login_serv_updates_gerente, |
| 70 | 70 | te_senha_login_serv_updates_gerente, |
| 71 | 71 | nu_porta_serv_updates, |
| 72 | - id_dominio, | |
| 72 | + id_servidor_autenticacao, | |
| 73 | 73 | id_local) |
| 74 | 74 | VALUES ('$frm_id_ip_rede', |
| 75 | 75 | '$frm_te_mascara_rede', |
| ... | ... | @@ -90,7 +90,7 @@ if($_REQUEST['submit']) |
| 90 | 90 | '$frm_nm_usuario_login_serv_updates_gerente', |
| 91 | 91 | '$frm_te_senha_login_serv_updates_gerente', |
| 92 | 92 | '$frm_nu_porta_serv_updates', |
| 93 | - '$frm_id_dominio', | |
| 93 | + '$frm_id_servidor_autenticacao', | |
| 94 | 94 | '$frm_id_local')"; |
| 95 | 95 | |
| 96 | 96 | $result = mysql_query($query) or die ('Insert falhou ou sua sessão expirou!'); |
| ... | ... | @@ -232,14 +232,14 @@ function valida_form(frmForm) |
| 232 | 232 | document.form.frm_id_ip_rede.focus(); |
| 233 | 233 | return false; |
| 234 | 234 | } |
| 235 | - else if ( document.form.frm_te_mascara_rede.value == "" ) | |
| 235 | + */ | |
| 236 | + if ( document.form.frm_te_mascara_rede.value == "" ) | |
| 236 | 237 | { |
| 237 | 238 | alert("A máscara de rede é obrigatória.\nPor favor, informe-a, usando o formato X.X.X.0\nExemplo: 255.255.255.0"); |
| 238 | 239 | document.form.frm_te_mascara_rede.focus(); |
| 239 | 240 | return false; |
| 240 | - } | |
| 241 | - */ | |
| 242 | - if ( document.form.frm_nm_rede.value == "" ) | |
| 241 | + } | |
| 242 | + else if ( document.form.frm_nm_rede.value == "" ) | |
| 243 | 243 | { |
| 244 | 244 | alert("O nome da rede é obrigatório. Por favor, informe-o."); |
| 245 | 245 | document.form.frm_nm_rede.focus(); |
| ... | ... | @@ -326,7 +326,7 @@ MM_reloadPage(true); |
| 326 | 326 | <tr> |
| 327 | 327 | <td> </td> |
| 328 | 328 | <td class="label"><br>Local:</td> |
| 329 | - <td class="label" colspan="2"><br>Domínio:</td> | |
| 329 | + <td class="label" colspan="2"><br>Servidor para Autenticação:</td> | |
| 330 | 330 | </tr> |
| 331 | 331 | <tr> |
| 332 | 332 | <td colspan="4" height="1" bgcolor="#333333"></td> |
| ... | ... | @@ -365,19 +365,19 @@ MM_reloadPage(true); |
| 365 | 365 | //if ($_SESSION['cs_nivel_administracao']<>1) |
| 366 | 366 | // echo '<input name="frm_id_local" id="frm_id_local" type="hidden" value="'.$_SESSION['id_local'].'">'; |
| 367 | 367 | ?> </td> |
| 368 | - <td nowrap><select name="frm_id_dominio" id="frm_id_dominio" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
| 368 | + <td nowrap><select name="frm_id_servidor_autenticacao" id="frm_id_servidor_autenticacao" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | |
| 369 | 369 | <option value="" selected></option> |
| 370 | 370 | <? |
| 371 | 371 | |
| 372 | - $qry_dominio = "SELECT id_dominio, | |
| 373 | - nm_dominio | |
| 374 | - FROM dominios | |
| 375 | - ORDER BY nm_dominio"; | |
| 372 | + $qry_servidor_autenticacao = "SELECT id_servidor_autenticacao, | |
| 373 | + nm_servidor_autenticacao | |
| 374 | + FROM servidores_autenticacao | |
| 375 | + ORDER BY nm_servidor_autenticacao"; | |
| 376 | 376 | |
| 377 | - $result_dominio = mysql_query($qry_dominio) or die ('Falha na consulta à tabela Dominios ou sua sessão expirou!'); | |
| 377 | + $result_servidor_autenticacao = mysql_query($qry_servidor_autenticacao) or die ('Falha na consulta à tabela Servidores de Autenticação ou sua sessão expirou!'); | |
| 378 | 378 | |
| 379 | - while($row = mysql_fetch_array($result_dominio)) | |
| 380 | - echo '<option value="'.$row['id_dominio'].'" '.($row_usuario['id_dominio']==$row['id_dominio']?'selected':'').'>'.$row['nm_dominio'].'</option>'; | |
| 379 | + while($row = mysql_fetch_array($result_servidor_autenticacao)) | |
| 380 | + echo '<option value="'.$row['id_servidor_autenticacao'].'">'.$row['nm_servidor_autenticacao'].'</option>'; | |
| 381 | 381 | |
| 382 | 382 | ?> |
| 383 | 383 | </select></td> |
| ... | ... | @@ -411,7 +411,7 @@ MM_reloadPage(true); |
| 411 | 411 | </tr> |
| 412 | 412 | <tr> |
| 413 | 413 | <td> </td> |
| 414 | - <td nowrap><input name="frm_nm_rede" type="text" id="frm_nm_rede2" size="50" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></td> | |
| 414 | + <td nowrap><input name="frm_nm_rede" type="text" id="frm_nm_rede" size="50" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></td> | |
| 415 | 415 | <td> </td> |
| 416 | 416 | <td> </td> |
| 417 | 417 | </tr> | ... | ... |
admin/redes/index.php
| ... | ... | @@ -34,24 +34,24 @@ AntiSpy('1,2,3'); // Permitido somente a estes cs_nivel_administracao... |
| 34 | 34 | // 2 - Gestão Central |
| 35 | 35 | // 3 - Supervisão |
| 36 | 36 | |
| 37 | -Conecta_bd_cacic(); | |
| 38 | - | |
| 39 | -// Obtem quantidade de máquinas por rede | |
| 40 | -function getNetPCs($p_id_ip_rede) { | |
| 41 | - $qry_net_pc = "SELECT computadores.id_ip_rede, | |
| 42 | - count(te_node_address) AS quantidade_pc | |
| 43 | - FROM computadores | |
| 44 | - LEFT JOIN redes ON (computadores.id_ip_rede = redes.id_ip_rede AND computadores.te_mascara = redes.te_mascara_rede) | |
| 45 | - WHERE computadores.id_ip_rede='".$p_id_ip_rede."' | |
| 46 | - GROUP BY id_ip_rede | |
| 47 | - ORDER BY computadores.id_ip_rede;"; | |
| 48 | - $result_net_pc = mysql_query($qry_net_pc); | |
| 49 | - $row = mysql_fetch_array($result_net_pc); | |
| 50 | - | |
| 51 | - return ($row['quantidade_pc']); | |
| 52 | -} | |
| 53 | - | |
| 54 | -$total_geral_pc = 0; | |
| 37 | +Conecta_bd_cacic(); | |
| 38 | + | |
| 39 | +// Obtem quantidade de máquinas por rede | |
| 40 | +function getNetPCs($p_id_ip_rede) { | |
| 41 | + $qry_net_pc = "SELECT computadores.id_ip_rede, | |
| 42 | + count(te_node_address) AS quantidade_pc | |
| 43 | + FROM computadores | |
| 44 | + LEFT JOIN redes ON (computadores.id_ip_rede = redes.id_ip_rede AND computadores.te_mascara = redes.te_mascara_rede) | |
| 45 | + WHERE computadores.id_ip_rede='".$p_id_ip_rede."' | |
| 46 | + GROUP BY id_ip_rede | |
| 47 | + ORDER BY computadores.id_ip_rede;"; | |
| 48 | + $result_net_pc = mysql_query($qry_net_pc); | |
| 49 | + $row = mysql_fetch_array($result_net_pc); | |
| 50 | + | |
| 51 | + return ($row['quantidade_pc']); | |
| 52 | +} | |
| 53 | + | |
| 54 | +$total_geral_pc = 0; | |
| 55 | 55 | |
| 56 | 56 | $where = ($_SESSION['cs_nivel_administracao']==1||$_SESSION['cs_nivel_administracao']==2? |
| 57 | 57 | ' LEFT JOIN locais ON (locais.id_local = redes.id_local)': |
| ... | ... | @@ -67,7 +67,7 @@ if ($_SESSION['te_locais_secundarios']<>'' && $where <> '') |
| 67 | 67 | $ordem = ($_GET['cs_ordem']<>''?$_GET['cs_ordem']:'sg_local,nm_rede'); |
| 68 | 68 | |
| 69 | 69 | $query = 'SELECT * |
| 70 | - FROM redes LEFT JOIN dominios ON redes.id_dominio = dominios.id_dominio '. | |
| 70 | + FROM redes LEFT JOIN servidores_autenticacao ON redes.id_servidor_autenticacao = servidores_autenticacao.id_servidor_autenticacao '. | |
| 71 | 71 | $where .' |
| 72 | 72 | ORDER BY '.$ordem; |
| 73 | 73 | |
| ... | ... | @@ -119,7 +119,7 @@ $msg = '<div align="center"> |
| 119 | 119 | <td> <table border="0" cellpadding="2" cellspacing="0" bordercolor="#333333" align="center"> |
| 120 | 120 | <tr> |
| 121 | 121 | <th colspan="10" align="left"><?=$oTranslator->_('Redes cadastradas');?></th> |
| 122 | - </tr> | |
| 122 | + </tr> | |
| 123 | 123 | <tr bgcolor="#E1E1E1"> |
| 124 | 124 | <td align="center" nowrap> </td> |
| 125 | 125 | <td align="center" nowrap> </td> |
| ... | ... | @@ -128,7 +128,7 @@ $msg = '<div align="center"> |
| 128 | 128 | <td nowrap > </td> |
| 129 | 129 | <td nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=nm_rede"><?=$oTranslator->_('Subrede');?></a></div></td> |
| 130 | 130 | <td nowrap > </td> |
| 131 | - <td nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=nm_dominio">Domínio</a></div></td> | |
| 131 | + <td nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=nm_servidor_autenticacao">Servidor de Autenticação</a></div></td> | |
| 132 | 132 | <td nowrap > </td> |
| 133 | 133 | <td align="center" nowrap class="cabecalho_tabela"><div align="left"><a href="index.php?cs_ordem=sg_local,nm_rede"><?=$oTranslator->_('Local');?></a></div></td> |
| 134 | 134 | <td nowrap class="cabecalho_tabela"><div align="center"><?=$oTranslator->_('Total de Maquinas');?></div></td> |
| ... | ... | @@ -160,22 +160,22 @@ else |
| 160 | 160 | <td nowrap> </td> |
| 161 | 161 | <td nowrap class="opcao_tabela"><div align="left"><a href="detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&id_local=<? echo $row['id_local'];?>"><? echo $row['nm_rede']; ?></a></div></td> |
| 162 | 162 | <td nowrap> </td> |
| 163 | - <td nowrap><a href="detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&id_local=<? echo $row['id_local'];?>"><? echo $row['nm_dominio']; ?></a></td> | |
| 163 | + <td nowrap><a href="detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&id_local=<? echo $row['id_local'];?>"><? echo $row['nm_servidor_autenticacao']; ?></a></td> | |
| 164 | 164 | <td nowrap> </td> |
| 165 | 165 | <td nowrap class="opcao_tabela"><div align="left"><a href="detalhes_rede.php?id_ip_rede=<? echo $row['id_ip_rede'];?>&id_local=<? echo $row['id_local'];?>"><? echo $row['sg_local']; ?></a></div></td> |
| 166 | - <td nowrap align="right"> | |
| 167 | - <a href="../../relatorios/navegacao.php" title="<?=$oTranslator->_('Navegar nas redes detectadas pelos agentes nas estacoes');?>"> | |
| 168 | - <?php $total_ip_rede = getNetPCs($row['id_ip_rede']); $total_geral_pc += $total_ip_rede; echo $total_ip_rede;?> | |
| 169 | - </a> | |
| 170 | - </td> | |
| 166 | + <td nowrap align="right"> | |
| 167 | + <a href="../../relatorios/navegacao.php" title="<?=$oTranslator->_('Navegar nas redes detectadas pelos agentes nas estacoes');?>"> | |
| 168 | + <?php $total_ip_rede = getNetPCs($row['id_ip_rede']); $total_geral_pc += $total_ip_rede; echo $total_ip_rede;?> | |
| 169 | + </a> | |
| 170 | + </td> | |
| 171 | 171 | </tr> |
| 172 | 172 | <? |
| 173 | 173 | $Cor=!$Cor; |
| 174 | 174 | $NumRegistro++; |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | - ?> | |
| 178 | - | |
| 177 | + ?> | |
| 178 | + | |
| 179 | 179 | </table></td> |
| 180 | 180 | </tr> |
| 181 | 181 | <tr> | ... | ... |
admin/usuarios/detalhes_usuario.php
| ... | ... | @@ -51,8 +51,7 @@ elseif ($_POST['GravaAlteracoes']) |
| 51 | 51 | nm_usuario_completo = '".$_POST['frm_nm_usuario_completo'] ."', |
| 52 | 52 | id_grupo_usuarios = '".$_POST['frm_id_grupo_usuarios'] ."', |
| 53 | 53 | id_local = ".$_POST['frm_id_local'] .", |
| 54 | - id_dominio = ".$_POST['frm_id_dominio'] .", | |
| 55 | - te_emails_contato = '".$_POST['frm_te_emails_contato'] ."', | |
| 54 | + te_emails_contato = '".$_POST['frm_te_emails_contato'] ."', | |
| 56 | 55 | te_telefones_contato = '".$_POST['frm_te_telefones_contato'] ."', |
| 57 | 56 | te_locais_secundarios = '".$v_te_locais_secundarios ."' |
| 58 | 57 | WHERE id_usuario = ". $_POST['frm_id_usuario']; |
| ... | ... | @@ -80,7 +79,6 @@ else |
| 80 | 79 | a.nm_usuario_completo, |
| 81 | 80 | a.id_grupo_usuarios, |
| 82 | 81 | a.id_local, |
| 83 | - a.id_dominio, | |
| 84 | 82 | a.te_emails_contato, |
| 85 | 83 | a.te_telefones_contato, |
| 86 | 84 | loc.sg_local, |
| ... | ... | @@ -300,6 +298,7 @@ else |
| 300 | 298 | <td class="label"> </td> |
| 301 | 299 | <td> </td> |
| 302 | 300 | </tr> |
| 301 | +<? /* | |
| 303 | 302 | <tr nowrap> |
| 304 | 303 | <td nowrap class="label">Domínio:</td> |
| 305 | 304 | <td nowrap><select name="frm_id_dominio" id="frm_id_dominio" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > |
| ... | ... | @@ -324,6 +323,7 @@ else |
| 324 | 323 | <td class="label"> </td> |
| 325 | 324 | <td> </td> |
| 326 | 325 | </tr> |
| 326 | + */ ?> | |
| 327 | 327 | <tr> |
| 328 | 328 | <td class="label"><?=$oTranslator->_('Identificacao');?>:</td> |
| 329 | 329 | <td><input name="frm_nm_usuario_acesso" readonly="" type="text" id="frm_nm_usuario_acesso" value="<? echo mysql_result($result, 0, 'nm_usuario_acesso'); ?>" size="50" maxlength="100" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" ></td> | ... | ... |
admin/usuarios/incluir_usuario.php
| ... | ... | @@ -48,7 +48,6 @@ if($_POST['submit']) |
| 48 | 48 | dt_log_in, |
| 49 | 49 | id_grupo_usuarios, |
| 50 | 50 | id_local, |
| 51 | - id_dominio, | |
| 52 | 51 | te_emails_contato, |
| 53 | 52 | te_telefones_contato, |
| 54 | 53 | te_locais_secundarios) |
| ... | ... | @@ -58,7 +57,6 @@ if($_POST['submit']) |
| 58 | 57 | now(), |
| 59 | 58 | '".$_POST['frm_id_grupo_usuarios']."', |
| 60 | 59 | '".$_POST['frm_id_local']."', |
| 61 | - '".$_POST['frm_id_dominio']."', | |
| 62 | 60 | '".$_POST['frm_te_emails_contato']."', |
| 63 | 61 | '".$_POST['frm_te_telefones_contato']."', |
| 64 | 62 | '".$_POST['frm_te_locais_secundarios']."')"; |
| ... | ... | @@ -266,6 +264,7 @@ else |
| 266 | 264 | <td class="label"> </td> |
| 267 | 265 | <td> </td> |
| 268 | 266 | </tr> |
| 267 | +<? /* | |
| 269 | 268 | <tr nowrap> |
| 270 | 269 | <td nowrap class="label">Domínio:</td> |
| 271 | 270 | <td nowrap><select name="frm_id_dominio" id="frm_id_dominio" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > |
| ... | ... | @@ -289,6 +288,7 @@ else |
| 289 | 288 | <td class="label"> </td> |
| 290 | 289 | <td> </td> |
| 291 | 290 | </tr> |
| 291 | +*/ ?> | |
| 292 | 292 | <tr> |
| 293 | 293 | <td class="label"><?=$oTranslator->_('Identificacao');?>:</td> |
| 294 | 294 | <td> <input name="frm_nm_usuario_acesso" type="text" id="frm_nm_usuario_acesso" size="15" maxlength="15" class="normal" onFocus="SetaClassDigitacao(this);" onBlur="SetaClassNormal(this);" > | ... | ... |
include/library.php
| ... | ... | @@ -279,24 +279,19 @@ function DeCrypt($p_CipherKey, $p_IV, $p_CriptedData, $p_cs_Cipher, $p_cs_UnComp |
| 279 | 279 | { |
| 280 | 280 | $p_CipherKey .= $p_PaddingKey; |
| 281 | 281 | |
| 282 | - /*GravaTESTES('Em DeCrypt: p_CipherKey = "'.$p_CipherKey.'"'); | |
| 283 | - GravaTESTES('Em DeCrypt: p_IV = "'.$p_IV.'"'); | |
| 284 | - GravaTESTES('Em DeCrypt: p_CriptedData = "'.$p_CriptedData.'"'); | |
| 285 | - GravaTESTES('Em DeCrypt: p_cs_Cipher = "'.$p_cs_Cipher.'"'); | |
| 286 | - */ | |
| 287 | 282 | // Bloco de Substituições para antes da Decriptação |
| 288 | 283 | // ------------------------------------------------ |
| 289 | 284 | // Razão: Dependendo da configuração do servidor, os valores |
| 290 | 285 | // enviados, pertinentes à criptografia, tendem a ser interpretados incorretamente. |
| 291 | 286 | // Obs.: Vide Lista de Convenções Abaixo |
| 292 | 287 | // ======================================================================================= |
| 293 | - $_p_CriptedData = str_ireplace('<MAIS>','+',$p_CriptedData,$countMAIS); | |
| 288 | + $pp_CriptedData = str_ireplace('<MAIS>','+',$p_CriptedData,$countMAIS); | |
| 294 | 289 | // ======================================================================================= |
| 295 | 290 | |
| 296 | 291 | if ($p_cs_Cipher=='1') |
| 297 | - $v_result = (trim($_p_CriptedData)<>''?@mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$p_CipherKey,base64_decode($_p_CriptedData),MCRYPT_MODE_CBC,$p_IV):''); | |
| 292 | + $v_result = (trim($pp_CriptedData)<>''?@mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$p_CipherKey,base64_decode($pp_CriptedData),MCRYPT_MODE_CBC,$p_IV):''); | |
| 298 | 293 | else |
| 299 | - $v_result = $_p_CriptedData; | |
| 294 | + $v_result = $p_CriptedData; | |
| 300 | 295 | |
| 301 | 296 | // Bloco de Substituições para depois da Decriptação |
| 302 | 297 | // ------------------------------------------------- |
| ... | ... | @@ -329,8 +324,10 @@ function DeCrypt($p_CipherKey, $p_IV, $p_CriptedData, $p_cs_Cipher, $p_cs_UnComp |
| 329 | 324 | $re = "/".$char."*$/"; |
| 330 | 325 | $v_result = preg_replace($re, "", $v_result); |
| 331 | 326 | } |
| 332 | - //GravaTESTES('Em DeCrypt: v_result = "'.$v_result.'"'); | |
| 333 | - | |
| 327 | + /* | |
| 328 | + GravaTESTES('Em DeCrypt: p_CriptedData = "'.$p_CriptedData.'"'); | |
| 329 | + GravaTESTES('Em DeCrypt: v_result = "'.$v_result.'"'); | |
| 330 | + */ | |
| 334 | 331 | return trim($v_result); |
| 335 | 332 | } |
| 336 | 333 | |
| ... | ... | @@ -540,7 +537,7 @@ function conecta_bd_cacic() |
| 540 | 537 | // Função para obtenção de dados da subrede de acesso, em função do IP e Máscara. |
| 541 | 538 | // Function to retrieve access subnet data, based on IP/Mask address. |
| 542 | 539 | // ------------------------------------------------------------------------------ |
| 543 | -function GetDadosRede($strTeIP = '') | |
| 540 | +function getDadosRede($strTeIP = '') | |
| 544 | 541 | { |
| 545 | 542 | conecta_bd_cacic(); |
| 546 | 543 | |
| ... | ... | @@ -589,6 +586,7 @@ function GetDadosRede($strTeIP = '') |
| 589 | 586 | te_senha_login_serv_updates, |
| 590 | 587 | id_ip_rede, |
| 591 | 588 | redes.id_local, |
| 589 | + cs_permitir_desativar_srcacic, | |
| 592 | 590 | sg_local, |
| 593 | 591 | nm_local |
| 594 | 592 | FROM redes, |
| ... | ... | @@ -610,6 +608,7 @@ function GetDadosRede($strTeIP = '') |
| 610 | 608 | redes.te_senha_login_serv_updates, |
| 611 | 609 | redes.te_serv_cacic, |
| 612 | 610 | redes.id_local, |
| 611 | + redes.cs_permitir_desativar_srcacic, | |
| 613 | 612 | "Alternative" |
| 614 | 613 | FROM redes, |
| 615 | 614 | configuracoes_locais conf |
| ... | ... | @@ -857,19 +856,16 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 857 | 856 | if (substr_count($v_te_ip,'zf')>0 || trim($v_te_ip)=='') |
| 858 | 857 | $v_te_ip = $_SERVER['REMOTE_ADDR']; |
| 859 | 858 | |
| 860 | - /* | |
| 861 | - GravaTESTES('Script Chamador: '.$_SERVER['REQUEST_URI']); | |
| 862 | - GravaTESTES('v_te_ip: '.$v_te_ip); | |
| 863 | - GravaTESTES('te_node_address: '.$te_node_address); | |
| 864 | - GravaTESTES('id_so_new: '.$id_so_new); | |
| 865 | - GravaTESTES('te_so_new: '.$te_so_new); | |
| 866 | - GravaTESTES('te_so_new_new: '.$te_so_new_new); | |
| 867 | - GravaTESTES('id_ip_rede: '.$id_ip_rede); | |
| 868 | - GravaTESTES('te_ip: '.$te_ip); | |
| 869 | - GravaTESTES('v_te_ip: '.$v_te_ip); | |
| 870 | - GravaTESTES('te_nome_computador: '.$te_nome_computador); | |
| 871 | - GravaTESTES('te_workgroup: '.$te_workgroup); | |
| 872 | - */ | |
| 859 | + /* | |
| 860 | + GravaTESTES('Library_iccne: Script Chamador: '.$_SERVER['REQUEST_URI']); | |
| 861 | + GravaTESTES('Library_iccne: v_te_ip: '.$v_te_ip); | |
| 862 | + GravaTESTES('Library_iccne: te_node_address: '.$te_node_address); | |
| 863 | + GravaTESTES('Library_iccne: id_so_new: '.$id_so_new); | |
| 864 | + GravaTESTES('Library_iccne: te_so_new: '.$te_so_new); | |
| 865 | + GravaTESTES('Library_iccne: id_ip_rede: '.$id_ip_rede); | |
| 866 | + GravaTESTES('Library_iccne: te_ip: '.$te_ip); | |
| 867 | + GravaTESTES('Library_iccne: te_nome_computador: '.$te_nome_computador); | |
| 868 | + GravaTESTES('Library_iccne: te_workgroup: '.$te_workgroup); */ | |
| 873 | 869 | |
| 874 | 870 | $arrSO = getValores('so', 'id_so', 'id_so = '.$id_so_new); |
| 875 | 871 | $id_so = $arrSO['id_so']; |
| ... | ... | @@ -886,7 +882,7 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 886 | 882 | $query = 'UPDATE so |
| 887 | 883 | SET te_so = "'.$te_so_new.'" |
| 888 | 884 | WHERE id_so = '.$id_so; |
| 889 | - //GravaTESTES('query 1: '.$query); | |
| 885 | + //GravaTESTES('Library_iccne_query 1: '.$query); | |
| 890 | 886 | $result = mysql_query($query); |
| 891 | 887 | } |
| 892 | 888 | elseif ($te_so <> '' && ($id_so == '' || $id_so == 0)) // Encontrei somente o Identificador Interno (TE_SO) |
| ... | ... | @@ -895,7 +891,7 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 895 | 891 | $query = 'SELECT id_so |
| 896 | 892 | FROM so |
| 897 | 893 | WHERE te_so = "'.$te_so.'"'; |
| 898 | - //GravaTESTES('query 2: '.$query); | |
| 894 | + //GravaTESTES('Library_iccne_query 2: '.$query); | |
| 899 | 895 | $result = mysql_query($query); |
| 900 | 896 | $row = mysql_fetch_array($result); |
| 901 | 897 | $id_so = $row['id_so']; |
| ... | ... | @@ -903,7 +899,8 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 903 | 899 | |
| 904 | 900 | if ($te_so == '' && ($id_so == '' || $id_so == 0)) // Nada Encontrado, provavelmente versão antiga de agente. |
| 905 | 901 | { |
| 906 | - if ($te_so_new <> '' && ($id_so_new <> '' && $id_so_new <> 0)) // Só insiro se houver conteúdo chegando... | |
| 902 | + if (($te_so_new <> '' && ($id_so_new <> '' && $id_so_new <> 0)) || | |
| 903 | + ($te_so_new <> '')) // Só insiro se houver conteúdo chegando... | |
| 907 | 904 | { |
| 908 | 905 | conecta_bd_cacic(); |
| 909 | 906 | if ($id_so == 0 || $id_so == '') |
| ... | ... | @@ -922,7 +919,7 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 922 | 919 | $queryINS = 'INSERT |
| 923 | 920 | INTO so(id_so,te_desc_so,sg_so,te_so) |
| 924 | 921 | VALUES ('.$id_so.',"S.O. a Cadastrar","Sigla a Cadastrar","'.$te_so_new.'")'; |
| 925 | - //GravaTESTES('queryINS: '.$queryINS); | |
| 922 | + //GravaTESTES('Library_iccne_queryINS: '.$queryINS); | |
| 926 | 923 | $resultINS = mysql_query($queryINS); |
| 927 | 924 | |
| 928 | 925 | // Carrego os dados referente à rede da estação |
| ... | ... | @@ -933,7 +930,7 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 933 | 930 | FROM acoes_so |
| 934 | 931 | WHERE id_local = '.$v_dados_rede['id_local'].' |
| 935 | 932 | GROUP BY id_acao'; |
| 936 | - //GravaTESTES('querySEL: '.$querySEL); | |
| 933 | + //GravaTESTES('Library_iccne_querySEL: '.$querySEL); | |
| 937 | 934 | $resultSEL = mysql_query($querySEL); |
| 938 | 935 | |
| 939 | 936 | // Caso existam ações configuradas para o local, incluo o S.O. para que também execute-as... |
| ... | ... | @@ -976,7 +973,7 @@ function inclui_computador_caso_nao_exista( $te_node_address, |
| 976 | 973 | WHERE te_node_address = "'.$te_node_address.'" |
| 977 | 974 | AND id_so = "'.$id_so.'"'; |
| 978 | 975 | } |
| 979 | -//GravaTESTES('QUERY : '.$query); | |
| 976 | +//GravaTESTES('Library_iccne_QUERY : '.$query); | |
| 980 | 977 | $result = mysql_query($query); |
| 981 | 978 | $arrRetorno = array('id_so'=>$id_so,'te_so'=>$te_so); |
| 982 | 979 | // OK! O computador foi INCLUIDO/ATUALIZADO. |
| ... | ... | @@ -1035,7 +1032,9 @@ function getValores($tabela, $campos, $where="1") |
| 1035 | 1032 | $arrRetorno = array(); |
| 1036 | 1033 | conecta_bd_cacic(); |
| 1037 | 1034 | $query_SEL = 'SELECT '.$campos.' FROM '.$tabela.' WHERE '.$where.' LIMIT 1'; |
| 1038 | - | |
| 1035 | + | |
| 1036 | + //GravaTESTES('Library: getValores: '.$query_SEL); | |
| 1037 | + | |
| 1039 | 1038 | $result_SEL = mysql_query($query_SEL); |
| 1040 | 1039 | if (mysql_num_rows($result_SEL) > 0) |
| 1041 | 1040 | { | ... | ... |
language/en_US/menu_adm.txt
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | ..<b>Cadastros</b>||mainFrame|imgs/config_gerais.gif |
| 15 | 15 | ...Aquisições|admin/gerencia_licencas/arquivo/aquisicoes.php|mainFrame|| |
| 16 | 16 | ...Locais|admin/locais/index.php|mainFrame||Cadastro de Locais para Controle Centralizado |
| 17 | -...Domínios|admin/dominios/index.php|mainFrame||Cadastro de Domínios para Autenticação do srCACIC | |
| 17 | +...Servidores Autenticação|admin/servidores_autenticacao/index.php|mainFrame||Cadastro de Servidores para Autenticação do srCACIC | |
| 18 | 18 | ...SubRedes|admin/redes/index.php|mainFrame||Cadastro de SubRedes |
| 19 | 19 | ...Perfis Sistemas|admin/perfis_aplicativos_monitorados/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados |
| 20 | 20 | ...Usuários|admin/usuarios/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados | ... | ... |
language/es_UR/menu_adm.txt
| ... | ... | @@ -7,15 +7,17 @@ |
| 7 | 7 | ..Softwares No Usados|admin/softwares/remover_softwares_nao_instalados.php|mainFrame|| |
| 8 | 8 | ..Módulos|admin/modulos.php|mainFrame||Configuraciones de varios modulos disponibles de CACIC |
| 9 | 9 | ..<b>Logs</b>||mainFrame|imgs/config_gerais.gif |
| 10 | -...Accesos|admin/log_acessos.php|mainFrame||Visualizacion de los Logs de Accesos ocurridos en el Sistema | |
| 11 | -...Actividades|admin/log_atividades.php|mainFrame||Visualizacion de los Log de Actividades(INS/UPD/DEL) del Sistema | |
| 12 | -...Insucesos Instalação|admin/log_insucessos.php|mainFrame||Visualizacion de los Logs de Insucesos en las Instalaciones | |
| 10 | +...Accesos|admin/log_acessos.php|mainFrame||Visualização do Log de Acessos ocorridos no Sistema | |
| 11 | +...Actividades|admin/log_atividades.php|mainFrame||Visualização do Log de Atividades(INS/UPD/DEL) do Sistema | |
| 12 | +...Insucessos Instalação|admin/log_insucessos.php|mainFrame||Visualização do Log de Insucessoes nas Instalações | |
| 13 | +...Suporte Remoto Seguro|admin/log_suporte_remoto.php|mainFrame||Visualização do Log de Suporte Remoto Seguro | |
| 13 | 14 | ..<b>Registros</b>||mainFrame|imgs/config_gerais.gif |
| 14 | -...Adquisiciones|admin/gerencia_licencas/arquivo/index.php|mainFrame|| | |
| 15 | -...Locales|admin/locais/index.php|mainFrame||Registro de Locales para el Control Centralizado | |
| 16 | -...SubRedes|admin/redes/index.php|mainFrame||Registro de SubRedes | |
| 17 | -...Perfiles Sistemas|admin/perfis_aplicativos_monitorados/index.php|mainFrame||Registro de Perfiles de Aplicativos Monitoreados | |
| 18 | -...Usuarios|admin/usuarios/index.php|mainFrame||Registro de Perfiles de Aplicativos Monitoreados | |
| 15 | +...Aquisiciones|admin/gerencia_licencas/arquivo/aquisicoes.php|mainFrame|| | |
| 16 | +...Locales|admin/locais/index.php|mainFrame||Cadastro de Locais para Controle Centralizado | |
| 17 | +...Servidores Autenticação|admin/servidores_autenticacao/index.php|mainFrame||Cadastro de Servidores para Autenticação do srCACIC | |
| 18 | +...SubRedes|admin/redes/index.php|mainFrame||Cadastro de SubRedes | |
| 19 | +...Perfiles Sistemas|admin/perfis_aplicativos_monitorados/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados | |
| 20 | +...Usuarios|admin/usuarios/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados | |
| 19 | 21 | ...Tipos Softwares|admin/tipos_softwares/index.php|mainFrame|| |
| 20 | 22 | ...Sistemas Operativos|admin/sistemas_operacionais/index.php|mainFrame|| |
| 21 | 23 | ...Softwares|admin/softwares/index.php|mainFrame|| |
| ... | ... | @@ -61,7 +63,7 @@ |
| 61 | 63 | ...IPs Repetidas|relatorios/computador/ips_repetidos.php|mainFrame||Reporte de Maquinas con IPs repetidos |
| 62 | 64 | ...Inventarios en Blanco|relatorios/computador/inventario_em_branco.php|mainFrame|| |
| 63 | 65 | ...Últimas Alteraciones|relatorios/computador/ultimos_alterados.php|mainFrame|| |
| 64 | -...Crear Reporte|relatorios/computador/cria_informacoes_computadores.php|mainFrame||Creacion de reportes parametrizados | |
| 66 | +...Crear Reporte|relatorios/computador/cria_informacoes_computadores.php|mainFrame||Creacion de reportes parametrizados | |
| 65 | 67 | ..<b>Licencias</b>||mainFrame|imgs/config_gerais.gif |
| 66 | 68 | ...Resumen|admin/gerencia_licencas/consulta/resumo_licencas.php|mainFrame|| |
| 67 | 69 | ...Autorizadas por estacion|admin/gerencia_licencas/consulta/autorizados_por_estacao.php|mainFrame|| |
| ... | ... | @@ -77,4 +79,4 @@ |
| 77 | 79 | ..Cambio de Clave|admin/usuarios/troca_senha.php|mainFrame|| |
| 78 | 80 | .<b>Repositório|repositorio_install.php|mainFrame||Repositorio del Sistema CACIC |
| 79 | 81 | .<b>Projecto CACIC<b>|tribo/|new||Link de Acceso a la Home Page del Projecto CACIC |
| 80 | -.<b>Comunidad CACIC<b>|http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=3585|new||Link de Acceso a la Home Page de la Comunidad CACIC | |
| 82 | +.<b>Comunidad CACIC<b>|http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=3585|new||Link de Acceso a la Home Page de la Comunidad CACIC | ... | ... |
language/pt_BR/menu_adm.txt
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | ..<b>Cadastros</b>||mainFrame|imgs/config_gerais.gif |
| 15 | 15 | ...Aquisições|admin/gerencia_licencas/arquivo/aquisicoes.php|mainFrame|| |
| 16 | 16 | ...Locais|admin/locais/index.php|mainFrame||Cadastro de Locais para Controle Centralizado |
| 17 | -...Domínios|admin/dominios/index.php|mainFrame||Cadastro de Domínios para Autenticação do srCACIC | |
| 17 | +...Servidores Autenticação|admin/servidores_autenticacao/index.php|mainFrame||Cadastro de Servidores para Autenticação do srCACIC | |
| 18 | 18 | ...SubRedes|admin/redes/index.php|mainFrame||Cadastro de SubRedes |
| 19 | 19 | ...Perfis Sistemas|admin/perfis_aplicativos_monitorados/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados |
| 20 | 20 | ...Usuários|admin/usuarios/index.php|mainFrame||Cadastro de Perfis de Aplicativos Monitorados | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
ws/get_config.php
| ... | ... | @@ -77,12 +77,14 @@ if (trim(DeCrypt($key,$iv,$_POST['in_chkcacic'],$v_cs_cipher,$v_cs_compress,$str |
| 77 | 77 | } |
| 78 | 78 | else |
| 79 | 79 | { |
| 80 | - $retorno_xml_values .= '<CACIC2>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacic2.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CACIC2>'; | |
| 81 | - $retorno_xml_values .= '<CACIC2_HASH>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacic2.exe_HASH'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CACIC2_HASH>'; | |
| 82 | - $retorno_xml_values .= '<GER_COLS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['ger_cols.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/GER_COLS>'; | |
| 83 | - $retorno_xml_values .= '<GER_COLS_HASH>' . EnCrypt($key,$iv,$v_array_versoes_agentes['ger_cols.exe_HASH'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/GER_COLS_HASH>'; | |
| 84 | - $retorno_xml_values .= '<CHKSIS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['chksis.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CHKSIS>'; | |
| 85 | - $retorno_xml_values .= '<CHKSIS_HASH>' . EnCrypt($key,$iv,$v_array_versoes_agentes['chksis.exe_HASH'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CHKSIS_HASH>'; | |
| 80 | + $retorno_xml_values .= '<CACICSVC>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacicsvc.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CACICSVC>'; | |
| 81 | + $retorno_xml_values .= '<TE_HASH_CACICSVC>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacicsvc.exe_HASH'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/TE_HASH_CACICSVC>'; | |
| 82 | + $retorno_xml_values .= '<CACIC2>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacic2.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CACIC2>'; | |
| 83 | + $retorno_xml_values .= '<TE_HASH_CACIC2>' . EnCrypt($key,$iv,$v_array_versoes_agentes['cacic2.exe_HASH'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/TE_HASH_CACIC2>'; | |
| 84 | + $retorno_xml_values .= '<GER_COLS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['ger_cols.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/GER_COLS>'; | |
| 85 | + $retorno_xml_values .= '<TE_HASH_GER_COLS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['ger_cols.exe_HASH'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/TE_HASH_GER_COLS>'; | |
| 86 | + $retorno_xml_values .= '<CHKSIS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['chksis.exe'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/CHKSIS>'; | |
| 87 | + $retorno_xml_values .= '<TE_HASH_CHKSIS>' . EnCrypt($key,$iv,$v_array_versoes_agentes['chksis.exe_HASH'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey) . '<' . '/TE_HASH_CHKSIS>'; | |
| 86 | 88 | } |
| 87 | 89 | } |
| 88 | 90 | } |
| ... | ... | @@ -422,7 +424,8 @@ else |
| 422 | 424 | nu_intervalo_renovacao_patrim, |
| 423 | 425 | te_senha_adm_agente, |
| 424 | 426 | te_enderecos_mac_invalidos, |
| 425 | - te_janelas_excecao | |
| 427 | + te_janelas_excecao, | |
| 428 | + nu_porta_srcacic | |
| 426 | 429 | FROM configuracoes_locais |
| 427 | 430 | WHERE id_local = '.$v_dados_rede['id_local']; |
| 428 | 431 | |
| ... | ... | @@ -450,8 +453,9 @@ $retorno_xml_values .= '<TE_SERV_UPDATES>' . EnCrypt($key,$iv,$v_d |
| 450 | 453 | $retorno_xml_values .= '<NU_PORTA_SERV_UPDATES>' . EnCrypt($key,$iv,$v_dados_rede['nu_porta_serv_updates'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</NU_PORTA_SERV_UPDATES>'; |
| 451 | 454 | $retorno_xml_values .= '<TE_PATH_SERV_UPDATES>' . EnCrypt($key,$iv,$v_dados_rede['te_path_serv_updates'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</TE_PATH_SERV_UPDATES>'; |
| 452 | 455 | $retorno_xml_values .= '<NM_USUARIO_LOGIN_SERV_UPDATES>' . EnCrypt($key,$iv,$v_dados_rede['nm_usuario_login_serv_updates'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</NM_USUARIO_LOGIN_SERV_UPDATES>'; |
| 453 | -$retorno_xml_values .= '<TE_SENHA_LOGIN_SERV_UPDATES>' . EnCrypt($key,$iv,$v_dados_rede['te_senha_login_serv_updates'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</TE_SENHA_LOGIN_SERV_UPDATES>'; | |
| 454 | - | |
| 456 | +$retorno_xml_values .= '<TE_SENHA_LOGIN_SERV_UPDATES>' . EnCrypt($key,$iv,$v_dados_rede['te_senha_login_serv_updates'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</TE_SENHA_LOGIN_SERV_UPDATES>'; | |
| 457 | +$retorno_xml_values .= '<CS_PERMITIR_DESATIVAR_SRCACIC>' . EnCrypt($key,$iv,$v_dados_rede['cs_permitir_desativar_srcacic'] ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey). '</CS_PERMITIR_DESATIVAR_SRCACIC>'; | |
| 458 | + | |
| 455 | 459 | // --------------- Retorno de Classificador de CRIPTOGRAFIA --------------- // |
| 456 | 460 | if ($v_cs_cipher <> '1') $v_cs_cipher --; |
| 457 | 461 | ... | ... |
ws/srcacic_auth_client.php
| ... | ... | @@ -24,17 +24,6 @@ require_once('../include/library.php'); |
| 24 | 24 | //$v_compress_level = 9; |
| 25 | 25 | $v_compress_level = 0; // Mantido em 0(zero) para desabilitar a Compressão/Decompressão |
| 26 | 26 | // Há necessidade de testes para Análise de Viabilidade Técnica |
| 27 | - | |
| 28 | - | |
| 29 | -GravaTESTES('AuthClient: Valores Recebidos:'); | |
| 30 | -foreach($HTTP_POST_VARS as $i => $v) | |
| 31 | - GravaTESTES('AuthClient: POST => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 32 | - | |
| 33 | -foreach($HTTP_GET_VARS as $i => $v) | |
| 34 | - GravaTESTES('AuthClient: GET => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 35 | - | |
| 36 | -GravaTESTES(''); | |
| 37 | - | |
| 38 | 27 | $retorno_xml_header = '<?xml version="1.0" encoding="iso-8859-1" ?>'; |
| 39 | 28 | $retorno_xml_values = ''; |
| 40 | 29 | |
| ... | ... | @@ -45,13 +34,34 @@ $v_cs_compress = (trim($_POST['cs_compress']) <> ''?trim($_POST['cs_compress']) |
| 45 | 34 | $v_cs_cipher = '1'; |
| 46 | 35 | |
| 47 | 36 | $strPaddingKey = ''; |
| 37 | + | |
| 38 | + | |
| 39 | +GravaTESTES('AuthClient: Valores Recebidos:'); | |
| 40 | +foreach($HTTP_POST_VARS as $i => $v) | |
| 41 | + GravaTESTES('AuthClient: POST => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 42 | + | |
| 43 | +foreach($HTTP_GET_VARS as $i => $v) | |
| 44 | + GravaTESTES('AuthClient: GET => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 45 | + | |
| 46 | +GravaTESTES(''); | |
| 47 | + | |
| 48 | 48 | |
| 49 | -// Autenticação da Estação Visitada | |
| 50 | -$te_node_address = DeCrypt($key,$iv,$_POST['te_node_address'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 51 | -$te_so = DeCrypt($key,$iv,$_POST['te_so'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 49 | +// Autenticação da Estação Visitante | |
| 50 | +$te_node_address = DeCrypt($key,$iv,$_POST['te_node_address'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 51 | +$te_so = DeCrypt($key,$iv,$_POST['te_so'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 52 | + | |
| 53 | +//$te_node_address_visitante = DeCrypt($key,$iv,$_POST['te_node_address_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 54 | +$te_so_visitante = DeCrypt($key,$iv,$_POST['te_so_visitante'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 52 | 55 | $te_palavra_chave = DeCrypt($key,$iv,urldecode($_POST['te_palavra_chave']) ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 53 | 56 | |
| 54 | 57 | |
| 58 | +/* | |
| 59 | +GravaTESTES('AuthClient: te_node_address => '.$te_node_address); | |
| 60 | +GravaTESTES('AuthClient: te_so => '.$te_so); | |
| 61 | +GravaTESTES('AuthClient: te_node_address_visitante => '.$te_node_address_visitante); | |
| 62 | +GravaTESTES('AuthClient: te_so_visitante => '.$te_so_visitante); | |
| 63 | +*/ | |
| 64 | + | |
| 55 | 65 | // ATENÇÃO: Apenas retornará um ARRAY contendo "id_so" e "te_so". |
| 56 | 66 | $arrSO = inclui_computador_caso_nao_exista( $te_node_address, |
| 57 | 67 | '', |
| ... | ... | @@ -61,25 +71,27 @@ $arrSO = inclui_computador_caso_nao_exista( $te_node_address, |
| 61 | 71 | '', |
| 62 | 72 | ''); |
| 63 | 73 | |
| 64 | -GravaTESTES('AuthClient: te_palavra_chave: '.$te_palavra_chave); | |
| 74 | +//GravaTESTES('AuthClient: te_palavra_chave: '.$te_palavra_chave); | |
| 65 | 75 | $arrComputadores = getValores('computadores c, redes r', 'c.te_palavra_chave,c.te_nome_computador,c.te_ip,r.id_local' , 'c.te_node_address = "'.$te_node_address.'" and c.id_so = '.$arrSO['id_so'].' and r.id_ip_rede = c.id_ip_rede'); |
| 66 | 76 | $strTePalavraChave = $arrComputadores['te_palavra_chave']; |
| 67 | 77 | |
| 68 | -GravaTESTES('AuthClient: strTePalavraChave: '.$strTePalavraChave); | |
| 78 | +//GravaTESTES('AuthClient: strTePalavraChave: '.$strTePalavraChave); | |
| 69 | 79 | |
| 70 | 80 | |
| 71 | -// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos domínios | |
| 81 | +// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos servidores de autenticação | |
| 72 | 82 | if ($te_palavra_chave == $strTePalavraChave) |
| 73 | 83 | { |
| 74 | - GravaTESTES('AuthClient: Palavra-Chave OK!'); | |
| 84 | +// GravaTESTES('AuthClient: Palavra-Chave OK!'); | |
| 75 | 85 | conecta_bd_cacic(); |
| 76 | 86 | |
| 77 | 87 | if ($_POST['nm_usuario_visitante'] && $_POST['te_senha_visitante']) |
| 78 | 88 | { |
| 79 | 89 | $nm_usuario_visitante = DeCrypt($key,$iv,$_POST['nm_usuario_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 80 | 90 | $te_senha_visitante = DeCrypt($key,$iv,$_POST['te_senha_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 91 | + /* | |
| 81 | 92 | GravaTESTES('AuthClient: nm_usuario_visitante => '.$nm_usuario_visitante); |
| 82 | 93 | GravaTESTES('AuthClient: te_senha_visitante => '.$te_senha_visitante); |
| 94 | + */ | |
| 83 | 95 | |
| 84 | 96 | // Autentico o usuário técnico, verificando nome, senha e local |
| 85 | 97 | $arrUsuarios = getValores('usuarios','id_usuario, |
| ... | ... | @@ -91,47 +103,45 @@ if ($te_palavra_chave == $strTePalavraChave) |
| 91 | 103 | if ($arrUsuarios['id_usuario']<>'') |
| 92 | 104 | { |
| 93 | 105 | $boolIdLocal = stripos2($arrUsuarios['te_locais_secundarios'],$arrComputadores['id_local'],false); |
| 94 | - //GravaTESTES('AuthClient: boolIdLocal => '.$boolIdLocal); | |
| 95 | - //GravaTESTES('AuthClient: arrComputadores[id_local] => '.$arrComputadores['id_local']); | |
| 96 | - //GravaTESTES('AuthClient: arrUsuarios[id_local] => '.$arrUsuarios['id_local']); | |
| 106 | + /* | |
| 107 | + GravaTESTES('AuthClient: boolIdLocal => '.$boolIdLocal); | |
| 108 | + GravaTESTES('AuthClient: arrComputadores[id_local] => '.$arrComputadores['id_local']); GravaTESTES('AuthClient: arrUsuarios[id_local] => '.$arrUsuarios['id_local']); */ | |
| 97 | 109 | if ($arrUsuarios['id_local'] == $arrComputadores['id_local'] || $boolIdLocal) |
| 98 | 110 | { |
| 99 | 111 | $id_sessao = DeCrypt($key,$iv,$_POST['id_sessao'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 100 | 112 | $id_usuario_visitante = $arrUsuarios['id_usuario']; |
| 101 | - $te_node_address_visitante = DeCrypt($key,$iv,$_POST['te_node_address_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 102 | - $te_so_visitante = DeCrypt($key,$iv,$_POST['te_so_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 103 | - //GravaTESTES('AuthClient: te_node_address_visitante => '.$te_node_address_visitante); | |
| 104 | - //GravaTESTES('AuthClient: te_so_visitante => '.$te_so_visitante); | |
| 105 | 113 | $te_motivo_conexao = DeCrypt($key,$iv,$_POST['te_motivo_conexao'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 114 | + $te_documento_referencial = DeCrypt($key,$iv,$_POST['te_documento_referencial'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 115 | + | |
| 106 | 116 | $dt_hr_autenticacao = date('Y-m-d H:i:s'); |
| 107 | 117 | |
| 108 | - // ATENÇÃO: Apenas retornará um ARRAY contendo "id_so" e "te_so". | |
| 109 | - $arrSO_visitante = inclui_computador_caso_nao_exista($te_node_address_visitante, | |
| 110 | - '', | |
| 111 | - $te_so_visitante, | |
| 112 | - '', | |
| 113 | - '', | |
| 114 | - '', | |
| 115 | - ''); | |
| 118 | + // Identifico o SO da máquina visitante | |
| 119 | + $arrIdSO = getValores('so','id_so','trim(te_so) = "'.trim($te_so_visitante).'"'); | |
| 120 | + | |
| 121 | + $id_so_visitante = $arrIdSO['id_so']; | |
| 122 | + GravaTESTES('AuthClient: id_so_visitante => '.$id_so_visitante); | |
| 123 | + | |
| 124 | + if ($id_so_visitante == '') | |
| 125 | + $id_so_visitante = insereNovoSO($te_so_visitante); | |
| 116 | 126 | |
| 117 | 127 | $query_SESSAO = "INSERT INTO srcacic_sessoes_logs |
| 118 | 128 | (id_sessao, |
| 119 | 129 | id_usuario_visitante, |
| 120 | - te_node_address_visitante, | |
| 121 | - id_so_visitante, | |
| 130 | + te_documento_referencial, | |
| 122 | 131 | te_motivo_conexao, |
| 123 | 132 | dt_hr_ultimo_contato, |
| 124 | - dt_hr_conexao) | |
| 133 | + dt_hr_conexao, | |
| 134 | + id_so_visitante) | |
| 125 | 135 | VALUES (" . $id_sessao . ", |
| 126 | 136 | " . $id_usuario_visitante . ", |
| 127 | - '" . $te_node_address_visitante . "', | |
| 128 | - " . $arrSO_visitante['id_so'] . ", | |
| 137 | + '" . $te_documento_referencial . "', | |
| 129 | 138 | '" . $te_motivo_conexao . "', |
| 130 | 139 | '" . $dt_hr_autenticacao . "', |
| 131 | - '" . $dt_hr_autenticacao . "')"; | |
| 140 | + '" . $dt_hr_autenticacao . "', | |
| 141 | + " . $id_so_visitante .")"; | |
| 132 | 142 | $result_SESSAO = mysql_query($query_SESSAO); |
| 133 | 143 | |
| 134 | - // GravaTESTES('AuthClient: query_SESSAO => '.$query_SESSAO); | |
| 144 | + GravaTESTES('AuthClient: query_SESSAO => '.$query_SESSAO); | |
| 135 | 145 | |
| 136 | 146 | $retorno_xml_values = '<STATUS>'.EnCrypt($key,$iv,'OK',$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</STATUS>'.$retorno_xml_values; |
| 137 | 147 | $retorno_xml_values .= '<ID_USUARIO_VISITANTE>'.str_ireplace('+','<MAIS>',EnCrypt($key,$iv,$arrUsuarios['id_usuario'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey),$countMAIS).'</ID_USUARIO_VISITANTE>'; |
| ... | ... | @@ -164,4 +174,25 @@ if ($te_palavra_chave == $strTePalavraChave) |
| 164 | 174 | $retorno_xml = $retorno_xml_header . $retorno_xml_values; |
| 165 | 175 | GravaTESTES('AuthClient XML: '.$retorno_xml); |
| 166 | 176 | echo $retorno_xml; |
| 177 | + | |
| 178 | +function insereNovoSO($te_so_new) | |
| 179 | + { | |
| 180 | + conecta_bd_cacic(); | |
| 181 | + | |
| 182 | + // Busco o último valor do Identificador Externo caso não tenha recebido valor para o ID Externo | |
| 183 | + $querySEL = 'SELECT max(id_so) as MaxIdSo | |
| 184 | + FROM so'; | |
| 185 | + $resultSEL = mysql_query($querySEL); | |
| 186 | + $rowSEL = mysql_fetch_array($resultSEL); | |
| 187 | + $id_so = ($rowSEL['MaxIdSo']+1); | |
| 188 | + | |
| 189 | + // Insiro a informação na tabela de Sistemas Operacionais incrementando o Identificador Externo | |
| 190 | + $queryINS = 'INSERT | |
| 191 | + INTO so(id_so,te_desc_so,sg_so,te_so) | |
| 192 | + VALUES ('.$id_so.',"S.O. a Cadastrar","Sigla a Cadastrar","'.$te_so_new.'")'; | |
| 193 | + | |
| 194 | + $resultINS = mysql_query($queryINS); | |
| 195 | + return $id_so; | |
| 196 | + } | |
| 197 | + | |
| 167 | 198 | ?> | ... | ... |
ws/srcacic_get_config.php
| ... | ... | @@ -19,7 +19,7 @@ |
| 19 | 19 | estação/usuário em questão. São levados em consideração a rede do agente, sistema operacional e Mac-Address. |
| 20 | 20 | |
| 21 | 21 | Retorno: |
| 22 | - 1) <DOMINIOS>Domínios cadastrados no Gerente WEB. O domínio referente à subrede da estação será acrescido de "*".</DOMINIOS> | |
| 22 | + 1) <SERVIDORES_AUTENTICACAO>Servidores de Autenticação cadastrados no Gerente WEB. O servidor de autenticação referente à subrede da estação será acrescido de "*".</SERVIDORES_AUTENTICACAO> | |
| 23 | 23 | 2) <STATUS>Retornará OK se a palavra chave informada "bater" com a chave armazenada previamente no BD</STATUS> |
| 24 | 24 | */ |
| 25 | 25 | |
| ... | ... | @@ -41,24 +41,29 @@ $v_cs_cipher = '1'; |
| 41 | 41 | |
| 42 | 42 | $strPaddingKey = ''; |
| 43 | 43 | |
| 44 | -/* | |
| 44 | + | |
| 45 | 45 | LimpaTESTES(); |
| 46 | -GravaTESTES('Valores POST Recebidos:'); | |
| 46 | +GravaTESTES('srCACIC_getConfig.Valores POST Recebidos:'); | |
| 47 | 47 | foreach($HTTP_POST_VARS as $i => $v) |
| 48 | - GravaTESTES('Nome/Valor do POST_Request: "'.$i.'"/"'.$v.'"'); | |
| 48 | + GravaTESTES('srCACIC_getConfig.Nome/Valor do POST_Request: "'.$i.'"/"'.$v.'"'); | |
| 49 | 49 | |
| 50 | -GravaTESTES('Valores GET Recebidos:'); | |
| 50 | +GravaTESTES('srCACIC_getConfig.Valores GET Recebidos:'); | |
| 51 | 51 | foreach($HTTP_GET_VARS as $i => $v) |
| 52 | - GravaTESTES('Nome/Valor do GET_Request: "'.$i.'"/"'.$v.'"'); | |
| 52 | + GravaTESTES('srCACIC_getConfig.Nome/Valor do GET_Request: "'.$i.'"/"'.$v.'"'); | |
| 53 | 53 | |
| 54 | 54 | GravaTESTES(''); |
| 55 | 55 | GravaTESTES(''); |
| 56 | -*/ | |
| 57 | 56 | |
| 58 | 57 | // Autenticação da Estação Visitada |
| 59 | -$te_node_address = DeCrypt($key,$iv,$_POST['te_node_address'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 60 | -$te_so = DeCrypt($key,$iv,$_POST['te_so'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 61 | -$te_palavra_chave = DeCrypt($key,$iv,$_POST['te_palavra_chave'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 58 | +$te_node_address = DeCrypt($key,$iv,$_POST['te_node_address'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 59 | +$te_so = DeCrypt($key,$iv,$_POST['te_so'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 60 | +$te_palavra_chave = DeCrypt($key,$iv,$_POST['te_palavra_chave'],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 61 | + | |
| 62 | +/* | |
| 63 | +GravaTESTES('srCACIC_getConfig.te_node_address:'.$te_node_address); | |
| 64 | +GravaTESTES('srCACIC_getConfig.te_so:'.$te_so); | |
| 65 | +GravaTESTES('srCACIC_getConfig.te_palavra_chave:'.$te_palavra_chave); | |
| 66 | +*/ | |
| 62 | 67 | |
| 63 | 68 | // ATENÇÃO: Apenas retornará um ARRAY contendo "id_so" e "te_so". |
| 64 | 69 | $arrSO = inclui_computador_caso_nao_exista( $te_node_address, |
| ... | ... | @@ -74,32 +79,34 @@ $arrComputadores = getValores('computadores', 'te_palavra_chave,id_ip_rede' , |
| 74 | 79 | $strTePalavraChave = $arrComputadores['te_palavra_chave']; |
| 75 | 80 | $strIdIpRede = $arrComputadores['id_ip_rede']; |
| 76 | 81 | |
| 77 | -/* | |
| 78 | -LimpaTESTES(); | |
| 79 | -GravaTESTES('strTePalavraChave:'.$strTePalavraChave); | |
| 80 | -GravaTESTES('strIdIpRede:'.$strIdIpRede); | |
| 81 | -*/ | |
| 82 | 82 | |
| 83 | -// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos domínios | |
| 83 | +//GravaTESTES('srCACIC_getConfig.strTePalavraChave:'.$strTePalavraChave); | |
| 84 | +//GravaTESTES('srCACIC_getConfig.strIdIpRede:'.$strIdIpRede); | |
| 85 | + | |
| 86 | + | |
| 87 | +// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos servidores para autenticação | |
| 84 | 88 | if ($te_palavra_chave == $strTePalavraChave) |
| 85 | 89 | { |
| 86 | - $arrRedes = getValores('redes','id_dominio','id_ip_rede = "'.$strIdIpRede.'"'); | |
| 87 | - $strIdDominio = $arrRedes['id_dominio']; | |
| 90 | + $arrRedes = getValores('redes','id_servidor_autenticacao','id_ip_rede = "'.$strIdIpRede.'"'); | |
| 91 | + $strIdServidor = $arrRedes['id_servidor_autenticacao']; | |
| 88 | 92 | |
| 89 | 93 | conecta_bd_cacic(); |
| 90 | - $query_SEL = 'SELECT id_dominio, | |
| 91 | - nm_dominio | |
| 92 | - FROM dominios | |
| 93 | - WHERE in_ativo = "S" | |
| 94 | - ORDER BY nm_dominio'; | |
| 94 | + $query_SEL = 'SELECT id_servidor_autenticacao, | |
| 95 | + nm_servidor_autenticacao | |
| 96 | + FROM servidores_autenticacao | |
| 97 | + WHERE in_ativo = "S" AND | |
| 98 | + id_servidor_autenticacao = '.$strIdServidor.' | |
| 99 | + ORDER BY nm_servidor_autenticacao'; | |
| 95 | 100 | $result_SEL = mysql_query($query_SEL); |
| 96 | 101 | |
| 97 | - $strTripaDominios = ''; | |
| 102 | + $strTripaServidores = ''; | |
| 98 | 103 | while ($row_SEL = mysql_fetch_array($result_SEL)) |
| 99 | - $strTripaDominios .= $row_SEL['id_dominio'].';'.$row_SEL['nm_dominio'].($row_SEL['id_dominio']==$strIdDominio?'*':'').';'; | |
| 104 | + $strTripaServidores .= $row_SEL['id_servidor_autenticacao'].';'.$row_SEL['nm_servidor_autenticacao'].($row_SEL['id_servidor_autenticacao']==$strIdServidor?'*':'').';'; | |
| 105 | + | |
| 106 | + if ($strTripaServidores == '') | |
| 107 | + $strTripaServidores = '0;0'; | |
| 100 | 108 | |
| 101 | - if ($strTripaDominios <> '') | |
| 102 | - $retorno_xml_values = '<DOMINIOS>'.EnCrypt($key,$iv,$strTripaDominios ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</DOMINIOS>'; | |
| 109 | + $retorno_xml_values = '<SERVIDORES_AUTENTICACAO>'.EnCrypt($key,$iv,$strTripaServidores ,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</SERVIDORES_AUTENTICACAO>'; | |
| 103 | 110 | } |
| 104 | 111 | |
| 105 | 112 | if ($retorno_xml_values <> '') | ... | ... |
ws/srcacic_set_session.php
| ... | ... | @@ -37,7 +37,16 @@ $v_cs_cipher = '1'; |
| 37 | 37 | |
| 38 | 38 | // Algumas estações enviarão uma string para extensão de bloco |
| 39 | 39 | $strPaddingKey = ''; |
| 40 | - | |
| 40 | + | |
| 41 | +//LimpaTESTES(); | |
| 42 | +GravaTESTES('SetSession: Valores Recebidos:'); | |
| 43 | +foreach($HTTP_POST_VARS as $i => $v) | |
| 44 | + GravaTESTES('SetSession: POST => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 45 | + | |
| 46 | +foreach($HTTP_GET_VARS as $i => $v) | |
| 47 | + GravaTESTES('SetSession: GET => '.$i.' => '.$v.' => '.DeCrypt($key,$iv,$v,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 48 | + | |
| 49 | +GravaTESTES(''); | |
| 41 | 50 | // Autenticação da Estação Visitada |
| 42 | 51 | $te_node_address = DeCrypt($key,$iv,$_POST['te_node_address'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| 43 | 52 | $te_so = DeCrypt($key,$iv,$_POST['te_so'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); |
| ... | ... | @@ -58,147 +67,135 @@ $strTePalavraChave = $arrComputadores['te_palavra_chave']; |
| 58 | 67 | |
| 59 | 68 | //LimpaTESTES(); |
| 60 | 69 | |
| 61 | -// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos domínios | |
| 70 | +// Valido a Palavra-Chave e monto a tripa com os nomes e ids dos servidores de autenticação | |
| 62 | 71 | if ($te_palavra_chave == $strTePalavraChave) |
| 63 | 72 | { |
| 64 | - GravaTESTES('SetSession: Palavra-Chave OK!'); | |
| 73 | + //GravaTESTES('SetSession: Palavra-Chave OK!'); | |
| 65 | 74 | conecta_bd_cacic(); |
| 66 | 75 | |
| 67 | 76 | if (!$_POST['id_sessao']) |
| 68 | - { | |
| 69 | - // Identificador para Autenticação no Domínio | |
| 70 | - $id_dominio = DeCrypt($key,$iv,$_POST['id_dominio'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 71 | - $nm_nome_acesso_dominio = DeCrypt($key,$iv,$_POST['nm_nome_acesso_dominio'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 72 | - $te_senha_acesso_dominio = DeCrypt($key,$iv,$_POST['te_senha_acesso_dominio'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 73 | - | |
| 74 | - $arrDominios = getValores('dominios', 'nm_dominio, | |
| 75 | - te_ip_dominio, | |
| 76 | - id_tipo_protocolo, | |
| 77 | - nu_versao_protocolo, | |
| 78 | - te_base_consulta_raiz, | |
| 79 | - te_base_consulta_folha, | |
| 80 | - te_atributo_identificador, | |
| 81 | - te_atributo_retorna_nome, | |
| 82 | - te_atributo_retorna_email' , 'id_dominio = '.$id_dominio.' AND in_ativo="S"'); | |
| 83 | - | |
| 84 | - | |
| 85 | - GravaTESTES('SetSession: Valores:'); | |
| 86 | - GravaTESTES('SetSession: nm_nome_acesso_dominio: '.$nm_nome_acesso_dominio); | |
| 87 | - GravaTESTES('SetSession: te_senha_acesso_dominio: '.$te_senha_acesso_dominio); | |
| 88 | - GravaTESTES('SetSession: arrDominios[nm_dominio]: '.$arrDominios['nm_dominio']); | |
| 89 | - GravaTESTES('SetSession: arrDominios[te_ip_dominio]: '.$arrDominios['te_ip_dominio']); | |
| 90 | - GravaTESTES('SetSession: arrDominios[id_tipo_protocolo]: '.$arrDominios['id_tipo_protocolo']); | |
| 91 | - GravaTESTES('SetSession: arrDominios[nu_versao_protocolo]: '.$arrDominios['nu_versao_protocolo']); | |
| 92 | - GravaTESTES('SetSession: arrDominios[te_base_consulta_raiz]: '.$arrDominios['te_base_consulta_raiz']); | |
| 93 | - GravaTESTES('SetSession: arrDominios[te_base_consulta_folha]: '.$arrDominios['te_base_consulta_folha']); | |
| 94 | - GravaTESTES('SetSession: arrDominios[te_atributo_identificador]: '.$arrDominios['te_atributo_identificador']); | |
| 95 | - GravaTESTES('SetSession: arrDominios[te_atributo_retorna_nome]: '.$arrDominios['te_atributo_retorna_nome']); | |
| 96 | - GravaTESTES('SetSession: arrDominios[te_atributo_retorna_email]: '.$arrDominios['te_atributo_retorna_email']); | |
| 97 | - | |
| 98 | - // Comunicação com o servidor de Domínio, para autenticação | |
| 99 | - | |
| 100 | - $te_atributo_retorna_nome = $arrDominios['te_atributo_retorna_nome']; | |
| 101 | - $te_atributo_retorna_email = $arrDominios['te_atributo_retorna_email']; | |
| 102 | - $te_host = $arrDominios['nm_dominio']; | |
| 103 | - | |
| 104 | - $ldap = ldap_connect($te_host,389); | |
| 77 | + { | |
| 78 | + // Identificador para Autenticação no Servidor de Autenticação | |
| 79 | + $id_servidor_autenticacao = DeCrypt($key,$iv,$_POST['id_servidor_autenticacao'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 80 | + $nm_nome_acesso_autenticacao = DeCrypt($key,$iv,$_POST['nm_nome_acesso_autenticacao'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 81 | + $te_senha_acesso_autenticacao = DeCrypt($key,$iv,$_POST['te_senha_acesso_autenticacao'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 82 | + $nm_nome_completo = ''; | |
| 83 | + $dt_hr_inicio_sessao = date('Y-m-d H:i:s'); | |
| 105 | 84 | |
| 106 | - GravaTESTES('SetSession: Após CONNECT em "'.$te_host.'" => '.ldap_error($ldap)); | |
| 85 | + if ($id_servidor_autenticacao == '0') | |
| 86 | + { | |
| 87 | + $nm_nome_completo = 'Usuário Não Autenticado'; | |
| 88 | + criaSessao($dt_hr_inicio_sessao, | |
| 89 | + $nm_nome_acesso_autenticacao, | |
| 90 | + $nm_nome_completo, | |
| 91 | + $te_email, | |
| 92 | + $te_node_address, | |
| 93 | + $arrSO['id_so']); | |
| 94 | + } | |
| 95 | + else | |
| 96 | + { | |
| 97 | + $arrServidores = getValores('servidores_autenticacao', | |
| 98 | + 'nm_servidor_autenticacao, | |
| 99 | + te_ip_servidor_autenticacao, | |
| 100 | + id_tipo_protocolo, | |
| 101 | + nu_versao_protocolo, | |
| 102 | + te_base_consulta_raiz, | |
| 103 | + te_base_consulta_folha, | |
| 104 | + te_atributo_identificador, | |
| 105 | + te_atributo_retorna_nome, | |
| 106 | + te_atributo_retorna_email' , | |
| 107 | + 'id_servidor_autenticacao = '.$id_servidor_autenticacao.' AND in_ativo="S"'); | |
| 107 | 108 | |
| 108 | - ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, $arrDominios['nu_versao_protocolo']); | |
| 109 | - GravaTESTES('SetSession: Após SET_OPTION => '.ldap_error($ldap)); | |
| 109 | + /* | |
| 110 | + | |
| 111 | + // APLICACAO DO BLOCO DE CODIGO DO JARBAS PEIXOTO - URMS | |
| 112 | + // 1 - Fazer a pesquisa no OpenLDAP | |
| 113 | + // 2 - Contar os resultados | |
| 114 | + // 2.1 - Caso resultado = 0 ERRO | |
| 115 | + // 2.2 - Caso resultado > 1 ERRO | |
| 116 | + // 2.3 - Caso resultado = 1 OK | |
| 117 | + // 3 - No script, acontece a obtencao do DN do unico usuario encontrado | |
| 118 | + // 4 - A partir do DN obtido, realizar o BIND. | |
| 119 | + */ | |
| 110 | 120 | |
| 111 | - //ldap_start_tls($ldap); | |
| 112 | - | |
| 113 | - if (ldap_errno($ldap) == 0) | |
| 114 | - { | |
| 115 | - GravaTESTES('SetSession: Tentando BIND Identificado com "'.$nm_nome_acesso_dominio.' / **********"'); | |
| 116 | - | |
| 117 | - $bindTesteAnonimo=ldap_bind($ldap); // this is an "anonymous" bind, typically | |
| 118 | - // read-only access | |
| 119 | - GravaTESTES("Bind Anônimo retornou " . $bindTesteAnonimo); | |
| 120 | - | |
| 121 | - //ob_start(); | |
| 122 | - $strBind = $arrDominios['te_atributo_identificador'].'='.$nm_nome_acesso_dominio.','.$arrDominios['te_base_consulta_folha'].','.$arrDominios['te_base_consulta_raiz']; | |
| 123 | - $bind = ldap_bind($ldap, "$strBind", $te_senha_acesso_dominio); | |
| 124 | - //ob_end_flush(); | |
| 121 | + // Comunicação com o servidor de Autenticação | |
| 122 | + | |
| 123 | + $te_atributo_retorna_nome = $arrServidores['te_atributo_retorna_nome']; | |
| 124 | + $te_atributo_retorna_email = $arrServidores['te_atributo_retorna_email']; | |
| 125 | + $te_host = $arrServidores['nm_servidor_autenticacao']; | |
| 126 | + | |
| 127 | + $ldap = ldap_connect($te_host,389); | |
| 125 | 128 | |
| 126 | - if (ldap_errno($ldap) == 0) | |
| 127 | - { | |
| 128 | - $strRootDN = $arrDominios['te_base_consulta_raiz']; | |
| 129 | - $strNodeDN = $arrDominios['te_base_consulta_folha']; | |
| 130 | - GravaTESTES('SetSession: Preparando Search : '.'"'.$strNodeDN.','.$strRootDN.'" / '.'"'.$arrDominios['te_atributo_identificador'].'='.$nm_nome_acesso_dominio.'"'); | |
| 131 | - $searchResults = ldap_search($ldap, "$strNodeDN,$strRootDN",$arrDominios['te_atributo_identificador'].'='.$nm_nome_acesso_dominio); | |
| 129 | + ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, $arrServidores['nu_versao_protocolo']); | |
| 130 | + //GravaTESTES('SetSession: Após SET_OPTION => '.ldap_error($ldap)); | |
| 132 | 131 | |
| 133 | - GravaTESTES('SetSession: Após SEARCH => '.ldap_error($ldap)); | |
| 134 | - // OK! Dados encontrados! | |
| 135 | - if (!$searchResults === false) | |
| 132 | + //ldap_start_tls($ldap); | |
| 133 | + | |
| 134 | + if (ldap_errno($ldap) == 0) | |
| 135 | + { | |
| 136 | + //GravaTESTES('SetSession: Tentando BIND Identificado com "'.$nm_nome_acesso_autenticacao.' / **********"'); | |
| 137 | + | |
| 138 | + $bindTesteAnonimo=ldap_bind($ldap); // this is an "anonymous" bind, typically | |
| 139 | + // read-only access | |
| 140 | + //GravaTESTES("Bind Anônimo retornou " . $bindTesteAnonimo); | |
| 141 | + | |
| 142 | + //ob_start(); | |
| 143 | + $strBind = $arrServidores['te_atributo_identificador'].'='.$nm_nome_acesso_autenticacao.','.$arrServidores['te_base_consulta_folha'].','.$arrServidores['te_base_consulta_raiz']; | |
| 144 | + $bind = ldap_bind($ldap, "$strBind", $te_senha_acesso_autenticacao); | |
| 145 | + //ob_end_flush(); | |
| 146 | + | |
| 147 | + if (ldap_errno($ldap) == 0) | |
| 136 | 148 | { |
| 137 | - $arrLDAPdata = array(); | |
| 138 | - $ldapResults = ldap_get_entries($ldap, $searchResults); | |
| 139 | - for ($item = 0; $item < $ldapResults['count']; $item++) | |
| 149 | + $strRootDN = $arrServidores['te_base_consulta_raiz']; | |
| 150 | + $strNodeDN = $arrServidores['te_base_consulta_folha']; | |
| 151 | + //GravaTESTES('SetSession: Preparando Search : '.'"'.$strNodeDN.','.$strRootDN.'" / '.'"'.$arrDominios['te_atributo_identificador'].'='.$nm_nome_acesso_dominio.'"'); | |
| 152 | + $searchResults = ldap_search($ldap, "$strNodeDN,$strRootDN",$arrServidores['te_atributo_identificador'].'='.$nm_nome_acesso_autenticacao); | |
| 153 | + | |
| 154 | + //GravaTESTES('SetSession: Após SEARCH => '.ldap_error($ldap)); | |
| 155 | + // OK! Dados encontrados! | |
| 156 | + if (!$searchResults === false) | |
| 140 | 157 | { |
| 141 | - for ($attribute = 0; $attribute < $ldapResults[$item]['count']; $attribute++) | |
| 158 | + $arrLDAPdata = array(); | |
| 159 | + $ldapResults = ldap_get_entries($ldap, $searchResults); | |
| 160 | + for ($item = 0; $item < $ldapResults['count']; $item++) | |
| 142 | 161 | { |
| 143 | - $data = $ldapResults[$item][$attribute]; | |
| 144 | - $arrLDAPdata[$data]=$ldapResults[$item][$data][0]; | |
| 162 | + for ($attribute = 0; $attribute < $ldapResults[$item]['count']; $attribute++) | |
| 163 | + { | |
| 164 | + $data = $ldapResults[$item][$attribute]; | |
| 165 | + $arrLDAPdata[$data]=$ldapResults[$item][$data][0]; | |
| 166 | + } | |
| 145 | 167 | } |
| 146 | - } | |
| 147 | - | |
| 148 | - GravaTESTES('SetSession: Após GET_ENTRIES => '.ldap_error($ldap)); | |
| 149 | - $nm_nome_completo = $arrLDAPdata[strtolower($arrDominios['te_atributo_retorna_nome'])]; | |
| 150 | - $te_email = $arrLDAPdata[strtolower($arrDominios['te_atributo_retorna_email'])]; | |
| 151 | - GravaTESTES('SetSession: Após GET_ENTRIES => nm_nome_completo: '.$nm_nome_completo); | |
| 152 | - GravaTESTES('SetSession: Após GET_ENTRIES => te_email: '.$te_email); | |
| 153 | - | |
| 154 | - if ($nm_nome_completo <> '') | |
| 155 | - { | |
| 156 | - $dt_hr_inicio_sessao = date('Y-m-d H:i:s'); | |
| 157 | 168 | |
| 158 | - if ($te_email <> '') | |
| 159 | - { | |
| 160 | - // Envio e-mail informando da abertura de sessão | |
| 161 | - $corpo_mail = "Prezado usuário(a) ".$nm_nome_completo.",\n\n | |
| 162 | - informamos que foi iniciada uma sessão para Suporte Remoto Seguro através do Sistema CACIC em ".$dt_hr_inicio_sessao . "\n\n\n\n | |
| 163 | - _______________________________________________________________________ | |
| 164 | - CACIC - Configurador Automático e Coletor de Informações Computacionais\n | |
| 165 | - srCACIC - Módulo para Suporte Remoto Seguro do Sistema CACIC\n | |
| 166 | - Desenvolvido pela Dataprev - Unidade Regional Espírito Santo"; | |
| 167 | - | |
| 168 | - GravaTESTES('SetSession: Enviando Email...'); | |
| 169 | - // Manda mail para os administradores. | |
| 170 | - //mail("$te_email", "Sistema CACIC - Módulo srCACIC - Abertura de Sessão para Suporte Remoto Seguro", "$corpo_mail", "From: cacic@{$_SERVER['SERVER_NAME']}"); | |
| 171 | - } | |
| 172 | - $query_SESSAO = "INSERT INTO srcacic_sessoes | |
| 173 | - (dt_hr_inicio_sessao, | |
| 174 | - nm_acesso_usuario_visitado, | |
| 175 | - nm_completo_usuario_visitado, | |
| 176 | - te_email_usuario_visitado, | |
| 177 | - te_node_address_visitado, | |
| 178 | - id_so_visitado, | |
| 179 | - dt_hr_ultimo_contato) | |
| 180 | - VALUES ('" . $dt_hr_inicio_sessao . "', | |
| 181 | - '" . $nm_nome_acesso_dominio . "', | |
| 182 | - '" . $nm_nome_completo . "', | |
| 183 | - '" . $te_email . "', | |
| 184 | - '" . $te_node_address . "', | |
| 185 | - '" . $arrSO['id_so'] . "', | |
| 186 | - '" . $dt_hr_inicio_sessao . "')"; | |
| 187 | - GravaTESTES('SetSession: query_SESSAO: '.$query_SESSAO); | |
| 188 | - $result_SESSAO = mysql_query($query_SESSAO); | |
| 189 | - $arrSessoes = getValores('srcacic_sessoes','id_sessao','dt_hr_inicio_sessao="'.$dt_hr_inicio_sessao.'" AND | |
| 190 | - te_node_address_visitado="'.$te_node_address.'" AND | |
| 191 | - id_so_visitado = "'.$arrSO['id_so'].'"'); | |
| 192 | - | |
| 193 | - $arrConfiguracoesLocais = getValores('configuracoes_locais','nu_timeout_srcacic','id_local = '.$arrRedes['id_local']); | |
| 194 | - | |
| 195 | - $retorno_xml_values .= '<NM_COMPLETO>'.EnCrypt($key,$iv,$nm_nome_completo,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</NM_COMPLETO>'; | |
| 196 | - $retorno_xml_values .= '<ID_SESSAO>'.EnCrypt($key,$iv,$arrSessoes['id_sessao'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</ID_SESSAO>'; | |
| 197 | - $retorno_xml_values .= '<NU_TIMEOUT_SRCACIC>'.EnCrypt($key,$iv,$arrConfiguracoesLocais['nu_timeout_srcacic'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</NU_TIMEOUT_SRCACIC>'; | |
| 169 | + //GravaTESTES('SetSession: Após GET_ENTRIES => '.ldap_error($ldap)); | |
| 170 | + $nm_nome_completo = $arrLDAPdata[strtolower($arrServidores['te_atributo_retorna_nome'])]; | |
| 171 | + $te_email = $arrLDAPdata[strtolower($arrServidores['te_atributo_retorna_email'])]; | |
| 172 | + //GravaTESTES('SetSession: Após GET_ENTRIES => nm_nome_completo: '.$nm_nome_completo); | |
| 173 | + //GravaTESTES('SetSession: Após GET_ENTRIES => te_email: '.$te_email); | |
| 174 | + | |
| 175 | + if ($nm_nome_completo <> '') | |
| 176 | + criaSessao($dt_hr_inicio_sessao, | |
| 177 | + $nm_nome_acesso_autenticacao, | |
| 178 | + $nm_nome_completo, | |
| 179 | + $te_email, | |
| 180 | + $te_node_address, | |
| 181 | + $arrSO['id_so']); | |
| 198 | 182 | } |
| 199 | 183 | } |
| 200 | 184 | } |
| 201 | 185 | } |
| 186 | + | |
| 187 | + if ($nm_nome_completo <> '') | |
| 188 | + { | |
| 189 | + $arrSessoes = getValores('srcacic_sessoes','id_sessao','dt_hr_inicio_sessao="'.$dt_hr_inicio_sessao.'" AND | |
| 190 | + te_node_address_visitado="'.$te_node_address.'" AND | |
| 191 | + id_so_visitado = "'.$arrSO['id_so'].'"'); | |
| 192 | + | |
| 193 | + $arrConfiguracoesLocais = getValores('configuracoes_locais','nu_timeout_srcacic','id_local = '.$arrRedes['id_local']); | |
| 194 | + | |
| 195 | + $retorno_xml_values .= '<NM_COMPLETO>'.EnCrypt($key,$iv,$nm_nome_completo,$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</NM_COMPLETO>'; | |
| 196 | + $retorno_xml_values .= '<ID_SESSAO>'.EnCrypt($key,$iv,$arrSessoes['id_sessao'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</ID_SESSAO>'; | |
| 197 | + $retorno_xml_values .= '<NU_TIMEOUT_SRCACIC>'.EnCrypt($key,$iv,$arrConfiguracoesLocais['nu_timeout_srcacic'],$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</NU_TIMEOUT_SRCACIC>'; | |
| 198 | + } | |
| 202 | 199 | } |
| 203 | 200 | else |
| 204 | 201 | { |
| ... | ... | @@ -208,37 +205,36 @@ if ($te_palavra_chave == $strTePalavraChave) |
| 208 | 205 | SET dt_hr_ultimo_contato = '".date('Y-m-d H:i:s')."' |
| 209 | 206 | WHERE id_sessao = ".$id_sessao; |
| 210 | 207 | $result_SESSAO = mysql_query($query_SESSAO); |
| 208 | + | |
| 209 | + $arr_id_usuario_visitante = explode('<REG>',DeCrypt($key,$iv,$_POST['id_usuario_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 210 | + $arr_te_so_visitante = explode('<REG>',DeCrypt($key,$iv,$_POST['te_so_visitante'] ,$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 211 | + | |
| 212 | + GravaTESTES('POST_id_usuario_visitante: '.DeCrypt($key,$iv,$_POST['id_usuario_visitante'],$v_cs_cipher,$v_cs_compress,$strPaddingKey)); | |
| 213 | + GravaTESTES('Tamanho de arr_id_usuario_visitante: '.count($arr_id_usuario_visitante)); | |
| 211 | 214 | |
| 212 | - $arr_id_usuario_visitante = explode('<REG>',$_POST['id_usuario_visitante']); | |
| 213 | - $arr_te_node_address_visitante = explode('<REG>',$_POST['te_node_address_visitante']); | |
| 214 | - $arr_te_so_visitante = explode('<REG>',$_POST['te_so_visitante']); | |
| 215 | - | |
| 216 | 215 | for ($i=0; $i < count($arr_id_usuario_visitante); $i++) |
| 217 | 216 | { |
| 218 | - $id_usuario_visitante = DeCrypt($key,$iv,$arr_id_usuario_visitante[$i],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 219 | - $te_node_address_visitante = DeCrypt($key,$iv,$arr_te_node_address_visitante[$i],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 220 | - $te_so_visitante = DeCrypt($key,$iv,$arr_te_so_visitante[$i],$v_cs_cipher,$v_cs_compress,$strPaddingKey); | |
| 221 | - | |
| 222 | - // ATENÇÃO: Apenas retornará um ARRAY contendo "id_so" e "te_so". | |
| 223 | - $arrSO_visitante = inclui_computador_caso_nao_exista($te_node_address_visitante, | |
| 224 | - '', | |
| 225 | - $te_so_visitante, | |
| 226 | - '', | |
| 227 | - '', | |
| 228 | - '', | |
| 229 | - ''); | |
| 217 | + $te_so_visitante = $arr_te_so_visitante[$i]; | |
| 218 | + $arr_id_so_visitante = getValores('so','id_so','trim(te_so)="'.trim($te_so_visitante).'"'); | |
| 230 | 219 | |
| 220 | + /* | |
| 221 | + E se o tecnico utilizar um notebook externo ao parque computacional da corporacao? | |
| 222 | + Nao insiro a maquina do visitante... | |
| 223 | + */ | |
| 224 | + | |
| 231 | 225 | $query_SESSAO = "UPDATE srcacic_sessoes_logs |
| 232 | - SET dt_hr_ultimo_contato = '".date('Y-m-d H:i:s')."' | |
| 226 | + SET dt_hr_ultimo_contato = '".date('Y-m-d H:i:s')."' | |
| 233 | 227 | WHERE id_sessao = ".$id_sessao." and |
| 234 | - id_usuario_visitante = ".$id_usuario_visitante." and | |
| 228 | + id_usuario_visitante = ".$arr_id_usuario_visitante[$i]." AND | |
| 229 | + id_so_visitante = ".$arr_id_so_visitante['id_so'] ; | |
| 230 | +/*." and | |
| 235 | 231 | te_node_address_visitante = '".$te_node_address_visitante."' and |
| 236 | - id_so_visitante = ".$arrSO_visitante['id_so']; | |
| 237 | - | |
| 232 | + id_so_visitante = ".$arrSO_visitante['id_so']; */ | |
| 233 | + | |
| 238 | 234 | GravaTESTES('SetSession: POST[id_sessao] => '.$_POST['id_sessao']); |
| 239 | 235 | GravaTESTES('SetSession: id_sessao => '.$id_sessao); |
| 240 | 236 | GravaTESTES('SetSession: query_SESSAO => '.$query_SESSAO); |
| 241 | - | |
| 237 | + | |
| 242 | 238 | $result_SESSAO = mysql_query($query_SESSAO); |
| 243 | 239 | |
| 244 | 240 | } |
| ... | ... | @@ -246,14 +242,57 @@ if ($te_palavra_chave == $strTePalavraChave) |
| 246 | 242 | $retorno_xml_values .= '<OK>'.EnCrypt($key,$iv,'OK',$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</OK>'; |
| 247 | 243 | } |
| 248 | 244 | } |
| 249 | - | |
| 245 | +//GravaTESTES('Montando XML de retorno...'); | |
| 250 | 246 | if ($retorno_xml_values <> '') |
| 251 | 247 | $retorno_xml_values = '<STATUS>'.EnCrypt($key,$iv,'OK',$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</STATUS>'.$retorno_xml_values; |
| 252 | 248 | else |
| 253 | 249 | $retorno_xml_values = '<STATUS>'.EnCrypt($key,$iv,'SetSession ERRO! '.ldap_error($ldap),$v_cs_cipher,$v_cs_compress,$v_compress_level,$strPaddingKey).'</STATUS>'; |
| 254 | - | |
| 250 | +//GravaTESTES($retorno_xml_values); | |
| 255 | 251 | $retorno_xml = $retorno_xml_header . $retorno_xml_values; |
| 256 | 252 | |
| 257 | 253 | echo $retorno_xml; |
| 254 | + | |
| 255 | +function criaSessao($p_dt_hr_inicio_sessao, | |
| 256 | + $p_nm_nome_acesso_autenticacao, | |
| 257 | + $p_nm_nome_completo, | |
| 258 | + $p_te_email, | |
| 259 | + $p_te_node_address, | |
| 260 | + $p_id_so) | |
| 261 | + { | |
| 262 | + if ($p_te_email <> '') | |
| 263 | + { | |
| 264 | + // Envio e-mail informando da abertura de sessão | |
| 265 | + $corpo_mail = "Prezado usuário(a) ".$p_nm_nome_completo.",\n\n | |
| 266 | + informamos que foi iniciada uma sessão para Suporte Remoto Seguro através do Sistema CACIC em ".$p_dt_hr_inicio_sessao . "\n\n\n\n | |
| 267 | + _______________________________________________________________________ | |
| 268 | + CACIC - Configurador Automático e Coletor de Informações Computacionais\n | |
| 269 | + srCACIC - Módulo para Suporte Remoto Seguro do Sistema CACIC\n | |
| 270 | + Desenvolvido pela Dataprev - Unidade Regional Espírito Santo"; | |
| 271 | + | |
| 272 | + //GravaTESTES('SetSession: Enviando Email...'); | |
| 273 | + // Manda mail para os administradores. | |
| 274 | + //mail("$p_te_email", "Sistema CACIC - Módulo srCACIC - Abertura de Sessão para Suporte Remoto Seguro", "$corpo_mail", "From: cacic@{$_SERVER['SERVER_NAME']}"); | |
| 275 | + } | |
| 276 | + | |
| 277 | + conecta_bd_cacic(); | |
| 278 | + | |
| 279 | + $query_SESSAO = "INSERT INTO srcacic_sessoes | |
| 280 | + ( dt_hr_inicio_sessao, | |
| 281 | + nm_acesso_usuario_visitado, | |
| 282 | + nm_completo_usuario_visitado, | |
| 283 | + te_email_usuario_visitado, | |
| 284 | + te_node_address_visitado, | |
| 285 | + id_so_visitado, | |
| 286 | + dt_hr_ultimo_contato) | |
| 287 | + VALUES ('" . $p_dt_hr_inicio_sessao . "', | |
| 288 | + '" . $p_nm_nome_acesso_autenticacao . "', | |
| 289 | + '" . $p_nm_nome_completo . "', | |
| 290 | + '" . $p_te_email . "', | |
| 291 | + '" . $p_te_node_address . "', | |
| 292 | + '" . $p_id_so . "', | |
| 293 | + '" . $p_dt_hr_inicio_sessao . "')"; | |
| 294 | + GravaTESTES('SetSession: query_SESSAO: '.$query_SESSAO); | |
| 295 | + $result_SESSAO = mysql_query($query_SESSAO); | |
| 296 | + } | |
| 258 | 297 | ?> |
| 259 | 298 | ... | ... |