Ir para conteúdo
Fórum Script Brasil

iurilvepo

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que iurilvepo postou

  1. quero que esse código funcione da seguinte forma. tenho tabelas do banco de dados, que eu quero exibir! porém quero exibi-las por semestres 1º e 2º, se forem registros até junho irá aparecer em primeiro semestre e apartir de junho irá aparecer no segundo semestre! o código abaixo: <?php include 'conexao.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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Boletim Interno</title> <style type="text/css"> body { margin-left: 0px; margin-top: 0px; } </style> </head> <body> <br /><center><a href="restrita.php?v=nbusc"><img src="imagens/localbi012.jpg" width="300" height="50" border="0" /></a></center> <br /> <center> <?php $pegaBoletim = mysql_query("SELECT * FROM tbboletiminterno ORDER BY idboletiminterno DESC"); $pegaMes = mysql_query("SELECT * FROM tbmes"); $pega_ano = mysql_query("SELECT * FROM tbano ORDER BY idano DESC"); $linha = mysql_fetch_array($pega_ano); $mes = mysql_fetch_array($pegaMes); $boletim = mysql_fetch_array($pegaBoletim); echo "<h4>1º Semestre de ".$linha['ano']."</h4>"; $mb = $boletim['mes']; $mm = $mes['mes']; $mid = $mes['idmes']; while($linhac = mysql_fetch_array($pegaBoletim)){ if(($mb == $mm) && ($mid < 7)){ echo " <table width=360' border='0' cellpadding='0' cellspacing='0'> <tr bgcolor='#F8F8F8'> <td align='left'><h6>&nbsp;Boletim Interno &nbsp;Nº.:&nbsp;".$linhac['numbol]."</h6></td> <td align='left'><h6>Data:&nbsp;".$linhac['dia']."/".$linhac['mes']."/".$linhac['ano']."</h6></td> <td align=left'><a href='arc/".$linhac['arc]."'><img src='imagens/iconlupa.gif' width='18' height='18' border='0' /></a></td> </tr> </table>";} else { echo "Não houve publicação nesse semestre!";} } ?> <?php $pegaBoletim2 = mysql_query("SELECT * FROM tbboletiminterno ORDER BY idboletiminterno DESC"); $pega_ano2 = mysql_query("SELECT * FROM tbano ORDER BY idano DESC"); $pegaMes2 = mysql_query("SELECT * FROM tbmes"); $linha2 = mysql_fetch_array($pega_ano2); $mes2 = mysql_fetch_array($pegaMes2); $boletim2 = mysql_fetch_array($pegaBoletim2); $mb2 = $boletim2['mes']; $mm2 = $mes2['mes']; $mid2 = $mes2['idmes']; echo "<h4>2º Semestre de ".$linha2['ano']."</h4>"; while($linhac2 = mysql_fetch_array($pegaBoletim2)){ if (($mb2 == $mm2) && ($mid2 > '6')){ echo" <table width=360' border='0' cellpadding='0' cellspacing='0'> <tr bgcolor='#F8F8F8'> <td align='left'><h6>&nbsp;Boletim Interno &nbsp;Nº.:&nbsp;".$linhac2['numbol]."</h6></td> <td align='left'><h6>Data:&nbsp;".$linhac2['dia']."/".$linhac2['mes']."/".$linhac2['ano']."</h6></td> <td align=left'><a href='arc/".$linhac2['arc]."'><img src='imagens/iconlupa.gif' width='18' height='18' border='0' /></a></td> </tr> </table>"; } else { echo "Não houve publicação nesse semestre!";} } ?> </center> </body> </html>
×
×
  • Criar Novo...