<?php
ob_start();
session_start();

include_once('../class/class.mysql.php');
include_once('class.principal.php');
include_once('../include/utilitarios.php');

$mysqlCom = new MysqlConnect();
extract($_POST);
extract($_GET);
$PR = new Principal();

if ($ax == 'CarregarAlbumFinalizado') {
  $PR->SelectX9Finalizado();

  echo '  <table width="380" border="0">
              <tr>';
  while ($row = mysqli_fetch_object($PR->qry)) {
    echo '       <td width="162"><div align="left"><a href="?p=evento/principal&id_evento=' . $row->id_evento . '">' . $row->nome . '</a></div></td>
                <td width="103"><div align="left">' . InverterData($row->data_finalizacao) . '</div></td>
                <td width="103">' . $row->tipo_evento . '</td>
              </tr>';
  }
  echo ' </table>';
}

if ($ax == 'x9NaoFinalizado') {
  $PR->SelectX9Ativos();
  //<a href="?p=evento/principal&id_evento=40">Francisco e Meire</a>
  echo '  <table width="380" border="0">
              <tr>';
  while ($row = mysqli_fetch_object($PR->qry)) {
    echo '    <td width="162"><div align="left"><a href="?p=evento/principal&id_evento=' . $row->id_evento . '">' . $row->nome . '</a></div></td>
                <td width="103"><div align="left">' . InverterData($row->data_evento) . '</div></td>
                <td width="103">' . $row->tipo_evento . '</td>
              </tr>';
  }
  echo ' </table>';
}


if ($ax == 'ProximoEvento') {
  $PR->SelectProximoEvento();
  echo '  <table width="380" border="0">
              <tr>';
  while ($row = mysqli_fetch_object($PR->qry)) {
    echo '    <td width="162"><div align="left"><a href="?p=evento/principal&id_evento=' . $row->id_evento . '">' . $row->nome . '</a></div></td>
                <td width="103"><div align="left">' . InverterData($row->data_evento) . '</div></td>
                <td width="103">' . $row->tipo_evento . '</td>
              </tr>';
  }
  echo ' </table>';
}

if ($ax == 'ProcimaPrevia') {
  $PR->SelectProximaPrevia();
  echo '  <table width="380" border="0">
              <tr>';
  while ($row = mysqli_fetch_object($PR->qry)) {
    echo '    <td width="162"><div align="left"><a href="?p=evento/principal&id_evento=' . $row->id_evento . '">' . $row->nome . '</a></div></td>
                <td width="103"><div align="left">' . InverterData($row->data) . '</div></td>
                <td width="103">' . $row->hora . '</td>
              </tr>';
  }
  echo ' </table>';
}
