Commit 3d650d11442e7ece4c0aa4a4aad00f53a4103883

Authored by Eriksen Costa Paixão
1 parent 506cc55c
Exists in master

Removido verificação {{{class_exists}}} desnecessárias

Showing 1 changed file with 29 additions and 54 deletions   Show diff stats
ieducar/intranet/educar_matricula_det.php
... ... @@ -101,62 +101,37 @@ class indice extends clsDetalhe
101 101 die();
102 102 }
103 103  
104   - if (class_exists('clsPmieducarCurso')) {
105   - $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
106   - $det_ref_cod_curso = $obj_ref_cod_curso->detalhe();
107   - $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso'];
  104 + // Curso
  105 + $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
  106 + $det_ref_cod_curso = $obj_ref_cod_curso->detalhe();
  107 + $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso'];
  108 +
  109 + // Série
  110 + $obj_serie = new clsPmieducarSerie($registro['ref_ref_cod_serie']);
  111 + $det_serie = $obj_serie->detalhe();
  112 + $registro['ref_ref_cod_serie'] = $det_serie['nm_serie'];
  113 +
  114 + // Nome da instituição
  115 + $obj_cod_instituicao = new clsPmieducarInstituicao( $registro['ref_cod_instituicao'] );
  116 + $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe();
  117 + $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao'];
  118 +
  119 + // Nome da escola
  120 + $obj_ref_cod_escola = new clsPmieducarEscola( $registro['ref_ref_cod_escola'] );
  121 + $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
  122 + $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome'];
  123 +
  124 + // Nome do aluno
  125 + $obj_aluno = new clsPmieducarAluno();
  126 + $lst_aluno = $obj_aluno->lista($registro['ref_cod_aluno'], NULL, NULL, NULL,
  127 + NULL, NULL, NULL, NULL, NULL, NULL, 1);
  128 +
  129 + if (is_array($lst_aluno)) {
  130 + $det_aluno = array_shift($lst_aluno);
  131 + $nm_aluno = $det_aluno['nome_aluno'];
108 132 }
109   - else {
110   - $registro['ref_cod_curso'] = 'Erro na geracao';
111   - echo "<!--\nErro\nClasse nao existente: clsPmieducarCurso\n-->";
112   - }
113   -
114   - if (class_exists('clsPmieducarSerie')) {
115   - $obj_serie = new clsPmieducarSerie($registro['ref_ref_cod_serie']);
116   - $det_serie = $obj_serie->detalhe();
117   - $registro['ref_ref_cod_serie'] = $det_serie['nm_serie'];
118   - }
119   - else {
120   - $registro['ref_ref_cod_serie'] = 'Erro na geracao';
121   - echo "<!--\nErro\nClasse nao existente: clsPmieducarSerie\n-->";
122   - }
123   -
124   - if (class_exists('clsPmieducarInstituicao')) {
125   - $obj_cod_instituicao = new clsPmieducarInstituicao( $registro['ref_cod_instituicao'] );
126   - $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe();
127   - $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao'];
128   - }
129   - else {
130   - $registro['ref_cod_instituicao'] = 'Erro na geracao';
131   - echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarInstituicao\n-->";
132   - }
133   -
134   - if (class_exists('clsPmieducarEscola')) {
135   - $obj_ref_cod_escola = new clsPmieducarEscola( $registro['ref_ref_cod_escola'] );
136   - $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
137   - $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome'];
138   - }
139   - else {
140   - $registro['ref_ref_cod_escola'] = 'Erro na geracao';
141   - echo "<!--\nErro\nClasse n&atilde;o existente: clsPmieducarEscola\n-->";
142   - }
143   -
144   - if (class_exists('clsPmieducarAluno')) {
145   - $obj_aluno = new clsPmieducarAluno();
146   - $lst_aluno = $obj_aluno->lista($registro['ref_cod_aluno'], NULL, NULL, NULL,
147   - NULL, NULL, NULL, NULL, NULL, NULL, 1);
148   -
149   - if (is_array($lst_aluno)) {
150   - $det_aluno = array_shift($lst_aluno);
151   - $nm_aluno = $det_aluno['nome_aluno'];
152   - }
153   - }
154   - else {
155   - $nm_aluno = 'Erro na geracao';
156   - echo "<!--\nErro\nClasse nao existente: clsPmieducarAluno\n-->";
157   - }
158   -
159 133  
  134 + // Nome da turma
160 135 $obj_mat_turma = new clsPmieducarMatriculaTurma();
161 136 $det_mat_turma = $obj_mat_turma->lista($this->ref_cod_matricula, NULL, NULL,
162 137 NULL, NULL, NULL, NULL, NULL, 1);
... ...