if (!empty($_GET['deletar'])) { $lT = new ListaEventos(); $lT->condicoes('', $_GET['deletar'], ListaEventos::ID); if ($lT->getTotal() > 0) { try { $lT->deletar($lT->listar()); $javaScript .= Aviso::criar("Evento removido com sucesso!"); } catch (Exception $e) { $javaScript .= Aviso::criar($e->getMessage()); } } } $lT = new ListaEventos(); $ILT->createRepeticao("repetir->Eventos"); if (!empty($_GET['busca'])) { $lT->condicoes('', "%" . $_GET['busca'] . "%", 'empresa', 'LIKE'); } $ILT->condicao("condicaoBusca", !empty($_SESSION['nivel'])); $ILT->trocar("linkCadastrar.Evento", "?p=" . $_GET['p'] . "&a=cadastrarEvento"); while ($eve = $lT->listar("DESC", ListaEventos::DATA)) { $ILT->repetir(); $ILT->enterRepeticao()->condicao("condicaoRemover", !empty($_SESSION['nivel'])); $bgColor = $lT->getParametros() % 2 == 0 ? '#FFFFFF' : '#EAEAEA'; $ILT->enterRepeticao()->trocar("bgColorEmpresa", $bgColor); $ILT->enterRepeticao()->trocar("id.Evento", $eve->getId()); $ILT->enterRepeticao()->trocar("titulo.Evento", $eve->getTexto()->titulo); $ILT->enterRepeticao()->trocar("linkAlterar.Evento", "?p=" . $_GET['p'] . "&a=alterarEvento&evento=" . $eve->getId()); $ILT->enterRepeticao()->condicao("condicaoVisualizar", $eve->tipo == 1); } $ILT->trocar("linkVoltar", "?p=" . $_GET['p'] . "&a=utilidades"); $botoes = $ILT->cutParte('botoes');
$t->conteudo = $eve->getTexto()->texto; $t->traducao = $_POST['itexto'][$i->getId()]; $t->setIdConteudo($eve->getTexto()->getId()); $t->setCampoConteudo(ListaTextos::TEXTO); $t->setTabelaConteudo($lT->getTabela()); $i->addTraducao($t); } } $lI->setParametros(0); $javaScript .= Aviso::criar("Evento salvo com sucesso!"); } else { $javaScript .= Aviso::criar($erro); } } $lE = new ListaEventos(); $t = $lE->condicoes('', $_GET['evento'], ListaEventos::ID)->listar(); $lT = new ListaTextos(); $iAT->trocar("titulo", $t->getTexto()->titulo); $iAT->trocar("local", $t->local); $iAT->trocar("url", $t->getURL()->getURL()); $iAT->trocar("data", $t->getData()->mostrar("d/m/Y")); $iAT->trocar("texto", $t->getTexto()->texto); $sub = "repetir->titulo.Eventos.Idiomas"; $sub2 = "repetir->texto.Eventos.Idiomas"; $iAT->createRepeticao($sub); $iAT->createRepeticao($sub2); while ($i = $lI->listar()) { $iAT->repetir($sub); $iAT->repetir($sub2); $iAT->enterRepeticao($sub)->trocar("nome.Idioma", $i->nome); $iAT->enterRepeticao($sub)->trocar("id.Idioma", $i->getId());
</tr> <tr class="firstRow"><?php //Add days for the beginning non-month days for ($i = 0; $i < $wdays_counter; $i++) { $day = date("t", $pr_ts) - ($wdays_counter - $i) + 1; $i_ts = mktime(1, 1, 1, $ts_month_nr - 1, $day, $ts_year); echo '<td class="outsideDay" date="' . "{'day': '" . $day . "', 'month': '" . date('n', $i_ts) . "', 'year': '" . date('Y', $i_ts) . "'}" . '">' . $day . '</td>'; } //Add month days $row = 0; for ($i = 1; $i <= $ts_nrodays; $i++) { $i_ts = mktime(1, 1, 1, $ts_month_nr, $i, $ts_year); $mes = strlen($ts_month_nr) == 1 ? "0" . $ts_month_nr : $ts_month_nr; $dia = strlen($i) == 1 ? "0" . $i : $i; $d = new DataHora($ts_year . $mes . $dia); $lE->condicoes('', $d->mostrar("Ymd"), 'data_evento'); $stY = ''; if ($lE->getTotal() > 0) { $stY = 'style="color: #FFF;"'; } echo '<td' . ($i_ts == $pickedDate ? ' class="selected"' : '') . ' ' . "date=\"{'day': '" . $i . "', 'month': '" . $ts_month_nr . "', 'year': '" . $ts_year . "'}\">"; if ($lE->getTotal() > 0) { echo '<a href="./?p=agenda" ' . $stY . '>' . $i . '</a>'; } else { echo $i; } echo '</td>'; if ($wdays_counter == 6 && $i - 1 != $ts_nrodays) { $week_num = date("W", $i_ts) + 1; echo "</tr>\n\t<tr>"; $wdays_counter = -1;