コード例 #1
0
                    $opcoes_curso["{$registro['cod_curso']}"] = "{$registro['nm_curso']}";
                }
            }
        }
    }
    $this->campoLista("ref_cod_curso", "Curso", $opcoes_curso, $this->ref_cod_curso, null, null, null, null, $curso_desabilitado, $curso_obrigatorio);
    if ($get_semestre) {
        $this->campoRotulo("semestres", "Semestre", "<div id='div_semestre'>Selecione um Curso</div>");
        $this->campoOculto("is_padrao", 1);
    }
}
if ($get_escola_curso_serie) {
    $opcoes_series_curso_escola = array("" => "Selecione");
    // EDITAR
    if ($this->ref_cod_escola && $this->ref_cod_curso) {
        $obj_escola_serie = new clsPmieducarEscolaSerie();
        $obj_escola_serie->setOrderby("nm_serie ASC");
        $lst_escola_serie = $obj_escola_serie->lista($this->ref_cod_escola, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, null, $this->ref_cod_curso);
        if (is_array($lst_escola_serie) && count($lst_escola_serie)) {
            foreach ($lst_escola_serie as $escola_curso_serie) {
                $opcoes_series_curso_escola["{$escola_curso_serie["ref_cod_serie"]}"] = $escola_curso_serie['nm_serie'];
            }
        }
    }
    $this->campoLista("ref_ref_cod_serie", "S&eacute;rie", $opcoes_series_curso_escola, $this->ref_ref_cod_serie, null, null, null, null, $escola_curso_serie_desabilitado, $escola_curso_serie_obrigatorio);
}
if ($get_serie) {
    $opcoes_serie = array("" => "Selecione");
    // EDITAR
    if ($this->ref_cod_curso) {
        $obj_serie = new clsPmieducarSerie();
コード例 #2
0
ファイル: educar_turma_cad.php プロジェクト: krlsdu/ieducar
 protected function getEscolaSerie($escolaId, $serieId)
 {
     $escolaSerie = new clsPmieducarEscolaSerie();
     $escolaSerie->ref_cod_escola = $escolaId;
     $escolaSerie->ref_cod_serie = $serieId;
     return $escolaSerie->detalhe();
 }
コード例 #3
0
 function Gerar()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $this->titulo = "Reserva Vaga - Listagem";
     foreach ($_GET as $var => $val) {
         // passa todos os valores obtidos no GET para atributos do objeto
         $this->{$var} = $val === '' ? NULL : $val;
     }
     $lista_busca = array("S&eacute;rie", "Curso");
     $obj_permissao = new clsPermissoes();
     $nivel_usuario = $obj_permissao->nivel_acesso($this->pessoa_logada);
     if ($nivel_usuario == 1) {
         $lista_busca[] = 'Escola';
         $lista_busca[] = 'Institui&ccedil;&atilde;o';
     } elseif ($nivel_usuario == 2) {
         $lista_busca[] = "Escola";
     }
     $this->addCabecalhos($lista_busca);
     $get_escola = TRUE;
     $get_curso = TRUE;
     $get_escola_curso_serie = TRUE;
     include 'include/pmieducar/educar_campo_lista.php';
     // Paginador
     $this->limite = 20;
     $this->offset = $_GET['pagina_' . $this->nome] ? $_GET['pagina_' . $this->nome] * $this->limite - $this->limite : 0;
     $obj_escola_serie = new clsPmieducarEscolaSerie();
     $obj_escola_serie->setLimite($this->limite, $this->offset);
     $lista = $obj_escola_serie->lista($this->ref_cod_escola, $this->ref_ref_cod_serie, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, $this->ref_cod_instituicao, $this->ref_cod_curso);
     $total = $obj_escola_serie->_total;
     // monta a lista
     if (is_array($lista) && count($lista)) {
         foreach ($lista as $registro) {
             if (class_exists('clsPmieducarSerie')) {
                 $obj_ref_cod_serie = new clsPmieducarSerie($registro['ref_cod_serie']);
                 $det_ref_cod_serie = $obj_ref_cod_serie->detalhe();
                 $nm_serie = $det_ref_cod_serie['nm_serie'];
             } else {
                 $registro['ref_cod_serie'] = "Erro na gera&ccedil;&atilde;o";
                 echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarSerie\n-->";
             }
             if (class_exists('clsPmieducarCurso')) {
                 $obj_curso = new clsPmieducarCurso($registro["ref_cod_curso"]);
                 $det_curso = $obj_curso->detalhe();
                 $registro["ref_cod_curso"] = $det_curso["nm_curso"];
             } else {
                 $registro["ref_cod_serie"] = "Erro na gera&ccedil;&atilde;o";
                 echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarSerie\n-->";
             }
             if (class_exists('clsPmieducarEscola')) {
                 $obj_ref_cod_escola = new clsPmieducarEscola($registro["ref_cod_escola"]);
                 $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
                 $nm_escola = $det_ref_cod_escola["nome"];
             } else {
                 $registro["ref_cod_escola"] = "Erro na gera&ccedil;&atilde;o";
                 echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarEscola\n-->";
             }
             if (class_exists('clsPmieducarInstituicao')) {
                 $obj_ref_cod_instituicao = new clsPmieducarInstituicao($registro["ref_cod_instituicao"]);
                 $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
                 $registro["ref_cod_instituicao"] = $det_ref_cod_instituicao["nm_instituicao"];
             } else {
                 $registro["ref_cod_escola"] = "Erro na gera&ccedil;&atilde;o";
                 echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarEscola\n-->";
             }
             $lista_busca = array("<a href=\"educar_reserva_vaga_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_serie}</a>", "<a href=\"educar_reserva_vaga_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$registro["ref_cod_curso"]}</a>");
             if ($nivel_usuario == 1) {
                 $lista_busca[] = "<a href=\"educar_reserva_vaga_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_escola}</a>";
                 $lista_busca[] = "<a href=\"educar_reserva_vaga_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$registro["ref_cod_instituicao"]}</a>";
             } else {
                 if ($nivel_usuario == 2) {
                     $lista_busca[] = "<a href=\"educar_reserva_vaga_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_escola}</a>";
                 }
             }
             $this->addLinhas($lista_busca);
         }
     }
     $this->addPaginador2('educar_reserva_vaga_lst.php', $total, $_GET, $this->nome, $this->limite);
     $this->largura = "100%";
     $localizacao = new LocalizacaoSistema();
     $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "In&iacute;cio", "educar_index.php" => "i-Educar - Escola", "" => "Listagem de reservas de vaga"));
     $this->enviaLocalizacao($localizacao->montar());
 }
コード例 #4
0
        echo "<!--\nErro\nClasse(s) clsPmieducarEscolaSerie / clsPmieducarSerie n&atilde;o encontrada(s)\n-->";
        $opcoes_series_curso_escola = array("" => "Erro na gera&ccedil;&atilde;o");
    }
    $this->campoLista("ref_ref_cod_serie", "S&eacute;rie", $opcoes_series_curso_escola, $this->ref_ref_cod_serie, null, null, null, null, $escola_curso_serie_desabilitado, $escola_curso_serie_obrigatorio);
}
if ($get_serie) {
    $opcoes_serie = array("" => "Selecione");
    if (class_exists("clsPmieducarSerie")) {
        $todas_series = "serie = new Array();\n";
        $obj_serie = new clsPmieducarSerie();
        $obj_serie->setOrderby("nm_serie ASC");
        $lst_serie = $obj_serie->lista(null, null, null, null, null, null, null, null, null, null, null, null, 1);
        if (is_array($lst_serie) && count($lst_serie)) {
            foreach ($lst_serie as $serie) {
                if ($get_escola_serie) {
                    $obj_escola_serie = new clsPmieducarEscolaSerie();
                    $obj_escola_serie->setOrderby("nm_serie ASC");
                    $lst_escola_serie = $obj_escola_serie->lista(null, $serie["cod_serie"], null, null, null, null, null, null, null, null, null, null, 1);
                    if (is_array($lst_escola_serie) && count($lst_escola_serie)) {
                        $arr = "new Array(";
                        $conc = "";
                        foreach ($lst_escola_serie as $escola_serie) {
                            $arr .= "{$conc}'{$escola_serie["ref_cod_escola"]}'";
                            $conc = ",";
                        }
                        $arr .= ")";
                    } else {
                        $arr = "new Array()";
                    }
                    $todas_series .= "serie[serie.length] = new Array( {$serie["cod_serie"]}, '{$serie['nm_serie']}', {$serie["ref_cod_curso"]}, {$arr}, '{$serie["intervalo"]}' );\n";
                } else {
コード例 #5
0
 function Excluir()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     @session_write_close();
     $obj = new clsPmieducarEscolaSerie($this->ref_cod_escola_, $this->ref_cod_serie_, $this->pessoa_logada, NULL, NULL, NULL, NULL, NULL, 0);
     $excluiu = $obj->excluir();
     if ($excluiu) {
         $obj = new clsPmieducarEscolaSerieDisciplina($this->ref_cod_serie_, $this->ref_cod_escola_, NULL, 0);
         $excluiu1 = $obj->excluirTodos();
         if ($excluiu1) {
             $this->mensagem .= "Exclus&atilde;o efetuada com sucesso.<br>";
             header("Location: educar_escola_serie_lst.php");
             die;
         }
     }
     $this->mensagem = "Exclus&atilde;o n&atilde;o realizada.<br>";
     echo "<!--\nErro ao excluir clsPmieducarEscolaSerie\nvalores obrigatorios\nif( is_numeric( {$this->ref_cod_escola_} ) && is_numeric( {$this->ref_cod_serie_} ) && is_numeric( {$this->pessoa_logada} ) )\n-->";
     return FALSE;
 }
コード例 #6
0
 function Gerar()
 {
     @session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $this->titulo = 'Escola S&eacute;rie - Listagem';
     foreach ($_GET as $var => $val) {
         // passa todos os valores obtidos no GET para atributos do objeto
         $this->{$var} = $val === '' ? null : $val;
     }
     $this->addBanner('imagens/nvp_top_intranet.jpg', 'imagens/nvp_vert_intranet.jpg', 'Intranet');
     $lista_busca = array('S&eacute;rie', 'Curso');
     $obj_permissao = new clsPermissoes();
     $nivel_usuario = $obj_permissao->nivel_acesso($this->pessoa_logada);
     if ($nivel_usuario == 1) {
         $lista_busca[] = 'Escola';
         $lista_busca[] = 'Institui&ccedil;&atilde;o';
     } else {
         if ($nivel_usuario == 2) {
             $lista_busca[] = 'Escola';
         }
     }
     $this->addCabecalhos($lista_busca);
     $get_escola = true;
     //    $get_escola_curso = true;
     $get_curso = true;
     $get_escola_curso_serie = true;
     include 'include/pmieducar/educar_campo_lista.php';
     // Paginador
     $this->limite = 20;
     $this->offset = $_GET["pagina_{$this->nome}"] ? $_GET["pagina_{$this->nome}"] * $this->limite - $this->limite : 0;
     $obj_escola_serie = new clsPmieducarEscolaSerie();
     $obj_escola_serie->setOrderby('nm_serie ASC');
     $obj_escola_serie->setLimite($this->limite, $this->offset);
     $lista = $obj_escola_serie->lista($this->ref_cod_escola, $this->ref_ref_cod_serie, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, $this->ref_cod_instituicao, $this->ref_cod_curso);
     $total = $obj_escola_serie->_total;
     // monta a lista
     if (is_array($lista) && count($lista)) {
         foreach ($lista as $registro) {
             $obj_ref_cod_serie = new clsPmieducarSerie($registro['ref_cod_serie']);
             $det_ref_cod_serie = $obj_ref_cod_serie->detalhe();
             $nm_serie = $det_ref_cod_serie['nm_serie'];
             $obj_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
             $det_curso = $obj_curso->detalhe();
             $registro['ref_cod_curso'] = $det_curso['nm_curso'];
             $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_cod_escola']);
             $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
             $nm_escola = $det_ref_cod_escola['nome'];
             $obj_ref_cod_instituicao = new clsPmieducarInstituicao($registro['ref_cod_instituicao']);
             $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
             $registro['ref_cod_instituicao'] = $det_ref_cod_instituicao['nm_instituicao'];
             $lista_busca = array("<a href=\"educar_escola_serie_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_serie}</a>", "<a href=\"educar_escola_serie_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$registro["ref_cod_curso"]}</a>");
             if ($nivel_usuario == 1) {
                 $lista_busca[] = "<a href=\"educar_escola_serie_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_escola}</a>";
                 $lista_busca[] = "<a href=\"educar_escola_serie_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$registro["ref_cod_instituicao"]}</a>";
             } elseif ($nivel_usuario == 2) {
                 $lista_busca[] = "<a href=\"educar_escola_serie_det.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}\">{$nm_escola}</a>";
             }
             $this->addLinhas($lista_busca);
         }
     }
     $this->addPaginador2("educar_escola_serie_lst.php", $total, $_GET, $this->nome, $this->limite);
     if ($obj_permissao->permissao_cadastra(585, $this->pessoa_logada, 7)) {
         $this->acao = "go(\"educar_escola_serie_cad.php\")";
         $this->nome_acao = "Novo";
     }
     $this->largura = "100%";
     $localizacao = new LocalizacaoSistema();
     $localizacao->entradaCaminhos(array($_SERVER['SERVER_NAME'] . "/intranet" => "In&iacute;cio", "educar_index.php" => "i-Educar - Escola", "" => "Listagem de v&iacute;nculos entre escolas e s&eacute;ries"));
     $this->enviaLocalizacao($localizacao->montar());
 }
コード例 #7
0
 function Gerar()
 {
     session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $this->titulo = 'Reserva Vaga - Detalhe';
     $this->addBanner('imagens/nvp_top_intranet.jpg', 'imagens/nvp_vert_intranet.jpg', 'Intranet');
     $this->ref_cod_serie = $_GET['ref_cod_serie'];
     $this->ref_cod_escola = $_GET['ref_cod_escola'];
     $tmp_obj = new clsPmieducarEscolaSerie();
     $lst_obj = $tmp_obj->lista($this->ref_cod_escola, $this->ref_cod_serie);
     $registro = array_shift($lst_obj);
     if (!$registro) {
         header('Location: educar_reserva_vaga_lst.php');
         die;
     }
     // Instituição
     $obj_ref_cod_instituicao = new clsPmieducarInstituicao($registro['ref_cod_instituicao']);
     $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
     $registro['ref_cod_instituicao'] = $det_ref_cod_instituicao['nm_instituicao'];
     // Escola
     $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_cod_escola']);
     $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
     $nm_escola = $det_ref_cod_escola['nome'];
     // Série
     $obj_ref_cod_serie = new clsPmieducarSerie($registro['ref_cod_serie']);
     $det_ref_cod_serie = $obj_ref_cod_serie->detalhe();
     $nm_serie = $det_ref_cod_serie['nm_serie'];
     // Curso
     $obj_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
     $det_curso = $obj_curso->detalhe();
     $registro['ref_cod_curso'] = $det_curso['nm_curso'];
     // Matrícula
     $obj_matricula = new clsPmieducarMatricula();
     $lst_matricula = $obj_matricula->lista(NULL, NULL, $registro['ref_cod_escola'], $registro['ref_cod_serie'], NULL, NULL, NULL, 3, NULL, NULL, NULL, NULL, 1);
     if (is_array($lst_matricula)) {
         $matriculados = count($lst_matricula);
     }
     // Detalhes da reserva
     $obj_reserva_vaga = new clsPmieducarReservaVaga();
     $lst_reserva_vaga = $obj_reserva_vaga->lista(NULL, $registro['ref_cod_escola'], $registro['ref_cod_serie'], NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);
     if (is_array($lst_reserva_vaga)) {
         $reservados = count($lst_reserva_vaga);
     }
     // Permissões
     $obj_permissao = new clsPermissoes();
     $nivel_usuario = $obj_permissao->nivel_acesso($this->pessoa_logada);
     if ($nivel_usuario == 1) {
         if ($registro['ref_cod_instituicao']) {
             $this->addDetalhe(array('Institui&ccedil;&atilde;o', $registro['ref_cod_instituicao']));
         }
     }
     if ($nivel_usuario == 1 || $nivel_usuario == 2) {
         if ($nm_escola) {
             $this->addDetalhe(array('Escola', $nm_escola));
         }
     }
     if ($registro['ref_cod_curso']) {
         $this->addDetalhe(array('Curso', $registro['ref_cod_curso']));
     }
     if ($nm_serie) {
         $this->addDetalhe(array('S&eacute;rie', $nm_serie));
     }
     $obj_turmas = new clsPmieducarTurma();
     $lst_turmas = $obj_turmas->lista(NULL, NULL, NULL, $this->ref_cod_serie, $this->ref_cod_escola, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);
     if (is_array($lst_turmas)) {
         $cont = 0;
         $total_vagas = 0;
         $html = "\n        <table width='50%' cellspacing='0' cellpadding='0' border='0'>\n          <tr>\n            <td bgcolor=#A1B3BD>Nome</td>\n            <td bgcolor=#A1B3BD>N&uacute;mero Vagas</td>\n          </tr>";
         foreach ($lst_turmas as $turmas) {
             $total_vagas += $turmas['max_aluno'];
             if ($cont % 2 == 0) {
                 $class = ' formmdtd ';
             } else {
                 $class = ' formlttd ';
             }
             $cont++;
             $html .= "\n          <tr>\n            <td class={$class} width='35%'>{$turmas["nm_turma"]}</td>\n            <td class={$class} width='15%'>{$turmas["max_aluno"]}</td>\n          </tr>";
         }
         $html .= '</tr></table>';
         $this->addDetalhe(array('Turma', $html));
         if ($total_vagas) {
             $this->addDetalhe(array('Total Vagas', $total_vagas));
         }
         if ($matriculados) {
             $this->addDetalhe(array('Matriculados', $matriculados));
         }
         if ($reservados) {
             $this->addDetalhe(array('Reservados', $reservados));
         }
         $vagas_restantes = $total_vagas - ($matriculados + $reservados);
         $this->addDetalhe(array('Vagas Restantes', $vagas_restantes));
     }
     if ($obj_permissao->permissao_cadastra(639, $this->pessoa_logada, 7)) {
         $this->array_botao = array('Reservar Vaga', 'Vagas Reservadas');
         $this->array_botao_url = array("educar_reserva_vaga_cad.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}", 'educar_reservada_vaga_lst.php?ref_cod_escola=' . $registro['ref_cod_escola'] . '&ref_cod_serie=' . $registro['ref_cod_serie']);
     }
     $this->url_cancelar = 'educar_reserva_vaga_lst.php';
     $this->largura = '100%';
 }
コード例 #8
0
    function Gerar()
    {
        @session_start();
        $this->pessoa_logada = $_SESSION['id_pessoa'];
        session_write_close();
        $this->titulo = 'Escola S&eacute;rie - Detalhe';
        $this->addBanner('imagens/nvp_top_intranet.jpg', 'imagens/nvp_vert_intranet.jpg', 'Intranet');
        $this->ref_cod_serie = $_GET['ref_cod_serie'];
        $this->ref_cod_escola = $_GET['ref_cod_escola'];
        $tmp_obj = new clsPmieducarEscolaSerie();
        $lst_obj = $tmp_obj->lista($this->ref_cod_escola, $this->ref_cod_serie);
        $registro = array_shift($lst_obj);
        if (!$registro) {
            header('Location: educar_escola_serie_lst.php');
            die;
        }
        $obj_ref_cod_instituicao = new clsPmieducarInstituicao($registro['ref_cod_instituicao']);
        $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
        $registro['ref_cod_instituicao'] = $det_ref_cod_instituicao['nm_instituicao'];
        $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_cod_escola']);
        $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
        $nm_escola = $det_ref_cod_escola['nome'];
        $obj_ref_cod_serie = new clsPmieducarSerie($registro['ref_cod_serie']);
        $det_ref_cod_serie = $obj_ref_cod_serie->detalhe();
        $nm_serie = $det_ref_cod_serie['nm_serie'];
        $obj_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
        $det_curso = $obj_curso->detalhe();
        $registro['ref_cod_curso'] = $det_curso['nm_curso'];
        $obj_permissao = new clsPermissoes();
        $nivel_usuario = $obj_permissao->nivel_acesso($this->pessoa_logada);
        if ($nivel_usuario == 1) {
            if ($registro["ref_cod_instituicao"]) {
                $this->addDetalhe(array('Institui&ccedil;&atilde;o', $registro['ref_cod_instituicao']));
            }
        }
        if ($nivel_usuario == 1 || $nivel_usuario == 2) {
            if ($nm_escola) {
                $this->addDetalhe(array('Escola', $nm_escola));
            }
        }
        if ($registro['ref_cod_curso']) {
            $this->addDetalhe(array('Curso', $registro['ref_cod_curso']));
        }
        if ($nm_serie) {
            $this->addDetalhe(array('S&eacute;rie', $nm_serie));
        }
        if ($registro['hora_inicial']) {
            $registro['hora_inicial'] = date('H:i', strtotime($registro['hora_inicial']));
            $this->addDetalhe(array('Hora Inicial', $registro['hora_inicial']));
        }
        if ($registro['hora_final']) {
            $registro['hora_final'] = date('H:i', strtotime($registro['hora_final']));
            $this->addDetalhe(array('Hora Final', $registro['hora_final']));
        }
        if ($registro['hora_inicio_intervalo']) {
            $registro['hora_inicio_intervalo'] = date('H:i', strtotime($registro['hora_inicio_intervalo']));
            $this->addDetalhe(array('Hora In&iacute;cio Intervalo', $registro['hora_inicio_intervalo']));
        }
        if ($registro['hora_fim_intervalo']) {
            $registro['hora_fim_intervalo'] = date('H:i', strtotime($registro['hora_fim_intervalo']));
            $this->addDetalhe(array('Hora Fim Intervalo', $registro['hora_fim_intervalo']));
        }
        // Componentes da escola-série
        $componentes = array();
        try {
            $componentes = App_Model_IedFinder::getEscolaSerieDisciplina($this->ref_cod_serie, $this->ref_cod_escola);
        } catch (Exception $e) {
        }
        if (0 < count($componentes)) {
            $tabela = '
<table>
  <tr align="center">
    <td bgcolor="#A1B3BD"><b>Nome</b></td>
    <td bgcolor="#A1B3BD"><b>Carga horária</b></td>
  </tr>';
            $cont = 0;
            foreach ($componentes as $componente) {
                if ($cont % 2 == 0) {
                    $color = ' bgcolor="#E4E9ED" ';
                } else {
                    $color = ' bgcolor="#FFFFFF" ';
                }
                $tabela .= sprintf('
          <tr>
            <td %s align="left">%s</td>
            <td %s align="center">%.0f h</td>
          </tr>', $color, $componente, $color, $componente->cargaHoraria);
                $cont++;
            }
            $tabela .= '</table>';
        }
        if (isset($tabela)) {
            $this->addDetalhe(array('Componentes curriculares', $tabela));
        }
        if ($obj_permissao->permissao_cadastra(585, $this->pessoa_logada, 7)) {
            $this->url_novo = "educar_escola_serie_cad.php";
            $this->url_editar = "educar_escola_serie_cad.php?ref_cod_escola={$registro["ref_cod_escola"]}&ref_cod_serie={$registro["ref_cod_serie"]}";
        }
        $this->url_cancelar = "educar_escola_serie_lst.php";
        $this->largura = "100%";
    }
コード例 #9
0
             } else {
                 echo "<!--\nErro\nClasse clsPmieducarEscolaSerie nao encontrada\n-->";
                 $opcoes = array("" => "Erro na geracao");
             }
         }
         echo "<script> var escola = new Array(); \n {$cursos}</script>\n";
         echo "<script> var curso = new Array(); \n {$series}</script>\n";
     }
 } else {
     echo "<!--\nErro\nClasse clsPmieducarEscola nao encontrada\n-->";
     $opcoes = array("" => "Erro na geracao");
 }
 $this->campoLista("ref_cod_curso", "Curso", $opcoes, $this->ref_cod_curso, "CursoSerie();", false, "", "", false, $obrigatorio);
 $opcoes = array("" => "Selecione");
 if (class_exists("clsPmieducarEscolaSerie")) {
     $objTemp = new clsPmieducarEscolaSerie($permissoes->getEscola($this->pessoa_logada));
     $lista = $objTemp->lista($permissoes->getEscola($this->pessoa_logada));
     if (is_array($lista) && count($lista)) {
         foreach ($lista as $registro) {
             $obj_ser = new clsPmieducarSerie($registro["ref_cod_serie"]);
             $lst_ser = $obj_ser->lista(null, null, null, $this->ref_cod_curso, null, null, null, null, null, null, null, null, 1);
             if ($lst_ser) {
                 foreach ($lst_ser as $serie) {
                     if ($editar) {
                         $opcoes["{$serie['cod_serie']}"] = "{$serie['nm_serie']}";
                     } else {
                         $opcoes[""] = "Selecione uma série";
                     }
                 }
             }
         }