$cod = '0701009,0208002,0207002,0415001,0419002';
include('../_bo/inc/config.inc.php');
include('../_bo/inc/adodb_start.inc.php');
$select_agenda = "
select titulo, texto, docente
from tbl_agenda
where tipo = 'Palestra'
and publicado = 1
order by data_ord asc
";
$qry_select_agenda =& $conn->Execute($select_agenda);
if (!$qry_select_agenda) {
echo $conn->ErroMsg();
}
else {
$rows = '';
while (!$qry_select_agenda->EOF) {
$rows .= '
' . $qry_select_agenda->fields['titulo'] . ':
' . $qry_select_agenda->fields['texto'] . '
Docente:
' . $qry_select_agenda->fields['docente'] . '
';
$qry_select_agenda->MoveNext();
}
$qry_select_agenda->Close();
}
$select_cursos = "
select titulo, texto, docente
from tbl_agenda
where tipo = 'Cursos'
and publicado = 1
order by data_ord asc
";
$qry_select_cursos =& $conn->Execute($select_cursos);
if (!$qry_select_cursos) {
echo $conn->ErroMsg();
}
else {
$rows2 = '';
while (!$qry_select_cursos->EOF) {
$rows2 .= '
' . $qry_select_cursos->fields['titulo'] . ':
' . $qry_select_cursos->fields['texto'] . '
Docente:
' . $qry_select_cursos->fields['docente'] . '
';
$qry_select_cursos->MoveNext();
}
$qry_select_cursos->Close();
}
$select_aulas = "
select titulo, texto, docente
from tbl_agenda
where tipo = 'Aulas'
and publicado = 1
order by data_ord asc
";
$qry_select_aulas =& $conn->Execute($select_aulas);
if (!$qry_select_agenda) {
echo $conn->ErroMsg();
}
else {
$rows3 = '';
while (!$qry_select_aulas->EOF) {
$rows3 .= '
' . $qry_select_aulas->fields['titulo'] . ':
' . $qry_select_aulas->fields['texto'] . '
Docente:
' . $qry_select_aulas->fields['docente'] . '
';
$qry_select_aulas->MoveNext();
}
$qry_select_aulas->Close();
}
$select_eventos = "
select titulo, texto
from tbl_agenda
where tipo = 'Eventos'
and publicado = 1
order by data_ord asc
";
$qry_select_eventos =& $conn->Execute($select_eventos);
if (!$qry_select_cursos) {
echo $conn->ErroMsg();
}
else {
$rows4 = '';
while (!$qry_select_eventos->EOF) {
$rows4 .= '
' . $qry_select_eventos->fields['titulo'] . ':
' . $qry_select_eventos->fields['texto'] . '
';
$qry_select_eventos->MoveNext();
}
$qry_select_eventos->Close();
}
include('../_bo/inc/adodb_stop.inc.php');
if ($rows == '') {
$rows = '
Não há nenhuma palestra a ser realizada.
';
}
if ($rows2 == '') {
$rows2 = '
Não há nenhum curso a ser realizado.
';
}
if ($rows3 == '') {
$rows3 = '
Não há nenhuma aula a ser realizada.
';
}
if ($rows4 == '') {
$rows4 = '
Não há nenhum evento a ser realizado.
';
}
?>
|