public function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(self::Entity, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["<b>Sucesso:</b> A categoria {$this->Data['category_title']} foi cadastrada no sistema!", WS_ACCEPT];
     }
 }
Ejemplo n.º 2
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_LOGS, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Log gravado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 3
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(self::Entity, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Msg = "<script>alert('Sucesso');</script>";
     }
 }
Ejemplo n.º 4
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(self::entidade, $this->dados);
     if ($Create->getResult()) {
         $this->result = $Create->getResult();
         $this->error = ["O registro de <b>{$this->dados['nome']}</b> foi cadastrado com sucesso no sistema!", WS_ACCEPT];
     }
 }
Ejemplo n.º 5
0
 private function Create()
 {
     $Create = new Create();
     //        $this->Data['nome'] = date('Y-m-d H:i:s');
     //        $this->Data['senha'] = md5($this->Data['senha']);
     $Create->ExeCreate(self::Entity, $this->Data);
     if ($Create->getResult()) {
         $this->Msg = ["O usuário <b>{$this->Data['user_name']}</b> foi cadastrado com sucesso no sistema!", WS_ACCEPT];
         $this->Result = $Create->getResult();
     }
 }
Ejemplo n.º 6
0
 public function CriaCidade(array $data)
 {
     $this->data = $data;
     $create = new Create();
     $create->Inserter(self::Cidade, $this->data);
     if ($create->getResult()) {
         $this->result = $create->getResult();
     } else {
         $this->result = false;
     }
 }
Ejemplo n.º 7
0
 public function ModelCreator(array $data)
 {
     $this->data = $data;
     $this->data['motorista_nome_url'] = Asserts::CheckName($this->data['motorista_nome'] . ' ' . $this->data['motorista_sobrenome']);
     $create = new Create();
     $create->Inserter(self::Entity, $this->data);
     if ($create->getResult()) {
         $this->result = $create->getResult();
         $this->rowcount = $create->getRowCount();
     } else {
         $this->result = $create->getResult();
         $this->rowcount = 0;
     }
 }
Ejemplo n.º 8
0
 public function ModelCreator(array $data)
 {
     $this->data = $data;
     $this->data['veiculo_vagas'] = 0;
     $create = new Create();
     $create->Inserter(self::Entity, $this->data);
     if ($create->getResult()) {
         $this->result = $create->getResult();
         $this->rowcount = $create->getRowCount();
     } else {
         $this->result = $create->getResult();
         $this->rowcount = 0;
     }
 }
Ejemplo n.º 9
0
 public function ModelCreator(array $data)
 {
     $this->data = $data;
     $this->data['instituicao_nome_url'] = Asserts::CheckName($this->data['instituicao_nome']);
     $create = new Create();
     $create->Inserter(self::Entity, $this->data);
     if ($create->getResult()) {
         $this->result = $create->getResult();
         $this->rowcount = $create->getRowCount();
         $this->lastid = $create->getLastId();
     } else {
         $this->result = $create->getResult();
         $this->rowcount = 0;
         $this->lastid = false;
     }
 }
Ejemplo n.º 10
0
 public function inserir($dados)
 {
     $this->Dados = $dados;
     $cadastrar = new Create();
     $cadastrar->ExeCreate('faleconosco', $this->Dados);
     if ($cadastrar->getResult()) {
         $this->result = true;
     } else {
         $this->result = false;
     }
 }
Ejemplo n.º 11
0
 /**
  * <b>ModelCreator</b>: Método responsável por efetivar o cadastro da rota no sistema.
  * @param array $data Array com os dados necessários para cadastro da rota.
  * @return bool Retorna TRUE caso a função seja executada com sucesso, ou FALSE em caso de falha.
  */
 public function ModelCreator(array $data)
 {
     $this->data = $data;
     $dataRota = array('rota_instituicoes' => json_encode($this->data['escolas']), 'tb_veiculos_veiculo_id' => (int) $this->data['rota_veiculo'], 'rota_inicio' => date('Y-m-d', strtotime(str_replace(array('/', '_', ' '), '-', $this->data['inicio']))), 'rota_fim' => date('Y-m-d', strtotime(str_replace(array('/', '_', ' '), '-', $this->data['fim']))), 'rota_saida' => (int) $this->data['rota_inicio'], 'rota_chegada' => (int) $this->data['rota_fim'], 'rota_observacoes' => $this->data['observacoes']);
     $create = new Create();
     $create->Inserter(self::Entity, $dataRota);
     if ($create->getResult()) {
         $this->result = true;
     } else {
         $this->result = false;
     }
 }
Ejemplo n.º 12
0
 public function ModelCreator(array $data)
 {
     $this->data = $data;
     $this->data['aluno_nome_url'] = Asserts::CheckName($this->data['aluno_nome']);
     $this->data['aluno_nascimento'] = date('Y-m-d', strtotime(str_replace(array('/', '_'), '-', $this->data['aluno_nascimento'])));
     $create = new Create();
     $create->Inserter(self::Entity, $this->data);
     if ($create->getResult()) {
         $rota = new ModelRotas();
         $veiculo = $rota->getRota($this->data['tb_rotas_rota_id']);
         if ($veiculo) {
             $idVeiculo = $veiculo[0]['tb_veiculos_veiculo_id'];
             $bus = new ModelVeiculo();
             $bus->setVaga($idVeiculo);
         }
         $this->result = $create->getResult();
         $this->rowcount = $create->getRowCount();
     } else {
         $this->result = $create->getResult();
         $this->rowcount = 0;
     }
 }
Ejemplo n.º 13
0
 public function cadastrar(array $dados)
 {
     try {
         $cadastrar = new Create();
         $cadastrar->ExeCreate('produtos', $dados);
         if ($cadastrar->getResult() < 1) {
             throw new Exception('Verifique os valores antes de Enviar!', E_USER_ERROR);
         } else {
             JBErro('<p>Produto Cadastrado com Sucesso!</p>', JB_ACCEPT);
         }
     } catch (Exception $e) {
     }
 }
Ejemplo n.º 14
0
 public function GravarTrabalho()
 {
     $this->dados = filter_input_array(INPUT_POST, FILTER_DEFAULT);
     if (isset($_FILES['fileUpload'])) {
         $nome = $this->dados['titulo'];
         $ext = strtolower(substr($_FILES['fileUpload']['name'], -4));
         //Pegando extensão do arquivo
         $new_name = $nome . $ext;
         //Definindo um novo nome para o arquivo
         $this->LinkAnexo = $new_name;
         $dir = 'uploads/';
         //Diretório para uploads
         move_uploaded_file($_FILES['fileUpload']['tmp_name'], $dir . $new_name);
         //Fazer upload do arquivo
     } else {
         echo "<script>alert('nao foi possivel anexar o arquivo!');</script>";
     }
     if ($this->dados['tipoAtividade'] == "Palestra") {
         $tipoA = 1;
     } elseif ($this->dados['tipoAtividade'] == "MiniCurso") {
         $tipoA = 2;
     } else {
         $tipoA = 3;
     }
     //atualiza pessoa
     $updateP = new Update();
     $dadosUp = ["curriculo" => $this->dados['perfil'], "nivel" => 1, "telefone" => $this->dados['telefone']];
     $updateP->ExeUpdate('pessoas', $dadosUp, "where codigo = :id", "id={$this->dados['idPes']}");
     //cadastra Trabalho
     $cadastrarT = new Create();
     $Dados = ["resumo" => $this->dados['resumo'], "data_submetido" => date("Y-m-d"), "tipo_atividade" => $tipoA, "anexo" => $this->LinkAnexo, "status" => "N", "titulo" => $this->dados['titulo']];
     $cadastrarT->ExeCreate('trabalhos', $Dados);
     $this->idT = $cadastrarT->getResult();
     // Vincula o auto trabalho
     $cadastraAT = new Create();
     $DadosAT = ["codigo_trabalho" => (int) $this->idT, "codigo_autor" => (int) $this->dados['idPes'], "codigo_evento" => 1];
     $cadastraAT->ExeCreate('autor_trabalho', $DadosAT);
     // pega dados da pessoa
     $pessoa = new Read();
     $pessoa->ExeRead('pessoas', "where codigo = :id", "id={$this->dados['idPes']}");
     foreach ($pessoa->getResult() as $resulPes) {
         extract($resulPes);
         //Enviar o Email.
         $enviarEmail = new Email();
         $DadosEmail = ["Assunto" => "Confirmação da Submição de Trabalho DeepDay", "Mensagem" => "Seu Trabalho foi submetido com sucesso.", "RemetenteNome" => "Equipe DeepDay", "RemetenteEmail" => "*****@*****.**", "DestinoNome" => $nome, "DestinoEmail" => $email];
         $enviarEmail->Enviar($DadosEmail);
     }
     echo "<script>alert('Seu trabalho foi submetido com sucesso!');</script>";
     echo "<script>window.location.assign('" . BASE . "/painel')</script>";
 }
Ejemplo n.º 15
0
 public function GravarTrabalho()
 {
     $this->dados = filter_input_array(INPUT_POST, FILTER_DEFAULT);
     if (isset($_FILES['fileUpload'])) {
         $nome = $this->dados['titulo'];
         $ext = strtolower(substr($_FILES['fileUpload']['name'], -4));
         //Pegando extensão do arquivo
         $new_name = $nome . $ext;
         //Definindo um novo nome para o arquivo
         $this->LinkAnexo = $new_name;
         $dir = 'uploads/';
         //Diretório para uploads
         move_uploaded_file($_FILES['fileUpload']['tmp_name'], $dir . $new_name);
         //Fazer upload do arquivo
     } else {
         echo "<script>alert('nao foi possivel anexar o arquivo!');</script>";
     }
     if ($this->dados['tipoAtividade'] == "Palestra") {
         $tipoA = 1;
     } elseif ($this->dados['tipoAtividade'] == "MiniCurso") {
         $tipoA = 2;
     } else {
         $tipoA = 3;
     }
     //atualiza pessoa
     $updateP = new Update();
     $dadosUp = ["curriculo" => $this->dados['perfil'], "nivel" => 1, "senha" => $this->dados['senha']];
     $updateP->ExeUpdate('pessoas', $dadosUp, "where codigo = :id", "id={$this->dados['idPes']}");
     //cadastra Trabalho
     $cadastrarT = new Create();
     $Dados = ["resumo" => $this->dados['resumo'], "data_submetido" => date("Y-m-d"), "tipo_atividade" => $tipoA, "anexo" => $this->LinkAnexo, "status" => "N", "titulo" => $this->dados['titulo']];
     $cadastrarT->ExeCreate('trabalhos', $Dados);
     $this->idT = $cadastrarT->getResult();
     // Vincula o auto trabalho
     $cadastraAT = new Create();
     $DadosAT = ["codigo_trabalho" => (int) $this->idT, "codigo_autor" => (int) $this->dados['idPes'], "codigo_evento" => 1];
     $cadastraAT->ExeCreate('autor_trabalho', $DadosAT);
     echo "<script>alert('Seu trabalho foi submetido com sucesso. Aguarde nosso contato');</script>";
     echo "<script>window.location.assign('http://www.profile.vc/sigea')</script>";
 }
Ejemplo n.º 16
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(self::entidade, $this->dados);
     if ($Create->getResult() != null) {
         $this->result = true;
         $this->error = ["O empenho <b>{$this->dados['id']}</b> foi cadastrada com sucesso no sistema!", WS_ACCEPT];
     }
 }
Ejemplo n.º 17
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_FAMILIA_COMPOSICAO, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro de um membro da família realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 18
0
 private function Create()
 {
     $Create = new Create();
     $this->Data['user_registration'] = date('Y-m-d H:i:s');
     $this->Data['user_password'] = crypt(sha1($this->Data['user_email'] . $this->Data['user_password']), sha1($this->Data['user_email']));
     $Create->ExeCreate(DB_USERS, $this->Data);
     if ($Create->getResult()) {
         $this->Error = ["O usuário <b>{$this->Data['user_name']}</b> foi cadastrado com sucesso no sistema!", TW_ACCEPT];
         $this->Result = $Create->getResult();
     }
 }
Ejemplo n.º 19
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_VISITANTES, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro do visitante realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 20
0
 private function RegistraQuantidade()
 {
     $create = new Create();
     $create->ExeCreate(DB_NUTRICAO_REGISTRO, $this->Data);
     if ($create->getResult()) {
         $this->Result = true;
     }
 }
Ejemplo n.º 21
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_TURMAS, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro da turma realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 22
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_EDUCANDOS, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro do educando realizado com sucesso!", TW_ACCEPT];
     } else {
         $this->Result = false;
         $this->Error = ["Erro ao realizar cadastro!", TW_ERROR];
     }
 }
Ejemplo n.º 23
0
 private function CreateReport()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_PSICO_GRUPO_SESSAO, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro do grupo realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 24
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(self::Entity, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["<b>Sucesso:</b> A banda {$this->Data['name']} foi cadastrada no sistema!", WS_ACCEPT];
     }
 }
<!DOCTYPE html>
<html lang="pt-br">
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php 
require './_app/Config.inc.php';
$Dados = ['agent_name' => 'Firefox', 'agent_views' => '1289'];
$Cadastra = new Create();
//$Cadastra->ExeCreate('ws_siteviews_agent', $Dados);
$Dados = ['agent_name' => 'Safari', 'agent_views' => '680'];
$Cadastra->ExeCreate('ws_siteviews_agent', $Dados);
if ($Cadastra->getResult()) {
    echo "Cadastro com sucesso!";
}
var_dump($Cadastra);
?>
    </body>
</html>
Ejemplo n.º 26
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate('audioclip', $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["<b>Success:</b> Audioclip added!", WS_ACCEPT];
     }
 }
Ejemplo n.º 27
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_NUTRICAO_CATEGORIAS, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro da categoria realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 28
0
$resultado = false;
$texto = null;
$form = filter_input_array(INPUT_POST, FILTER_DEFAULT);
if ($form && $form['submit']) {
    $file = $_FILES['pesquisa'];
    if ($file['name']) {
        $upload = new Upload('uploads/');
        $upload->File($file);
        if ($upload->getError()) {
            $texto = $upload->getError();
        }
        $dados = ['titulo' => $_POST['titulo'], 'resumo' => $_POST['resumo'], 'ano' => $_POST['ano'], 'autores' => $_POST['autores'], 'orientador' => $_POST['orientador'], 'outorga' => $_POST['outorga'], 'modalidade' => $_POST['modalidade'], 'financiamento' => $_POST['financiamento'], 'area' => $_POST['area']];
        if ($upload->getResult()) {
            $cadastra = new Create();
            $cadastra->ExeCreate('pesquisa', $dados);
            if ($cadastra->getResult()) {
                $resultado = true;
            }
        }
    }
}
?>
<!DOCTYPE html>
<html class="ls-theme-green">
  <head>
    <title>Repositório Institucional - IFBA - VCA</title>

    <?php 
require_once 'assets.php';
?>
     
Ejemplo n.º 29
0
 private function Create()
 {
     $Create = new Create();
     if (isset($this->Responsavel['familia_resp_dados'])) {
         $this->Pai['familia_resp_dados'] = $this->Responsavel['familia_resp_dados'];
     }
     $Create->ExeCreate(DB_FAMILIA, array_merge($this->Pai, $this->Mae, $this->Data));
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->SituacaoPai['familia_id'] = $this->Result;
         $this->SituacaoMae['familia_id'] = $this->Result;
         $this->createResponsavel();
         $Create->ExeCreate(DB_FAMILIA_PAI_SITUACAO, $this->SituacaoPai);
         $Create->ExeCreate(DB_FAMILIA_MAE_SITUACAO, $this->SituacaoMae);
         $this->Error = ["Cadastro da família realizado com sucesso!", TW_ACCEPT];
     }
 }
Ejemplo n.º 30
0
 private function Create()
 {
     $Create = new Create();
     $Create->ExeCreate(DB_SAUDE, $this->Data);
     if ($Create->getResult()) {
         $this->Result = $Create->getResult();
         $this->Error = ["Cadastro do histórico de saúde realizado com sucesso!", TW_ACCEPT];
     }
 }