/** * Construtor * @param int $id * @return void */ function Evento($idevento) { $db = new BD(); $sql = sprintf("select\n\t\t\t id,\n\t\t\t data,\n\t\t\t local,\n\t\t\t descricao\n\t\t\t from\n cad_eventos\n where id= %d", $idevento); $db->Query($sql); if ($db->NumRows() == 0) { $this->Existe = 'N'; } else { $this->Existe = 'S'; $db->Next(); $this->ID = $idevento; $this->Data = $db->getValue('data'); $this->Local = $db->getValue('local'); $this->Descricao = $db->getValue('descricao'); } $db->Close(); }
/** * Construtor * @param int $id * @return void */ function Reuniao($id) { $db = new BD(); $sql = sprintf("select\n\t\t\t id,\n\t\t\t data,\n\t\t\t hora,\n\t\t\t local\n\t\t\t from\n cad_reuniao\n where id= %d", $id); $db->Query($sql); if ($db->NumRows() == 0) { $this->Existe = 'N'; } else { $this->Existe = 'S'; $db->Next(); $this->ID = $id; $this->Data = $db->getValue('data'); $this->Hora = $db->getValue('hora'); $this->Local = $db->getValue('local'); } $db->Close(); }
/** * Construtor * @param int $id * @return void */ function Calendario($id) { $db = new BD(); $sql = sprintf("select\n\t\t\t idcalendario,\n\t\t\t dataevento,\n\t\t\t titulo,\n\t\t\t descricao,\n\t\t\t local,\n\t\t\t realizacao\n\t\t\t from\n tb_calendario\n where idcalendario= %d", $id); $db->Query($sql); if ($db->NumRows() == 0) { $this->Existe = 'N'; } else { $this->Existe = 'S'; $db->Next(); $this->ID = $id; $this->Data = $db->getValue('dataevento'); $this->Titulo = $db->getValue('titulo'); $this->Descricao = $db->getValue('descricao'); $this->Local = $db->getValue('local'); $this->Realizacao = $db->getValue('realizacao'); } $db->Close(); }
/** * Construtor * @param int $userid * @return void */ function Enquete($codigo) { $db = new BD(); $sql = sprintf("select\n\t\t\t numero,\n\t\t\t pergunta,\n\t\t\t datainicio,\n\t\t\t datafim,\n\t\t\t tiporesposta,\n\t\t\t restrita\t\t\t \n\t\t\t from\n cad_enquete\n where numero= %d", $codigo); $db->Query($sql); if ($db->NumRows() == 0) { $this->Existe = 'N'; } else { $this->Existe = 'S'; $db->Next(); $this->Codigo = $codigo; $this->Pergunta = $db->getValue('pergunta'); $this->DataInicio = $db->getValue('datainicio'); $this->DataFim = $db->getValue('datafim'); $this->TipoResposta = $db->getValue('tiporesposta'); $this->Restrita = $db->getValue('restrita'); $this->CarregaOpcoes(); } $db->Close(); }
<tr><td colspan=10 align="center"> <div style="width:430px;border:solid 1px #a0b0b0;background:#fff;"> <table style="width:450px;" width="450px" bordercolor="white" class='dettab' border="1px" cellspacing=0 frame="box" rules="all"> <?php require_once $_SESSION['DOCROOT'] . "/classes/class.bd.php"; require_once $_SESSION['DOCROOT'] . "/classes/class.usuario.php"; require_once $_SESSION['DOCROOT'] . "/classes/class.campeonato.php"; require_once $_SESSION['DOCROOT'] . "/classes/class.inscricao.php"; $db = new BD(); $sql = sprintf("select i.campeonato,i.userid " . "from " . "cad_inscricao i, " . "cad_usuario u, " . "cad_campeonato c " . "where " . "i.campeonato = c.codigo " . "and i.userid = u.userid " . "and c.flandamento = 'S' and c.codigo = 4 " . "order by " . "c.ano desc," . "i.campeonato," . "i.posefetiva," . "u.username"); $db->Query($sql); $camp = 0; $posant = 0; $pos = 0; if ($db->NumRows() == 0) { echo ' <tr> <td>Não existe campeonatos cadastrados ou em andamento no momento.<br></td> </tr>' . "\n"; } else { while ($db->Next()) { if ($camp != $db->getValue('campeonato')) { if ($camp != 0) { echo "<tr><td colspan=4><br></td></tr>\n"; } $pos = 0; $cmp = new Campeonato($db->getValue('campeonato')); echo "<tr style='background:rgb(250, 252, 188);color:rgb(0, 102, 0);'><td colspan=10 align=center><b>" . $cmp->getDescricaoAno() . "</td></tr>\n"; echo "<tr style='background:rgb(250, 252, 188);color:rgb(0, 102, 0);'><td colspan=3 align=center><b>Classificação do Bolão</td>\n\t\t\t\t\t\t\t</tr>\n"; $camp = $cmp->getCodigo(); echo "<tr class='cabec'><td align=center>Pos</td><td>Participante</td><td align=center>Pontos</td></tr>\n"; } $usr = new Usuario($db->getValue('userid'));