
quinhosp
Membros-
Total de itens
127 -
Registro em
-
Última visita
Tudo que quinhosp postou
-
Jonathan, deu certo. Quando inseri a tag <PRE> no arquivo que mostra texto ele apareceu o jeito que foi inserido. Porém quando mostrado no arquivo mostra.php ele aparece maior do que a página e faz com que apareça uma barra de rolagem na horizontal. Já tentei de todo jeito diminuir o modo de visusalização. Mesmo assim não consegui. Identifiquei que é por causa da tag <PRE> e quando tiro consigo formatar o layout do texto com o height. Você pode me ajudar?
-
(Resolvido) Como faço para limitar o texto na vertical do <textarea
pergunta respondeu ao quinhosp de quinhosp em HTML, XHTML, CSS
eu fiz isso e não deu certo. O problema é a tag <PRE> que coloquei para mostrar o texto como inserido na caixa de texto. Porque s eu tirar o texto fica todo junto sem nenhuma formatação. Ai quando aparece no browser, ele ultrapassa o tamanho e exige barra de rolagem. Meu objetivo é tirar essa barra de rolagem e estreitar o heigth do texto. -
(Resolvido) Como faço para limitar o texto na vertical do <textarea
pergunta respondeu ao quinhosp de quinhosp em HTML, XHTML, CSS
Eu uso css, mas não sei qual propriedade para atingir o objetivo desejado. olha só os arquivos: form.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Cadastro de Notícias</title> <link rel="stylesheet" type="text/css" href="css.css">; <style type="text/css"> <!-- .style1 { font-size: 24px; font-weight: bold; color: #000033; } --> </style> </head> <body id="body"> <h1 align="center"> </h1> <form action="inserir.php" method="post"> <p align="center" class="style1">Cadastro de Notícias</p> <table width="549" height="232" border="0" align="center"> <tr> <td width="543"><label for="nome">Nome do Autor: </label> <strong> <input name="nome" id="nome" type="text" size="35"/> </strong> <br /><br /> <label for="titulo">Título do Texto : </label> <strong> <input name="titulo" id="titulo" type="text" size = "35"/> </strong> <br /><br /> <label for="resumo">Resumo do Texto:<br /> </label> <strong> <textarea name="resumo" id="resumo" rows="5" cols="70" /></textarea> </strong> <br /> <label for="texto">Texto:<br /></label> <strong> <textarea name="texto" id="texto" rows="10" cols="40" /></textarea> </strong> <br /> <br> <input name="submit" type="submit" value="Cadastrar" /> </p></td> </tr> </table> <p> </p> </form> </body> </html> css /* CSS Document */ #texto { margin-left: 100px; margin-right: 100px; font:Arial, Helvetica, sans-serif; } #titulo { font:Arial, Helvetica, sans-serif; font-size:24px; text-align:center; color: #000066; } #body { background:#E1E1E1; width: 200; height:100; } #body2 { background:#E1E1E1; width: 200; height:100; margin-right:50%; } #saida { font-style: normal; font-family:Verdana, Arial, Helvetica, sans-serif; margin-bottom:auto; height: 200; width: 400; float: inherit; color:#000000; font-size:12px; text-align:left; } e a página que mostra a notícia mostrar.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Consulta Notícias</title> <link rel="stylesheet" type="text/css" href="css.css"> </head> <body id="body2"> <?php include "conexao_db.php"; $sql = "SELECT * FROM tb_noticias WHERE ver = '1' ORDER BY id DESC"; /* * executa e trata a consulta */ $resultado = mysql_query($sql) or die ("Não foi possível realizar a consulta"); if(@mysql_num_rows($resultado) == 0) //or die("Nenhum registro encontrado") { echo "Nenhum registro encontrado"; } /* * fazendo um loop para mostrar os resultados */ else { while ($linha=mysql_fetch_array($resultado)) { $novadata = substr($linha['data'],8,2) . "/" . substr($linha['data'],5,2) . "/" . substr($linha['data'],0,4); //echo "<b>Código da Notícia</b>: {$linha['id']} <br />"; //echo "Autor: {$linha['nome']} <br />"; echo "<b>Data: $novadata </b><br />"; $id = (int)$_GET['id']; $resultado = mysql_query("SELECT * FROM tb_noticias WHERE id=".$id); $l = mysql_fetch_assoc($resultado); echo "<link rel='stylesheet' type='text/css' href='titulo.css'>"; echo "<div id='titulo'>"; ?> <font face="Times New Roman, Times, serif"> <?php echo "<center>" . "{$l['titulo']}" . "</center>"; ?> </font> <?php echo "</div><br /><br />"; $id = (int)$_GET['id']; $resultado = mysql_query("SELECT * FROM tb_noticias WHERE id=".$id); $l = mysql_fetch_assoc($resultado); echo "<link rel='stylesheet' type='text/css' href='css.css'>"; echo "<div id='texto'><p>"; echo "<pre id ='saida'>" . $l['texto'] . "</pre>"; echo "</p></div>"; echo "<hr />"; } } ?> </body> </html> Gente se eu colocar em uma table resolvo isso, mas não sei se é legal??? -
Gente, boa noite!! Não sei se me entendera bem, eu tenho um form onde insiro a noticia. Quando vou mostrar, aparece a notícia, porém com barra de rolagem horizontal. Quero que a notícia apareça no browser sem barra de rolagem na horizonal. quando coloquei no css o direction hidden, a barra sumiu, mas não consegui ler mais todo o texto. Acho que teria que ter uma limitação no <textarea> na vertical tipo height onde o texto passasse pra linha de baixo. se eu colocar em uma table resolvo isso, não sei se é legal. Alguém pode me ajudar Grato quinhosp
-
se eu baixar o iso do had hat, como faço. É so gravar no cd e dar boot?
-
Oi Boa tarde! Baixei o Fedora no site do Fedora project, e gravei em dvd o Fedora live + BrOffice. Porém não consigo instalar, pois quando do boot pelo dvd ele não encontra. alguém pode me ajudar? grato
-
Boa noite! Estou querendo aprender linux na versão redhat 9.0, onde conseguir? Esta versão é boa para um pc comum. Grato.
-
Gente, boa noite! Quero desenvolver um site de noticias que eu insira as materias por meio de um form em banco de dados. o problema é que quando vou mostrar essas noticias no site ela fica configurada como no banco. ou seja não quebra de linha, espaço nada. Ta totalmente desconfigurado. Tipo: eu insiro a noticia no form como eu quero que apareça no site. Isso não to consegindo fazer. alguém sabe como resolver.
-
(Resolvido) Problema no Firefox... com html
pergunta respondeu ao quinhosp de quinhosp em HTML, XHTML, CSS
e mudei para <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />,acho que funcionou, legal valeu! -
Também estou com o mesmo problema, alguém já achou a solução????/
-
(Resolvido) Problema no Firefox... com html
pergunta respondeu ao quinhosp de quinhosp em HTML, XHTML, CSS
Eu uso este: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> No Firefox dá probblema com acentos, etc.. -
Boa noite!, to meio ernrolado aqui. desenvolvi um site de notícias aqui, mas quando vou editar as notícias no firefox, com acentos ou outra coisa o texto fica todo desconfigurado com símbolos estranhos. Já no IE funciona legal. alguém pode me ajudar?? Grato, quinhosp
-
Me desculpe Jonathan Queiroz, Eu quero inserir o texto em meu banco de dados atarvés do campo textarea, e quero que ele saia formatado como inserido. Com parágrafo, espaço, toda formatação do momento da entrada. Grato, quinhosp
-
Algué pode me ajudar?? Como inserir e imprimir texto formatado em banco de dados
-
não deu não!!!!!!!!! antes etava assim Código da Notícia: 30 Autor: Teste Teste Data: 24/07/2009 Título: Testando Agora Resumo:Testeando de novo porque? agora depois desta linha de comando que você passou, o texto do resumo desceu Código da Notícia: 30 Autor: Teste Teste Data: 24/07/2009 Título: Testando Agora Resumo: Testeando de novo porque?
-
Então ESerra! Olha só, eu digito no form, ele insere no mysql pelo inserir.php e depois eu mostro as notícias pelo mostrar.php. eu coloquei a função que me disse aqui. mostrar.php echo nl2br("Resumo:<a href = consultar_todas.php?id=".$linha['id'].">\t".$linha['resumo']."</a>"); mas saiu tudo junto ainda. se puder me ajudar! grato
-
Estou desenvolvendo um sistema de notícias. Insiro o texto no banco de dados atarv's de um form, porém quando vou imprimir o texto ta todo junto. Preciso que o texto seja impresso na tela do mesmo modo que inseri. Como faço isso? Inserir.php <?php include "../conexao_db.php"; /* * monta query em SQL para insercao */ $sql = "INSERT INTO tb_noticias (nome, data, titulo, resumo, texto) VALUES ( '".$_POST['nome']."', NOW(), '".$_POST['titulo']."', '".$_POST['resumo']."', '".$_POST['texto']."' )"; /* * executa a query */ $sql = mysql_query($sql) or die ("Houve erro na gravação dos dados."); ?> mostar.php <?php include "conexao_db.php"; $sql = "SELECT * FROM tb_noticias WHERE ver = '1' ORDER BY id DESC LIMIT 5"; /* * executa e trata a consulta */ $resultado = mysql_query($sql) or die ("Não foi possível realizar a consulta"); if(@mysql_num_rows($resultado) == 0) //or die("Nenhum registro encontrado") { echo "Nenhum registro encontrado"; } /* * fazendo um loop para mostrar os resultados */ else { while ($linha=mysql_fetch_array($resultado)) { $novadata = substr($linha['data'],8,2) . "/" . substr($linha['data'],5,2) . "/" . substr($linha['data'],0,4); echo "<b>Código da Notícia</b>: {$linha['id']} <br />"; echo "Autor: {$linha['nome']} <br />"; echo "Data: $novadata <br />"; echo "Título: {$linha['titulo']} <br />"; echo "Resumo:<a href = consultar_todas.php?id=".$linha['id'].">\t".$linha['resumo']."</a>"; echo "<hr />"; } } ?>
-
Gostaria de editar um arquivo report.rav, como faço isso??? Grato..
-
Continuo enrolado com os posicionamentos dos divs........................ Se alguém puder me ajudar????
-
aqui estão os dois arquivos, o index(home2.html) e o css. quando altero o css ele muda o posicionamento no div. O internet 6 os divs ficam desregulados. grato arquivo css html, body { height: 100%; } * html #geral { height: 100%; /* hack para IE6 hq trata height como min-height */ } body { margin:0 auto; padding:0; text-align: center; width:100%; height:100%; } #geral { width:100%; height:100%; background-position:center top; background-repeat:no-repeat; background-attachment:scroll; margin:0 auto; text-align:center; } #topo { width:100%; height:100px; margin:0 auto; text-align:center; background-color:#f3f2f1; float:left; background-image: url(fundotopo.jpg); background-repeat:repeat-x; } #topoesquerdo { background-image:url(logo.gif); background-repeat:no-repeat; background-attachment:scroll; width:36%; height:71px; margin-top:33px; float:left; margin-left:30px; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-align:center; color:#FF9900; } #topodireito { width:56%; height:90px; float:left; margin-top:10px; } #topodown{ background-color:#000000; width:100%; height:20px; border-top:1px solid #cccccc; text-align:left; color:#FFFFFF; float:left; margin:0; padding:0; } #topodown_esquerdo{ width:500px; height:18px; font-family:Arial, Helvetica, sans-serif; font-size:10px; text-align:left; float:left; font-weight:bold; margin-left:10px; padding-top:3px; } #horas { width:30%; height:18px; font-family:Arial, Helvetica, sans-serif; font-size:10px; text-align:right; margin-right:25px; float:right; padding-top:3px; } #conteudogeral { width:100%; height:100%; padding:0; margin:0 auto; text-align:left; border-top:7px solid #ffffff; clear:both; } #menuesquerdo { width:15%; float:left; height:100%; border-top:5px solid #ffffff; } #centro { width:65%; float:left; height:100%; border-top:7px solid #ffffff; margin:0 auto; text-align:center; } #centroesquerdo { width:40%; float:left; height:100%; } #centrodireito { width:60%; float:inherit; height:50px; border: 1px solid #f3f2f1; margin_left:lpx text-align:left; font-size:11px; font-family:Arial, Helvetica, sans-serif; border-color: #fff #665 #665 #fff; border-style: solid; border-width: 1px; background-color:#F9F9F9; } #centrodireito2 { width:43%; float:right; height:275px; background-color:#F9F9F9; text-align:left; font-size:11px; font-family:Arial, Helvetica, sans-serif; border-color: #fff #665 #665 #fff; border-style: solid; border-width: 1px; } #jornallinha1 { width:90%; } #centro1 { width:33%; height:30px; float:left; } #centro2 { width:33%; float:left; } #centro3 { width:30%; float:left; } #menudireito { float:right; width:18%; height: 100%; float:left; border-top:5px solid #ffffff; } #jornal { width:95%; } /*- Menu --------------------------- */ #menu { width: 150px; margin: 10px; border-style: solid solid none solid; border-width: 0; padding:0; margin:0; } #menu li a { voice-family: "\"}\""; voice-family: inherit; height: 24px; text-decoration: none; font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#666; text-align:left; } #menu li a:link, #menu li a:visited { color:#666; display: block; background: url(menu.jpg); padding: 8px 0 0 0px; } #menu li a:hover { color:#666; background: url(menu.jpg) 0 -31px; padding: 8px 0 0 0px; } ul { list-style: none; margin: 0; padding: 0; } /*- Menu ------FIM----------------- */ .title{ font-size:10px; font-family:Arial, Helvetica, sans-serif; } /*- PUBLICIDADE---------- */ #publicidade1 { background-color: #F3F2F1; background-image:url(waiting2.gif); background-repeat:no-repeat; background-position:center center; width:148px; height:75px; border-top:1px solid #666666; border-bottom:1px solid #666666; border-left:1px solid #666666; border-right:1px solid #666666; margin-top:15px; margin-left:20px; float:right; } #tempo { background-image:url(waiting2.gif); background-repeat:no-repeat; background-position:center center; width:148px; height:170px; margin-top:10px; margin-left:20px; float:right; } #megasena { background-image:url(waiting2.gif); background-repeat:no-repeat; background-position:center center; width:150px; height:40px; margin-top:15px; margin-left:20px; float:right; } #publicidade2 { width:150px; height:90px; margin-top:20px; text-align:center; margin-left:20px; float:right; } #publicidade3 { width:150px; height:100px; margin-top:20px; text-align:center; margin-left:20px; float:right; } .pontilhado{ border-style: dotted; border-width: 1px; font-family: verdana, arial; font-size: 10pt; } .lin-hor-dotted { background: url(lin-dotted.gif) left top repeat-x; line-height: 3px; clear:both; } #rodape { clear:both; } #menurodape { clear:both; background-color: #eeeedd; } #menurodape ul { padding:0px; margin:0px; width: 100%; list-style:none; text-align:center; } #menurodape ul li { display: inline; } #menurodape ul li a { padding: 2px 8px; /* visual do link */ color: #333; text-decoration: none; font-family:Arial, Helvetica, sans-serif; font-size:11px; } #menurodape ul li a:hover { color: #b7b7b7; text-decoration: none; font-family:Arial, Helvetica, sans-serif; font-size:11px; } #linha { clear: both; } #rodape { position:relative; text-align:center; bottom:0px; clear:both; font-size:10px; font-family:Arial, Helvetica, sans-serif; height:90px; } #rodape1 { text-align:center; bottom:0px; clear:both; font-size:10px; font-family:Arial, Helvetica, sans-serif; height:90px; } #noticiasconteudo { margin-top:1px; margin-left:1px; top:0; margin-top:0; padding-top:0; width:240px; height:290px; text-align:left; float:left; } #noticias { font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:left; } #noticiasbaixo { width:250px; float:left; height:70px; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:11px; background-color: #f3f2f1; } #dicasdesaude { width:240px; float:left; height:140px; margin-left:30px; margin-top:2px; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:10px; padding-left:0; border-color: #fff #665 #665 #fff; border-style: solid; border-width: 1px; background: #F8F8F8; } #dolar { width:230px; float:left; height:115px; margin-left:110px; margin-top:2px; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:10px; padding-left:10px; border-color: #fff #665 #665 #fff; border-style: solid; border-width: 1px; background: #F8F8F8; } #jornal { margin:0 auto; text-align:center; height:100%; } #jornal1 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal2 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal3 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal4 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal4a { width:24%; clear:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal5 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornal6 { width:24%; float:left; background-image:url(loading.gif); background-repeat:no-repeat; background-position:center; height:180px; margin-bottom:75%; } #jornalcima { width: 90%; height:200px; margin-left:120px; } #jornalbaixo { width: 90%; height:200px; margin-left:120px; } } #titulocentro { font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:bold; color:#FF9900; } .combobox{ border-color:#ff9900; border: 1px solid #FF9900; font-size:11px; background-color:#eeeedd; color:#FF9900; font-family:Arial, Helvetica, sans-serif; font-weight:bold; } #comboboxgeral { width:90%; text-align:center; margin:0 auto; } #jornalgeral { width:98%; text-align:center; margin:0 auto; } #materia2 { font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; height:100%; padding-left:30px; padding-right:20px; } #materia3 { font-family:Arial, Helvetica, sans-serif; font-size:12px; text-align:justify; height:100%; padding-left:30px; padding-right:20px; } #altura { height:15px; width:40%; } #dica1 { background-image:url(waiting2.gif); background-repeat:no-repeat; margin-left:10px; } #dica2 { background-image:url(waiting2.gif); background-repeat:no-repeat; margin-left:10px; } .style1 {font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#F90; } .style2 {font-family:Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; } #dicas{ width:600px; height:300px; border:1px solid #F00; } #a {width:600px; background-color:#F0F; float:left; } #1 { width:200px; background-color: #0CF; float:left; } #2 { width:200px; background-color:#FF0; float:left; } #1a { float:left; width:50%; } #2a { float:left; width:50%; } #1b { float:left; width:50%; } #2b { float:left; width:50%; } #1c { float:left; width:50%; } #2c { float:left; width:50%; } #1d { float:left; width:50%; } #2d { float:left; width:50%; } #1e { float:left; width:50%; } #2e { float:left; width:50%; } arquivo Home2.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>JORNAL SEGVALE</title> <script> //drag n drop de div ---------------------------------------------------- //by tmferreira - [url=http://www.webly.com.br/tutorial/javascript-e-ajax/7045/drag-and-drop.htm]http://www.webly.com.br/tutorial/javascrip...ag-and-drop.htm[/url] //corrigida 30/01/2008 por Micox - [url=http://forum.ievolutionweb.com/index.php?s=&showtopic=7045&view=findpost&p=139679]http://forum.ievolutionweb.com/index.php?s...st&p=139679[/url] var objSelecionado = null; var mouseOffset = null; function addEvent(obj, evType, fn) { //Funo adaptada da original de Christian Heilmann, em //http://www.onlinetools.org/articles/unobtrusivejavascript/chapter4.html if (typeof obj == "string") { if (null == (obj = document.getElementById(obj))) { throw new Error("Elemento HTML no encontrado. No foi possível adicionar o evento."); } } if (obj.attachEvent) { return obj.attachEvent(("on" + evType), fn); } else if (obj.addEventListener) { return obj.addEventListener(evType, fn, true); } else { throw new Error("Seu browser no suporta adio de eventos. Senta, chora e pega um navegador mais recente."); } } function mouseCoords(ev){ if(typeof(ev.pageX)!=="undefined"){ return {x:ev.pageX, y:ev.pageY}; }else{ return { x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, y:ev.clientY + document.body.scrollTop - document.body.clientTop }; } } function getPosition(e, ev){ var ev = ev || window.event; if(e.constructor==String){ e = document.getElementById(e);} var left = 0, top = 0; var coords = mouseCoords(ev); while (e.offsetParent){ left += e.offsetLeft; top += e.offsetTop; e = e.offsetParent; } left += e.offsetLeft; top += e.offsetTop; return {x: coords.x - left, y: coords.y - top}; } function dragdrop(local_click, caixa_movida) { //local click indica quem o cara que quando movido, move o caixa_movida if(local_click.constructor==String){ local_click = document.getElementById(local_click);} if(caixa_movida.constructor==String){ caixa_movida = document.getElementById(caixa_movida);} local_click.style.cursor = 'move'; if(!caixa_movida.style.position || caixa_movida.style.position=='static'){ caixa_movida.style.position='relative' } local_click.onmousedown = function(ev) { objSelecionado = caixa_movida; mouseOffset = getPosition(objSelecionado, ev); }; document.onmouseup = function() { objSelecionado = null; } document.onmousemove = function(ev) { if (objSelecionado) { var ev = ev || window.event; var mousePos = mouseCoords(ev); var pai = objSelecionado.parentNode; objSelecionado.style.left = (mousePos.x - mouseOffset.x - pai.offsetLeft) + 'px'; objSelecionado.style.top = (mousePos.y - mouseOffset.y - pai.offsetTop) + 'px'; objSelecionado.style.margin = '0px'; return false; } } }</script> <script type="text/javascript" src="doc/demo.js"></script> <!-- other adapters (for testing purposes) --> <!--script type="text/javascript" src="/js/dojo-release-1.0.2/dojo/dojo.js"></script--> <!--script type="text/javascript" src="/js/ext-2.0/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="/js/ext-2.0/ext-core.js"></script--> <!--script type="text/javascript" src="/js/jquery-1.2.6.js"></script--> <!--script type="text/javascript" src="/js/mootools-1.2.js"></script--> <!--script type="text/javascript" src="/js/prototype-1.6.js"></script--> <!--script type="text/javascript" src="/js/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script--> <!--script type="text/javascript" src="src/adapter/shadowbox-dojo.js"></script--> <script type="text/javascript" src="src/adapter/shadowbox-base.js"></script> <script type="text/javascript" src="src/shadowbox.js"></script> <script type="text/javascript"> Shadowbox.loadSkin('classic', 'src/skin'); Shadowbox.loadLanguage('en', 'src/lang'); Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'src/player'); window.onload = function(){ Shadowbox.init(); /** * Note: The following function call is not necessary in your own project. * It is only used here to set up the demonstrations on this page. */ initDemos(); }; </script> <link rel="stylesheet" type="text/css" href="css.css"> <link rel="stylesheet" type="text/css" href="sample.css?t=1" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="captify.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('img.captify').captify({}); }); </script> <script language="JavaScript" src="http://www.midpublicidade.com.br/segvale/site/audio/audio-player.js"></script> <script type="text/javascript" src="gradient.js"></script> <script type="text/javascript"> function settings(){ var el = document.getElementById('settings'); (el.style.display == 'none') ? el.style.display = 'block' : el.style.display = 'none'; } </script> <script src="slide.js" type="text/javascript"></script> <link href="slide.css" rel="stylesheet" media="screen" type="text/css" /> </head> <body onload="slide.start()"> <div id="geral"> <div id="topo"> <div id="topoesquerdo"><br /><br /><br /><br /> </div> <div id="topodireito"><a href="http://www.midpublicidade.com.br" target="_blank"><img src="banner_blogui.jpg" alt="" border="0" /></a></div> </div> <div id="topodown"> <div id="topodown_esquerdo"> O seu Jornal da Saúde, Segurança do Trabalho e Meio Ambiente no Vale do Paraíba </div> <div id="horas"><script language="JavaScript"> hoje = new Date() dia = hoje.getDate() dias = hoje.getDay() mes = hoje.getMonth() ano = hoje.getFullYear() if (dia < 10) dia = "0" + dia if (ano < 2000) ano = "19" + ano function CriaArray (n) { this.length = n } NomeDia = new CriaArray(7) NomeDia[0] = "Domingo" NomeDia[1] = "Segunda-feira" NomeDia[2] = "Tera-feira" NomeDia[3] = "Quarta-feira" NomeDia[4] = "Quinta-feira" NomeDia[5] = "Sexta-feira" NomeDia[6] = "Sbado" NomeMes = new CriaArray(12) NomeMes[0] = "Janeiro" NomeMes[1] = "Fevereiro" NomeMes[2] = "Maro" NomeMes[3] = "Abril" NomeMes[4] = "Maio" NomeMes[5] = "Junho" NomeMes[6] = "Julho" NomeMes[7] = "Agosto" NomeMes[8] = "Setembro" NomeMes[9] = "Outubro" NomeMes[10] = "Novembro" NomeMes[11] = "Dezembro" document.write (NomeDia[dias] + ", " + dia + " de " + NomeMes[mes] + " de " + ano) </script></div> </div> <div id="conteudogeral"> <div id="menuesquerdo"> <div id="menu"> <ul> <li><a href="home.html" title="Home"> Home</a></li> <li><a href="quemsomos.html" title="quem somos" target="_self"> Quem somos</a></li> <li><a href="ultima.html" title="ultima edio" target="_self"> Última edição</a></li> <li><a href="dezembro2007.html" title="edies anteriores" target="_self"> Edições anteriores</a></li> <li><a href="anuncie.html" title="anuncie aqui" target="_self"> Anuncie aqui</a></li> <li><a href="expediente.html" title="expediente" target="_self"> Expediente</a></li> <li><a href="sugestoes.html" title="envie sugestes" target="_self"> Envie sugestões</a></li> <li><a href="enviarmateria.html" title="envie sua matria"> Envie sua matéria</a></li> <li><a href="vocesabia.html" title="cotao do dlar" target="_self"> Você sabia ?</a></li> </ul> </div> </div> <div id="centro"><a href="home2.html"></a> <div id="centroesquerdo"> <div id="noticias"> <div id="noticiasconteudo"> <!--Slide Start--> <div class="center"><div id="pic"> <a href="" id="linkSlide"> <img id="slideImg" class="img" /> <div id="titleSlide"></div> </a> <div id="textSlide"></div> <div id="nav"> <ul><div id="menuslide"> <div id="anterior"><div id="imganterior"> <li> <a href="#" onclick="slide.previous();"> <img src="imgs/past.gif" /> </a> </li></div><div id="txtanterior"><a href="#" onclick="slide.previous();" style="color: #666666;">ANTERIOR</a></div></div> <div id="slidemeio"> <li> <a href="#" onclick="slide.pause();"> <img id="playpause" src="imgs/pause.gif" /> </a> </li> </div> <div id="proxima"><div id="txtproxima"><a href="#" onclick="slide.next();" style="color: #666666;">PRÓXIMA</a></div><div id="imgproxima"><li> <a href="#" onclick="slide.next();"><img src="imgs/next.gif" /> </a> </li></div></div></div> </ul> </div> </div></div> <!--Slide End--> </div></div> <div id="dicasdesaude"> <h2 style="color:#990000;">Dicas de Saúde </h2> Escute dicas importantes para o seu dia-a-dia. <br /><br /> <div id="dica1"> <object type="application/x-shockwave-flash" data="http://www.midpublicidade.com.br/jornal/audio/player.swf" id="faixa1" height="24" width="220"> <param name="movie" value="http://www.midpublicidade.com.br/jornal/audio/player.swf" /> <param name="FlashVars" value="playerID=1&soundFile=http://www.midpublicidade.com.br/jornal/audio/faixa1.mp3" /> <param name="quality" value="high" /> <param name="menu" value="false" /> <param name="wmode" value="transparent" /> </object> </div> <br /> <div id="dica2"> <object type="application/x-shockwave-flash" data="http://www.midpublicidade.com.br/jornal/audio/player.swf" id="faixa2" height="24" width="220"> <param name="movie" value="http://www.midpublicidade.com.br/jornal/audio/player.swf"> <param name="FlashVars" value="playerID=1&soundFile=http://www.midpublicidade.com.br/jornal/audio/faixa2.mp3"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="wmode" value="transparent"> </object> </div> </div> <div id="altura"><Br /></div> <Br /></div> <div id="centrodireito2"><h2>Edição do Mês</h2><br /> <div class="images"> <p><strong> Confira nessa edição de Abril:</strong><a href="ultima.html" title="JORNAL SEGVALE do ms de Dez de 2007 - Pgina 01 " target="_top"><img class="captify" src="arquivos/abr09/01_small.jpg" alt="Última edição" border="0" /></a><Br /> <Br /> - Símbolos da Páscoa<Br /> - Reflexão sobre a Crise<Br /> - Saúde da mulher<Br /> - Ambiente Composto<Br /> e muito mais...<Br /><br /> <a href="ultima.html" target="_top"><strong>LEIA AGORA</strong></a> </p> <a rel="shadowbox[MustangThumbs];options={counterType:'skip',continuous:true,animSequence:'sync'}" class="option" href="arquivos/dez07/pagina03.html" title="JORNAL SEGVALE do ms de Dez de 2007 - Pgina 03 "></a> <a rel="shadowbox[MustangThumbs];options={counterType:'skip',continuous:true,animSequence:'sync'}" class="option" href="arquivos/dez07/pagina04.html" title="JORNAL SEGVALE do ms de Dez de 2007 - Pgina 04 "></a></p> </div> </div> <div id="altura"><Br /></div> <div id="dolar"><Br /><script language="JavaScript" src="http://www.guianews.com.br/js/dolar_1.js"></script> </div> <div id="altura"> <p><Br /> </p> </div> </div> <div id="menudireito"> <div id="megasena"><a href="http://www1.caixa.gov.br/loterias/loterias/megasena/megasena_resultado.asp" target="_blank"><img src="megasena.jpg" alt="" border="0" /></a></div> <div id="publicidade1"><img src="publicidade1.gif" alt="" /></div> <div id="publicidade2"><img src="publicidade2.gif" alt="" /></div> <div id="publicidade3"><img src="publicidade3.gif" alt="" /></div> <div id="tempo"><iframe src='http://selos.climatempo.com.br/selos/MostraSelo.php?CODCIDADE=449,432,566,553&SKIN=padrão' scrolling='no' frameborder='0' width=150 height='170' marginheight='0' marginwidth='0'></iframe></div> </div> </div> </div> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <div id="linha" class="lin-hor-dotted "> </div> <div id="menurodape"> <ul> <li><a href="home .html" title="Jornal Segvale do ms de Janeiro de 2008 - Pgina 01 "> Home</a></li> <li><a href="quemsomos.html" title="quem somos" target="_self"> Quem somos</a></li> <li><a href="ultima.html" title="ultima edio" target="_self"> Última edição</a></li> <li><a href="dezembro2007.html" title="edies anteriores" target="_self"> Edições anteriores</a></li> <li><a href="anuncie.html" title="anuncie aqui" target="_self"> Anuncie aqui</a></li> <li><a href="expediente.html" title="expediente" target="_self"> Expediente</a></li> <li><a href="sugestoes.html" title="envie sugestes" target="_self"> Envie sugestões</a></li> <li><a href="enviarmateria.html" title="envie sua matria"> Envie sua matéria</a></li> <li><a href="vocesabia.html" title="cotao do dlar" target="_self"> Você sabia ?</a></li> </ul> </div> <div id="linha" class="lin-hor-dotted "> </div> <div class="style2" id="rodape" style="text-align:center"><Br /><br /><br /> <strong>JORNAL SEGVALE</strong> - O seu Jornal da Saúde, Segurança do Trabalho e Meio Ambiente no Vale do Paraíba <br /> Todos os direitos reservados 2009 | Desenvolvido por:</span> <a href="http://www.midpublicidade.com.br" target="_blank">MID Publicidade</a><Br /> Configuração mínima 1024 x 768 pixels</div> <script> dragdrop('movedor','movido'); </script> </body> </html>
-
bom dia! Estou com um probleminha aqui que tá me dando dor de cabeça. Desenvolvi uma página em html com css, os div(s) estão todos posicionado corretamente, mas so on internet explorer 7 e 8 e no fire fox. Porém quando abro o internet explorer 6 dois dos meus divs se movem para direita. quando arrumo o arquivo.css na propriedade margin_left ele acerta no internet 6 e desarruma no outros. Como arrumo isso?
-
Cara sabe o que ta pegando, é que não é tão simples, olha só: Não sei onde colocar - target 'blank' - porque tem esse código que vou colocar abaixo. Neste códido as notícias apareciam em um popup, porém consegui alterar a abrir dentro do iframe. Só que eu queria abrir na mesma página porque no popup ta muito pequeno. Só falta isso pra dar certo minha página. O arquivo config.php e o show_inc.php é que pode alterar isso, pois este código na internet. Se alguém puder me ajudar?? Grato. arquivo config.php <?PHP //System Configurations (Auto Generated file) $config_http_script_dir = "http://www.site.com.br/jornal/news"; $config_skin = "default"; $config_date_adjust = "0"; $config_smilies = "smile,wink,wassat,tongue,laughing,sad,angry,crying"; $config_auto_archive = "no"; $config_allow_registration = "no"; $config_registration_level = "4"; $config_use_avatar = "no"; $config_use_wysiwyg = "yes"; $config_reverse_active = "no"; $config_timestamp_active = "d m Y"; $config_full_popup = "yes"; $config_full_popup_string = "HEIGHT=360,WIDTH=440,resizable=yes,scrollbars=yes"; $config_show_comments_with_full = "yes"; $config_auto_wrap = "44"; $config_reverse_comments = "no"; $config_flood_time = "15"; $config_comment_max_long = "1500"; $config_comments_per_page = "50"; $config_only_registered_comment = "no"; $config_allow_url_instead_mail = "yes"; $config_timestamp_comment = "d m Y h:i a"; $config_comments_popup = "yes"; $config_comments_popup_string = "HEIGHT=400,WIDTH=650,resizable=yes,scrollbars=yes"; $config_show_full_with_comments = "yes"; $config_notify_email = "email@teste.com"; $config_notify_status = "disabled"; $config_notify_registration = "no"; $config_notify_comment = "no"; $config_notify_unapproved = "no"; $config_notify_archive = "no"; $config_notify_postponed = "no"; ?> arquivo show_inc.php (onde estão os links que aparece o comentários) <?PHP do{ // Used if we want to display some error to the user and halt the rest of the script $user_query = cute_query_string($QUERY_STRING, array( "comm_start_from","start_from", "archive", "subaction", "id", "ucat")); $user_post_query = cute_query_string($QUERY_STRING, array( "comm_start_from", "start_from", "archive", "subaction", "id", "ucat"), "post"); //#################################################################################################################### // Define Categories //#################################################################################################################### $cat_lines = file("$cutepath/data/category.db.php"); foreach($cat_lines as $single_line){ $cat_arr = explode("|", $single_line); $cat[$cat_arr[0]] = $cat_arr[1]; $cat_icon[$cat_arr[0]]=$cat_arr[2]; } /////////////////////////////////////////////////////// // Function: Category ID to Name // Description: convert to category name from ID if ( !function_exists('catid2name') ) { function catid2name($thecat){ global $cat; if(strstr($thecat,',')){ $thecat_arr = explode(',',$thecat); foreach($thecat_arr as $single_thecat){ if($thecat_not_first){ $thecat_str .= ', '. $cat[$single_thecat]; } else{ $thecat_str .= $cat[$single_thecat]; } $thecat_not_first = TRUE; } return $thecat_str; }else{ return $cat[$thecat]; } } } //#################################################################################################################### // Define Users //#################################################################################################################### $all_users = file("$cutepath/data/users.db.php"); foreach($all_users as $user) { if(!eregi("<\?",$member_db_line)){ $user_arr = explode("|",$user); if($user_arr[4] != "") { if($user_arr[7] != 1 and $user_arr[5] != ""){ $my_names[$user_arr[2]] = "<a href=\"mailto:$user_arr[5]\">$user_arr[4]</a>"; } else{ $my_names[$user_arr[2]] = "$user_arr[4]"; } $name_to_nick[$user_arr[2]] = $user_arr[4]; } else { if($user_arr[7] != 1 and $user_arr[5] != ""){ $my_names[$user_arr[2]] = "<a href=\"mailto:$user_arr[5]\">$user_arr[2]</a>"; } else{ $my_names[$user_arr[2]] = "$user_arr[2]"; } $name_to_nick[$user_arr[2]] = $user_arr[2]; } if($user_arr[7] != 1){ $my_mails[$user_arr[2]] = $user_arr[5]; } else{ $my_mails[$user_arr[2]] = ""; } $my_passwords[$user_arr[2]] = $user_arr[3]; $my_users[] = $user_arr[2]; } } //#################################################################################################################### // Activate Postponed Articles //#################################################################################################################### ResynchronizePostponed(); //#################################################################################################################### // Auto-Archive Function //#################################################################################################################### if($config_auto_archive == "yes"){ ResynchronizeAutoArchive(); } //#################################################################################################################### // Add Comment //#################################################################################################################### if($allow_add_comment){ $name = trim($name); $mail = trim($mail); $id = (int) $id; // Yes it's stupid how I didn't thought about this :/ //---------------------------------- // Check the lenght of comment, include name + mail //---------------------------------- if( strlen($name) > 50 ){ echo"<div style=\"text-align: center;\">Seu nome é muito longo!</div>"; $CN_HALT = TRUE; break 1; } if( strlen($mail) > 50){ echo"<div style=\"text-align: center;\">Seu email é muito longo!</div>"; $CN_HALT = TRUE; break 1; } if( strlen($comments) > $config_comment_max_long and $config_comment_max_long != "" and $config_comment_max_long != "0"){ echo"<div style=\"text-align: center;\">Seu comentário é muito longo!</div>"; $CN_HALT = TRUE; break 1; } //---------------------------------- // Get the IP //---------------------------------- $foundip = TRUE; if (getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if(getenv("REMOTE_ADDR")) $ip = getenv("REMOTE_ADDR"); else if(getenv("HTTP_X_FORWARDED_FOR")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else {$ip = "not detected"; $foundip = FALSE;} if( !$foundip or !preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", "$ip") ){ $ip = "not detected"; $foundip = FALSE;} //ensure that what we have is a real IP //---------------------------------- // Flood Protection //---------------------------------- if($config_flood_time != 0 and $config_flood_time != "" ){ if(flooder($ip, $id) == TRUE ){ echo("<div style=\"text-align: center;\">Proteção contra excesso ativada !!!<br />você tem que esperar $config_flood_time segundos após o seu último comentário antes de enviar novamente para este artigo.</div>"); $CN_HALT = TRUE; break 1; } } //---------------------------------- // Check if IP is blocked //---------------------------------- $blockip = FALSE; $old_ips = file("$cutepath/data/ipban.db.php"); $new_ips = fopen("$cutepath/data/ipban.db.php", "w"); @flock ($new_ips,2); foreach($old_ips as $old_ip_line){ $ip_arr = explode("|", $old_ip_line); //implemented wildcard match $ip_check_matches = 0; $db_ip_split = explode(".", $ip_arr[0]); $this_ip_split = explode(".", $ip); for($i_i=0;$i_i<4;$i_i++){ // echo"IF $this_ip_split[$i_i] == $db_ip_split[$i_i] or $db_ip_split[$i_i] == '*'<br>"; if ($this_ip_split[$i_i] == $db_ip_split[$i_i] or $db_ip_split[$i_i] == '*') { $ip_check_matches += 1; } } if ($ip_check_matches == 4) { $countblocks = $ip_arr[1] = $ip_arr[1] + 1; fwrite($new_ips, "$ip_arr[0]|$countblocks||\n"); $blockip = TRUE; } else { fwrite($new_ips, $old_ip_line); } } @flock ($new_ips,3); fclose($new_ips); if($blockip){ echo("<div style=\"text-align: center;\">Desculpe, mas você foi bloqueado de postar comentários</div>"); $CN_HALT = TRUE; break 1; } //---------------------------------- // Check if the name is protected //---------------------------------- $is_member = FALSE; foreach($all_users as $member_db_line) { if(!eregi("<\?",$member_db_line) and $member_db_line != ""){ $user_arr = explode("|",$member_db_line); //if the name is protected if((strtolower($user_arr[2]) == strtolower($name) or strtolower($user_arr[4]) == strtolower($name)) and ($user_arr[3] != $CNpass and $user_arr[3] != md5($password)) and $name != "") { //$comments = replace_comment("add", $comments); //commented because will mess up the <br /> $comments = preg_replace(array("'\"'", "'\''", "''"), array(""", "'", ""), $comments); $name = replace_comment("add", preg_replace("/\n/", "",$name)); $mail = replace_comment("add", preg_replace("/\n/", "",$mail)); echo"<div style=\"text-align: center;\">Este nome é propriedade de um usuário registrado e você deve digitar a senha para usá-lo<br /> <form name=passwordForm id=passwordForm method=\"post\" action=\"\"> Senha: <input type=\"password\" name=\"password\" /> <input type=\"hidden\" name=\"name\" value=\"$name\" /> <input type=\"hidden\" name=\"comments\" value=\"$comments\" /> <input type=\"hidden\" name=\"mail\" value=\"$mail\" /> <input type=\"hidden\" name=\"ip\" value=\"$ip\" /> <input type=\"hidden\" name=\"subaction\" value=\"addcomment\" /> <input type=\"hidden\" name=\"show\" value=\"$show\" /> <input type=\"hidden\" name=\"ucat\" value=\"$ucat\" /> $user_post_query <input type=\"submit\" /> \n <br> <input type=\"checkbox\" name=\"CNrememberPass\" value=1 /> Lembrar senha no cookie (md5 format) </form> </div>"; $CN_HALT = TRUE; break 2; } if(strtolower($user_arr[2]) == strtolower($name)) $is_member = TRUE; //---------------------------------- // Member wants to save his pass in cookie ? //---------------------------------- if($CNrememberPass == 1){ if(file_exists("$cutepath/remember.js")){ echo"<script type=\"text/javascript\" src=\"$config_http_script_dir/remember.js\"></script>"; echo"<script>CNRememberPass('".md5($password)."')</script>"; } } } } //---------------------------------- // Check if only members can comment //---------------------------------- if($config_only_registered_comment == "yes" and !$is_member){ echo"<div style=\"text-align: center;\">Lamentamos mas apenas usuários registados podem postar comentários, e '".htmlspecialchars($name)."' não é reconhecida como membro válido.</div>"; $CN_HALT = TRUE; break 1; } //---------------------------------- // Wrap the long words //---------------------------------- if($config_auto_wrap > 1){ $comments_arr = explode("\n", $comments); foreach($comments_arr as $line){ $wraped_comm .= ereg_replace("([^ \/\/]{".$config_auto_wrap."})","\\1\n", $line) ."\n"; } if(strlen($name) > $config_auto_wrap){ $name = substr($name, 0, $config_auto_wrap)." ..."; } $comments = $wraped_comm; } //---------------------------------- // Do some validation check 4 name, mail.. //---------------------------------- $comments = replace_comment("add", $comments); $name = replace_comment("add", preg_replace("/\n/", "",$name)); $mail = replace_comment("add", preg_replace("/\n/", "",$mail)); if($name == " " or $name == ""){ echo("<div style=\"text-align: center;\">Você deve digitar o nome.<br /><a href=\"java script:history.go(-1)\">voltar</a></div>"); $CN_HALT = TRUE; break 1; } if($mail == " " or $mail == ""){ $mail = "none"; } else{ $ok = FALSE; if(preg_match("/^[\.A-z0-9_\-\+]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $mail)) $ok = TRUE; elseif($config_allow_url_instead_mail == "yes" and preg_match("/((http(s?):\/\/)|(www\.))([\w\.]+)([\/\w+\.-?]+)/", $mail)) $ok = TRUE; elseif($config_allow_url_instead_mail != "yes"){ echo("<div style=\"text-align: center;\">Este não é um e-mail válido.<br /><a href=\"java script:history.go(-1)\">voltar</a></div>"); $CN_HALT = TRUE; break 1; } else{ echo("<div style=\"text-align: center;\">Este não é um e-mail válido ou URL do site.<br /><a href=\"java script:history.go(-1)\">voltar</a></div>"); $CN_HALT = TRUE; break 1; } } if($comments == ""){ echo("<div style=\"text-align: center;\">Desculpe, mas o comentário não pode estar em branco.<br /><a href=\"java script:history.go(-1)\">voltar</a></div>"); $CN_HALT = TRUE; break 1; } $time = time()+($config_date_adjust*60); //---------------------------------- // Add The Comment ... Go Go GO! //---------------------------------- $old_comments = file("$comm_file"); $new_comments = fopen("$comm_file", "w"); @flock ($new_comments,2); $found = FALSE; foreach($old_comments as $old_comments_line) { $old_comments_arr = explode("|>|", $old_comments_line); if($old_comments_arr[0] == $id) { $old_comments_arr[1] = trim($old_comments_arr[1]); fwrite($new_comments, "$old_comments_arr[0]|>|$old_comments_arr[1]$time|$name|$mail|$ip|$comments||\n"); $found = TRUE; }else{ fwrite($new_comments, $old_comments_line); //if we do not have the news ID in the comments.txt we are not doing anything (see comment below) (must make sure the news ID is valid) } } if(!$found){ /* // do not add comment if News ID is not found \\ fwrite($new_comments, "$id|>|$time|$name|$mail|$ip|$comments||\n");*/ echo("<div style=\"text-align: center;\">O sistema não adicionou o seu comentário, porque há algum problema com a base de dados dos comentários.<br /><a href=\"java script:history.go(-1)\">voltar</a></div>"); $CN_HALT = TRUE; break 1; } @flock ($new_comments,3); fclose($new_comments); //---------------------------------- // Sign this comment in the Flood Protection //---------------------------------- if($config_flood_time != "0" and $config_flood_time != "" ){ $flood_file = fopen("$cutepath/data/flood.db.php", "a"); @flock ($flood_file,2); fwrite($flood_file, time()."|$ip|$id|\n"); @flock ($flood_file,3); fclose($flood_file); } //---------------------------------- // Notify for New Comment ? //---------------------------------- if($config_notify_comment == "yes" and $config_notify_status == "active"){ send_mail("$config_notify_email", "Sistema de Notícias - Novo Comentário Adicionado", "Novo comentário foi adicionado por $name:\n--------------------------$comments"); } echo "<script type=\"text/javascript\">window.location=\"$PHP_SELF?subaction=showfull&id=$id&ucat=$ucat&archive=$archive&start_from=$start_from&$user_query\";</script>"; } //#################################################################################################################### // Show Full Story //#################################################################################################################### if($allow_full_story){ if(!file_exists($news_file)){ die("Erro!<br>Arquivos de notícias não existe!"); } $all_active_news = file("$news_file"); foreach($all_active_news as $active_news) { $news_arr = explode("|", $active_news); if($news_arr[0] == $id and (!$catid or $catid == $news_arr[6])) { $found = TRUE; if($news_arr[4] == "" and (!eregi("\{short-story\}", $template_full)) ){ $news_arr[4] = $news_arr[3]; } if($my_names[$news_arr[1]]){ $my_author = $my_names[$news_arr[1]]; } else{ $my_author = $news_arr[1]; } $output = str_replace("{title}", $news_arr[2], $template_full); $output = str_replace("{date}", date($config_timestamp_active, $news_arr[0]), $output); $output = str_replace("{author}", $my_author, $output); $output = str_replace("{short-story}", $news_arr[3], $output); $output = str_replace("{full-story}", $news_arr[4], $output); if($news_arr[5] != ""){$output = str_replace("{avatar}", "<img alt=\"\" src=\"$news_arr[5]\" style=\"border: none;\" />", $output); } else{ $output = str_replace("{avatar}", "", $output); } $output = str_replace("{avatar-url}", "$news_arr[5]", $output); $output = str_replace("{comments-num}", countComments($news_arr[0], $archive), $output); $output = str_replace("{category}", catid2name($news_arr[6]), $output); $output = str_replace("{category-id}", $news_arr[6], $output); if($cat_icon[$news_arr[6]] != ""){ $output = str_replace("{category-icon}", "<img style=\"border: none;\" alt=\"".$cat[$news_arr[6]]." icon\" src=\"".$cat_icon[$news_arr[6]]."\" />", $output); } else{ $output = str_replace("{category-icon}", "", $output); } if($config_comments_popup == "no"){ $output = str_replace("[com-link]","<a href=\"#\" onclick=\"window.open('$config_http_script_dir/show_news.php?subaction=showcomments&template=$template&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]', '_News', '$config_comments_popup_string');return false;\">", $output); }else{ $output = str_replace("[com-link]","<a href=\"$PHP_SELF?subaction=showcomments&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]&$user_query\">", $output); } $output = str_replace("[/com-link]","</a>", $output); $output = str_replace("{author-name}", $name_to_nick[$news_arr[1]], $output); if($my_mails[$news_arr[1]] != ""){ $output = str_replace("[mail]","<a href=\"mailto:".$my_mails[$news_arr[1]]."\">", $output); $output = str_replace("[/mail]","</a>", $output); }else{ $output = str_replace("[mail]","", $output); $output = str_replace("[/mail]","", $output); } $output = str_replace("{news-id}", $news_arr[0], $output); $output = str_replace("{archive-id}", $archive, $output); $output = str_replace("{php-self}", $PHP_SELF, $output); $output = str_replace("{cute-http-path}", $config_http_script_dir, $output); $output = replace_news("show", $output); echo $output; } } if(!$found){ // // Article ID was not found, if we have not specified an archive -> try to find the article in some archive. // // Auto-Find ID In archives //---------------------------------------------------------------------- if(!$archive or $archive == ''){ //get all archives. (if any) and fit our lost id in the most propper archive. $lost_id = $id; $all_archives = FALSE; $hope_archive = FALSE; if(!$handle = opendir("$cutepath/data/archives")){ echo("<!-- Não pode abrir o diretório $cutepath/data/archives --> "); } while (false !== ($file = readdir($handle))) { if($file != "." and $file != ".." and !is_dir("./data/archives/$file") and eregi("news.arch", $file)) { $file_arr = explode(".", $file); $all_archives[] = $file_arr[0]; } } closedir($handle); if($all_archives){ sort($all_archives); if(isset($all_archives[1])){ foreach($all_archives as $this_archive){ if($this_archive > $lost_id){ $hope_archive = $this_archive; break;} } }else{ if($all_archives[0] > $lost_id){ $hope_archive = $all_archives[0]; break;} } } } if($hope_archive){ echo" <center>Você está agora redirecionando o artigo para nossos arquivos <br>se o redirecionamento falhar, por favor <a href=\"$PHP_SELF?start_from=$start_from&ucat=$ucat&subaction=$subaction&id=$id&archive=$hope_archive&$user_query\">clique aqui</a></center> <script LANGUAGE=\"JavaScript\"> <!-- Lets hope the archive id is correct. window.location=\"$PHP_SELF?start_from=$start_from&ucat=$ucat&subaction=$subaction&id=$id&archive=$hope_archive&$user_query\"; // --> </script>"; }else{ echo("<div style=\"text-align: center;\">Can not find an article with id: <strong>". @(int) htmlspecialchars($id)."</strong></div>"); } $CN_HALT = TRUE; break 1; } } //#################################################################################################################### // Show Comments //#################################################################################################################### if($allow_comments){ $comm_per_page = $config_comments_per_page; $total_comments = 0; $showed_comments = 0; $comment_number = 0; $showed = 0; $all_comments = file("$comm_file"); foreach($all_comments as $comment_line) { $comment_line = trim($comment_line); $comment_line_arr = explode("|>|", $comment_line); if($id == $comment_line_arr[0]) { $individual_comments = explode("||", $comment_line_arr[1]); $total_comments = @count($individual_comments) - 1; //show the page with our new comment, if we just added one /* causes some problems, will be updated !!! if($allow_add_comment and true){ $comm_start_from = $total_comments-1; if($config_reverse_comments == "yes"){ $comm_start_from = 0; } } */ $iteration = 0; if($config_reverse_comments == "yes"){$iteration = count($individual_comments)+1; $individual_comments = array_reverse($individual_comments); } foreach($individual_comments as $comment) { if($config_reverse_comments == "yes") { $iteration --; } else{ $iteration ++; } $comment_arr = explode("|", $comment); if($comment_arr[0] != "") { if(isset($comm_start_from) and $comm_start_from != ""){ if($comment_number < $comm_start_from){ $comment_number++; continue; } elseif($showed_comments == $comm_per_page){ break; } } $comment_number ++; $comment_arr[4] = stripslashes(rtrim($comment_arr[4])); if($comment_arr[2] != "none"){ if( preg_match("/^[\.A-z0-9_\-\+]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]{1,4}$/", $comment_arr[2])){ $url_target = "";$mail_or_url = "mailto:"; } else{ $url_target = "target=\"_blank\""; $mail_or_url = ""; if(substr($comment_arr[2],0,3) == "www"){ $mail_or_url = "http://"; } } $output = str_replace("{author}", "<a $url_target href=\"$mail_or_url".stripslashes($comment_arr[2])."\">".stripslashes($comment_arr[1])."</a>", $template_comment); } else{ $output = str_replace("{author}", $comment_arr[1], $template_comment); } $comment_arr[4] = preg_replace("/\b((http(s?):\/\/)|(www\.))([\w\.]+)([&-~\%\/\w+\.-?]+)\b/i", "<a href=\"http$3://$4$5$6\" target=\"_blank\">$2$4$5$6</a>", $comment_arr[4]); $comment_arr[4] = preg_replace("/([\w\.]+)(@)([-\w\.]+)/i", "<a href=\"mailto:$0\">$0</a>", $comment_arr[4]); $output = str_replace("{mail}", "$comment_arr[2]",$output); $output = str_replace("{date}", date($config_timestamp_comment, $comment_arr[0]),$output); $output = str_replace("{comment-id}", $comment_arr[0],$output); $output = str_replace("{comment}", "<a name=\"".$comment_arr[0]."\"></a>$comment_arr[4]",$output); $output = str_replace("{comment-iteration}", $iteration ,$output); $output = replace_comment("show", $output); echo $output; $showed_comments++; if($comm_per_page != 0 and $comm_per_page == $showed_comments){ break; } } } } } //---------------------------------- // Prepare the Comment Pagination //---------------------------------- $prev_next_msg = $template_comments_prev_next; // Previous link if(isset($comm_start_from) and $comm_start_from != "" and $comm_start_from > 0){ $prev = $comm_start_from - $comm_per_page; $prev_next_msg = preg_replace("'\[prev-link\](.*?)\[/prev-link\]'si", "<a href=\"$PHP_SELF?comm_start_from=$prev&archive=$archive&subaction=showcomments&id=$id&ucat=$ucat&$user_query\">\\1</a>", $prev_next_msg); }else{ $prev_next_msg = preg_replace("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1", $prev_next_msg); $no_prev = TRUE; } // Pages if($comm_per_page){ $pages_count = @ceil($total_comments/$comm_per_page); $pages_start_from = 0; $pages = ""; for($j=1;$j<=$pages_count;$j++){ if($pages_start_from != $comm_start_from){ $pages .= "<a href=\"$PHP_SELF?comm_start_from=$pages_start_from&archive=$archive&subaction=showcomments&id=$id&ucat=$ucat&$user_query\">$j</a> "; } else{ $pages .= " <strong>$j</strong> "; } $pages_start_from += $comm_per_page; } $prev_next_msg = str_replace("{pages}", $pages, $prev_next_msg); } // Next link if($comm_per_page < $total_comments and $comment_number < $total_comments){ $prev_next_msg = preg_replace("'\[next-link\](.*?)\[/next-link\]'si", "<a href=\"$PHP_SELF?comm_start_from=$comment_number&archive=$archive&subaction=showcomments&id=$id&ucat=$ucat&$user_query\">\\1</a>", $prev_next_msg); }else{ $prev_next_msg = preg_replace("'\[next-link\](.*?)\[/next-link\]'si", "\\1", $prev_next_msg); $no_next = TRUE;} if (!$no_prev or !$no_next){ echo $prev_next_msg; } $template_form = str_replace("{config_http_script_dir}", "$config_http_script_dir", $template_form); //---------------------------------- // Check if the remember script exists //---------------------------------- $CN_remember_include = ''; $CN_remember_form = ''; if(file_exists("$cutepath/remember.js")){ $CN_remember_include = "<script type=\"text/javascript\" src=\"$config_http_script_dir/remember.js\"></script><script>CNreadCookie();</script>"; $CN_remember_form = "onsubmit=\"return CNSubmitComment()\""; } $smilies_form = "\n<script type=\"text/javascript\"> //<![CDATA[ function insertext(text){ document.comment.comments.value+=\" \"+ text; document.comment.comments.focus(); } //]]></script> <noscript>Seu browser não está com o Javascript ativado ou você terá desligá-lo. Recomendamos-lhe ativar, caso contrário, terá que introduzir manualmente as representações de emoção. </noscript>".insertSmilies('short', FALSE); $template_form = str_replace("{smilies}", $smilies_form, $template_form); echo"<form $CN_remember_form method=\"post\" name=\"comment\" id=\"comment\" action=\"\">".$template_form."<div><input type=\"hidden\" name=\"subaction\" value=\"addcomment\" /><input type=\"hidden\" name=\"ucat\" value=\"$ucat\" /><input type=\"hidden\" name=\"show\" value=\"$show\" />$user_post_query</div></form> \n $CN_remember_include"; } //#################################################################################################################### // Active News //#################################################################################################################### if($allow_active_news){ $all_news = file("$news_file"); if($reverse == TRUE){ $all_news = array_reverse($all_news); } $count_all = 0; if(isset($category) and $category != ""){ foreach($all_news as $news_line){ $news_arr = explode("|", $news_line); $is_in_cat = FALSE; if(strstr($news_arr[6],',')){ //if the article is in multiple categories // echo"<br>$news_arr[0] item is multy<br>"; $this_cats_arr = explode(',',$news_arr[6]); foreach($this_cats_arr as $this_single_cat){ // echo"<br>if we want $this_single_cat "; if($requested_cats and $requested_cats[$this_single_cat] == TRUE){ $is_in_cat=TRUE;} } }else{ // echo"<br>$news_arr[0] item is single<br>"; // echo"<br>if we want $news_arr[6] "; if($requested_cats and $requested_cats[$news_arr[6]] == TRUE){ $is_in_cat=TRUE;} } if($is_in_cat){ $count_all ++; } else{ continue; } } }else{ $count_all = count($all_news); } $i = 0; $showed = 0; $repeat = TRUE; $url_archive = $archive; while($repeat != FALSE){ foreach($all_news as $news_line){ $news_arr = explode("|", $news_line); $is_in_cat = FALSE; if(strstr($news_arr[6],',')){ //if the article is in multiple categories $this_cats_arr = explode(',',$news_arr[6]); foreach($this_cats_arr as $this_single_cat){ if($requested_cats and $requested_cats[$this_single_cat] == TRUE){ $is_in_cat=TRUE;} } }else{ if($requested_cats and $requested_cats[$news_arr[6]] == TRUE){ $is_in_cat=TRUE;} } if(!$is_in_cat and $category != '' and isset($category)){ continue; } if(isset($start_from) and $start_from != ""){ if($i < $start_from){ $i++; continue; } elseif($showed == $number){ break; } } if($my_names[$news_arr[1]]){ $my_author = $my_names[$news_arr[1]]; } else{ $my_author = $news_arr[1]; } $output = $template_active; $output = str_replace("{title}", $news_arr[2], $output); $output = str_replace("{author}", $my_author, $output); if($news_arr[5] != ""){$output = str_replace("{avatar}", "<img alt=\"\" src=\"$news_arr[5]\" style=\"border: none;\" />", $output); } else{ $output = str_replace("{avatar}", "", $output); } $output = str_replace("{avatar-url}", "$news_arr[5]", $output); $output = str_replace("[link]","<a href=\"$PHP_SELF?subaction=showfull&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]&$user_query\">", $output); $output = str_replace("[/link]","</a>", $output); $output = str_replace("{comments-num}", countComments($news_arr[0], $archive), $output); $output = str_replace("{short-story}", $news_arr[3], $output); $output = str_replace("{full-story}", $news_arr[4], $output); $output = str_replace("{category}", catid2name($news_arr[6]), $output); $output = str_replace("{category-id}", $news_arr[6], $output); if($cat_icon[$news_arr[6]] != ""){ $output = str_replace("{category-icon}", "<img alt=\"".$cat[$news_arr[6]]." icon\" style=\"border: none;\" src=\"".$cat_icon[$news_arr[6]]."\" />", $output); } else{ $output = str_replace("{category-icon}", "", $output); } $output = str_replace("{author-name}", $name_to_nick[$news_arr[1]], $output); if($my_mails[$news_arr[1]] != ""){ $output = str_replace("[mail]","<a href=\"mailto:".$my_mails[$news_arr[1]]."\">", $output); $output = str_replace("[/mail]","</a>", $output); }else{ $output = str_replace("[mail]","", $output); $output = str_replace("[/mail]","", $output); } $output = str_replace("{news-id}", $news_arr[0], $output); $output = str_replace("{archive-id}", $archive, $output); $output = str_replace("{php-self}", $PHP_SELF, $output); $output = str_replace("{cute-http-path}", $config_http_script_dir, $output); //if we are showing the RSS feed, add some need variables. if($template == 'rss'){ $output = str_replace("{date}", date("r", $news_arr[0]), $output); // in RSS we need the date in specific format if($rss_news_include_url == '' or !$rss_news_include_url){ $rss_news_include_url = '$config_http_script_dir/show_news.php'; } $output = str_replace("{rss-news-include-url}", $rss_news_include_url, $output); }else{ //normally display the date in the format that user wants it. $output = str_replace("{date}", date($config_timestamp_active, $news_arr[0]), $output); } $output = replace_news("show", $output); if($news_arr[4] != "" or $action == "showheadlines"){//if full story if($config_full_popup == "no"){ $output = preg_replace("/\\[full-link\\]/","<a href=\"#\" onclick=\"window.open('$config_http_script_dir/show_news.php?subaction=showfull&id=$news_arr[0]&archive=$archive&template=$template', '_News', '$config_full_popup_string');return false;\">", $output); }else{ $output = str_replace("[full-link]","<a href=\"$PHP_SELF?subaction=showfull&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]&$user_query\">", $output); } $output = str_replace("[/full-link]","</a>", $output); }else{ $output = preg_replace("'\\[full-link\\].*?\\[/full-link\\]'si","<!-- no full story-->", $output); } if($config_comments_popup == "no"){ $output = str_replace("[com-link]","<a href=\"#\" onclick=\"window.open('$config_http_script_dir/show_news.php?subaction=showcomments&template=$template&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]', '_News', '$config_comments_popup_string');return false;\">", $output); }else{ $output = str_replace("[com-link]","<a href=\"$PHP_SELF?subaction=showcomments&id=$news_arr[0]&archive=$archive&start_from=$my_start_from&ucat=$news_arr[6]&$user_query\">", $output); } $output = str_replace("[/com-link]","</a>", $output); echo $output; $showed++; $i++; if($number != 0 and $number == $i){ break; } } $used_archives[$archive] = TRUE; // Archives Looop if($i < $number and $only_active != TRUE){ if(!$handle = opendir("$cutepath/data/archives")){ die("<div style=\"text-align: center;\">Não pode abrir o diretório $cutepath/data/archives</div>"); } while (false !== ($file = readdir($handle))) { if($file != "." and $file != ".." and eregi("news.arch", $file)) { $file_arr = explode(".",$file); $archives_arr[$file_arr[0]] = $file_arr[0]; } } closedir($handle); $archives_arr[$in_use]=""; $in_use = max($archives_arr); if($in_use != "" and !$used_archives[$in_use]){ $all_news = file("$cutepath/data/archives/$in_use.news.arch"); $archive = $in_use; $used_archives[$in_use] = TRUE; }else{ $repeat = FALSE; } }else{ $repeat = FALSE; } } // << Previous & Next >> $prev_next_msg = $template_prev_next; //---------------------------------- // Previous link //---------------------------------- if(isset($start_from) and $start_from != "" and $start_from > 0){ $prev = $start_from - $number; $prev_next_msg = preg_replace("'\[prev-link\](.*?)\[/prev-link\]'si", "<a href=\"$PHP_SELF?start_from=$prev&ucat=$ucat&archive=$url_archive&subaction=$subaction&id=$id&$user_query\">\\1</a>", $prev_next_msg); }else{ $prev_next_msg = preg_replace("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1", $prev_next_msg); $no_prev = TRUE; } //---------------------------------- // Pages //---------------------------------- if($number){ $pages_count = @ceil($count_all/$number); $pages_start_from = 0; $pages = ""; for($j=1;$j<=$pages_count;$j++){ if($pages_start_from != $start_from){ $pages .= "<a href=\"$PHP_SELF?start_from=$pages_start_from&ucat=$ucat&archive=$url_archive&subaction=$subaction&id=$id&$user_query\">$j</a> "; } else{ $pages .= " <strong>$j</strong> "; } $pages_start_from += $number; } $prev_next_msg = str_replace("{pages}", $pages, $prev_next_msg); } //---------------------------------- // Next link (typo here ... typo there... typos everywhere !) //---------------------------------- if($number < $count_all and $i < $count_all){ $prev_next_msg = preg_replace("'\[next-link\](.*?)\[/next-link\]'si", "<a href=\"$PHP_SELF?start_from=$i&ucat=$ucat&archive=$url_archive&subaction=$subaction&id=$id&$user_query\">\\1</a>", $prev_next_msg); }else{ $prev_next_msg = preg_replace("'\[next-link\](.*?)\[/next-link\]'si", "\\1", $prev_next_msg); $no_next = TRUE;} if (!$no_prev or !$no_next){ echo $prev_next_msg; } } }while(0); if((!isset($count_cute_news_includes) or !$count_cute_news_includes) and $template != 'rss'){ /// /// Removing the "P0wered By..." line is NOT allowed by the CuteNews License, only registered users are alowed to do so. /// if(!file_exists("$cutepath/data/reg.php")){} else{ include("$cutepath/data/reg.php"); if(preg_match('/\\A(\\w{6})-\\w{6}-\\w{6}\\z/', $reg_site_key, $mmbrid)){ }else{} } } $count_cute_news_includes++; ?>
-
Tipo: Tenho uma pagina que no lado esquerdo tenho menu, no lado direito tenho as propagandas e no centro tenho um iframe na parte superior onde constam as cincos norícias e na parte central inferior uma foto do jornal. Quando clico no leia mais a página com a notícia completa abre dentro do pequeno iframe e fica ruim de ler a notícia. Quero clicar no leia mais...e abrir toda a notícia desejada no centro sobrepondo o iframe e a foto ou quelquer outra coisa que estiver na parte central, ficando somente os lados. essa é a chamada do iframe. <iframe src="http://www.seusite.com.br/noticias/news.php" width="99%" height="90%" frameborder="0"></iframe> lembrando arquivo news.php está dentro do site noticias Grato
-
Boa noite! Tenho um site de notícias já desnvolvido, mas queria modificar aqui. Minha home mostra a página principal tem nela um iframe onde permanece as cinco ultimas notícias. Quando clico no leia mais..., ele abre a página com a notícia completa dentro do iframe, porém gostaria de saber como fazer para fazer para clicar no Leia mais... e abrir a notícias fora do iframe de modo que apareça na página inteira como se fosse a home. aqui está o link onde chamo o arquivo. <iframe src="http://www.teste.com.br/noticias/news.php" width=99% height=90% scrolling="auto" frameborder="0"></iframe></div> Grato
-
(Resolvido) Criar botao que retorne a pagina anterior
pergunta respondeu ao quinhosp de quinhosp em HTML, XHTML, CSS
Verdade! Valeu mesmo deu certo sim. Muito Obrigado.