Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa tarde,
Estou utilizando o boilerplate 3.0, as minhas páginas que tem o conteúdo estático esta tudo tranquilo, mas o problema é quando eu coloco php junto....
Depois de fechar a tag ?> ele não funciona nada mais...
Não sei se esse é um erro do boilerplate ou do PHP, por isso postei aqui nesta sessão...
Segue o código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="pt-BR"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="pt-BR"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="pt-BR"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="pt-BR" xmlns="http://www.w3.org/1999/xhtml"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Leis Municipais de Alvorada</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/estilo.css">
<script src="js/libs/modernizr-2.5.3.min.js"></script>
</head>
<body>
<!--[if lt IE 7]><p class=chromeframe>Your browser is <em>ancient!</em> <a href="http://browsehappy.com/">Upgrade to a different browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to experience this site.</p><![endif]-->
<header>
</header>
<div id="topo">
<?php
include "banner.php";
?>
</div>
<div role="main" id="main">
<?php
include "php/conexao.php";
if(empty($_GET['p']) AND empty($_GEt['b'])){
header("Location:index.php");
}
$p = $_GET['p'];
$b = $_GET['b'];
$dados = array();
switch ($p) {
case 1:
$sql = "SELECT * FROM leis WHERE numero = $b";
break;
case 2:
$sql = "SELECT * FROM leis WHERE ano = $b";
break;
case 3:
$sql = "SELECT * FROM leis WHERE ementa LIKE '%$b%'";
break;
case 4:
$sql = "SELECT * FROM leis WHERE tag LIKE '%$b%'";
break;
default:
header("Location:index.php");
break;
}
echo "<table>";
echo "<caption>Lista de leis</caption>";
echo "<thead>";
echo "<tr class='cabecalho'>";
echo "<th colspan='4'><a href='index.php'>Voltar</a></th>";
echo "</tr>";
echo "<tr class='cabecalho'>";
echo "<th>Numero/ano</th>";
echo "<th>Ementa</th>";
echo "<th>Alteração</th>";
echo "<th>Download</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
$resultado = mysql_query($sql) or die (mysql_error());
if(mysql_num_rows($resultado)){
while ($linha = mysql_fetch_assoc($resultado) or die (mysql_error())) {
$numero = $linha['numero'];
$ano = $linha['ano'];
//formatando a ementa
$formatar_ementa = $linha['ementa'];
$ementa_explodida = explode(" ", $formatar_ementa);
$ementa = "";
for ($i=0; $i < 3; $i++) {
$ementa .= $ementa_explodida[$i]." ";
}
$tag = $linha['tag'];
$alteracao = $linha['alteracao'];
$url_arquivo = $linha['url_arquivo'];
echo "<tr>";
echo "<td><a href='lei.php?v=$numero' class='fancy'>$numero/$ano</a></td>";
echo "<td>$ementa...</td>";
echo "<td>$alteracao</td>";
echo "<td><a href=../sistema_cadastro_leis/".$url_arquivo." target='_blank' title='Arquivo PDF ou DOC original da lei'>Download</a></td>";
echo "</tr>";
}
}else{
echo "<tr>";
echo "<td colspan='4'>Não foi encontrado nenhum resultado.</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='4'><a href='index.php'>Volte</a> e pesquise um outro termo.</td>";
echo "</tr>";
}
?>
</div>
<footer>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/script.js"></script>
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</footer>
</body>
</html>Carregando comentários...