Exemplo n.º 1
0
                $t = new Traducao();
                $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);
Exemplo n.º 2
0
     $erro = "<b>Titulo</b> não preenchido!<br><br>";
 }
 if (empty($_POST['url'])) {
     $erro = "<b>URL</b> não preenchido!<br><br>";
 }
 if (empty($erro)) {
     $eve = new Evento();
     $eve->getTexto()->titulo = $_POST['titulo'];
     $eve->local = $_POST['local'];
     $eve->getURL()->setURL($_POST['url']);
     $eve->getTexto()->texto = html_entity_decode($_POST['texto']);
     $eve->setData(new DataHora($_POST['data']));
     if (!empty($_FILES['imagem']['name'])) {
         $eve->getTexto()->getImagem()->setImage(new Image(Arquivos::__OpenArquivoByTEMP($_FILES['imagem'])));
     }
     $lE = new ListaEventos();
     $lE->inserir($eve);
     $lT = new ListaTextos();
     while ($i = $lI->listar()) {
         $t = new Traducao();
         $t->setIdConteudo($eve->getTexto()->getId());
         $t->setCampoConteudo(ListaTextos::TITULO);
         $t->setTabelaConteudo($lT->getTabela());
         $t->conteudo = $eve->getTexto()->titulo;
         $t->traducao = $_POST['ititulo'][$i->getId()];
         $i->addTraducao($t);
         $t->setCampoConteudo(ListaTextos::TEXTO);
         $t->conteudo = $eve->getTexto()->texto;
         $t->traducao = $_POST['itexto'][$i->getId()];
         $i->addTraducao($t);
     }
Exemplo n.º 3
0
$ILT = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaUtilidades/listarEventos.html"));
$ILT->trocar("linkDeletar.Evento", "?p=" . $_GET['p'] . "&a=" . $_GET['a'] . "&");
$ILT->trocar("linkBuscar.Evento", "?p=" . $_GET['p'] . "&");
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);
Exemplo n.º 4
0
<?php

include 'vars.php';
include '../../../../lib.conf/includes.php';
importar("Utils.Dados.DataHora");
importar("Site.Listas.ListaEventos");
$lE = new ListaEventos();
$start_monday = $_POST['startMonday'] ? true : false;
$picker = $_POST['picker'] ? true : false;
if (isset($_POST['pickedDate']) && $_POST['pickedDate'] != 'null') {
    $pickedDateAr = explode('/', $_POST['pickedDate']);
    $pickedDate = @mktime(1, 1, 1, $pickedDateAr[1], $pickedDateAr[0], $pickedDateAr[2]);
} else {
    $pickedDate = mktime(1, 1, 1, date('n'), date('j'), date('Y'));
}
if (isset($_POST['gotoPickedDate'])) {
    $ts = isset($_POST['ts']) ? $_POST['ts'] : mktime(1, 1, 1, date('n', $pickedDate), 1, date('Y', $pickedDate));
} else {
    $ts = isset($_POST['ts']) ? $_POST['ts'] : mktime(1, 1, 1, date('n'), 1, date('Y'));
}
$ts_year_full = date('Y', $ts);
$ts_year = date('Y', $ts);
$ts_month_nr = date('n', $ts);
$ts_month = $month_labels[date('n', $ts) - 1];
$ts_nrodays = date('t', $ts);
$pr_ts = mktime(1, 1, 1, $ts_month_nr - 1, 1, $ts_year);
$nx_ts = mktime(1, 1, 1, $ts_month_nr + 1, 1, $ts_year);
$wdays_counter = date('w', $ts) - ($start_monday ? 1 : 0);
if ($wdays_counter == -1) {
    $wdays_counter = 6;
}