Só reforçando o que eu disse, eu já achei uma falha de segurança, onde você abre um descritor de arquivos com dois argumentos. *Possivelmente* em algum desses "opens" um dos argumentos vem do usuário.
https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=76775519 On Mon, Jan 11, 2016 at 5:36 PM, Daniel de Oliveira Mantovani < daniel.oliveira.mantov...@gmail.com> wrote: > Eu fortemente te aconselho a jogar isso fora, e usar o Google Hangout ou > qualquer uma das milhões de soluções grátis que resolvem isso. > > 2016-01-11 17:33 GMT-02:00 Lucas Moraes <lucastiagodemor...@gmail.com>: > >> Aconselho você atualizar a pagina com javascript. >> >> setInterval(function(){ window.location.href = '?todas' }, 5000); >> >> Falou. >> >> Em 11 de janeiro de 2016 17:26, kleber caetano <payb...@hotmail.com.br> >> escreveu: >> >>> Olá Sr(s), >>> >>> Migrei para o windows 10 e estou tendo um problema com um aplicativo em >>> perl quando utilizo o edge , >>> entretanto , quando utilizo o explorer 11 o aplicativo é executado >>> normalmente. >>> >>> Nota[1] - Este aplicativo refere-se a um chat ( sala de reunião online ). >>> >>> O problema ( no edge ) ocorre quando : >>> >>> - Ele reenvia as mensagens ( através do comando <meta >>> http-equiv="refresh" content="5,?todas"/> ) para >>> os participantes da sala de reunião ou seja não está enviando nada. >>> - Quando é encerrada a reunião , o aplicativo elimina os arquivos de >>> trabalho , porém , no edge isto >>> não está acontecendo. >>> >>> Nota[2] - No explorer 11 estes problemas não ocorrem. >>> >>> Nota[3] - O script em perl foi desenvolvido por um amigo que conhecia >>> bastante perl >>> entretanto meu conhecimento é limitado. >>> >>> Nota[4] – Estou trabalhando com >>> ActivePerl-5.16.3.1603-MSWin32-x86-296746 >>> >>> Nota[5] – Caso considerem necessário , tenho como disponibilizar um link >>> de acesso a este site sala.cgi >>> >>> Nota[6] - Quando instalei o windows 10 , o reload automático >>> funcionava , entretanto , >>> ao realizar uma manutenção grande ( nova versão acho ) o >>> problema apareceu. >>> O problema de não eliminar os arquivos temporário de >>> trabalho existem >>> desde a instalação inicial do windows 10 >>> Nota[7] – coloquei duas marcas no script onde eu acho que as funções são >>> executadas: >>> >>> ######################### aqui elimina os arquivos de trabalho >>> ################################### >>> >>> ##################### aqui reenvia mensagens para os participantes >>> ############################# >>> >>> Alguém sabe como resolver isto ? >>> >>> Agradeço a atenção , >>> >>> kleber >>> >>> >>> ================================================================================================= >>> script em perl >>> ( sala.cgi ) >>> >>> ================================================================================================= >>> #!perl >>> print "Content-type:text/html\n\n"; >>> use CGI::Carp(fatalsToBrowser); >>> >>> >>> ############################################################################################### >>> # CONFIGURAÇÕES >>> GERAIS >>> # >>> # >>> # >>> $titulo = "Sala de Reunião Online"; # Título do >>> script >>> # >>> $master = "master.log"; # Arquivo temporário a >>> guardar primeiro usuário # >>> $log = "logs.log"; # Arquivo >>> temporário de logs >>> totais # >>> $log2 = "logs2.log"; # Arquivo temporário >>> de logs da >>> sessão # >>> $online = "online.log"; # Arquivo temporário com >>> nomes dos usuários Online # >>> $estilos= "estilos.css"; # Arquivo com os estilos >>> dentro da pasta modelos # >>> $topo = "topo.html"; # Template do >>> Topo >>> # >>> $fim = "fim.html"; # Template do >>> Fim >>> # >>> # >>> # >>> # >>> # >>> # FIM DAS >>> CONFIGURAÇÕES >>> # >>> >>> ############################################################################################### >>> >>> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); >>> @conteudo = split(/&/, $buffer); >>> foreach $par (@conteudo) { >>> ($campo, $valor) = split(/=/, $par); >>> $valor =~ tr/+/ /; >>> $valor =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> $CAMPO{$campo} = $valor; >>> } >>> >>> $qs = "$ENV{QUERY_STRING}"; >>> &data; >>> &style; >>> if ($qs eq ""){ >>> print qq| >>> <BR><BR><BR><BR><BR><BR><BR> >>> |; >>> &topo; >>> print qq§ >>> <script language="JavaScript"> >>> <!-- >>> altura = 690; >>> largura= 1090; >>> l = (screen.width - largura)/2; >>> t = (screen.height - altura - 50)/2; >>> var flag = ""; >>> var idioma=1; >>> var strCookie='payback'; >>> >>> function LerCookie(strCookie) { >>> var strNomeIgual = strCookie + "="; >>> var arrCookies = document.cookie.split(';'); >>> for(var i = 0; i < arrCookies.length; i++) >>> { >>> var strValorCookie = arrCookies[i]; >>> while(strValorCookie.charAt(0) == ' ') >>> { >>> strValorCookie = strValorCookie.substring(1, >>> strValorCookie.length); >>> } >>> if(strValorCookie.indexOf(strNomeIgual) == 0) >>> { >>> var mensagem=strValorCookie.substring(strNomeIgual.length, >>> strValorCookie.length); >>> flag = mensagem; >>> mensagem =''; >>> return; >>> } >>> } >>> alert ( '!!!! Erro crítico : Não foi possível restaurar área de >>> transferência' ); >>> top.location.href = "/payback/index.htm"; >>> }; >>> function init(form) { >>> LerCookie(strCookie); >>> if (flag != null ) { >>> flag = flag.split('|'); >>> document.form.login.value = flag[9]; >>> } >>> document.form.tema.focus(); >>> } >>> function Entra(form) { >>> if (document.form.tema.value.length == 0) { >>> alert("O tema da reunião não foi informado"); >>> document.form.tema.focus(); >>> document.form.tema.select(); >>> return false; >>> } >>> novajanela = window.open("", "entrar", >>> "scrollbars=no,menubar=no,height="+altura+",width="+largura+",top="+t+",left="+l); >>> >>> return true; >>> } >>> function showSalaHelp() { >>> altura1=400; >>> largura1= 800; >>> l1 = (screen.width - largura + 250)/2; >>> t1 = (screen.height - altura + 250)/2; >>> var html = '<HTML><HEAD><TITLE></TITLE></HEAD>'; >>> html += '<BODY background="/reuniao/imagem/papel.jpg" >>> TEXT="#000066"><br><table align=center><tr><td><h4><b>SALA DE >>> REUNIÃO ONLINE >>> </b></h4></td></tr></table><br><TABLE >>> ALIGN=CENTER><font size=2><TR><TD><PRE><b>'; >>> html += '<li>O dado usuário deve ser único por sala.'; >>> html += '<li>O dado tema da reunião será o ponto de encontro >>> dos participantes na sala.<br>'; >>> html += ' Este texto não pode conter espaço , por exemplo , >>> informar Aquisição_de_Filial'; >>> html += '<li>O sistema diferencia letra maiúscula de minúscula >>> para identificação da sala.'; >>> html += '<li>Cada sala terá um único tema não tendo limitações >>> de quantidade de aberturas de<br>'; >>> html += ' salas e participantes.<br>'; >>> html += '<li>O usuário que abrir a sala ou seja o primeiro a >>> entrar receberá uma tarefa de<br>'; >>> html += ' encerrar a reunião ( botão especial ).<br> Este >>> usuário , ao sair da sala , provocará a eliminação dos arquivos que >>> registram<br> os textos digitados.<br> Portanto , recomenda-se dar um >>> tempo de poucos segundos antes de sair da sala.'; >>> html += '<li>Ao acionar o batão especial ENCERRAR REUNIÃO , o >>> texto REUNIÃO FINALIZADA<br>'; >>> html += ' é enviado á sala e nenhuma nova mensagem é >>> registrada pelo sistema.'; >>> html += '<li>É recomendável que os participantes imprimam a >>> ata de reunião após esta ação.<br>'; >>> html += '<li>Para ajuda de formatação do texto mensagem , na >>> sala de reunião , acionar a tecla F1'; >>> html += '<li>Os documentos enviados ao servidor para serem >>> apresentados como anexo ,<br> serão eliminados quando o sistema >>> operacional for reinicializado.<br>'; >>> html += ' Nota - O documento apresentado como anexo , para >>> ser baixado no servidor , deverá ter<br> no máximo 500 kbytes.'; >>> html += '</TABLE></FONT></B></PRE></BODY></HTML>'; >>> var newWindow = >>> window.open("","","scrollbars=auto,height="+altura1+",width="+largura1+",top="+t1+",left="+l1); >>> newWindow.document.write(html); >>> newWindow.document.close(); >>> event.cancelBubble = true; >>> return false; >>> } >>> //--> >>> </script> >>> <style type="text/css"><!-- >>> .multi_bg { background-image : linear-gradient(to right, rgba(30, 75, >>> 115, 0.5), rgba(30, 75, 115, 0.5)); } >>> --> >>> </style> >>> </HEAD> >>> <body onload="init(this.form)" onHelp="return showSalaHelp()" >>> BGCOLOR="#ADB6C6" TEXT="#003366" class="multi_bg"> >>> <form action="?entra" method="POST" name="form" target="entrar" >>> id="form" OnSubmit="return Entra(this)"> >>> <br> >>> <strong><font color="#ffffff" >>> size="2"> <label >>> class='sombra'><b>Escolha um tema para >>> entrar</label></font></strong> <img >>> src="/reuniao/imagem/help.gif" >>> onClick="showSalaHelp();document.form.tema.focus()" WIDTH="18" HEIGHT="18" >>> style="cursor:pointer" title ="Ajuda do sistema"> >>> <br><br> >>> <div align="center"> >>> <table> >>> <tr> >>> <!-- <td width="33%"><div align="right"><font >>> class="sombra"><font color="#ffffff" >>> size="2"><b>Usuário </b></font></div></td> --> >>> <td><input type="hidden" name="login" class="campo" >>> onFocus="document.form.tema.focus()" onHelp="return showSalaHelp()"></td> >>> </tr> >>> <tr> >>> <td><div align="right"><font class="sombra"><font >>> color="#ffffff" size="2"><b>Tema </b></font></div></td> >>> <td><input name="tema" type="text" class="campo" >>> id="tema" onHelp="return showSalaHelp()"></td> >>> </tr> >>> </table><br> >>> <table> >>> <tr> >>> >>> <td> </td> >>> <td align="center" colspan=2><input type="submit" >>> value="Entrar" class="botao" STYLE='cursor: pointer;font-weight:bold'></td> >>> </tr> >>> </table><br> >>> </div> >>> §;&fim;} >>> >>> if ($qs eq "entra"){ >>> if ($CAMPO{login} eq ""){ >>> print qq|<br><br><br><br><br><br><br><br><br><br><br><br>|; >>> &topo; >>> print qq|<br>Você deve digitar um nome de usuário antes de entrar na >>> sala ! <br><br> >>> <div align="center"> >>> <input type="button" class="botao2" onClick="javascript:windows.close()" >>> value="Fechar Janela"><br> >>> </div> >>> |; >>> &fim; >>> }else{ >>> if ($CAMPO{tema} eq "" ){ >>> print qq|<br><br><br><br><br><br><br><br><br><br><br><br>|; >>> &topo; >>> print qq|<br>Você deve digitar um tema antes de entrar na sala ! <br><br> >>> <div align="center"> >>> <input type="button" class="botao2" onClick="javascript:window.close()" >>> value="Fechar Janela"><br> >>> </div> >>> |; >>> &fim; >>> }else{ >>> if (-e "$CAMPO{tema}"."_"."$log"){ >>> open(ONLINE,"$CAMPO{tema}_$online"); >>> @online = <ONLINE>; >>> close(ONLINE); >>> >>> foreach (@online){ >>> chomp; >>> s/%//gi; >>> if ($CAMPO{login} eq "$_"){ >>> $repetido = "1"; >>> }else{ >>> $repetido = "0"; >>> }} >>> if ($repetido eq "1"){ >>> print qq|<br><br><br><br><br><br><br><br><br><br><br><br>|; >>> &topo; >>> print qq|<br>Este nome de usuário já está em uso! Por favor escolha >>> outro.<br><br> >>> <div align="center"> >>> <input type="button" class="botao2" onClick="javascript:window.close()" >>> value="Fechar Janela"><br> >>> </div> >>> |;&fim; >>> }else{ >>> open(MASTER,"$CAMPO{tema}_$master"); >>> $master = <MASTER>; >>> close(MASTER); >>> chomp $master; >>> $master =~ s/%//gi; >>> >>> if ($CAMPO{login} eq $master){$a = "1";} else {$a = "0";} >>> open(ONLINE,">>$CAMPO{tema}_$online"); >>> print ONLINE qq|%$CAMPO{login}%\n|; >>> close(ONLINE); >>> >>> open (SALA, ">>$CAMPO{tema}_$log"); >>> print SALA qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> entrou na sala</b></font><br>\n|; >>> close(SALA); >>> >>> open (SALA, ">>$CAMPO{tema}_$log2"); >>> print SALA qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> entrou na sala</b></font><br>\n|; >>> close(SALA); >>> >>> &topo;&msg;&fim; >>> }}else{ >>> >>> open(MASTER,">$CAMPO{tema}_$master"); >>> print MASTER qq|%$CAMPO{login}%\n|; >>> close(MASTER); >>> >>> open(ONLINE,">>$CAMPO{tema}_$online"); >>> print ONLINE qq|%$CAMPO{login}%\n|; >>> close(ONLINE); >>> >>> open (SALA, ">>$CAMPO{tema}_$log"); >>> print SALA qq|<div align="center"><font class="texto"><h5>ATA DA >>> REUNIÃO : <font size=4><b>$CAMPO{tema} </b></font></div><hr>\n|; >>> print SALA qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> entrou na sala</b></font><br>\n|; >>> close(SALA); >>> >>> open (SALA, ">>$CAMPO{tema}_$log2"); >>> print SALA qq|<div align="center"><font class="texto"><h5>ATA DA >>> REUNIÃO : <font size=4><b>$CAMPO{tema} </b></font></div><hr>\n|; >>> print SALA qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> entrou na sala</b></font><br>\n|; >>> close(SALA); >>> $a = "1"; >>> &topo;&msg;&fim; >>> }}}} >>> >>> if ($qs eq "escreve2"){ >>> $CAMPO{msg} =~ tr/+/ /; >>> $CAMPO{msg} =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> $CAMPO{tema} =~ tr/+/ /; >>> $CAMPO{tema} =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> if ($CAMPO{msg} eq ""){ >>> print qq| >>> <script language="Javascript"> >>> <!-- >>> alert ('Mensagem não informada') >>> //--> >>> </script> >>> <body >>> onLoad="this.location.href('?principal2=$CAMPO{tema}-$CAMPO{login}')"> >>> |;}else{ >>> >>> if ($CAMPO{msg} eq "REUNIÃO FINALIZADA"){ >>> >>> open(LOG,">>$CAMPO{tema}"."_"."$log"); >>> print LOG qq|<br><div align="center"><font class="texto"><b>REUNIÃO >>> FINALIZADA</b></font></div><br>\n|; >>> close(LOG); >>> >>> open(LOG,">$CAMPO{tema}"."_"."$log2"); >>> print LOG qq|<br><div align="center"><font class="texto"><b>REUNIÃO >>> FINALIZADA</b></font></div><br>\n|; >>> close(LOG); >>> >>> print qq| >>> <body >>> onLoad="this.location.href('?principal2=$CAMPO{tema}-$CAMPO{login}')"> >>> |; >>> }else{ >>> >>> open(LOG,"$CAMPO{tema}"."_"."$log"); >>> @log = <LOG>; >>> close(LOG); >>> $r = "0"; >>> foreach (@log){ >>> chomp; >>> if($_ eq "<br><div align=\"center\"><font class=\"texto\"><b>REUNIÃO >>> FINALIZADA</b></font></div><br>"){ >>> $r = "1"; >>> }} >>> >>> if ($r eq "1"){ >>> print qq| >>> <body >>> onLoad="this.location.href('?principal2=$CAMPO{tema}-$CAMPO{login}')"> >>> |; >>> }else{ >>> >>> open(LOG,">>$CAMPO{tema}"."_"."$log"); >>> print LOG qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> <i>diz</i> $CAMPO{msg}</font><br>\n|; >>> close(LOG); >>> open(LOG,">>$CAMPO{tema}"."_"."$log2"); >>> print LOG qq|<font class="texto"><i>($data)</i> >>> <b>$CAMPO{login}</b> <i>diz</i> $CAMPO{msg}</font><br>\n|; >>> close(LOG); >>> print qq| >>> <body >>> onLoad="this.location.href('?principal2=$CAMPO{tema}-$CAMPO{login}')"> >>> |;}}}} >>> >>> if ($qs =~ /imprimir/){ >>> &imprimir; >>> } >>> >>> if ($qs =~ /logout/){ >>> &logout; >>> } >>> >>> if ($qs =~ /principal/){ >>> &principal; >>> } >>> >>> if ($qs =~ /principal2/){ >>> &principal2; >>> } >>> >>> if ($qs =~ /todas/){ >>> &todas; >>> } >>> >>> sub data{ >>> ($seg,$min,$hr,$dia,$mes,$ano) = localtime(); >>> if ($hr < "10"){$hr = "0$hr";} >>> if ($min < "10"){$min = "0$min";} >>> if ($seg < "10"){$seg = "0$seg";} >>> >>> @mes = >>> ("janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"); >>> $ano = 1900+$ano; >>> >>> $data = "$hr:$min:$seg, $dia de @mes[$mes] de $ano"; >>> } >>> >>> sub fim{ >>> open(FIM,"$fim"); >>> @fim=<FIM>; >>> close(FIM); >>> print "@fim"; >>> } >>> >>> sub imprimir { >>> $qs =~ s/imprimir=//; >>> $qs =~ tr/+/ /; >>> $qs =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> >>> open (LOG,"$qs"."_"."$log"); >>> @log = <LOG>; >>> close(LOG); >>> >>> print qq| >>> <html> >>> <head> >>> <title>$titulo</title> >>> @style >>> </head> >>> <body onload="this.window.print()"> >>> @log >>> </body> >>> |;} >>> >>> sub logout{ >>> $qs =~ s/logout=//gi; >>> ($login,$tema) = split (/-/,$qs); >>> $login =~ tr/+/ /; >>> $login =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> $tema =~ tr/+/ /; >>> $tema =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> >>> open(LOG,">>$tema"."_"."$log2"); >>> print LOG qq|<font class="texto"><i>($data)</i> <b>$login</b> >>> saiu da sala</b></font><br>\n|; >>> close(LOG); >>> >>> open(LOG,">>$tema"."_"."$log"); >>> print LOG qq|<font class="texto"><i>($data)</i> <b>$login</b> >>> saiu da sala</b></font><br>\n|; >>> close(LOG); >>> >>> open(ONLINE,"$tema"."_"."$online"); >>> @online = <ONLINE>; >>> close(ONLINE); >>> >>> @on = @online; >>> foreach (@on){ >>> chomp; >>> if ($_ =~ /%$login%/){ >>> s/$_//; >>> }} >>> >>> open(ONLINE,">$tema"."_"."$online"); >>> print ONLINE qq|@on|; >>> close(ONLINE); >>> >>> open(ONLINE,"$tema"."_"."$online"); >>> @online = <ONLINE>; >>> close(ONLINE); >>> >>> if (length ("@online") eq "0"){ >>> unlink("$tema"."_"."$master"); ######################### aqui elimina >>> os arquivos de trabalho ################################### >>> unlink("$tema"."_"."$online"); ################# não está sendo >>> executado no edge ########################################### >>> unlink("$tema"."_"."$log2"); >>> unlink("$tema"."_"."$log"); >>> }else{} >>> >>> print qq| >>> <html> >>> <head> >>> <title>$titulo</title> >>> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> >>> <script language="JavaScript"> >>> function Logout(){ >>> this.window.close() >>> } >>> </script> >>> </head> >>> <body onload="javascript:Logout()"> >>> </body> >>> </html> >>> |;} >>> >>> sub msg{ >>> $qs =~ tr/+/ /; >>> $qs =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> open (LOG, "$qs"."_"."$log2"); >>> @log = <LOG>; >>> close(LOG); >>> >>> $finalizado = "0"; >>> >>> foreach (@log){ >>> chomp; >>> print $_; >>> if ($_ eq "REUNIÃO FINALIZADA"){ >>> $finalizado = "1"; >>> }} >>> >>> print qq| >>> <script language="JavaScript"> >>> function Imprimir(){ >>> altura =690; >>> largura= 1090; >>> l = (screen.width - largura)/2; >>> t = (screen.height - altura - 50)/2; >>> window.open("?imprimir=$CAMPO{tema}","","scrollbars,height="+altura+",width="+largura+",top="+t+",left="+l); >>> >>> } >>> function unLoad(){ >>> window.open("?logout=$CAMPO{login}-$CAMPO{tema}","","width=80,height=80") >>> } >>> </script> >>> <body onunLoad="unLoad()"> >>> <table> >>> <tr><td> >>> <font class="texto1"><b> Usuário: >>> $CAMPO{login}</b></font> >>> </td><td> >>> <font class="texto1"><b> Tema: $CAMPO{tema}<br></b></font> >>> </td><td> >>> <img >>> src="/reuniao/imagem/calculadora.gif" onClick="calculadora()" WIDTH="18" >>> HEIGHT="22" style="cursor:pointer" title ="Calculadora financeira"> >>> </td><td> >>> <img >>> src="/reuniao/imagem/Email.gif" onClick="email()" WIDTH="24" HEIGHT="20" >>> style="cursor:pointer" title ="Correspondência interna"> >>> </td><td> >>> <img >>> src="/reuniao/imagem/acessorio.gif" onClick="acessorio()" WIDTH="24" >>> HEIGHT="20" style="cursor:pointer" title ="Acessórios"> >>> </td><TD> >>> <img >>> src="/reuniao/imagem/alarme.gif" onClick="alarme()" WIDTH="24" HEIGHT="20" >>> style="cursor:pointer" title ="Alarme"> >>> </td></tr></table> >>> <iframe align="middle" src="?todas=$CAMPO{tema}" name="iframe" >>> width="1010" height="480" style="overlap:auto"></iframe> >>> <iframe align="middle" src="?principal2=$CAMPO{tema}-$CAMPO{login}" >>> name="iframe2" width="1010" height="75" style="overlap:auto"></iframe> >>> <table> >>> <tr> >>> <td><input type="button" class="botao" value="Ata de reunião" >>> onClick="javascript:Imprimir()" >>> STYLE='cursor:pointer;font-weight:bold'></td> >>> <td> </td> >>> <td><div align="right"> >>> <input type="button" class="botao2" value="Sair da Sala" >>> onClick="javascript:window.close()" >>> STYLE='cursor:pointer;font-weight:bold'></div></td> >>> <td> </td> >>> |; >>> >>> if($a eq "1"){print qq|<td><div align="center"> >>> <form name="form" method="post" action="?escreve2" target="iframe2"> >>> <input name="msg" type="hidden" size="80" class="campo" >>> value="REUNIÃO FINALIZADA"> >>> <input name="login" type="hidden" class="campo" >>> value="$CAMPO{login}"> >>> <input name="tema" type="hidden" class="campo" >>> value="$CAMPO{tema}"> >>> <input type="submit" value="Encerrar Reunião" class="botao" >>> STYLE='cursor: pointer;font-weight:bold'> >>> </form> >>> </div> >>> </div></td></tr>|;}print qq|</table><br>|;} >>> >>> sub principal{ >>> $qs =~ s/principal=//; >>> $qs =~ tr/+/ /; >>> $qs =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> >>> open (LOG, $qs."_".$log2); >>> @log = <LOG>; >>> close(LOG); >>> >>> $finalizado = "0"; >>> >>> foreach (@log){ >>> chomp; >>> if ($_ eq "REUNIÃO FINALIZADA"){ >>> $finalizado = "1"; >>> }} >>> if ($finalizado eq "1"){print qq| >>> <font class="texto"> >>> A REUNIÃO FOI FINALIZADA. VOCÊ PODE IMPRIMIR OU VISUALIZAR O RELATÓRIO >>> </font>|; >>> >>> }else{print qq| >>> <html> >>> <head> >>> >>> @style >>> <script language="JavaScript"> >>> <!-- >>> function scroll() { >>> if( document.body && document.body.clientHeight ) { >>> window.innerHeight = document.body.clientHeight >>> } >>> window.scrollTo( 0, (window.innerHeight/0.1) ) >>> } >>> >>> function focus(){ >>> document.form.msg.focus() >>> } >>> >>> function enter(string){ >>> insertAtCaret(document.form.msg,string); >>> focus() >>> } >>> >>> function insertAtCaret (textObj, textFeildValue) { >>> if(document.all){ >>> if (textObj.createTextRange && textObj.caretPos) { >>> var caretPos = textObj.caretPos; >>> caretPos.text = >>> caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?textFeildValue + ' ' >>> : textFeildValue; >>> }else{ >>> textObj.value = textFeildValue; >>> } >>> }else{ >>> if(textObj.setSelectionRange){ >>> var rangeStart = textObj.selectionStart; >>> var rangeEnd = textObj.selectionEnd; >>> var tempStr1 = textObj.value.substring(0,rangeStart); >>> var tempStr2 = textObj.value.substring(rangeEnd); >>> textObj.value = tempStr1 + textFeildValue + tempStr2; >>> }else{ >>> alert("Esta versão do navegador não suporta >>> setSelectionRange"); >>> } >>> } >>> } >>> >>> function clear_field(){ >>> document.form.msg.value = '' >>> document.form.msg.focus() >>> document.form.msg.select() >>> } >>> >>> function anexar(){ >>> altura = 450; >>> largura= 700; >>> l = (screen.width - largura)/2; >>> t = (screen.height - altura - 50)/2; >>> var html = '<HTML><HEAD><TITLE></TITLE>' >>> html += '</HEAD><BODY >>> background="/reuniao/imagem/papel.jpg" TEXT="#000066">' >>> html += '<BR><BR><BR><table >>> align=center><tr><th><h3><label style="color: white; text-shadow: 1px 2px >>> 4px #000, 0 0 0 #000, 2px 4px 6px #000">Apresentar documento como >>> anexo</label></h3></th></tr></table><br><br>' >>> html += '<FORM NAME="anexo" METHOD="POST" >>> ACTION="/reuniao/temp/upload.plx" ENCTYPE="multipart/form-data">' >>> html += '<br>' >>> html += '<TABLE align=center>' >>> html += '<tr>' >>> html += '<td><input type="file" name="arquivo" >>> size="60" maxlength="90"></td>' >>> html += '</tr>' >>> html += '</table>' >>> html += '<br><br><br>' >>> html += '<TABLE align=center>' >>> html += '<tr>' >>> html += '<td bgcolor=#ADB6C6><input type="submit" >>> value=" Processa " style="color: white; text-shadow: 1px 2px 4px >>> #000, 0 0 0 #000, 2px 4px 6px #000"></td>' >>> html += '</TR>' >>> html += '</table>' >>> html += '</form>' >>> html += '</body>' >>> html += '</html>' >>> var newWindow = >>> window.open("","","scrollbars=no,menubar=no,height="+altura+",width="+largura+",top="+t+",left="+l) >>> newWindow.document.write(html) >>> newWindow.document.close() >>> focus() >>> return false >>> } >>> >>> function publicar(){ >>> altura = 450; >>> largura= 700; >>> l = (screen.width - largura)/2; >>> t = (screen.height - altura - 50)/2; >>> var html = '<HTML><HEAD><TITLE></TITLE>' >>> html += '</HEAD><BODY >>> background="/reuniao/imagem/papel.jpg" TEXT="#ffffff">' >>> html += '<BR><BR><BR><table >>> align=center><tr><th><h3><label style="color: white; text-shadow: 1px 2px >>> 4px #000, 0 0 0 #000, 2px 4px 6px #000">Ponto de publicação >>> web</label></h3></th></tr></table><br><br>' >>> html += '<FORM NAME="publica" METHOD="POST" >>> ACTION="/reuniao/temp/publica.plx">' >>> html += '<br>' >>> html += '<TABLE align=center>' >>> html += '<tr>' >>> html += '<td><input type="text" name="http" size="60" >>> maxlength="90" value = "http://"></td>' >>> html += '</tr>' >>> html += '</table>' >>> html += '<br><br><br>' >>> html += '<TABLE align=center>' >>> html += '<tr>' >>> html += '<td bgcolor=#ADB6C6><input type="submit" >>> value=" Processa " style="color: white; text-shadow: 1px 2px 4px >>> #000, 0 0 0 #000, 2px 4px 6px #000"></td>' >>> html += '</TR>' >>> html += '</table>' >>> html += '</form>' >>> html += '</body>' >>> html += '</html>' >>> var newWindow = >>> window.open("","","scrollbars=no,menubar=no,height="+altura+",width="+largura+",top="+t+",left="+l) >>> newWindow.document.write(html) >>> newWindow.document.close() >>> focus() >>> return false >>> } >>> >>> function showMsgHelp() { >>> alert(" SALA DE REUNIÃO >>> ONLINE\\n\\nMensagem -> Campo alfa numérico com tamanho de 300 caracteres e >>> diferente de espaço.\\n\\nNota - É recomendável que uma linha de mensagem >>> tenha no máximo 80 caracteres visando dar maior clareza no relatório ATA DE >>> REUNIÃO.\\n\\nTAGS ESPECIAIS PARA FORMATAÇÃO DE TEXTO\\n\\n<br> - Salto de >>> linha\\n<p> - Salto de parágrafo\\n<b>texto</b> - Texto em negrito\\n<font >>> size=4>texto</font> - Texto com fonte igual a 4 pixel\\n<font >>> color=red>texto</font> - Texto com cor em vermelho\\n<i>texto</i> - Texto >>> em itálico\\n<u>texto</u> - Texto sublinhado\\n<sub>texto</sub> - Texto >>> subscrito\\n<sup>texto</sup> - Texto >>> sobrescrito\\n<ol><li>texto1<li>texto2<li>texto3</ol> - Lista numérica dos >>> textos\\n<li>texto1<li>texto2<li>texto3 - Marcação dos textos\\n\\nNota - >>> Os parâmetros de formatação de texto podem ser utilizados >>> simultaneamente.\\n\\n EXEMPLO DE UTILIZAÇÃO\\n\\nOlá sr(s) >>> , bom dia a todos<br>Vamos dicurtir a <font size=3 color=red><b>Aquisição >>> do imóvel em São Paulo.</b></font><br>O Paulo vai nos descrever as >>> alternativas que dispomos.\\n\\n\\nFUNÇÕES ESPECIAIS PARA FORMATAÇÃO DE >>> TEXTO\\n\\nLimpa - Move espaço para o campo mensagem\\nLinha - >>> Move <br> para o campo mensagem para quebrar linha\\nLista - Move >>> marcador <li> para o campo mensagem com salto de linha\\nNumérico Move >>> marcador <ol> para o campo mensagem\\nCola - Coloca texto da área de >>> transferência no campo mensagem\\nAnexa - Disponibiliza documento como >>> um anexo para apresentação\\nPublica - Disponibiliza um link de acesso >>> referente a uma publicação na internet\\nRealça - Evidência uma parte do >>> texto selecionado no campo mensagem\\nSublinha - Realça um texto >>> selecionado no campo mensagem sublinhando-o") >>> event.cancelBubble = true >>> return false >>> } >>> >>> //--> >>> </script> >>> </head> >>> <body> >>> @log >>> </body> >>> </html>|; >>> }} >>> >>> sub principal2 { >>> $qs =~ s/principal2=//; >>> ($tema,$login) = split (/-/,$qs); >>> $tema =~ tr/+/ /; >>> $tema =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> $login =~ tr/+/ /; >>> $login =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> >>> print qq| >>> @style >>> >>> <body onLoad="document.form.msg.focus()" onHelp="return showMsgHelp()" >>> class="table3" leftmargin="0" topmargin="0" marginwidth="0" >>> marginheight="0"> >>> <div align="center"> >>> <table> >>> <tr> >>> <td> </td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/clear.png" >>> onClick="clear_field()" WIDTH="24" HEIGHT="20" style="cursor:pointer" >>> title ="Limpar campo mensagem" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/linha.png" >>> onClick="enter('<br>')" WIDTH="20" HEIGHT="20" style="cursor:pointer" >>> title ="Salto de linha" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/lista.gif" >>> onClick="enter('<li>')" WIDTH="20" HEIGHT="20" style="cursor:pointer" >>> title ="Marcador de lista" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/nlist.gif" >>> onClick="enter('<ol>')" WIDTH="20" HEIGHT="20" style="cursor:pointer" >>> title ="Marcador numérico" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" Á " >>> onClick="enter('Á')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" á " >>> onClick="enter('á')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" à " >>> onClick="enter('à')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ã " >>> onClick="enter('ã')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" â " >>> onClick="enter('â')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" É " >>> onClick="enter('É')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" é " >>> onClick="enter('é')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ê " >>> onClick="enter('ê')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" í " >>> onClick="enter('í')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" õ " >>> onClick="enter('õ')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ó " >>> onClick="enter('ó')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ô " >>> onClick="enter('ô')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ú " >>> onClick="enter('ú')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" Ç " >>> onClick="enter('Ç')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><input type="button" value=" ç " >>> onClick="enter('ç')" STYLE='cursor: pointer; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/anexo.png" >>> onClick="anexar()" WIDTH="20" HEIGHT="20" style="cursor:pointer" title >>> ="Anexar docto" STYLE='cursor: pointer; font-family: Arial, Helvetica, >>> sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/wlink.gif" >>> onClick="publicar()" WIDTH="20" HEIGHT="20" style="cursor:pointer" title >>> ="Publicar um link da internet" STYLE='cursor: hand; font-family: Arial, >>> Helvetica, sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> <td bgcolor='lightsteelblue'><img src="/reuniao/imagem/help.gif" >>> onClick="showMsgHelp()" WIDTH="18" HEIGHT="18" style="cursor:pointer" title >>> ="Ajuda do sistema" STYLE='cursor: pointer; font-family: Arial, Helvetica, >>> sans-serif; font-size: 10px; border-width: >>> 2;color:#003366;border-style:outset;font-weight:600'></td> >>> </tr> >>> </table><br> >>> <table align="center"> >>> <tr> >>> <td class="texto"><form name="form" method="post" action="?escreve2"> >>> <div align="center"><b><font size=2><label >>> class='sombra'> Mensagem </label></b></fonte> >>> <input name="msg" type="text" class="campo" >>> size="120" maxlength="300" onHelp="return showMsgHelp()"> >>> <input name="login" type="hidden" class="campo" >>> value="$login"> >>> <input name="tema" type="hidden" class="campo" >>> value="$tema"> >>> <input type="submit" value="Enviar" class="botao" >>> > >>> </div> >>> </td> >>> </tr> >>> </table> >>> </form> >>> </div> >>> </body> >>> |;} >>> >>> sub style{ >>> open(STYLE, "$estilos"); >>> @style = <STYLE>; >>> close(STYLE); >>> } >>> >>> sub todas{ >>> $qs =~ s/todas=//; >>> $qs =~ tr/+/ /; >>> $qs =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; >>> >>> open (LOG, $qs."_".$log); >>> @log = <LOG>; >>> close(LOG); >>> >>> print qq| >>> <meta http-equiv="refresh" content="5,?todas"/> ##################### >>> aqui reenvia mensagens para os participantes ############################# >>> @style >>> <script> >>> <!-- >>> function rolar() { >>> if( document.body && document.body.clientHeight ) { >>> window.innerHeight = document.body.clientHeight >>> } >>> window.scrollTo( 0, (window.innerHeight/0.1) ); >>> } >>> //--> >>> </script> >>> <body onLoad="javascript:rolar()"> >>> @log|;} >>> >>> sub topo{ >>> open(TOPO,"$topo"); >>> @topo=<TOPO>; >>> close(TOPO); >>> print "@topo"; >>> } >>> >>> =begin disclaimer >>> Sao Paulo Perl Mongers: http://sao-paulo.pm.org/ >>> SaoPaulo-pm mailing list: SaoPaulo-pm@pm.org >>> L<http://mail.pm.org/mailman/listinfo/saopaulo-pm> >>> =end disclaimer >>> >>> >> >> =begin disclaimer >> Sao Paulo Perl Mongers: http://sao-paulo.pm.org/ >> SaoPaulo-pm mailing list: SaoPaulo-pm@pm.org >> L<http://mail.pm.org/mailman/listinfo/saopaulo-pm> >> =end disclaimer >> >> > > > -- > Thank you very much! > > -dom > > -- > > Daniel de Oliveira Mantovani > Business Analytic Specialist > Perl Evangelist /Astrophysics hobbyist. > +55 11 9 8538-9897 > XOXO > -- Thank you very much! -dom -- Daniel de Oliveira Mantovani Business Analytic Specialist Perl Evangelist /Astrophysics hobbyist. +55 11 9 8538-9897 XOXO
=begin disclaimer Sao Paulo Perl Mongers: http://sao-paulo.pm.org/ SaoPaulo-pm mailing list: SaoPaulo-pm@pm.org L<http://mail.pm.org/mailman/listinfo/saopaulo-pm> =end disclaimer