
		marcusdf3
		
		(usa Debian)
		
		Enviado em 23/10/2009 - 10:01h 
		  <h2 align="left">Artes Gráficas Formato</h2>
  <p align="left">Pesquisa De Problemas</p> 
  <div align="right"> <a href="index.html"><img src='voltar.gif' border="0" style='height: 40px; width:50px'></a>  
    <br>
	
  </div>
</div>
<ul ><?php
function MontarLink ($texto)
{
       if (!is_string ($texto))
           return $texto;
      
    $er = "/(http:\/\/(www\.|.*?\/)?|www\.)([a-zA-Z0-9]+|_|-)+(\.(([0-9a-zA-Z]|-|_|\/|\?|=|&)+))+/i";
    preg_match_all ($er, $texto, $match);
    
    foreach ($match[0] as $link)
    {
        //coloca o 'http://' caso o link não o possua
        $link_completo = (stristr($link, "http://") === false) ? "http://" . $link : $link;
        
        $link_len = strlen ($link);
        
        
        //troca "&" por "&", tornando o link válido pela W3C
       $web_link = str_replace ("&", "&", $link_completo);
       $texto = str_ireplace ($link, "<a href=\"" . strtolower($web_link) . "\" target=\"_blank\">". (($link_len > 60) ? substr ($web_link, 0, 25). "...". substr ($web_link, -15) : $web_link) ."</a>", $texto);
    
    }
    
    return $texto;
    
}
?> 
<?php
include("connect.php");
$sql="SELECT * FROM RegistroProblemas ORDER BY Codigo";
$result = mysql_query($sql);
if (!$result)
  {
  	header( 'Location: erro.php' ) ;
  }
echo "<table border='1'  cellpadding='5' cellspacing='10'>
<tr>
<th>Código</th>
<th>Data</th>
<th>Nome</th>
<th>Descrição do Problema </th>
<th>Solução do Problema </th>
</tr>";
function codewrap($code, $maxLength = 80)
{
    $lines = explode("\n", $code);
    $count = count($lines);
    for($i=0; $i<$count; ++$i) {
        preg_match('`^\s*`', $code, $matches);
        $lines[$i] = wordwrap($lines[$i], $maxLength, "\n$matches[0]\t");
    }
    return implode("\n", $lines);
}
while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . " ". str_replace('<br>', '\n', $row['Codigo']) . "</td>";
  echo "<td>" . " ". $row['Data'] . "</td>";
  echo "<td>" . " ". $row['Nome'] . "</td>";
  echo "<td>" . " ". str_replace('\n', '<br>', $row['Descricao']) . "</td>"; 
  echo "<td>" . " ". $row['Solucao'] . "</td>";
  echo "</tr>";
  }
echo "</table>";
mysql_close($db)
?>
<p class="button_text"><a target="_self" href="#top"><img src="topo.gif" /></a> </p>
<div align="center"><br>
  Artes Graficas Formato <a href="http://www.formatobr.com"><font color="#000080">www.graficaformato.com.br</font></a></strong> 
</div>
</body>
</html>
a url teria que aparecer no campo Solução so que não aparece.!!!
valew