Пример #1
0
<div class="container">
    <article class="row">
        <?php 
if ($userlogin['user_level'] == NV_SADMIN || $userlogin['user_level'] == NV_ADMIN || $userlogin['user_level'] == NV_SERVICOSOCIAL) {
    $log = new Log($userlogin['user_id']);
    $log->RecordLog("Acesso: " . filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_DEFAULT), "Sucesso");
    $data = filter_input_array(INPUT_POST, FILTER_DEFAULT);
    $familiaId = filter_input(INPUT_GET, 'familia', FILTER_VALIDATE_INT);
    if ($data && $data['educando_nome']) {
        $data['educando_foto'] = $_FILES['educando_foto']['tmp_name'] ? $_FILES['educando_foto'] : 'null';
        require '_models/AdminEducando.class.php';
        $cadastra = new AdminEducando();
        $cadastra->ExeCreate($familiaId, $data, $userlogin['user_id']);
        if (!$cadastra->getResult()) {
            WSErro($cadastra->getError()[0], $cadastra->getError()[1]);
            $log->RecordLog("Cadastro: educando", "Erro: " . $cadastra->getError()[0]);
        } else {
            $logData = $log->setData($data);
            $log->RecordLog("Cadastro: educando. Dados: " . $logData, "Sucesso: " . $cadastra->getError()[0]);
            header("Location:painel.php?exe=educandos/matricula&familia={$familiaId}&educando={$cadastra->getResult()}");
        }
    }
    $familia = new Read();
    $familia->ExeRead(DB_FAMILIA, "WHERE familia_id = :familia", "familia={$familiaId}");
    if ($familia->getRowCount()) {
        foreach ($familia->getResult() as $fam) {
        }
    } else {
        header("Location: painel.php?exe=educandos/index&empty=true");
    }
    ?>
Пример #2
0
    <article class="row">
        <?php 
if ($userlogin['user_level'] == NV_SADMIN || $userlogin['user_level'] == NV_ADMIN || $userlogin['user_level'] == NV_PSICOLOGIA) {
    $log = new Log($userlogin['user_id']);
    $log->RecordLog("Acesso: " . filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_DEFAULT), "Sucesso");
    $educandoId = filter_input(INPUT_GET, 'educando', FILTER_VALIDATE_INT);
    $readEdu = new Read();
    $readEdu->FullRead("SELECT educando_nome, educando_id FROM " . DB_EDUCANDOS . " WHERE educando_id = :id", "id={$educandoId}");
    if ($readEdu->getResult()) {
        $data = filter_input_array(INPUT_POST, FILTER_DEFAULT);
        if ($data && $data['SendPostForm']) {
            unset($data['SendPostForm']);
            require '_models/AdminEducando.class.php';
            $cadastra = new AdminEducando();
            $cadastra->ExeCreateOcorrencia($educandoId, $data, 'Ocorrência', $userlogin['user_id']);
            if (!$cadastra->getResult()) {
                WSErro($cadastra->getError()[0], $cadastra->getError()[1]);
                $log->RecordLog("Cadastro: Registro de Ocorrência.", "Erro: " . $cadastra->getError()[0]);
            } else {
                $logData = $log->setData($data);
                $log->RecordLog("Cadastro: Registro de Ocorrência. Dados: " . $logData, "Sucesso: " . $cadastra->getError()[0]);
                header("Location:painel.php?exe=educandos/psico/index&create=true&tipo=ocorrencia");
            }
        }
        ?>
                <header>
                    <ol class="breadcrumb">
                        <li><a href="painel.php" title="Tela Inicial">Início</a></li>
                        <li><a href="painel.php?exe=educandos/psico/index" title="Registrar Atendimento Individual ou Contato">Registrar Atendimento Individual ou Contato</a></li>
                        <li class="active">Registrar Ocorrência de <?php 
        echo $readEdu->getResult()[0]['educando_nome'];
Пример #3
0
 $readEdu = new Read();
 $readEdu->ExeRead(DB_EDUCANDOS, "WHERE educando_id = :id AND educando_familia_id = :famid", "id={$educandoId}&famid={$familiaId}");
 $readEdu->FullRead("SELECT t1.educando_id, t1.educando_numero_matricula, t1.educando_data_rematricula, t1.educando_data_primeira_matricula, t1.educando_ano, t1.educando_turno, t1.educando_nome, t1.educando_pai, t1.educando_mae, " . "t1.educando_termo, t1.educando_folha, t1.educando_livro, t1.educando_nomecartorio, t1.educando_sexo, t1.educando_cor, t1.educando_religiao, t1.educando_colegio, t1.educando_foto, " . "t2.familia_pai_nome, t2.familia_pai_parentesco, t2.familia_pai_rg, t2.familia_pai_endereco, t2.familia_pai_bairro, t2.familia_pai_cep, t2.familia_pai_telefonefixo, t2.familia_pai_telefonecelular, t2.familia_pai_telefonecomercial, " . "t2.familia_pai_telefonerecados, t2.familia_pai_datanascimento, t2.familia_pai_pontoreferencia, t2.familia_pai_estadocivil, t2.familia_pai_escolaridade, t2.familia_mae_nome, " . "t2.familia_mae_parentesco, t2.familia_mae_rg, t2.familia_mae_estadocivil, t2.familia_mae_escolaridade, t2.familia_mae_datanascimento, t2.familia_mae_bairro, t2.familia_mae_cep, " . "t2.familia_mae_telefonecelular, t2.familia_mae_telefonecomercial, t2.familia_mae_telefonerecados, t3.familia_resp_nome, t3.familia_resp_endereco, " . "t3.familia_resp_bairro, t3.familia_resp_rg, t3.familia_resp_cep, t3.familia_resp_telefonefixo, t3.familia_resp_telefonecelular, t3.familia_resp_telefonecomercial, t3.familia_resp_telefonerecados, " . "t3.familia_resp_pontoreferencia, t3.familia_resp_parentesco, t3.familia_resp_datanascimento, t3.familia_resp_estadocivil, t3.familia_resp_escolaridade, t2.familia_tipomoradia, t2.familia_residencia, t2.familia_renda, t2.familia_saude, t2.familia_financiamento, t2.familia_aluguel, t2.familia_social_outrassituacoes, t2.familia_social_parecer FROM " . DB_EDUCANDOS . " t1 INNER JOIN " . DB_FAMILIA . " t2 ON (t1.educando_familia_id = t2.familia_id) LEFT JOIN " . DB_FAMILIA_RESPONSAVEL . " t3 ON (t1.educando_familia_id = t3.familia_id) WHERE t1.educando_id = :id AND t1.educando_familia_id = :famid", "id={$educandoId}&famid={$familiaId}");
 if ($readEdu->getResult()) {
     $botaoImprimir = '<a href="javascript:window.print()" title="Imprimir" class="btn btn-success printNone marginTop"><i class="fa fa-print"></i> Imprimir Documento</a>';
     $botaoMatricular = '<a href="painel.php?exe=educandos/matricula&familia=' . $familiaId . '&educando=' . $educandoId . '&matricula=true" title="Atualizar Matrícula" class="btn btn-gray printNone marginTop"><i class="fa fa-refresh"></i> Atualizar Matrícula</a>';
     $botaoConcluido = '<a href="painel.php?exe=familias/index" title="Cadastro Concluído" class="btn btn-primary printNone marginTop"><i class="fa fa-check"></i> Concluir</a>';
     $botaoNovoCadastro = '<a href="painel.php?exe=educandos/create&familia=' . $familiaId . '" title="Novo Educando para essa Família" class="btn btn-danger printNone marginTop"><i class="fa fa-child"></i> Novo Educando</a>';
     foreach ($readEdu->getResult() as $edu) {
     }
     if ($rematricula === true) {
         require '_models/AdminEducando.class.php';
         $adminEducando = new AdminEducando();
         $data['educando_data_rematricula'] = date('d/m/Y');
         $adminEducando->ExeMatricula($familiaId, $educandoId, $data, $userlogin['user_id']);
         if ($adminEducando->getResult()) {
             $edu['educando_data_rematricula'] = $data['educando_data_rematricula'];
             $log->RecordLog("Edição: Rematrícula Educando " . $educandoId, "Sucesso");
         }
     }
     $readComp = new Read();
     $readComp->ExeRead(DB_FAMILIA_COMPOSICAO, "WHERE familia_id = :id", "id={$familiaId}");
     if (isset($edu['familia_resp_nome'])) {
         $responsavel = "<strong>Nome: </strong>" . $edu['familia_resp_nome'] . " <strong>RG: </strong>" . $edu['familia_resp_rg'];
         $endereco = $edu['familia_resp_endereco'];
         $bairro = $edu['familia_resp_bairro'];
         $cep = $edu['familia_resp_cep'];
         $telResidencial = $edu['familia_resp_telefonefixo'];
         $telCelular = $edu['familia_resp_telefonecelular'];
         $telComercial = $edu['familia_resp_telefonecomercial'];
         $telRecado = $edu['familia_resp_telefonerecados'];