Commit bbdd304eee511c636923e8bbe8825eb6c42f81a9

Authored by Eder Soares
1 parent dc37335c
Exists in 2.9 and in 7 other branches 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8

Mais verificações inúteis

Showing 148 changed files with 9 additions and 5912 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 148 files displayed.

ieducar/intranet/educar_acervo_autor_cad.php
@@ -66,19 +66,11 @@ class indice extends clsCadastro @@ -66,19 +66,11 @@ class indice extends clsCadastro
66 $this->fexcluir = true; 66 $this->fexcluir = true;
67 } 67 }
68 68
69 - if( class_exists( "clsPmieducarBiblioteca" ) )  
70 - {  
71 $obj_ref_cod_biblioteca = new clsPmieducarBiblioteca( $registro["ref_cod_biblioteca"] ); 69 $obj_ref_cod_biblioteca = new clsPmieducarBiblioteca( $registro["ref_cod_biblioteca"] );
72 $det_ref_cod_biblioteca = $obj_ref_cod_biblioteca->detalhe(); 70 $det_ref_cod_biblioteca = $obj_ref_cod_biblioteca->detalhe();
73 $this->ref_cod_instituicao = $det_ref_cod_biblioteca["ref_cod_instituicao"]; 71 $this->ref_cod_instituicao = $det_ref_cod_biblioteca["ref_cod_instituicao"];
74 $this->ref_cod_escola = $det_ref_cod_biblioteca["ref_cod_escola"]; 72 $this->ref_cod_escola = $det_ref_cod_biblioteca["ref_cod_escola"];
75 73
76 - }  
77 - else  
78 - {  
79 - $registro["ref_cod_biblioteca"] = "Erro na geração";  
80 - }  
81 -  
82 $retorno = "Editar"; 74 $retorno = "Editar";
83 } 75 }
84 } 76 }
ieducar/intranet/educar_aluno_lst.php
@@ -90,7 +90,6 @@ class indice extends clsListagem @@ -90,7 +90,6 @@ class indice extends clsListagem
90 $this->campoTexto('nome_responsavel', 'Nome do Responsável', $this->nome_responsavel, 50, 255); 90 $this->campoTexto('nome_responsavel', 'Nome do Responsável', $this->nome_responsavel, 50, 255);
91 91
92 $opcoes = ['' => 'Selecione']; 92 $opcoes = ['' => 'Selecione'];
93 - if (class_exists('clsPublicSetorBai')) {  
94 $objTemp = new clsPublicSetorBai(); 93 $objTemp = new clsPublicSetorBai();
95 $objTemp->setOrderBy(' nome asc '); 94 $objTemp->setOrderBy(' nome asc ');
96 $lista = $objTemp->lista(); 95 $lista = $objTemp->lista();
@@ -100,10 +99,6 @@ class indice extends clsListagem @@ -100,10 +99,6 @@ class indice extends clsListagem
100 $opcoes[$registro['idsetorbai']] = $registro['nome']; 99 $opcoes[$registro['idsetorbai']] = $registro['nome'];
101 } 100 }
102 } 101 }
103 - } else {  
104 - echo '<!--\nErro\nClasse clsMunicipio nao encontrada\n-->';  
105 - $opcoes = ['' => 'Erro na geracao'];  
106 - }  
107 102
108 $this->campoLista('idsetorbai', 'Setor', $opcoes, $this->idsetorbai, null, null, null, null, null, false); 103 $this->campoLista('idsetorbai', 'Setor', $opcoes, $this->idsetorbai, null, null, null, null, null, false);
109 104
ieducar/intranet/educar_ano_letivo_modulo_cad.php
@@ -180,7 +180,6 @@ class indice extends clsCadastro @@ -180,7 +180,6 @@ class indice extends clsCadastro
180 180
181 $opcoesCampoModulo = []; 181 $opcoesCampoModulo = [];
182 182
183 - if (class_exists('clsPmieducarModulo')) {  
184 $objTemp = new clsPmieducarModulo(); 183 $objTemp = new clsPmieducarModulo();
185 $objTemp->setOrderby('nm_tipo ASC'); 184 $objTemp->setOrderby('nm_tipo ASC');
186 185
@@ -207,9 +206,6 @@ class indice extends clsCadastro @@ -207,9 +206,6 @@ class indice extends clsCadastro
207 $opcoesCampoModulo[$registro['cod_modulo']] = sprintf('%s - %d etapa(s)', $registro['nm_tipo'], $registro['num_etapas']); 206 $opcoesCampoModulo[$registro['cod_modulo']] = sprintf('%s - %d etapa(s)', $registro['nm_tipo'], $registro['num_etapas']);
208 } 207 }
209 } 208 }
210 - } else {  
211 - $opcoesCampoModulo = ['' => 'Erro na geração'];  
212 - }  
213 209
214 $this->campoLista( 210 $this->campoLista(
215 'ref_cod_modulo', 211 'ref_cod_modulo',
ieducar/intranet/educar_calendario_dia_cad.php
@@ -169,7 +169,7 @@ class indice extends clsCadastro @@ -169,7 +169,7 @@ class indice extends clsCadastro
169 { 169 {
170 $retorno = 'Novo'; 170 $retorno = 'Novo';
171 171
172 - 172 +
173 173
174 $this->dia = $_GET['dia']; 174 $this->dia = $_GET['dia'];
175 $this->mes = $_GET['mes']; 175 $this->mes = $_GET['mes'];
@@ -204,18 +204,9 @@ class indice extends clsCadastro @@ -204,18 +204,9 @@ class indice extends clsCadastro
204 $retorno = 'Editar'; 204 $retorno = 'Editar';
205 } 205 }
206 206
207 - if (class_exists('clsPmieducarCalendarioAnoLetivo')) {  
208 $objTemp = new clsPmieducarCalendarioAnoLetivo($this->ref_cod_calendario_ano_letivo); 207 $objTemp = new clsPmieducarCalendarioAnoLetivo($this->ref_cod_calendario_ano_letivo);
209 $det = $objTemp->detalhe(); 208 $det = $objTemp->detalhe();
210 $this->ano = $det['ano']; 209 $this->ano = $det['ano'];
211 - }  
212 - else {  
213 - $url = sprintf(  
214 - 'educar_calendario_dia_lst.php?ref_cod_calendario_ano_letivo=%d&mes=%d&dia=%d',  
215 - $registro['ref_cod_calendario_ano_letivo'], $registro['mes'], $registro['dia']  
216 - );  
217 - $this->simpleRedirect($url);  
218 - }  
219 } 210 }
220 211
221 $this->url_cancelar = sprintf( 212 $this->url_cancelar = sprintf(
@@ -284,7 +275,7 @@ class indice extends clsCadastro @@ -284,7 +275,7 @@ class indice extends clsCadastro
284 275
285 function Novo() 276 function Novo()
286 { 277 {
287 - 278 +
288 279
289 $obj_permissoes = new clsPermissoes(); 280 $obj_permissoes = new clsPermissoes();
290 $obj_permissoes->permissao_cadastra(620, $this->pessoa_logada, 7, 281 $obj_permissoes->permissao_cadastra(620, $this->pessoa_logada, 7,
@@ -329,7 +320,7 @@ class indice extends clsCadastro @@ -329,7 +320,7 @@ class indice extends clsCadastro
329 320
330 function Editar() 321 function Editar()
331 { 322 {
332 - 323 +
333 324
334 $obj_permissoes = new clsPermissoes(); 325 $obj_permissoes = new clsPermissoes();
335 $obj_permissoes->permissao_cadastra(620, $this->pessoa_logada, 7, 326 $obj_permissoes->permissao_cadastra(620, $this->pessoa_logada, 7,
@@ -401,7 +392,7 @@ class indice extends clsCadastro @@ -401,7 +392,7 @@ class indice extends clsCadastro
401 392
402 function Excluir() 393 function Excluir()
403 { 394 {
404 - 395 +
405 396
406 $obj_permissoes = new clsPermissoes(); 397 $obj_permissoes = new clsPermissoes();
407 $obj_permissoes->permissao_excluir(620, $this->pessoa_logada, 7, 398 $obj_permissoes->permissao_excluir(620, $this->pessoa_logada, 7,
ieducar/intranet/educar_calendario_pesquisas.php
@@ -36,7 +36,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -36,7 +36,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
36 $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada); 36 $nivel_usuario = $obj_permissoes->nivel_acesso($this->pessoa_logada);
37 37
38 if ($nivel_usuario == 1) { 38 if ($nivel_usuario == 1) {
39 - if (class_exists('clsPmieducarInstituicao')) {  
40 $opcoes = array('' => 'Selecione'); 39 $opcoes = array('' => 'Selecione');
41 40
42 $obj_instituicao = new clsPmieducarInstituicao(); 41 $obj_instituicao = new clsPmieducarInstituicao();
@@ -51,9 +50,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -51,9 +50,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
51 $opcoes[$registro['cod_instituicao']] = $registro['nm_instituicao']; 50 $opcoes[$registro['cod_instituicao']] = $registro['nm_instituicao'];
52 } 51 }
53 } 52 }
54 - } else {  
55 - $opcoes = array('' => 'Erro na geração');  
56 - }  
57 53
58 if ($get_escola) { 54 if ($get_escola) {
59 $retorno .= ' 55 $retorno .= '
@@ -103,7 +99,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -103,7 +99,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
103 } 99 }
104 100
105 if ($get_escola) { 101 if ($get_escola) {
106 - if (class_exists('clsPmieducarEscola')) {  
107 $opcoes_escola = array('' => 'Selecione'); 102 $opcoes_escola = array('' => 'Selecione');
108 103
109 $todas_escolas = 'escola = new Array();' . "\n"; 104 $todas_escolas = 'escola = new Array();' . "\n";
@@ -122,9 +117,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -122,9 +117,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
122 } 117 }
123 118
124 echo sprintf('<script>%s</script>', $todas_escolas); 119 echo sprintf('<script>%s</script>', $todas_escolas);
125 - } else {  
126 - $opcoes_escola = array('' => 'Erro na geração');  
127 - }  
128 120
129 if ($nivel_usuario == 4 || $nivel_usuario == 8) { 121 if ($nivel_usuario == 4 || $nivel_usuario == 8) {
130 $opcoes_escola = array('' => 'Selecione'); 122 $opcoes_escola = array('' => 'Selecione');
@@ -142,7 +134,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -142,7 +134,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
142 } 134 }
143 } 135 }
144 } else if ($this->ref_cod_instituicao) { 136 } else if ($this->ref_cod_instituicao) {
145 - if (class_exists('clsPmieducarEscola')) {  
146 $opcoes_escola = array('' => 'Selecione'); 137 $opcoes_escola = array('' => 'Selecione');
147 $obj_escola = new clsPmieducarEscola(); 138 $obj_escola = new clsPmieducarEscola();
148 $lista = $obj_escola->lista(NULL, NULL, NULL, $this->ref_cod_instituicao, 139 $lista = $obj_escola->lista(NULL, NULL, NULL, $this->ref_cod_instituicao,
@@ -153,9 +144,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) { @@ -153,9 +144,6 @@ if ($nivel_usuario &lt;= 4 &amp;&amp; !empty($nivel_usuario)) {
153 $opcoes_escola[$registro['cod_escola']] = $registro['nome']; 144 $opcoes_escola[$registro['cod_escola']] = $registro['nome'];
154 } 145 }
155 } 146 }
156 - } else {  
157 - $opcoes_escola = array('' => 'Erro na geração');  
158 - }  
159 } 147 }
160 148
161 if ($get_escola) { 149 if ($get_escola) {
ieducar/intranet/educar_categoria_nivel_lst.php
@@ -129,24 +129,13 @@ class indice extends clsListagem { @@ -129,24 +129,13 @@ class indice extends clsListagem {
129 $registro['data_exclusao_time'] = strtotime(substr( $registro['data_exclusao'], 0, 16)); 129 $registro['data_exclusao_time'] = strtotime(substr( $registro['data_exclusao'], 0, 16));
130 $registro['data_exclusao_br'] = date('d/m/Y H:i', $registro['data_exclusao_time']); 130 $registro['data_exclusao_br'] = date('d/m/Y H:i', $registro['data_exclusao_time']);
131 131
132 - // pega detalhes de foreign_keys  
133 - if (class_exists('clsPmieducarUsuario')) {  
134 $obj_ref_usuario_cad = new clsPmieducarUsuario($registro['ref_usuario_cad']); 132 $obj_ref_usuario_cad = new clsPmieducarUsuario($registro['ref_usuario_cad']);
135 $det_ref_usuario_cad = $obj_ref_usuario_cad->detalhe(); 133 $det_ref_usuario_cad = $obj_ref_usuario_cad->detalhe();
136 $registro['ref_usuario_cad'] = $det_ref_usuario_cad['data_cadastro']; 134 $registro['ref_usuario_cad'] = $det_ref_usuario_cad['data_cadastro'];
137 - }  
138 - else {  
139 - $registro['ref_usuario_cad'] = 'Erro na geracao';  
140 - }  
141 135
142 - if (class_exists('clsPmieducarUsuario')) {  
143 $obj_ref_usuario_exc = new clsPmieducarUsuario( $registro['ref_usuario_exc']); 136 $obj_ref_usuario_exc = new clsPmieducarUsuario( $registro['ref_usuario_exc']);
144 $det_ref_usuario_exc = $obj_ref_usuario_exc->detalhe(); 137 $det_ref_usuario_exc = $obj_ref_usuario_exc->detalhe();
145 $registro['ref_usuario_exc'] = $det_ref_usuario_exc['data_cadastro']; 138 $registro['ref_usuario_exc'] = $det_ref_usuario_exc['data_cadastro'];
146 - }  
147 - else {  
148 - $registro['ref_usuario_exc'] = 'Erro na geracao';  
149 - }  
150 139
151 $this->addLinhas(array( 140 $this->addLinhas(array(
152 sprintf('<a href="educar_categoria_nivel_det.php?cod_categoria_nivel=%s">%s</a>', 141 sprintf('<a href="educar_categoria_nivel_det.php?cod_categoria_nivel=%s">%s</a>',
ieducar/intranet/educar_cliente_det.php
@@ -99,13 +99,11 @@ class indice extends clsDetalhe @@ -99,13 +99,11 @@ class indice extends clsDetalhe
99 $motivo = $obj_banco->CampoUnico( $sql_unico ); 99 $motivo = $obj_banco->CampoUnico( $sql_unico );
100 if ( is_numeric( $motivo ) ) { 100 if ( is_numeric( $motivo ) ) {
101 $this->addDetalhe( array( "Status", "Suspenso" ) ); 101 $this->addDetalhe( array( "Status", "Suspenso" ) );
102 - if ( class_exists( "clsPmieducarMotivoSuspensao" ) ) {  
103 $obj_motivo_suspensao = new clsPmieducarMotivoSuspensao( $motivo ); 102 $obj_motivo_suspensao = new clsPmieducarMotivoSuspensao( $motivo );
104 $det_motivo_suspensao = $obj_motivo_suspensao->detalhe(); 103 $det_motivo_suspensao = $obj_motivo_suspensao->detalhe();
105 $this->suspenso = $motivo; 104 $this->suspenso = $motivo;
106 $this->addDetalhe( array( "Motivo da Suspensão", "{$det_motivo_suspensao["nm_motivo"]}" ) ); 105 $this->addDetalhe( array( "Motivo da Suspensão", "{$det_motivo_suspensao["nm_motivo"]}" ) );
107 $this->addDetalhe( array( "Descrição", "{$det_motivo_suspensao["descricao"]}" ) ); 106 $this->addDetalhe( array( "Descrição", "{$det_motivo_suspensao["descricao"]}" ) );
108 - }  
109 } 107 }
110 else 108 else
111 $this->addDetalhe( array( "Status", "Regular" ) ); 109 $this->addDetalhe( array( "Status", "Regular" ) );
ieducar/intranet/educar_define_status_cliente_cad.php
@@ -125,7 +125,6 @@ class indice extends clsCadastro @@ -125,7 +125,6 @@ class indice extends clsCadastro
125 $this->campoRotulo( "nm_cliente", "Cliente", $detalhe["nome"] ); 125 $this->campoRotulo( "nm_cliente", "Cliente", $detalhe["nome"] );
126 } 126 }
127 $this->campoNumero( "dias", "Dias", $this->dias, 9, 9, true ); 127 $this->campoNumero( "dias", "Dias", $this->dias, 9, 9, true );
128 - if ( class_exists( "clsPmieducarMotivoSuspensao" ) ) {  
129 echo "<script> descricao = new Array();\n </script>"; 128 echo "<script> descricao = new Array();\n </script>";
130 $opcoes[""] = "Selecione um motivo"; 129 $opcoes[""] = "Selecione um motivo";
131 $todos_motivos = ""; 130 $todos_motivos = "";
@@ -173,7 +172,6 @@ class indice extends clsCadastro @@ -173,7 +172,6 @@ class indice extends clsCadastro
173 { 172 {
174 $this->campoLista( "cod_motivo_suspensao", "Motivo da Suspensão", array("" => "Não há motivo cadastrado"), "", "", false, "", "", true, true ); 173 $this->campoLista( "cod_motivo_suspensao", "Motivo da Suspensão", array("" => "Não há motivo cadastrado"), "", "", false, "", "", true, true );
175 } 174 }
176 - }  
177 } 175 }
178 elseif ( $this->acao_status == "liberar" ) { 176 elseif ( $this->acao_status == "liberar" ) {
179 $db = new clsBanco(); 177 $db = new clsBanco();
ieducar/intranet/educar_definir_cliente_tipo_det.php
@@ -90,12 +90,10 @@ class indice extends clsDetalhe @@ -90,12 +90,10 @@ class indice extends clsDetalhe
90 $motivo = $obj_banco->CampoUnico( $sql_unico ); 90 $motivo = $obj_banco->CampoUnico( $sql_unico );
91 if ( is_numeric( $motivo ) ) { 91 if ( is_numeric( $motivo ) ) {
92 $this->addDetalhe( array( "Status", "Suspenso" ) ); 92 $this->addDetalhe( array( "Status", "Suspenso" ) );
93 - if ( class_exists( "clsPmieducarMotivoSuspensao" ) ) {  
94 $obj_motivo_suspensao = new clsPmieducarMotivoSuspensao( $motivo ); 93 $obj_motivo_suspensao = new clsPmieducarMotivoSuspensao( $motivo );
95 $det_motivo_suspensao = $obj_motivo_suspensao->detalhe(); 94 $det_motivo_suspensao = $obj_motivo_suspensao->detalhe();
96 $this->addDetalhe( array( "Motivo da Suspensão", "{$det_motivo_suspensao["nm_motivo"]}" ) ); 95 $this->addDetalhe( array( "Motivo da Suspensão", "{$det_motivo_suspensao["nm_motivo"]}" ) );
97 $this->addDetalhe( array( "Descrição", "{$det_motivo_suspensao["descricao"]}" ) ); 96 $this->addDetalhe( array( "Descrição", "{$det_motivo_suspensao["descricao"]}" ) );
98 - }  
99 } 97 }
100 else 98 else
101 $this->addDetalhe( array( "Status", "Regular" ) ); 99 $this->addDetalhe( array( "Status", "Regular" ) );
ieducar/intranet/educar_definir_cliente_tipo_lst.php
@@ -69,7 +69,7 @@ class indice extends clsListagem @@ -69,7 +69,7 @@ class indice extends clsListagem
69 foreach( $_GET AS $var => $val ) // passa todos os valores obtidos no GET para atributos do objeto 69 foreach( $_GET AS $var => $val ) // passa todos os valores obtidos no GET para atributos do objeto
70 $this->$var = ( $val === "" ) ? null: $val; 70 $this->$var = ( $val === "" ) ? null: $val;
71 71
72 - 72 +
73 73
74 $lista_busca = array( 74 $lista_busca = array(
75 "Cliente", 75 "Cliente",
@@ -134,14 +134,9 @@ class indice extends clsListagem @@ -134,14 +134,9 @@ class indice extends clsListagem
134 { 134 {
135 foreach ( $lista AS $registro ) 135 foreach ( $lista AS $registro )
136 { 136 {
137 -  
138 - // pega detalhes de foreign_keys  
139 - if( class_exists( "clsPmieducarBiblioteca" ) )  
140 - {  
141 $obj_ref_cod_biblioteca = new clsPmieducarBiblioteca( $registro["cod_biblioteca"] ); 137 $obj_ref_cod_biblioteca = new clsPmieducarBiblioteca( $registro["cod_biblioteca"] );
142 $det_ref_cod_biblioteca = $obj_ref_cod_biblioteca->detalhe(); 138 $det_ref_cod_biblioteca = $obj_ref_cod_biblioteca->detalhe();
143 $registro["cod_biblioteca"] = $det_ref_cod_biblioteca["nm_biblioteca"]; 139 $registro["cod_biblioteca"] = $det_ref_cod_biblioteca["nm_biblioteca"];
144 - }  
145 if( $registro["cod_instituicao"] ) 140 if( $registro["cod_instituicao"] )
146 { 141 {
147 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $registro["cod_instituicao"] ); 142 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $registro["cod_instituicao"] );
ieducar/intranet/educar_exemplar_devolucao_det.php
@@ -89,13 +89,10 @@ class indice extends clsDetalhe @@ -89,13 +89,10 @@ class indice extends clsDetalhe
89 $obj_ref_cod_exemplar = new clsPmieducarExemplar( $registro["ref_cod_exemplar"] ); 89 $obj_ref_cod_exemplar = new clsPmieducarExemplar( $registro["ref_cod_exemplar"] );
90 $det_ref_cod_exemplar = $obj_ref_cod_exemplar->detalhe(); 90 $det_ref_cod_exemplar = $obj_ref_cod_exemplar->detalhe();
91 91
92 - if ( class_exists( "clsPmieducarAcervo" ) )  
93 - {  
94 $acervo = $det_ref_cod_exemplar["ref_cod_acervo"]; 92 $acervo = $det_ref_cod_exemplar["ref_cod_acervo"];
95 $obj_acervo = new clsPmieducarAcervo($acervo); 93 $obj_acervo = new clsPmieducarAcervo($acervo);
96 $det_acervo = $obj_acervo->detalhe(); 94 $det_acervo = $obj_acervo->detalhe();
97 $titulo_exemplar = $det_acervo["titulo"]; 95 $titulo_exemplar = $det_acervo["titulo"];
98 - }  
99 96
100 $obj_cliente = new clsPmieducarCliente( $registro["ref_cod_cliente"] ); 97 $obj_cliente = new clsPmieducarCliente( $registro["ref_cod_cliente"] );
101 $det_cliente = $obj_cliente->detalhe(); 98 $det_cliente = $obj_cliente->detalhe();
ieducar/intranet/educar_exemplar_emprestimo_det.php
@@ -50,13 +50,10 @@ class indice extends clsDetalhe @@ -50,13 +50,10 @@ class indice extends clsDetalhe
50 $obj_ref_cod_exemplar = new clsPmieducarExemplar( $registro["ref_cod_exemplar"] ); 50 $obj_ref_cod_exemplar = new clsPmieducarExemplar( $registro["ref_cod_exemplar"] );
51 $det_ref_cod_exemplar = $obj_ref_cod_exemplar->detalhe(); 51 $det_ref_cod_exemplar = $obj_ref_cod_exemplar->detalhe();
52 52
53 - if ( class_exists( "clsPmieducarAcervo" ) )  
54 - {  
55 $acervo = $det_ref_cod_exemplar["ref_cod_acervo"]; 53 $acervo = $det_ref_cod_exemplar["ref_cod_acervo"];
56 $obj_acervo = new clsPmieducarAcervo($acervo); 54 $obj_acervo = new clsPmieducarAcervo($acervo);
57 $det_acervo = $obj_acervo->detalhe(); 55 $det_acervo = $obj_acervo->detalhe();
58 $titulo_exemplar = $det_acervo["titulo"]; 56 $titulo_exemplar = $det_acervo["titulo"];
59 - }  
60 57
61 $obj_cliente = new clsPmieducarCliente( $registro["ref_cod_cliente"] ); 58 $obj_cliente = new clsPmieducarCliente( $registro["ref_cod_cliente"] );
62 $det_cliente = $obj_cliente->detalhe(); 59 $det_cliente = $obj_cliente->detalhe();
ieducar/intranet/educar_falta_nota_aluno_cad.php
@@ -1162,14 +1162,11 @@ class indice extends clsCadastro @@ -1162,14 +1162,11 @@ class indice extends clsCadastro
1162 } 1162 }
1163 else 1163 else
1164 { 1164 {
1165 - if ( class_exists( "clsPmieducarEscolaComplemento" ) )  
1166 - {  
1167 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola ); 1165 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola );
1168 $det_escola = $obj_escola->detalhe(); 1166 $det_escola = $obj_escola->detalhe();
1169 1167
1170 $nm_escola = $det_escola["nm_escola"]; 1168 $nm_escola = $det_escola["nm_escola"];
1171 $cidade = $det_escola["municipio"]; 1169 $cidade = $det_escola["municipio"];
1172 - }  
1173 } 1170 }
1174 if ($this->padrao_ano_escolar) 1171 if ($this->padrao_ano_escolar)
1175 { 1172 {
@@ -2056,14 +2053,11 @@ class indice extends clsCadastro @@ -2056,14 +2053,11 @@ class indice extends clsCadastro
2056 } 2053 }
2057 else 2054 else
2058 { 2055 {
2059 - if ( class_exists( "clsPmieducarEscolaComplemento" ) )  
2060 - {  
2061 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola ); 2056 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola );
2062 $det_escola = $obj_escola->detalhe(); 2057 $det_escola = $obj_escola->detalhe();
2063 2058
2064 $nm_escola = $det_escola["nm_escola"]; 2059 $nm_escola = $det_escola["nm_escola"];
2065 $cidade = $det_escola["municipio"]; 2060 $cidade = $det_escola["municipio"];
2066 - }  
2067 } 2061 }
2068 2062
2069 if ($this->padrao_ano_escolar) 2063 if ($this->padrao_ano_escolar)
ieducar/intranet/educar_matricula_ocorrencia_disciplinar_cad.php
@@ -116,15 +116,12 @@ class indice extends clsCadastro @@ -116,15 +116,12 @@ class indice extends clsCadastro
116 } 116 }
117 } 117 }
118 118
119 - if( class_exists( "clsPmieducarMatricula" ) && is_numeric($this->ref_cod_matricula))  
120 - {  
121 $obj_ref_cod_matricula = new clsPmieducarMatricula(); 119 $obj_ref_cod_matricula = new clsPmieducarMatricula();
122 $detalhe_aluno = array_shift($obj_ref_cod_matricula->lista($this->ref_cod_matricula)); 120 $detalhe_aluno = array_shift($obj_ref_cod_matricula->lista($this->ref_cod_matricula));
123 $this->ref_cod_escola = $detalhe_aluno['ref_ref_cod_escola']; 121 $this->ref_cod_escola = $detalhe_aluno['ref_ref_cod_escola'];
124 $obj_escola = new clsPmieducarEscola($this->ref_cod_escola); 122 $obj_escola = new clsPmieducarEscola($this->ref_cod_escola);
125 $det_escola = $obj_escola->detalhe(); 123 $det_escola = $obj_escola->detalhe();
126 $this->ref_cod_instituicao = $det_escola['ref_cod_instituicao']; 124 $this->ref_cod_instituicao = $det_escola['ref_cod_instituicao'];
127 - }  
128 125
129 if (is_numeric($this->ref_cod_matricula)) 126 if (is_numeric($this->ref_cod_matricula))
130 $this->url_cancelar = ($retorno == "Editar") ? "educar_matricula_ocorrencia_disciplinar_det.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_tipo_ocorrencia_disciplinar={$registro["ref_cod_tipo_ocorrencia_disciplinar"]}&sequencial={$registro["sequencial"]}" : "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$this->ref_cod_matricula}"; 127 $this->url_cancelar = ($retorno == "Editar") ? "educar_matricula_ocorrencia_disciplinar_det.php?ref_cod_matricula={$registro["ref_cod_matricula"]}&ref_cod_tipo_ocorrencia_disciplinar={$registro["ref_cod_tipo_ocorrencia_disciplinar"]}&sequencial={$registro["sequencial"]}" : "educar_matricula_ocorrencia_disciplinar_lst.php?ref_cod_matricula={$this->ref_cod_matricula}";
@@ -140,13 +137,6 @@ class indice extends clsCadastro @@ -140,13 +137,6 @@ class indice extends clsCadastro
140 137
141 function Gerar() 138 function Gerar()
142 { 139 {
143 - /**  
144 - * Busca infos aluno  
145 - */  
146 -  
147 -  
148 - if( class_exists( "clsPmieducarMatricula" ) && is_numeric($this->ref_cod_matricula))  
149 - {  
150 $obj_ref_cod_matricula = new clsPmieducarMatricula(); 140 $obj_ref_cod_matricula = new clsPmieducarMatricula();
151 $detalhe_aluno = $obj_ref_cod_matricula->lista($this->ref_cod_matricula); 141 $detalhe_aluno = $obj_ref_cod_matricula->lista($this->ref_cod_matricula);
152 if($detalhe_aluno) 142 if($detalhe_aluno)
@@ -155,12 +145,6 @@ class indice extends clsCadastro @@ -155,12 +145,6 @@ class indice extends clsCadastro
155 $det_aluno = array_shift($det_aluno = $obj_aluno->lista($detalhe_aluno['ref_cod_aluno'],null,null,null,null,null,null,null,null,null,1)); 145 $det_aluno = array_shift($det_aluno = $obj_aluno->lista($detalhe_aluno['ref_cod_aluno'],null,null,null,null,null,null,null,null,null,1));
156 146
157 $this->campoRotulo("nm_pessoa","Nome do Aluno",$det_aluno['nome_aluno']); 147 $this->campoRotulo("nm_pessoa","Nome do Aluno",$det_aluno['nome_aluno']);
158 - }else{  
159 - $this->inputsHelper()->dynamic(array('ano', 'instituicao', 'escola'));  
160 - // FIXME #parameters  
161 - $this->inputsHelper()->simpleSearchMatricula(null);  
162 - $this->inputsHelper()->hidden('somente_andamento');  
163 - }  
164 148
165 // primary keys 149 // primary keys
166 $this->campoOculto( "ref_cod_matricula", $this->ref_cod_matricula ); 150 $this->campoOculto( "ref_cod_matricula", $this->ref_cod_matricula );
ieducar/intranet/educar_pesquisa_professor_lst.php
@@ -132,11 +132,9 @@ class indice extends clsListagem @@ -132,11 +132,9 @@ class indice extends clsListagem
132 } 132 }
133 133
134 // pega detalhes de foreign_keys 134 // pega detalhes de foreign_keys
135 - if (class_exists('clsPmieducarInstituicao')) {  
136 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $lista_professor[0]["ref_cod_instituicao"] ); 135 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $lista_professor[0]["ref_cod_instituicao"] );
137 $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe(); 136 $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
138 $nm_instituicao = $det_ref_cod_instituicao["nm_instituicao"]; 137 $nm_instituicao = $det_ref_cod_instituicao["nm_instituicao"];
139 - }  
140 138
141 // monta a lista 139 // monta a lista
142 if (is_array($lista_professor) && count($lista_professor)) { 140 if (is_array($lista_professor) && count($lista_professor)) {
@@ -197,7 +195,7 @@ function addVal1(campo,opcao, valor) @@ -197,7 +195,7 @@ function addVal1(campo,opcao, valor)
197 valor = obj.options[novoIndice]; 195 valor = obj.options[novoIndice];
198 valor.value = opcao.toString(); 196 valor.value = opcao.toString();
199 valor.selected = true; 197 valor.selected = true;
200 - obj.onchange(); 198 + obj.onchange();
201 } 199 }
202 else if (window.parent.document.getElementById(campo)) { 200 else if (window.parent.document.getElementById(campo)) {
203 obj = window.parent.document.getElementById(campo); 201 obj = window.parent.document.getElementById(campo);
ieducar/intranet/educar_pesquisa_servidor_lst.php
@@ -264,11 +264,9 @@ class indice extends clsListagem @@ -264,11 +264,9 @@ class indice extends clsListagem
264 } 264 }
265 $total = $obj_servidor->_total; 265 $total = $obj_servidor->_total;
266 // pega detalhes de foreign_keys 266 // pega detalhes de foreign_keys
267 - if (class_exists('clsPmieducarInstituicao')) {  
268 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $lista[0]["ref_cod_instituicao"] ); 267 $obj_ref_cod_instituicao = new clsPmieducarInstituicao( $lista[0]["ref_cod_instituicao"] );
269 $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe(); 268 $det_ref_cod_instituicao = $obj_ref_cod_instituicao->detalhe();
270 $nm_instituicao = $det_ref_cod_instituicao["nm_instituicao"]; 269 $nm_instituicao = $det_ref_cod_instituicao["nm_instituicao"];
271 - }  
272 270
273 // monta a lista 271 // monta a lista
274 if (is_array($lista) && count($lista)) { 272 if (is_array($lista) && count($lista)) {
ieducar/intranet/educar_sequencia_serie_cad.php
@@ -66,12 +66,9 @@ class indice extends clsCadastro @@ -66,12 +66,9 @@ class indice extends clsCadastro
66 $obj_ref_serie_origem = new clsPmieducarSerie( $this->ref_serie_origem ); 66 $obj_ref_serie_origem = new clsPmieducarSerie( $this->ref_serie_origem );
67 $det_ref_serie_origem = $obj_ref_serie_origem->detalhe(); 67 $det_ref_serie_origem = $obj_ref_serie_origem->detalhe();
68 $this->ref_curso_origem = $det_ref_serie_origem["ref_cod_curso"]; 68 $this->ref_curso_origem = $det_ref_serie_origem["ref_cod_curso"];
69 - if( class_exists( "clsPmieducarCurso" ) )  
70 - {  
71 $obj_ref_curso_origem = new clsPmieducarCurso( $this->ref_curso_origem ); 69 $obj_ref_curso_origem = new clsPmieducarCurso( $this->ref_curso_origem );
72 $det_ref_curso_origem = $obj_ref_curso_origem->detalhe(); 70 $det_ref_curso_origem = $obj_ref_curso_origem->detalhe();
73 $this->ref_cod_instituicao = $det_ref_curso_origem["ref_cod_instituicao"]; 71 $this->ref_cod_instituicao = $det_ref_curso_origem["ref_cod_instituicao"];
74 - }  
75 $obj_ref_serie_destino = new clsPmieducarSerie( $this->ref_serie_destino ); 72 $obj_ref_serie_destino = new clsPmieducarSerie( $this->ref_serie_destino );
76 $det_ref_serie_destino = $obj_ref_serie_destino->detalhe(); 73 $det_ref_serie_destino = $obj_ref_serie_destino->detalhe();
77 $this->ref_curso_destino = $det_ref_serie_destino["ref_cod_curso"]; 74 $this->ref_curso_destino = $det_ref_serie_destino["ref_cod_curso"];
ieducar/intranet/educar_servidor_formacao_det.php
@@ -80,7 +80,7 @@ class indice extends clsDetalhe @@ -80,7 +80,7 @@ class indice extends clsDetalhe
80 function Gerar() 80 function Gerar()
81 { 81 {
82 $this->titulo = 'Servidor Formacao - Detalhe'; 82 $this->titulo = 'Servidor Formacao - Detalhe';
83 - 83 +
84 84
85 $this->cod_formacao = $_GET['cod_formacao']; 85 $this->cod_formacao = $_GET['cod_formacao'];
86 86
@@ -91,17 +91,12 @@ class indice extends clsDetalhe @@ -91,17 +91,12 @@ class indice extends clsDetalhe
91 $this->simpleRedirect('educar_servidor_formacao_lst.php'); 91 $this->simpleRedirect('educar_servidor_formacao_lst.php');
92 } 92 }
93 93
94 - if (class_exists('clsPmieducarServidor')) {  
95 $obj_ref_cod_servidor = new clsPmieducarServidor($registro['ref_cod_servidor'], 94 $obj_ref_cod_servidor = new clsPmieducarServidor($registro['ref_cod_servidor'],
96 null, null, null, null, null, 1, $registro['ref_ref_cod_instituicao'] 95 null, null, null, null, null, 1, $registro['ref_ref_cod_instituicao']
97 ); 96 );
98 97
99 $det_ref_cod_servidor = $obj_ref_cod_servidor->detalhe(); 98 $det_ref_cod_servidor = $obj_ref_cod_servidor->detalhe();
100 $registro['ref_cod_servidor'] = $det_ref_cod_servidor['cod_servidor']; 99 $registro['ref_cod_servidor'] = $det_ref_cod_servidor['cod_servidor'];
101 - }  
102 - else {  
103 - $registro['ref_cod_servidor'] = 'Erro na geracao';  
104 - }  
105 100
106 if ($registro['nm_formacao']) { 101 if ($registro['nm_formacao']) {
107 $this->addDetalhe(array('Nome Formação', $registro['nm_formacao'])); 102 $this->addDetalhe(array('Nome Formação', $registro['nm_formacao']));
ieducar/intranet/educar_servidor_formacao_lst.php
@@ -95,7 +95,7 @@ class indice extends clsListagem @@ -95,7 +95,7 @@ class indice extends clsListagem
95 $this->$var = ($val === '') ? NULL : $val; 95 $this->$var = ($val === '') ? NULL : $val;
96 } 96 }
97 97
98 - 98 +
99 99
100 $this->addCabecalhos(array( 100 $this->addCabecalhos(array(
101 'Nome Formação', 101 'Nome Formação',
@@ -154,25 +154,15 @@ class indice extends clsListagem @@ -154,25 +154,15 @@ class indice extends clsListagem
154 if (is_array($lista) && count($lista)) { 154 if (is_array($lista) && count($lista)) {
155 foreach ($lista as $registro) { 155 foreach ($lista as $registro) {
156 // Pega detalhes de foreign_keys 156 // Pega detalhes de foreign_keys
157 - if (class_exists('clsPmieducarUsuario')) {  
158 $obj_ref_usuario_exc = new clsPmieducarUsuario($registro['ref_usuario_exc']); 157 $obj_ref_usuario_exc = new clsPmieducarUsuario($registro['ref_usuario_exc']);
159 $det_ref_usuario_exc = $obj_ref_usuario_exc->detalhe(); 158 $det_ref_usuario_exc = $obj_ref_usuario_exc->detalhe();
160 159
161 $registro['ref_usuario_exc'] = $det_ref_usuario_exc['data_cadastro']; 160 $registro['ref_usuario_exc'] = $det_ref_usuario_exc['data_cadastro'];
162 - }  
163 - else {  
164 - $registro['ref_usuario_exc'] = 'Erro na geracao';  
165 - }  
166 161
167 - if (class_exists('clsPmieducarServidor')) {  
168 $obj_ref_cod_servidor = new clsPmieducarServidor($registro['ref_cod_servidor']); 162 $obj_ref_cod_servidor = new clsPmieducarServidor($registro['ref_cod_servidor']);
169 $det_ref_cod_servidor = $obj_ref_cod_servidor->detalhe(); 163 $det_ref_cod_servidor = $obj_ref_cod_servidor->detalhe();
170 164
171 $registro['ref_cod_servidor'] = $det_ref_cod_servidor['cod_servidor']; 165 $registro['ref_cod_servidor'] = $det_ref_cod_servidor['cod_servidor'];
172 - }  
173 - else {  
174 - $registro['ref_cod_servidor'] = 'Erro na geracao';  
175 - }  
176 166
177 if ($registro['tipo'] == 'C') { 167 if ($registro['tipo'] == 'C') {
178 $registro['tipo'] = 'Curso'; 168 $registro['tipo'] = 'Curso';
ieducar/intranet/educar_servidor_substituicao_cad.php
@@ -155,7 +155,6 @@ class indice extends clsCadastro @@ -155,7 +155,6 @@ class indice extends clsCadastro
155 $this->campoOculto('ref_ref_cod_instituicao', $this->ref_ref_cod_instituicao); 155 $this->campoOculto('ref_ref_cod_instituicao', $this->ref_ref_cod_instituicao);
156 156
157 $opcoes = array('' => 'Selecione'); 157 $opcoes = array('' => 'Selecione');
158 - if (class_exists('clsPmieducarServidor')) {  
159 $objTemp = new clsPmieducarServidor($this->ref_cod_servidor); 158 $objTemp = new clsPmieducarServidor($this->ref_cod_servidor);
160 $det = $objTemp->detalhe(); 159 $det = $objTemp->detalhe();
161 if ($det) { 160 if ($det) {
@@ -169,7 +168,6 @@ class indice extends clsCadastro @@ -169,7 +168,6 @@ class indice extends clsCadastro
169 $detalhePessoa = $objPessoa->detalhe(); 168 $detalhePessoa = $objPessoa->detalhe();
170 $nm_servidor = $detalhePessoa['nome']; 169 $nm_servidor = $detalhePessoa['nome'];
171 } 170 }
172 - }  
173 171
174 $this->campoRotulo('nm_servidor', 'Servidor', $nm_servidor); 172 $this->campoRotulo('nm_servidor', 'Servidor', $nm_servidor);
175 173
ieducar/intranet/educar_turma_det.php
@@ -118,65 +118,41 @@ class indice extends clsDetalhe @@ -118,65 +118,41 @@ class indice extends clsDetalhe
118 $this->simpleRedirect('educar_turma_lst.php'); 118 $this->simpleRedirect('educar_turma_lst.php');
119 } 119 }
120 120
121 - if (class_exists('clsPmieducarTurmaTipo')) {  
122 $obj_ref_cod_turma_tipo = new clsPmieducarTurmaTipo( 121 $obj_ref_cod_turma_tipo = new clsPmieducarTurmaTipo(
123 $registro['ref_cod_turma_tipo'] 122 $registro['ref_cod_turma_tipo']
124 ); 123 );
125 124
126 $det_ref_cod_turma_tipo = $obj_ref_cod_turma_tipo->detalhe(); 125 $det_ref_cod_turma_tipo = $obj_ref_cod_turma_tipo->detalhe();
127 $registro['ref_cod_turma_tipo'] = $det_ref_cod_turma_tipo['nm_tipo']; 126 $registro['ref_cod_turma_tipo'] = $det_ref_cod_turma_tipo['nm_tipo'];
128 - } else {  
129 - $registro['ref_cod_turma_tipo'] = 'Erro na geração';  
130 - }  
131 127
132 - if (class_exists('clsPmieducarInfraPredioComodo')) {  
133 $obj_ref_cod_infra_predio_comodo = new clsPmieducarInfraPredioComodo( 128 $obj_ref_cod_infra_predio_comodo = new clsPmieducarInfraPredioComodo(
134 $registro['ref_cod_infra_predio_comodo'] 129 $registro['ref_cod_infra_predio_comodo']
135 ); 130 );
136 131
137 $det_ref_cod_infra_predio_comodo = $obj_ref_cod_infra_predio_comodo->detalhe(); 132 $det_ref_cod_infra_predio_comodo = $obj_ref_cod_infra_predio_comodo->detalhe();
138 $registro['ref_cod_infra_predio_comodo'] = $det_ref_cod_infra_predio_comodo['nm_comodo']; 133 $registro['ref_cod_infra_predio_comodo'] = $det_ref_cod_infra_predio_comodo['nm_comodo'];
139 - } else {  
140 - $registro['ref_cod_infra_predio_comodo'] = 'Erro na geração';  
141 - }  
142 134
143 - if (class_exists('clsPmieducarInstituicao')) {  
144 $obj_cod_instituicao = new clsPmieducarInstituicao( 135 $obj_cod_instituicao = new clsPmieducarInstituicao(
145 $registro['ref_cod_instituicao'] 136 $registro['ref_cod_instituicao']
146 ); 137 );
147 138
148 $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe(); 139 $obj_cod_instituicao_det = $obj_cod_instituicao->detalhe();
149 $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao']; 140 $registro['ref_cod_instituicao'] = $obj_cod_instituicao_det['nm_instituicao'];
150 - } else {  
151 - $registro['ref_cod_instituicao'] = 'Erro na geração';  
152 - }  
153 141
154 - if (class_exists('clsPmieducarEscola')) {  
155 $this->ref_ref_cod_escola = $registro['ref_ref_cod_escola']; 142 $this->ref_ref_cod_escola = $registro['ref_ref_cod_escola'];
156 $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_ref_cod_escola']); 143 $obj_ref_cod_escola = new clsPmieducarEscola($registro['ref_ref_cod_escola']);
157 $det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); 144 $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
158 $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome']; 145 $registro['ref_ref_cod_escola'] = $det_ref_cod_escola['nome'];
159 - } else {  
160 - $registro['ref_cod_escola'] = 'Erro na geração';  
161 - }  
162 146
163 - if (class_exists('clsPmieducarCurso')) {  
164 $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']); 147 $obj_ref_cod_curso = new clsPmieducarCurso($registro['ref_cod_curso']);
165 $det_ref_cod_curso = $obj_ref_cod_curso->detalhe(); 148 $det_ref_cod_curso = $obj_ref_cod_curso->detalhe();
166 $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso']; 149 $registro['ref_cod_curso'] = $det_ref_cod_curso['nm_curso'];
167 $padrao_ano_escolar = $det_ref_cod_curso['padrao_ano_escolar']; 150 $padrao_ano_escolar = $det_ref_cod_curso['padrao_ano_escolar'];
168 - } else {  
169 - $registro['ref_cod_curso'] = 'Erro na geração';  
170 - }  
171 151
172 - if (class_exists('clsPmieducarSerie')) {  
173 $this->ref_ref_cod_serie = $registro['ref_ref_cod_serie']; 152 $this->ref_ref_cod_serie = $registro['ref_ref_cod_serie'];
174 $obj_ser = new clsPmieducarSerie($registro['ref_ref_cod_serie']); 153 $obj_ser = new clsPmieducarSerie($registro['ref_ref_cod_serie']);
175 $det_ser = $obj_ser->detalhe(); 154 $det_ser = $obj_ser->detalhe();
176 $registro['ref_ref_cod_serie'] = $det_ser['nm_serie']; 155 $registro['ref_ref_cod_serie'] = $det_ser['nm_serie'];
177 - } else {  
178 - $registro['ref_ref_cod_serie'] = 'Erro na geração';  
179 - }  
180 156
181 $obj_permissoes = new clsPermissoes(); 157 $obj_permissoes = new clsPermissoes();
182 158
ieducar/intranet/educar_turma_lst.php
@@ -191,14 +191,11 @@ class indice extends clsListagem @@ -191,14 +191,11 @@ class indice extends clsListagem
191 $nm_escola = ""; 191 $nm_escola = "";
192 foreach ( $lista AS $registro ) 192 foreach ( $lista AS $registro )
193 { 193 {
194 - if( class_exists( "clsPmieducarEscola" ) && $registro["ref_ref_cod_escola"] != $ref_cod_escola)  
195 - {  
196 $ref_cod_escola = $registro["ref_ref_cod_escola"]; 194 $ref_cod_escola = $registro["ref_ref_cod_escola"];
197 $obj_ref_cod_escola = new clsPmieducarEscola( $registro["ref_ref_cod_escola"] ); 195 $obj_ref_cod_escola = new clsPmieducarEscola( $registro["ref_ref_cod_escola"] );
198 $det_ref_cod_escola = $obj_ref_cod_escola->detalhe(); 196 $det_ref_cod_escola = $obj_ref_cod_escola->detalhe();
199 $ref_cod_escola = $registro["ref_ref_cod_escola"] ; 197 $ref_cod_escola = $registro["ref_ref_cod_escola"] ;
200 $nm_escola = $det_ref_cod_escola["nome"]; 198 $nm_escola = $det_ref_cod_escola["nome"];
201 - }  
202 199
203 $lista_busca = array( 200 $lista_busca = array(
204 "<a href=\"educar_turma_det.php?cod_turma={$registro["cod_turma"]}\">{$registro["ano"]}</a>", 201 "<a href=\"educar_turma_det.php?cod_turma={$registro["cod_turma"]}\">{$registro["ano"]}</a>",
ieducar/intranet/educar_turma_nota_cad.php
@@ -1386,14 +1386,11 @@ class indice extends clsCadastro @@ -1386,14 +1386,11 @@ class indice extends clsCadastro
1386 } 1386 }
1387 else 1387 else
1388 { 1388 {
1389 - if ( class_exists( "clsPmieducarEscolaComplemento" ) )  
1390 - {  
1391 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola ); 1389 $obj_escola = new clsPmieducarEscolaComplemento( $this->ref_ref_cod_escola );
1392 $det_escola = $obj_escola->detalhe(); 1390 $det_escola = $obj_escola->detalhe();
1393 1391
1394 $nm_escola = $det_escola["nm_escola"]; 1392 $nm_escola = $det_escola["nm_escola"];
1395 $cidade = $det_escola["municipio"]; 1393 $cidade = $det_escola["municipio"];
1396 - }  
1397 } 1394 }
1398 $this->padrao_ano_escolar = $detalhe_curso["padrao_ano_escolar"]; 1395 $this->padrao_ano_escolar = $detalhe_curso["padrao_ano_escolar"];
1399 if ($this->padrao_ano_escolar) 1396 if ($this->padrao_ano_escolar)
ieducar/intranet/include/pessoa/clsCadastroFisicaDeficiencia.inc.php
@@ -21,40 +21,10 @@ class clsCadastroFisicaDeficiencia extends Model @@ -21,40 +21,10 @@ class clsCadastroFisicaDeficiencia extends Model
21 $this->_campos_lista = $this->_todos_campos = 'ref_idpes, ref_cod_deficiencia'; 21 $this->_campos_lista = $this->_todos_campos = 'ref_idpes, ref_cod_deficiencia';
22 22
23 if (is_numeric($ref_idpes)) { 23 if (is_numeric($ref_idpes)) {
24 - if (class_exists('clsCadastroFisica')) {  
25 - $tmp_obj = new clsCadastroFisica($ref_idpes);  
26 - if (method_exists($tmp_obj, 'existe')) {  
27 - if ($tmp_obj->existe()) {  
28 - $this->ref_idpes = $ref_idpes;  
29 - }  
30 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
31 - if ($tmp_obj->detalhe()) {  
32 - $this->ref_idpes = $ref_idpes;  
33 - }  
34 - }  
35 - } else {  
36 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$ref_idpes}'")) {  
37 $this->ref_idpes = $ref_idpes; 24 $this->ref_idpes = $ref_idpes;
38 - }  
39 - }  
40 } 25 }
41 if (is_numeric($ref_cod_deficiencia)) { 26 if (is_numeric($ref_cod_deficiencia)) {
42 - if (class_exists('clsCadastroDeficiencia')) {  
43 - $tmp_obj = new clsCadastroDeficiencia($ref_cod_deficiencia);  
44 - if (method_exists($tmp_obj, 'existe')) {  
45 - if ($tmp_obj->existe()) {  
46 - $this->ref_cod_deficiencia = $ref_cod_deficiencia;  
47 - }  
48 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
49 - if ($tmp_obj->detalhe()) {  
50 - $this->ref_cod_deficiencia = $ref_cod_deficiencia;  
51 - }  
52 - }  
53 - } else {  
54 - if ($db->CampoUnico("SELECT 1 FROM cadastro.deficiencia WHERE cod_deficiencia = '{$ref_cod_deficiencia}'")) {  
55 $this->ref_cod_deficiencia = $ref_cod_deficiencia; 27 $this->ref_cod_deficiencia = $ref_cod_deficiencia;
56 - }  
57 - }  
58 } 28 }
59 } 29 }
60 30
ieducar/intranet/include/pessoa/clsCadastroFisicaRaca.inc.php
@@ -24,40 +24,10 @@ class clsCadastroFisicaRaca extends Model @@ -24,40 +24,10 @@ class clsCadastroFisicaRaca extends Model
24 $this->_campos_lista = $this->_todos_campos = 'ref_idpes, ref_cod_raca'; 24 $this->_campos_lista = $this->_todos_campos = 'ref_idpes, ref_cod_raca';
25 25
26 if (is_numeric($ref_idpes)) { 26 if (is_numeric($ref_idpes)) {
27 - if (class_exists('clsCadastroFisica')) {  
28 - $tmp_obj = new clsCadastroFisica($ref_idpes);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_idpes = $ref_idpes;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_idpes = $ref_idpes;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$ref_idpes}'")) {  
40 $this->ref_idpes = $ref_idpes; 27 $this->ref_idpes = $ref_idpes;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_cod_raca)) { 29 if (is_numeric($ref_cod_raca)) {
45 - if (class_exists('clsCadastroRaca')) {  
46 - $tmp_obj = new clsCadastroRaca($ref_cod_raca);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_cod_raca = $ref_cod_raca;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_cod_raca = $ref_cod_raca;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM cadastro.raca WHERE cod_raca = '{$ref_cod_raca}'")) {  
58 $this->ref_cod_raca = $ref_cod_raca; 30 $this->ref_cod_raca = $ref_cod_raca;
59 - }  
60 - }  
61 } 31 }
62 } 32 }
63 33
ieducar/intranet/include/pessoa/clsCadastroRaca.inc.php
@@ -35,40 +35,10 @@ class clsCadastroRaca extends Model @@ -35,40 +35,10 @@ class clsCadastroRaca extends Model
35 $this->_campos_lista = $this->_todos_campos = 'cod_raca, idpes_exc, idpes_cad, nm_raca, data_cadastro, data_exclusao, ativo, raca_educacenso'; 35 $this->_campos_lista = $this->_todos_campos = 'cod_raca, idpes_exc, idpes_cad, nm_raca, data_cadastro, data_exclusao, ativo, raca_educacenso';
36 36
37 if (is_numeric($idpes_exc)) { 37 if (is_numeric($idpes_exc)) {
38 - if (class_exists('clsCadastroFisica')) {  
39 - $tmp_obj = new clsCadastroFisica($idpes_exc);  
40 - if (method_exists($tmp_obj, 'existe')) {  
41 - if ($tmp_obj->existe()) {  
42 - $this->idpes_exc = $idpes_exc;  
43 - }  
44 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
45 - if ($tmp_obj->detalhe()) {  
46 - $this->idpes_exc = $idpes_exc;  
47 - }  
48 - }  
49 - } else {  
50 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$idpes_exc}'")) {  
51 $this->idpes_exc = $idpes_exc; 38 $this->idpes_exc = $idpes_exc;
52 - }  
53 - }  
54 } 39 }
55 if (is_numeric($idpes_cad)) { 40 if (is_numeric($idpes_cad)) {
56 - if (class_exists('clsCadastroFisica')) {  
57 - $tmp_obj = new clsCadastroFisica($idpes_cad);  
58 - if (method_exists($tmp_obj, 'existe')) {  
59 - if ($tmp_obj->existe()) {  
60 - $this->idpes_cad = $idpes_cad;  
61 - }  
62 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
63 - if ($tmp_obj->detalhe()) {  
64 - $this->idpes_cad = $idpes_cad;  
65 - }  
66 - }  
67 - } else {  
68 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$idpes_cad}'")) {  
69 $this->idpes_cad = $idpes_cad; 41 $this->idpes_cad = $idpes_cad;
70 - }  
71 - }  
72 } 42 }
73 43
74 if (is_numeric($cod_raca)) { 44 if (is_numeric($cod_raca)) {
ieducar/intranet/include/pessoa/clsCadastroReligiao.inc.php
@@ -34,40 +34,10 @@ class clsCadastroReligiao extends Model @@ -34,40 +34,10 @@ class clsCadastroReligiao extends Model
34 $this->_campos_lista = $this->_todos_campos = 'cod_religiao, idpes_exc, idpes_cad, nm_religiao, data_cadastro, data_exclusao, ativo'; 34 $this->_campos_lista = $this->_todos_campos = 'cod_religiao, idpes_exc, idpes_cad, nm_religiao, data_cadastro, data_exclusao, ativo';
35 35
36 if (is_numeric($idpes_exc)) { 36 if (is_numeric($idpes_exc)) {
37 - if (class_exists('clsCadastroFisica')) {  
38 - $tmp_obj = new clsCadastroFisica($idpes_exc);  
39 - if (method_exists($tmp_obj, 'existe')) {  
40 - if ($tmp_obj->existe()) {  
41 - $this->idpes_exc = $idpes_exc;  
42 - }  
43 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
44 - if ($tmp_obj->detalhe()) {  
45 - $this->idpes_exc = $idpes_exc;  
46 - }  
47 - }  
48 - } else {  
49 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$idpes_exc}'")) {  
50 $this->idpes_exc = $idpes_exc; 37 $this->idpes_exc = $idpes_exc;
51 - }  
52 - }  
53 } 38 }
54 if (is_numeric($idpes_cad)) { 39 if (is_numeric($idpes_cad)) {
55 - if (class_exists('clsCadastroFisica')) {  
56 - $tmp_obj = new clsCadastroFisica($idpes_cad);  
57 - if (method_exists($tmp_obj, 'existe')) {  
58 - if ($tmp_obj->existe()) {  
59 - $this->idpes_cad = $idpes_cad;  
60 - }  
61 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
62 - if ($tmp_obj->detalhe()) {  
63 - $this->idpes_cad = $idpes_cad;  
64 - }  
65 - }  
66 - } else {  
67 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$idpes_cad}'")) {  
68 $this->idpes_cad = $idpes_cad; 40 $this->idpes_cad = $idpes_cad;
69 - }  
70 - }  
71 } 41 }
72 42
73 if (is_numeric($cod_religiao)) { 43 if (is_numeric($cod_religiao)) {
ieducar/intranet/include/pmieducar/clsPmieducarAbandonoTipo.inc.php
@@ -24,58 +24,13 @@ class clsPmiEducarAbandonoTipo extends Model @@ -24,58 +24,13 @@ class clsPmiEducarAbandonoTipo extends Model
24 $this->_campos_lista = $this->_todos_campos = 'tt.cod_abandono_tipo, tt.ref_usuario_exc, tt.ref_usuario_cad, tt.nome, tt.data_cadastro, tt.data_exclusao, tt.ativo, tt.ref_cod_instituicao'; 24 $this->_campos_lista = $this->_todos_campos = 'tt.cod_abandono_tipo, tt.ref_usuario_exc, tt.ref_usuario_cad, tt.nome, tt.data_cadastro, tt.data_exclusao, tt.ativo, tt.ref_cod_instituicao';
25 25
26 if (is_numeric($ref_cod_instituicao)) { 26 if (is_numeric($ref_cod_instituicao)) {
27 - if (class_exists('clsPmieducarEscola')) {  
28 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
40 $this->ref_cod_instituicao = $ref_cod_instituicao; 27 $this->ref_cod_instituicao = $ref_cod_instituicao;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_exc)) { 29 if (is_numeric($ref_usuario_exc)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_exc = $ref_usuario_exc;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
58 $this->ref_usuario_exc = $ref_usuario_exc; 30 $this->ref_usuario_exc = $ref_usuario_exc;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_usuario_cad)) { 32 if (is_numeric($ref_usuario_cad)) {
63 - if (class_exists('clsPmieducarUsuario')) {  
64 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_usuario_cad = $ref_usuario_cad;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
76 $this->ref_usuario_cad = $ref_usuario_cad; 33 $this->ref_usuario_cad = $ref_usuario_cad;
77 - }  
78 - }  
79 } 34 }
80 35
81 if (is_numeric($cod_abandono_tipo)) { 36 if (is_numeric($cod_abandono_tipo)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervo.inc.php
@@ -133,151 +133,31 @@ class clsPmieducarAcervo extends Model @@ -133,151 +133,31 @@ class clsPmieducarAcervo extends Model
133 a.tipo_autor'; 133 a.tipo_autor';
134 134
135 if (is_numeric($ref_cod_biblioteca)) { 135 if (is_numeric($ref_cod_biblioteca)) {
136 - if (class_exists('clsPmieducarBiblioteca')) {  
137 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
138 - if (method_exists($tmp_obj, 'existe')) {  
139 - if ($tmp_obj->existe()) {  
140 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
141 - }  
142 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
143 - if ($tmp_obj->detalhe()) {  
144 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
145 - }  
146 - }  
147 - } else {  
148 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
149 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 136 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
150 - }  
151 - }  
152 } 137 }
153 if (is_numeric($ref_cod_exemplar_tipo)) { 138 if (is_numeric($ref_cod_exemplar_tipo)) {
154 - if (class_exists('clsPmieducarExemplarTipo')) {  
155 - $tmp_obj = new clsPmieducarExemplarTipo($ref_cod_exemplar_tipo);  
156 - if (method_exists($tmp_obj, 'existe')) {  
157 - if ($tmp_obj->existe()) {  
158 - $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;  
159 - }  
160 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
161 - if ($tmp_obj->detalhe()) {  
162 - $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;  
163 - }  
164 - }  
165 - } else {  
166 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.exemplar_tipo WHERE cod_exemplar_tipo = '{$ref_cod_exemplar_tipo}'")) {  
167 $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo; 139 $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;
168 - }  
169 - }  
170 } 140 }
171 if (is_numeric($ref_cod_acervo)) { 141 if (is_numeric($ref_cod_acervo)) {
172 - if (class_exists('clsPmieducarAcervo')) {  
173 - $tmp_obj = new clsPmieducarAcervo($ref_cod_acervo);  
174 - if (method_exists($tmp_obj, 'existe')) {  
175 - if ($tmp_obj->existe()) {  
176 - $this->ref_cod_acervo = $ref_cod_acervo;  
177 - }  
178 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
179 - if ($tmp_obj->detalhe()) {  
180 - $this->ref_cod_acervo = $ref_cod_acervo;  
181 - }  
182 - }  
183 - } else {  
184 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo WHERE cod_acervo = '{$ref_cod_acervo}'")) {  
185 $this->ref_cod_acervo = $ref_cod_acervo; 142 $this->ref_cod_acervo = $ref_cod_acervo;
186 - }  
187 - }  
188 } elseif ($ref_cod_acervo == 'NULL') { 143 } elseif ($ref_cod_acervo == 'NULL') {
189 $this->ref_cod_acervo = 'NULL'; 144 $this->ref_cod_acervo = 'NULL';
190 } 145 }
191 146
192 if (is_numeric($ref_usuario_cad)) { 147 if (is_numeric($ref_usuario_cad)) {
193 - if (class_exists('clsPmieducarUsuario')) {  
194 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
195 - if (method_exists($tmp_obj, 'existe')) {  
196 - if ($tmp_obj->existe()) {  
197 - $this->ref_usuario_cad = $ref_usuario_cad;  
198 - }  
199 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
200 - if ($tmp_obj->detalhe()) {  
201 - $this->ref_usuario_cad = $ref_usuario_cad;  
202 - }  
203 - }  
204 - } else {  
205 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
206 $this->ref_usuario_cad = $ref_usuario_cad; 148 $this->ref_usuario_cad = $ref_usuario_cad;
207 - }  
208 - }  
209 } 149 }
210 if (is_numeric($ref_usuario_exc)) { 150 if (is_numeric($ref_usuario_exc)) {
211 - if (class_exists('clsPmieducarUsuario')) {  
212 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
213 - if (method_exists($tmp_obj, 'existe')) {  
214 - if ($tmp_obj->existe()) {  
215 - $this->ref_usuario_exc = $ref_usuario_exc;  
216 - }  
217 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
218 - if ($tmp_obj->detalhe()) {  
219 - $this->ref_usuario_exc = $ref_usuario_exc;  
220 - }  
221 - }  
222 - } else {  
223 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
224 $this->ref_usuario_exc = $ref_usuario_exc; 151 $this->ref_usuario_exc = $ref_usuario_exc;
225 - }  
226 - }  
227 } 152 }
228 if (is_numeric($ref_cod_acervo_colecao)) { 153 if (is_numeric($ref_cod_acervo_colecao)) {
229 - if (class_exists('clsPmieducarAcervoColecao')) {  
230 - $tmp_obj = new clsPmieducarAcervoColecao($ref_cod_acervo_colecao);  
231 - if (method_exists($tmp_obj, 'existe')) {  
232 - if ($tmp_obj->existe()) {  
233 - $this->ref_cod_acervo_colecao = $ref_cod_acervo_colecao;  
234 - }  
235 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
236 - if ($tmp_obj->detalhe()) {  
237 - $this->ref_cod_acervo_colecao = $ref_cod_acervo_colecao;  
238 - }  
239 - }  
240 - } else {  
241 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo_colecao WHERE cod_acervo_colecao = '{$ref_cod_acervo_colecao}'")) {  
242 $this->ref_cod_acervo_colecao = $ref_cod_acervo_colecao; 154 $this->ref_cod_acervo_colecao = $ref_cod_acervo_colecao;
243 - }  
244 - }  
245 } 155 }
246 if (is_numeric($ref_cod_acervo_idioma)) { 156 if (is_numeric($ref_cod_acervo_idioma)) {
247 - if (class_exists('clsPmieducarAcervoIdioma')) {  
248 - $tmp_obj = new clsPmieducarAcervoIdioma($ref_cod_acervo_idioma);  
249 - if (method_exists($tmp_obj, 'existe')) {  
250 - if ($tmp_obj->existe()) {  
251 - $this->ref_cod_acervo_idioma = $ref_cod_acervo_idioma;  
252 - }  
253 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
254 - if ($tmp_obj->detalhe()) {  
255 - $this->ref_cod_acervo_idioma = $ref_cod_acervo_idioma;  
256 - }  
257 - }  
258 - } else {  
259 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo_idioma WHERE cod_acervo_idioma = '{$ref_cod_acervo_idioma}'")) {  
260 $this->ref_cod_acervo_idioma = $ref_cod_acervo_idioma; 157 $this->ref_cod_acervo_idioma = $ref_cod_acervo_idioma;
261 - }  
262 - }  
263 } 158 }
264 if (is_numeric($ref_cod_acervo_editora)) { 159 if (is_numeric($ref_cod_acervo_editora)) {
265 - if (class_exists('clsPmieducarAcervoEditora')) {  
266 - $tmp_obj = new clsPmieducarAcervoEditora($ref_cod_acervo_editora);  
267 - if (method_exists($tmp_obj, 'existe')) {  
268 - if ($tmp_obj->existe()) {  
269 - $this->ref_cod_acervo_editora = $ref_cod_acervo_editora;  
270 - }  
271 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
272 - if ($tmp_obj->detalhe()) {  
273 - $this->ref_cod_acervo_editora = $ref_cod_acervo_editora;  
274 - }  
275 - }  
276 - } else {  
277 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo_editora WHERE cod_acervo_editora = '{$ref_cod_acervo_editora}'")) {  
278 $this->ref_cod_acervo_editora = $ref_cod_acervo_editora; 160 $this->ref_cod_acervo_editora = $ref_cod_acervo_editora;
279 - }  
280 - }  
281 } 161 }
282 162
283 if (is_numeric($cod_acervo)) { 163 if (is_numeric($cod_acervo)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAcervoAutor.inc.php
@@ -19,40 +19,10 @@ class clsPmieducarAcervoAcervoAutor extends Model @@ -19,40 +19,10 @@ class clsPmieducarAcervoAcervoAutor extends Model
19 $this->_campos_lista = $this->_todos_campos = 'ref_cod_acervo_autor, ref_cod_acervo, principal'; 19 $this->_campos_lista = $this->_todos_campos = 'ref_cod_acervo_autor, ref_cod_acervo, principal';
20 20
21 if (is_numeric($ref_cod_acervo)) { 21 if (is_numeric($ref_cod_acervo)) {
22 - if (class_exists('clsPmieducarAcervo')) {  
23 - $tmp_obj = new clsPmieducarAcervo($ref_cod_acervo);  
24 - if (method_exists($tmp_obj, 'existe')) {  
25 - if ($tmp_obj->existe()) {  
26 - $this->ref_cod_acervo = $ref_cod_acervo;  
27 - }  
28 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
29 - if ($tmp_obj->detalhe()) {  
30 - $this->ref_cod_acervo = $ref_cod_acervo;  
31 - }  
32 - }  
33 - } else {  
34 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo WHERE cod_acervo = '{$ref_cod_acervo}'")) {  
35 $this->ref_cod_acervo = $ref_cod_acervo; 22 $this->ref_cod_acervo = $ref_cod_acervo;
36 - }  
37 - }  
38 } 23 }
39 if (is_numeric($ref_cod_acervo_autor)) { 24 if (is_numeric($ref_cod_acervo_autor)) {
40 - if (class_exists('clsPmieducarAcervoAutor')) {  
41 - $tmp_obj = new clsPmieducarAcervoAutor($ref_cod_acervo_autor);  
42 - if (method_exists($tmp_obj, 'existe')) {  
43 - if ($tmp_obj->existe()) {  
44 - $this->ref_cod_acervo_autor = $ref_cod_acervo_autor;  
45 - }  
46 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
47 - if ($tmp_obj->detalhe()) {  
48 - $this->ref_cod_acervo_autor = $ref_cod_acervo_autor;  
49 - }  
50 - }  
51 - } else {  
52 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo_autor WHERE cod_acervo_autor = '{$ref_cod_acervo_autor}'")) {  
53 $this->ref_cod_acervo_autor = $ref_cod_acervo_autor; 25 $this->ref_cod_acervo_autor = $ref_cod_acervo_autor;
54 - }  
55 - }  
56 } 26 }
57 27
58 if (is_numeric($principal)) { 28 if (is_numeric($principal)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAssunto.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarAcervoAssunto extends Model @@ -25,40 +25,10 @@ class clsPmieducarAcervoAssunto extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_assunto, ref_usuario_exc, ref_usuario_cad, nm_assunto, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_assunto, ref_usuario_exc, ref_usuario_cad, nm_assunto, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
26 26
27 if (is_numeric($ref_usuario_cad)) { 27 if (is_numeric($ref_usuario_cad)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_cad = $ref_usuario_cad;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_cad = $ref_usuario_cad;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
41 $this->ref_usuario_cad = $ref_usuario_cad; 28 $this->ref_usuario_cad = $ref_usuario_cad;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_acervo_assunto)) { 34 if (is_numeric($cod_acervo_assunto)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoAutor.inc.php
@@ -25,58 +25,13 @@ class clsPmieducarAcervoAutor extends Model @@ -25,58 +25,13 @@ class clsPmieducarAcervoAutor extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_autor, ref_usuario_exc, ref_usuario_cad, nm_autor, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_autor, ref_usuario_exc, ref_usuario_cad, nm_autor, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
26 26
27 if (is_numeric($ref_cod_biblioteca)) { 27 if (is_numeric($ref_cod_biblioteca)) {
28 - if (class_exists('clsPmieducarBiblioteca')) {  
29 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
41 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 28 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 if (is_numeric($ref_usuario_cad)) { 33 if (is_numeric($ref_usuario_cad)) {
64 - if (class_exists('clsPmieducarUsuario')) {  
65 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
66 - if (method_exists($tmp_obj, 'existe')) {  
67 - if ($tmp_obj->existe()) {  
68 - $this->ref_usuario_cad = $ref_usuario_cad;  
69 - }  
70 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
71 - if ($tmp_obj->detalhe()) {  
72 - $this->ref_usuario_cad = $ref_usuario_cad;  
73 - }  
74 - }  
75 - } else {  
76 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
77 $this->ref_usuario_cad = $ref_usuario_cad; 34 $this->ref_usuario_cad = $ref_usuario_cad;
78 - }  
79 - }  
80 } 35 }
81 36
82 if (is_numeric($cod_acervo_autor)) { 37 if (is_numeric($cod_acervo_autor)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoColecao.inc.php
@@ -30,40 +30,10 @@ class clsPmieducarAcervoColecao extends Model @@ -30,40 +30,10 @@ class clsPmieducarAcervoColecao extends Model
30 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_colecao, ref_usuario_exc, ref_usuario_cad, nm_colecao, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 30 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_colecao, ref_usuario_exc, ref_usuario_cad, nm_colecao, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
31 31
32 if (is_numeric($ref_usuario_cad)) { 32 if (is_numeric($ref_usuario_cad)) {
33 - if (class_exists('clsPmieducarUsuario')) {  
34 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
35 - if (method_exists($tmp_obj, 'existe')) {  
36 - if ($tmp_obj->existe()) {  
37 - $this->ref_usuario_cad = $ref_usuario_cad;  
38 - }  
39 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
40 - if ($tmp_obj->detalhe()) {  
41 - $this->ref_usuario_cad = $ref_usuario_cad;  
42 - }  
43 - }  
44 - } else {  
45 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
46 $this->ref_usuario_cad = $ref_usuario_cad; 33 $this->ref_usuario_cad = $ref_usuario_cad;
47 - }  
48 - }  
49 } 34 }
50 if (is_numeric($ref_usuario_exc)) { 35 if (is_numeric($ref_usuario_exc)) {
51 - if (class_exists('clsPmieducarUsuario')) {  
52 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
53 - if (method_exists($tmp_obj, 'existe')) {  
54 - if ($tmp_obj->existe()) {  
55 - $this->ref_usuario_exc = $ref_usuario_exc;  
56 - }  
57 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
58 - if ($tmp_obj->detalhe()) {  
59 - $this->ref_usuario_exc = $ref_usuario_exc;  
60 - }  
61 - }  
62 - } else {  
63 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
64 $this->ref_usuario_exc = $ref_usuario_exc; 36 $this->ref_usuario_exc = $ref_usuario_exc;
65 - }  
66 - }  
67 } 37 }
68 38
69 if (is_numeric($ref_cod_biblioteca)) { 39 if (is_numeric($ref_cod_biblioteca)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoEditora.inc.php
@@ -33,77 +33,17 @@ class clsPmieducarAcervoEditora extends Model @@ -33,77 +33,17 @@ class clsPmieducarAcervoEditora extends Model
33 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_editora, ref_usuario_cad, ref_usuario_exc, ref_idtlog, ref_sigla_uf, nm_editora, cep, cidade, bairro, logradouro, numero, telefone, ddd_telefone, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 33 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_editora, ref_usuario_cad, ref_usuario_exc, ref_idtlog, ref_sigla_uf, nm_editora, cep, cidade, bairro, logradouro, numero, telefone, ddd_telefone, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
34 34
35 if (is_numeric($ref_usuario_exc)) { 35 if (is_numeric($ref_usuario_exc)) {
36 - if (class_exists('clsPmieducarUsuario')) {  
37 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
38 - if (method_exists($tmp_obj, 'existe')) {  
39 - if ($tmp_obj->existe()) {  
40 - $this->ref_usuario_exc = $ref_usuario_exc;  
41 - }  
42 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
43 - if ($tmp_obj->detalhe()) {  
44 - $this->ref_usuario_exc = $ref_usuario_exc;  
45 - }  
46 - }  
47 - } else {  
48 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
49 $this->ref_usuario_exc = $ref_usuario_exc; 36 $this->ref_usuario_exc = $ref_usuario_exc;
50 - }  
51 - }  
52 } 37 }
53 if (is_numeric($ref_usuario_cad)) { 38 if (is_numeric($ref_usuario_cad)) {
54 - if (class_exists('clsPmieducarUsuario')) {  
55 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
56 - if (method_exists($tmp_obj, 'existe')) {  
57 - if ($tmp_obj->existe()) {  
58 - $this->ref_usuario_cad = $ref_usuario_cad;  
59 - }  
60 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
61 - if ($tmp_obj->detalhe()) {  
62 - $this->ref_usuario_cad = $ref_usuario_cad;  
63 - }  
64 - }  
65 - } else {  
66 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
67 $this->ref_usuario_cad = $ref_usuario_cad; 39 $this->ref_usuario_cad = $ref_usuario_cad;
68 - }  
69 - }  
70 } 40 }
71 if (is_string($ref_idtlog)) { 41 if (is_string($ref_idtlog)) {
72 - if (class_exists('clsUrbanoTipoLogradouro')) {  
73 - $tmp_obj = new clsUrbanoTipoLogradouro($ref_idtlog);  
74 - if (method_exists($tmp_obj, 'existe')) {  
75 - if ($tmp_obj->existe()) {  
76 - $this->ref_idtlog = $ref_idtlog;  
77 - }  
78 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
79 - if ($tmp_obj->detalhe()) {  
80 - $this->ref_idtlog = $ref_idtlog;  
81 - }  
82 - }  
83 - } else {  
84 - if ($db->CampoUnico("SELECT 1 FROM urbano.tipo_logradouro WHERE idtlog = '{$ref_idtlog}'")) {  
85 $this->ref_idtlog = $ref_idtlog; 42 $this->ref_idtlog = $ref_idtlog;
86 - }  
87 - }  
88 } 43 }
89 44
90 if (is_string($ref_sigla_uf)) { 45 if (is_string($ref_sigla_uf)) {
91 - if (class_exists('clsUf')) {  
92 - $tmp_obj = new clsUf($ref_sigla_uf);  
93 - if (method_exists($tmp_obj, 'existe')) {  
94 - if ($tmp_obj->existe()) {  
95 - $this->ref_sigla_uf = $ref_sigla_uf;  
96 - }  
97 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
98 - if ($tmp_obj->detalhe()) {  
99 - $this->ref_sigla_uf = $ref_sigla_uf;  
100 - }  
101 - }  
102 - } else {  
103 - if ($db->CampoUnico("SELECT 1 FROM uf WHERE sigla_uf = '{$ref_sigla_uf}'")) {  
104 $this->ref_sigla_uf = $ref_sigla_uf; 46 $this->ref_sigla_uf = $ref_sigla_uf;
105 - }  
106 - }  
107 } 47 }
108 48
109 if (is_numeric($cod_acervo_editora)) { 49 if (is_numeric($cod_acervo_editora)) {
ieducar/intranet/include/pmieducar/clsPmieducarAcervoIdioma.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarAcervoIdioma extends Model @@ -24,40 +24,10 @@ class clsPmieducarAcervoIdioma extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_idioma, ref_usuario_exc, ref_usuario_cad, nm_idioma, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_acervo_idioma, ref_usuario_exc, ref_usuario_cad, nm_idioma, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
25 25
26 if (is_numeric($ref_usuario_cad)) { 26 if (is_numeric($ref_usuario_cad)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_cad = $ref_usuario_cad;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_cad = $ref_usuario_cad;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
40 $this->ref_usuario_cad = $ref_usuario_cad; 27 $this->ref_usuario_cad = $ref_usuario_cad;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_exc)) { 29 if (is_numeric($ref_usuario_exc)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_exc = $ref_usuario_exc;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
58 $this->ref_usuario_exc = $ref_usuario_exc; 30 $this->ref_usuario_exc = $ref_usuario_exc;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_acervo_idioma)) { 33 if (is_numeric($cod_acervo_idioma)) {
ieducar/intranet/include/pmieducar/clsPmieducarAluno.inc.php
@@ -77,43 +77,11 @@ class clsPmieducarAluno extends Model @@ -77,43 +77,11 @@ class clsPmieducarAluno extends Model
77 a.parentesco_tres, a.autorizado_tres, a.parentesco_quatro, a.autorizado_quatro, a.parentesco_cinco, a.autorizado_cinco, a.url_documento::text'; 77 a.parentesco_tres, a.autorizado_tres, a.parentesco_quatro, a.autorizado_quatro, a.parentesco_cinco, a.autorizado_cinco, a.url_documento::text';
78 78
79 if (is_numeric($ref_usuario_exc)) { 79 if (is_numeric($ref_usuario_exc)) {
80 - if (class_exists('clsPmieducarUsuario')) {  
81 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
82 -  
83 - if (method_exists($tmp_obj, 'existe')) {  
84 - if ($tmp_obj->existe()) {  
85 - $this->ref_usuario_exc = $ref_usuario_exc;  
86 - }  
87 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
88 - if ($tmp_obj->detalhe()) {  
89 - $this->ref_usuario_exc = $ref_usuario_exc;  
90 - }  
91 - }  
92 - } else {  
93 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
94 $this->ref_usuario_exc = $ref_usuario_exc; 80 $this->ref_usuario_exc = $ref_usuario_exc;
95 - }  
96 - }  
97 } 81 }
98 82
99 if (is_numeric($ref_usuario_cad)) { 83 if (is_numeric($ref_usuario_cad)) {
100 - if (class_exists('clsPmieducarUsuario')) {  
101 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
102 -  
103 - if (method_exists($tmp_obj, 'existe')) {  
104 - if ($tmp_obj->existe()) {  
105 - $this->ref_usuario_cad = $ref_usuario_cad;  
106 - }  
107 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
108 - if ($tmp_obj->detalhe()) {  
109 - $this->ref_usuario_cad = $ref_usuario_cad;  
110 - }  
111 - }  
112 - } else {  
113 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
114 $this->ref_usuario_cad = $ref_usuario_cad; 84 $this->ref_usuario_cad = $ref_usuario_cad;
115 - }  
116 - }  
117 } 85 }
118 86
119 if (is_numeric($ref_idpes)) { 87 if (is_numeric($ref_idpes)) {
ieducar/intranet/include/pmieducar/clsPmieducarAlunoBeneficio.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarAlunoBeneficio extends Model @@ -24,40 +24,10 @@ class clsPmieducarAlunoBeneficio extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_aluno_beneficio, ref_usuario_exc, ref_usuario_cad, nm_beneficio, desc_beneficio, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_aluno_beneficio, ref_usuario_exc, ref_usuario_cad, nm_beneficio, desc_beneficio, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_usuario_exc)) { 26 if (is_numeric($ref_usuario_exc)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_exc = $ref_usuario_exc;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_exc = $ref_usuario_exc;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
40 $this->ref_usuario_exc = $ref_usuario_exc; 27 $this->ref_usuario_exc = $ref_usuario_exc;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_aluno_beneficio)) { 33 if (is_numeric($cod_aluno_beneficio)) {
ieducar/intranet/include/pmieducar/clsPmieducarAnoLetivoModulo.inc.php
@@ -37,44 +37,12 @@ class clsPmieducarAnoLetivoModulo extends Model @@ -37,44 +37,12 @@ class clsPmieducarAnoLetivoModulo extends Model
37 $this->_campos_lista = $this->_todos_campos = 'ref_ano, ref_ref_cod_escola, sequencial, ref_cod_modulo, data_inicio, data_fim, dias_letivos'; 37 $this->_campos_lista = $this->_todos_campos = 'ref_ano, ref_ref_cod_escola, sequencial, ref_cod_modulo, data_inicio, data_fim, dias_letivos';
38 38
39 if (is_numeric($ref_cod_modulo)) { 39 if (is_numeric($ref_cod_modulo)) {
40 - if (class_exists('clsPmieducarModulo')) {  
41 - $tmp_obj = new clsPmieducarModulo($ref_cod_modulo);  
42 - if (method_exists($tmp_obj, 'existe')) {  
43 - if ($tmp_obj->existe()) {  
44 - $this->ref_cod_modulo = $ref_cod_modulo;  
45 - }  
46 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
47 - if ($tmp_obj->detalhe()) {  
48 - $this->ref_cod_modulo = $ref_cod_modulo;  
49 - }  
50 - }  
51 - } else {  
52 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.modulo WHERE cod_modulo = '{$ref_cod_modulo}'")) {  
53 $this->ref_cod_modulo = $ref_cod_modulo; 40 $this->ref_cod_modulo = $ref_cod_modulo;
54 - }  
55 - }  
56 } 41 }
57 42
58 if (is_numeric($ref_ref_cod_escola) && is_numeric($ref_ano)) { 43 if (is_numeric($ref_ref_cod_escola) && is_numeric($ref_ano)) {
59 - if (class_exists('clsPmieducarEscolaAnoLetivo')) {  
60 - $tmp_obj = new clsPmieducarEscolaAnoLetivo($ref_ref_cod_escola, $ref_ano);  
61 - if (method_exists($tmp_obj, 'existe')) {  
62 - if ($tmp_obj->existe()) {  
63 - $this->ref_ref_cod_escola = $ref_ref_cod_escola;  
64 - $this->ref_ano = $ref_ano;  
65 - }  
66 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
67 - if ($tmp_obj->detalhe()) {  
68 - $this->ref_ref_cod_escola = $ref_ref_cod_escola;  
69 - $this->ref_ano = $ref_ano;  
70 - }  
71 - }  
72 - } else {  
73 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_ano_letivo WHERE ref_cod_escola = '{$ref_ref_cod_escola}' AND ano = '{$ref_ano}'")) {  
74 $this->ref_ref_cod_escola = $ref_ref_cod_escola; 44 $this->ref_ref_cod_escola = $ref_ref_cod_escola;
75 $this->ref_ano = $ref_ano; 45 $this->ref_ano = $ref_ano;
76 - }  
77 - }  
78 } 46 }
79 47
80 if (is_numeric($sequencial)) { 48 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarArredondamento.inc.php
@@ -21,22 +21,7 @@ class clsPmieducarArredondamento extends Model @@ -21,22 +21,7 @@ class clsPmieducarArredondamento extends Model
21 $this->_campos_lista = $this->_todos_campos = 'ref_cod_curso, sequencial, valor, valor_min, valor_max'; 21 $this->_campos_lista = $this->_todos_campos = 'ref_cod_curso, sequencial, valor, valor_min, valor_max';
22 22
23 if (is_numeric($ref_cod_curso)) { 23 if (is_numeric($ref_cod_curso)) {
24 - if (class_exists('clsPmieducarCurso')) {  
25 - $tmp_obj = new clsPmieducarCurso($ref_cod_curso);  
26 - if (method_exists($tmp_obj, 'existe')) {  
27 - if ($tmp_obj->existe()) {  
28 - $this->ref_cod_curso = $ref_cod_curso;  
29 - }  
30 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
31 - if ($tmp_obj->detalhe()) {  
32 - $this->ref_cod_curso = $ref_cod_curso;  
33 - }  
34 - }  
35 - } else {  
36 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.curso WHERE cod_curso = '{$ref_cod_curso}'")) {  
37 $this->ref_cod_curso = $ref_cod_curso; 24 $this->ref_cod_curso = $ref_cod_curso;
38 - }  
39 - }  
40 } 25 }
41 26
42 if (is_numeric($sequencial)) { 27 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarAvaliacao.inc.php
@@ -29,67 +29,16 @@ class clsPmieducarAvaliacao extends Model @@ -29,67 +29,16 @@ class clsPmieducarAvaliacao extends Model
29 $this->_campos_lista = $this->_todos_campos = 'cod_avaliacao, disc_ref_ref_cod_serie, disc_ref_ref_cod_escola, disc_ref_ref_cod_disciplina, disc_ref_ref_cod_turma, ref_usuario_exc, ref_usuario_cad, titulo, descricao, aplicada, data_cadastro, data_exclusao, ativo'; 29 $this->_campos_lista = $this->_todos_campos = 'cod_avaliacao, disc_ref_ref_cod_serie, disc_ref_ref_cod_escola, disc_ref_ref_cod_disciplina, disc_ref_ref_cod_turma, ref_usuario_exc, ref_usuario_cad, titulo, descricao, aplicada, data_cadastro, data_exclusao, ativo';
30 30
31 if (is_numeric($ref_usuario_exc)) { 31 if (is_numeric($ref_usuario_exc)) {
32 - if (class_exists('clsPmieducarUsuario')) {  
33 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
34 - if (method_exists($tmp_obj, 'existe')) {  
35 - if ($tmp_obj->existe()) {  
36 - $this->ref_usuario_exc = $ref_usuario_exc;  
37 - }  
38 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
39 - if ($tmp_obj->detalhe()) {  
40 - $this->ref_usuario_exc = $ref_usuario_exc;  
41 - }  
42 - }  
43 - } else {  
44 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
45 $this->ref_usuario_exc = $ref_usuario_exc; 32 $this->ref_usuario_exc = $ref_usuario_exc;
46 - }  
47 - }  
48 } 33 }
49 if (is_numeric($ref_usuario_cad)) { 34 if (is_numeric($ref_usuario_cad)) {
50 - if (class_exists('clsPmieducarUsuario')) {  
51 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
52 - if (method_exists($tmp_obj, 'existe')) {  
53 - if ($tmp_obj->existe()) {  
54 - $this->ref_usuario_cad = $ref_usuario_cad;  
55 - }  
56 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
57 - if ($tmp_obj->detalhe()) {  
58 - $this->ref_usuario_cad = $ref_usuario_cad;  
59 - }  
60 - }  
61 - } else {  
62 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
63 $this->ref_usuario_cad = $ref_usuario_cad; 35 $this->ref_usuario_cad = $ref_usuario_cad;
64 - }  
65 - }  
66 } 36 }
67 if (is_numeric($disc_ref_ref_cod_turma) && is_numeric($disc_ref_ref_cod_disciplina) && is_numeric($disc_ref_ref_cod_escola) && is_numeric($disc_ref_ref_cod_serie)) { 37 if (is_numeric($disc_ref_ref_cod_turma) && is_numeric($disc_ref_ref_cod_disciplina) && is_numeric($disc_ref_ref_cod_escola) && is_numeric($disc_ref_ref_cod_serie)) {
68 - if (class_exists('clsPmieducarTurmaDisciplina')) {  
69 - $tmp_obj = new clsPmieducarTurmaDisciplina($disc_ref_ref_cod_turma, $disc_ref_ref_cod_disciplina, $disc_ref_ref_cod_escola, $disc_ref_ref_cod_serie);  
70 - if (method_exists($tmp_obj, 'existe')) {  
71 - if ($tmp_obj->existe()) {  
72 - $this->disc_ref_ref_cod_turma = $disc_ref_ref_cod_turma;  
73 - $this->disc_ref_ref_cod_disciplina = $disc_ref_ref_cod_disciplina;  
74 - $this->disc_ref_ref_cod_escola = $disc_ref_ref_cod_escola;  
75 - $this->disc_ref_ref_cod_serie = $disc_ref_ref_cod_serie;  
76 - }  
77 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
78 - if ($tmp_obj->detalhe()) {  
79 - $this->disc_ref_ref_cod_turma = $disc_ref_ref_cod_turma;  
80 - $this->disc_ref_ref_cod_disciplina = $disc_ref_ref_cod_disciplina;  
81 - $this->disc_ref_ref_cod_escola = $disc_ref_ref_cod_escola;  
82 - $this->disc_ref_ref_cod_serie = $disc_ref_ref_cod_serie;  
83 - }  
84 - }  
85 - } else {  
86 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.turma_disciplina WHERE ref_cod_turma = '{$disc_ref_ref_cod_turma}' AND ref_cod_disciplina = '{$disc_ref_ref_cod_disciplina}' AND ref_cod_escola = '{$disc_ref_ref_cod_escola}' AND ref_cod_serie = '{$disc_ref_ref_cod_serie}'")) {  
87 $this->disc_ref_ref_cod_turma = $disc_ref_ref_cod_turma; 38 $this->disc_ref_ref_cod_turma = $disc_ref_ref_cod_turma;
88 $this->disc_ref_ref_cod_disciplina = $disc_ref_ref_cod_disciplina; 39 $this->disc_ref_ref_cod_disciplina = $disc_ref_ref_cod_disciplina;
89 $this->disc_ref_ref_cod_escola = $disc_ref_ref_cod_escola; 40 $this->disc_ref_ref_cod_escola = $disc_ref_ref_cod_escola;
90 $this->disc_ref_ref_cod_serie = $disc_ref_ref_cod_serie; 41 $this->disc_ref_ref_cod_serie = $disc_ref_ref_cod_serie;
91 - }  
92 - }  
93 } 42 }
94 43
95 if (is_numeric($cod_avaliacao)) { 44 if (is_numeric($cod_avaliacao)) {
ieducar/intranet/include/pmieducar/clsPmieducarAvaliacaoDesempenho.inc.php
@@ -26,61 +26,14 @@ class clsPmieducarAvaliacaoDesempenho extends Model @@ -26,61 +26,14 @@ class clsPmieducarAvaliacaoDesempenho extends Model
26 $this->_campos_lista = $this->_todos_campos = 'sequencial, ref_cod_servidor, ref_ref_cod_instituicao, ref_usuario_exc, ref_usuario_cad, descricao, data_cadastro, data_exclusao, ativo, titulo_avaliacao'; 26 $this->_campos_lista = $this->_todos_campos = 'sequencial, ref_cod_servidor, ref_ref_cod_instituicao, ref_usuario_exc, ref_usuario_cad, descricao, data_cadastro, data_exclusao, ativo, titulo_avaliacao';
27 27
28 if (is_numeric($ref_usuario_exc)) { 28 if (is_numeric($ref_usuario_exc)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_exc = $ref_usuario_exc;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_exc = $ref_usuario_exc;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
42 $this->ref_usuario_exc = $ref_usuario_exc; 29 $this->ref_usuario_exc = $ref_usuario_exc;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) { 34 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) {
65 - if (class_exists('clsPmieducarServidor')) {  
66 - $tmp_obj = new clsPmieducarServidor($ref_cod_servidor, null, null, null, null, null, null, $ref_ref_cod_instituicao);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_cod_servidor = $ref_cod_servidor;  
70 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
71 - }  
72 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
73 - if ($tmp_obj->detalhe()) {  
74 - $this->ref_cod_servidor = $ref_cod_servidor;  
75 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
76 - }  
77 - }  
78 - } else {  
79 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.servidor WHERE cod_servidor = '{$ref_cod_servidor}' AND ref_cod_instituicao = '{$ref_ref_cod_instituicao}'")) {  
80 $this->ref_cod_servidor = $ref_cod_servidor; 35 $this->ref_cod_servidor = $ref_cod_servidor;
81 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao; 36 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;
82 - }  
83 - }  
84 } 37 }
85 38
86 if (is_numeric($sequencial)) { 39 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarBiblioteca.inc.php
@@ -63,40 +63,10 @@ class clsPmieducarBiblioteca extends Model @@ -63,40 +63,10 @@ class clsPmieducarBiblioteca extends Model
63 bloqueia_emprestimo_em_atraso'; 63 bloqueia_emprestimo_em_atraso';
64 64
65 if (is_numeric($ref_cod_instituicao)) { 65 if (is_numeric($ref_cod_instituicao)) {
66 - if (class_exists('clsPmieducarInstituicao')) {  
67 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
68 - if (method_exists($tmp_obj, 'existe')) {  
69 - if ($tmp_obj->existe()) {  
70 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
71 - }  
72 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
73 - if ($tmp_obj->detalhe()) {  
74 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
75 - }  
76 - }  
77 - } else {  
78 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
79 $this->ref_cod_instituicao = $ref_cod_instituicao; 66 $this->ref_cod_instituicao = $ref_cod_instituicao;
80 - }  
81 - }  
82 } 67 }
83 if (is_numeric($ref_cod_escola)) { 68 if (is_numeric($ref_cod_escola)) {
84 - if (class_exists('clsPmieducarEscola')) {  
85 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
86 - if (method_exists($tmp_obj, 'existe')) {  
87 - if ($tmp_obj->existe()) {  
88 - $this->ref_cod_escola = $ref_cod_escola;  
89 - }  
90 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
91 - if ($tmp_obj->detalhe()) {  
92 - $this->ref_cod_escola = $ref_cod_escola;  
93 - }  
94 - }  
95 - } else {  
96 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
97 $this->ref_cod_escola = $ref_cod_escola; 69 $this->ref_cod_escola = $ref_cod_escola;
98 - }  
99 - }  
100 } 70 }
101 71
102 if (is_numeric($cod_biblioteca)) { 72 if (is_numeric($cod_biblioteca)) {
ieducar/intranet/include/pmieducar/clsPmieducarBibliotecaDia.inc.php
@@ -18,22 +18,7 @@ class clsPmieducarBibliotecaDia extends Model @@ -18,22 +18,7 @@ class clsPmieducarBibliotecaDia extends Model
18 $this->_campos_lista = $this->_todos_campos = 'ref_cod_biblioteca, dia'; 18 $this->_campos_lista = $this->_todos_campos = 'ref_cod_biblioteca, dia';
19 19
20 if (is_numeric($ref_cod_biblioteca)) { 20 if (is_numeric($ref_cod_biblioteca)) {
21 - if (class_exists('clsPmieducarBiblioteca')) {  
22 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
23 - if (method_exists($tmp_obj, 'existe')) {  
24 - if ($tmp_obj->existe()) {  
25 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
26 - }  
27 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
28 - if ($tmp_obj->detalhe()) {  
29 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
30 - }  
31 - }  
32 - } else {  
33 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
34 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 21 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
35 - }  
36 - }  
37 } 22 }
38 23
39 if (is_numeric($dia)) { 24 if (is_numeric($dia)) {
ieducar/intranet/include/pmieducar/clsPmieducarBibliotecaFeriados.inc.php
@@ -24,22 +24,7 @@ class clsPmieducarBibliotecaFeriados extends Model @@ -24,22 +24,7 @@ class clsPmieducarBibliotecaFeriados extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_feriado, ref_cod_biblioteca, nm_feriado, descricao, data_feriado, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_feriado, ref_cod_biblioteca, nm_feriado, descricao, data_feriado, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_cod_biblioteca)) { 26 if (is_numeric($ref_cod_biblioteca)) {
27 - if (class_exists('clsPmieducarBiblioteca')) {  
28 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
40 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 27 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
41 - }  
42 - }  
43 } 28 }
44 29
45 if (is_numeric($cod_feriado)) { 30 if (is_numeric($cod_feriado)) {
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAnoLetivo.inc.php
@@ -24,58 +24,13 @@ class clsPmieducarCalendarioAnoLetivo extends Model @@ -24,58 +24,13 @@ class clsPmieducarCalendarioAnoLetivo extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_ano_letivo, ref_cod_escola, ref_usuario_exc, ref_usuario_cad, ano, data_cadastra, data_exclusao, ativo';/*, inicio_ano_letivo, termino_ano_letivo";*/ 24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_ano_letivo, ref_cod_escola, ref_usuario_exc, ref_usuario_cad, ano, data_cadastra, data_exclusao, ativo';/*, inicio_ano_letivo, termino_ano_letivo";*/
25 25
26 if (is_numeric($ref_cod_escola)) { 26 if (is_numeric($ref_cod_escola)) {
27 - if (class_exists('clsPmieducarEscola')) {  
28 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_cod_escola = $ref_cod_escola;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_cod_escola = $ref_cod_escola;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
40 $this->ref_cod_escola = $ref_cod_escola; 27 $this->ref_cod_escola = $ref_cod_escola;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_exc)) { 29 if (is_numeric($ref_usuario_exc)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_exc = $ref_usuario_exc;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
58 $this->ref_usuario_exc = $ref_usuario_exc; 30 $this->ref_usuario_exc = $ref_usuario_exc;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_usuario_cad)) { 32 if (is_numeric($ref_usuario_cad)) {
63 - if (class_exists('clsPmieducarUsuario')) {  
64 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_usuario_cad = $ref_usuario_cad;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
76 $this->ref_usuario_cad = $ref_usuario_cad; 33 $this->ref_usuario_cad = $ref_usuario_cad;
77 - }  
78 - }  
79 } 34 }
80 35
81 if (is_numeric($cod_calendario_ano_letivo)) { 36 if (is_numeric($cod_calendario_ano_letivo)) {
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAnotacao.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarCalendarioAnotacao extends Model @@ -24,40 +24,10 @@ class clsPmieducarCalendarioAnotacao extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_anotacao, ref_usuario_exc, ref_usuario_cad, nm_anotacao, descricao, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_anotacao, ref_usuario_exc, ref_usuario_cad, nm_anotacao, descricao, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_usuario_exc)) { 26 if (is_numeric($ref_usuario_exc)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_exc = $ref_usuario_exc;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_exc = $ref_usuario_exc;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
40 $this->ref_usuario_exc = $ref_usuario_exc; 27 $this->ref_usuario_exc = $ref_usuario_exc;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_calendario_anotacao)) { 33 if (is_numeric($cod_calendario_anotacao)) {
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioAtividade.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarCalendarioAtividade extends Model @@ -24,40 +24,10 @@ class clsPmieducarCalendarioAtividade extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_atividade, ref_usuario_exc, ref_usuario_cad, nm_atividade, descricao, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_calendario_atividade, ref_usuario_exc, ref_usuario_cad, nm_atividade, descricao, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_usuario_exc)) { 26 if (is_numeric($ref_usuario_exc)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_exc = $ref_usuario_exc;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_exc = $ref_usuario_exc;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
40 $this->ref_usuario_exc = $ref_usuario_exc; 27 $this->ref_usuario_exc = $ref_usuario_exc;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_calendario_atividade)) { 33 if (is_numeric($cod_calendario_atividade)) {
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDia.inc.php
@@ -26,78 +26,18 @@ class clsPmieducarCalendarioDia extends Model @@ -26,78 +26,18 @@ class clsPmieducarCalendarioDia extends Model
26 $this->_campos_lista = $this->_todos_campos = 'ref_cod_calendario_ano_letivo, mes, dia, ref_usuario_exc, ref_usuario_cad, ref_cod_calendario_dia_motivo, descricao, data_cadastro, data_exclusao, ativo'; 26 $this->_campos_lista = $this->_todos_campos = 'ref_cod_calendario_ano_letivo, mes, dia, ref_usuario_exc, ref_usuario_cad, ref_cod_calendario_dia_motivo, descricao, data_cadastro, data_exclusao, ativo';
27 27
28 if (is_numeric($ref_cod_calendario_dia_motivo)) { 28 if (is_numeric($ref_cod_calendario_dia_motivo)) {
29 - if (class_exists('clsPmieducarCalendarioDiaMotivo')) {  
30 - $tmp_obj = new clsPmieducarCalendarioDiaMotivo($ref_cod_calendario_dia_motivo);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.calendario_dia_motivo WHERE cod_calendario_dia_motivo = '{$ref_cod_calendario_dia_motivo}'")) {  
42 $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo; 29 $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo;
43 - }  
44 - }  
45 } elseif ($ref_cod_calendario_dia_motivo = 'NULL') { 30 } elseif ($ref_cod_calendario_dia_motivo = 'NULL') {
46 $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo; 31 $this->ref_cod_calendario_dia_motivo = $ref_cod_calendario_dia_motivo;
47 } 32 }
48 if (is_numeric($ref_usuario_exc)) { 33 if (is_numeric($ref_usuario_exc)) {
49 - if (class_exists('clsPmieducarUsuario')) {  
50 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
51 - if (method_exists($tmp_obj, 'existe')) {  
52 - if ($tmp_obj->existe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
56 - if ($tmp_obj->detalhe()) {  
57 - $this->ref_usuario_exc = $ref_usuario_exc;  
58 - }  
59 - }  
60 - } else {  
61 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
62 $this->ref_usuario_exc = $ref_usuario_exc; 34 $this->ref_usuario_exc = $ref_usuario_exc;
63 - }  
64 - }  
65 } 35 }
66 if (is_numeric($ref_usuario_cad)) { 36 if (is_numeric($ref_usuario_cad)) {
67 - if (class_exists('clsPmieducarUsuario')) {  
68 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
69 - if (method_exists($tmp_obj, 'existe')) {  
70 - if ($tmp_obj->existe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
74 - if ($tmp_obj->detalhe()) {  
75 - $this->ref_usuario_cad = $ref_usuario_cad;  
76 - }  
77 - }  
78 - } else {  
79 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
80 $this->ref_usuario_cad = $ref_usuario_cad; 37 $this->ref_usuario_cad = $ref_usuario_cad;
81 - }  
82 - }  
83 } 38 }
84 if (is_numeric($ref_cod_calendario_ano_letivo)) { 39 if (is_numeric($ref_cod_calendario_ano_letivo)) {
85 - if (class_exists('clsPmieducarCalendarioAnoLetivo')) {  
86 - $tmp_obj = new clsPmieducarCalendarioAnoLetivo($ref_cod_calendario_ano_letivo);  
87 - if (method_exists($tmp_obj, 'existe')) {  
88 - if ($tmp_obj->existe()) {  
89 - $this->ref_cod_calendario_ano_letivo = $ref_cod_calendario_ano_letivo;  
90 - }  
91 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
92 - if ($tmp_obj->detalhe()) {  
93 - $this->ref_cod_calendario_ano_letivo = $ref_cod_calendario_ano_letivo;  
94 - }  
95 - }  
96 - } else {  
97 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.calendario_ano_letivo WHERE cod_calendario_ano_letivo = '{$ref_cod_calendario_ano_letivo}'")) {  
98 $this->ref_cod_calendario_ano_letivo = $ref_cod_calendario_ano_letivo; 40 $this->ref_cod_calendario_ano_letivo = $ref_cod_calendario_ano_letivo;
99 - }  
100 - }  
101 } 41 }
102 42
103 if (is_numeric($mes)) { 43 if (is_numeric($mes)) {
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDiaAnotacao.inc.php
@@ -20,46 +20,12 @@ class clsPmieducarCalendarioDiaAnotacao extends Model @@ -20,46 +20,12 @@ class clsPmieducarCalendarioDiaAnotacao extends Model
20 $this->_campos_lista = $this->_todos_campos = 'ref_dia, ref_mes, ref_ref_cod_calendario_ano_letivo, ref_cod_calendario_anotacao'; 20 $this->_campos_lista = $this->_todos_campos = 'ref_dia, ref_mes, ref_ref_cod_calendario_ano_letivo, ref_cod_calendario_anotacao';
21 21
22 if (is_numeric($ref_cod_calendario_anotacao)) { 22 if (is_numeric($ref_cod_calendario_anotacao)) {
23 - if (class_exists('clsPmieducarCalendarioAnotacao')) {  
24 - $tmp_obj = new clsPmieducarCalendarioAnotacao($ref_cod_calendario_anotacao);  
25 - if (method_exists($tmp_obj, 'existe')) {  
26 - if ($tmp_obj->existe()) {  
27 - $this->ref_cod_calendario_anotacao = $ref_cod_calendario_anotacao;  
28 - }  
29 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
30 - if ($tmp_obj->detalhe()) {  
31 - $this->ref_cod_calendario_anotacao = $ref_cod_calendario_anotacao;  
32 - }  
33 - }  
34 - } else {  
35 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.calendario_anotacao WHERE cod_calendario_anotacao = '{$ref_cod_calendario_anotacao}'")) {  
36 $this->ref_cod_calendario_anotacao = $ref_cod_calendario_anotacao; 23 $this->ref_cod_calendario_anotacao = $ref_cod_calendario_anotacao;
37 - }  
38 - }  
39 } 24 }
40 if (is_numeric($ref_ref_cod_calendario_ano_letivo) && is_numeric($ref_mes) && is_numeric($ref_dia)) { 25 if (is_numeric($ref_ref_cod_calendario_ano_letivo) && is_numeric($ref_mes) && is_numeric($ref_dia)) {
41 - if (class_exists('clsPmieducarCalendarioDia')) {  
42 - $tmp_obj = new clsPmieducarCalendarioDia($ref_ref_cod_calendario_ano_letivo, $ref_mes, $ref_dia);  
43 - if (method_exists($tmp_obj, 'existe')) {  
44 - if ($tmp_obj->existe()) {  
45 - $this->ref_ref_cod_calendario_ano_letivo = $ref_ref_cod_calendario_ano_letivo;  
46 - $this->ref_mes = $ref_mes;  
47 - $this->ref_dia = $ref_dia;  
48 - }  
49 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
50 - if ($tmp_obj->detalhe()) {  
51 - $this->ref_ref_cod_calendario_ano_letivo = $ref_ref_cod_calendario_ano_letivo;  
52 - $this->ref_mes = $ref_mes;  
53 - $this->ref_dia = $ref_dia;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.calendario_dia WHERE ref_cod_calendario_ano_letivo = '{$ref_ref_cod_calendario_ano_letivo}' AND mes = '{$ref_mes}' AND dia = '{$ref_dia}'")) {  
58 $this->ref_ref_cod_calendario_ano_letivo = $ref_ref_cod_calendario_ano_letivo; 26 $this->ref_ref_cod_calendario_ano_letivo = $ref_ref_cod_calendario_ano_letivo;
59 $this->ref_mes = $ref_mes; 27 $this->ref_mes = $ref_mes;
60 $this->ref_dia = $ref_dia; 28 $this->ref_dia = $ref_dia;
61 - }  
62 - }  
63 } 29 }
64 } 30 }
65 31
ieducar/intranet/include/pmieducar/clsPmieducarCalendarioDiaMotivo.inc.php
@@ -28,58 +28,13 @@ class clsPmieducarCalendarioDiaMotivo extends Model @@ -28,58 +28,13 @@ class clsPmieducarCalendarioDiaMotivo extends Model
28 $this->_campos_lista = $this->_todos_campos = 'cdm.cod_calendario_dia_motivo, cdm.ref_cod_escola, cdm.ref_usuario_exc, cdm.ref_usuario_cad, cdm.sigla, cdm.descricao, cdm.tipo, cdm.data_cadastro, cdm.data_exclusao, cdm.ativo, cdm.nm_motivo'; 28 $this->_campos_lista = $this->_todos_campos = 'cdm.cod_calendario_dia_motivo, cdm.ref_cod_escola, cdm.ref_usuario_exc, cdm.ref_usuario_cad, cdm.sigla, cdm.descricao, cdm.tipo, cdm.data_cadastro, cdm.data_exclusao, cdm.ativo, cdm.nm_motivo';
29 29
30 if (is_numeric($ref_cod_escola)) { 30 if (is_numeric($ref_cod_escola)) {
31 - if (class_exists('clsPmieducarEscola')) {  
32 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
33 - if (method_exists($tmp_obj, 'existe')) {  
34 - if ($tmp_obj->existe()) {  
35 - $this->ref_cod_escola = $ref_cod_escola;  
36 - }  
37 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
38 - if ($tmp_obj->detalhe()) {  
39 - $this->ref_cod_escola = $ref_cod_escola;  
40 - }  
41 - }  
42 - } else {  
43 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
44 $this->ref_cod_escola = $ref_cod_escola; 31 $this->ref_cod_escola = $ref_cod_escola;
45 - }  
46 - }  
47 } 32 }
48 if (is_numeric($ref_usuario_exc)) { 33 if (is_numeric($ref_usuario_exc)) {
49 - if (class_exists('clsPmieducarUsuario')) {  
50 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
51 - if (method_exists($tmp_obj, 'existe')) {  
52 - if ($tmp_obj->existe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
56 - if ($tmp_obj->detalhe()) {  
57 - $this->ref_usuario_exc = $ref_usuario_exc;  
58 - }  
59 - }  
60 - } else {  
61 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
62 $this->ref_usuario_exc = $ref_usuario_exc; 34 $this->ref_usuario_exc = $ref_usuario_exc;
63 - }  
64 - }  
65 } 35 }
66 if (is_numeric($ref_usuario_cad)) { 36 if (is_numeric($ref_usuario_cad)) {
67 - if (class_exists('clsPmieducarUsuario')) {  
68 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
69 - if (method_exists($tmp_obj, 'existe')) {  
70 - if ($tmp_obj->existe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
74 - if ($tmp_obj->detalhe()) {  
75 - $this->ref_usuario_cad = $ref_usuario_cad;  
76 - }  
77 - }  
78 - } else {  
79 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
80 $this->ref_usuario_cad = $ref_usuario_cad; 37 $this->ref_usuario_cad = $ref_usuario_cad;
81 - }  
82 - }  
83 } 38 }
84 39
85 if (is_numeric($cod_calendario_dia_motivo)) { 40 if (is_numeric($cod_calendario_dia_motivo)) {
ieducar/intranet/include/pmieducar/clsPmieducarCategoriaNivel.inc.php
@@ -23,40 +23,10 @@ class clsPmieducarCategoriaNivel extends Model @@ -23,40 +23,10 @@ class clsPmieducarCategoriaNivel extends Model
23 $this->_campos_lista = $this->_todos_campos = 'cod_categoria_nivel, ref_usuario_exc, ref_usuario_cad, nm_categoria_nivel, data_cadastro, data_exclusao, ativo'; 23 $this->_campos_lista = $this->_todos_campos = 'cod_categoria_nivel, ref_usuario_exc, ref_usuario_cad, nm_categoria_nivel, data_cadastro, data_exclusao, ativo';
24 24
25 if (is_numeric($ref_usuario_cad)) { 25 if (is_numeric($ref_usuario_cad)) {
26 - if (class_exists('clsPmieducarUsuario')) {  
27 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
28 - if (method_exists($tmp_obj, 'existe')) {  
29 - if ($tmp_obj->existe()) {  
30 - $this->ref_usuario_cad = $ref_usuario_cad;  
31 - }  
32 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
33 - if ($tmp_obj->detalhe()) {  
34 - $this->ref_usuario_cad = $ref_usuario_cad;  
35 - }  
36 - }  
37 - } else {  
38 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
39 $this->ref_usuario_cad = $ref_usuario_cad; 26 $this->ref_usuario_cad = $ref_usuario_cad;
40 - }  
41 - }  
42 } 27 }
43 if (is_numeric($ref_usuario_exc)) { 28 if (is_numeric($ref_usuario_exc)) {
44 - if (class_exists('clsPmieducarUsuario')) {  
45 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
46 - if (method_exists($tmp_obj, 'existe')) {  
47 - if ($tmp_obj->existe()) {  
48 - $this->ref_usuario_exc = $ref_usuario_exc;  
49 - }  
50 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
51 - if ($tmp_obj->detalhe()) {  
52 - $this->ref_usuario_exc = $ref_usuario_exc;  
53 - }  
54 - }  
55 - } else {  
56 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
57 $this->ref_usuario_exc = $ref_usuario_exc; 29 $this->ref_usuario_exc = $ref_usuario_exc;
58 - }  
59 - }  
60 } 30 }
61 31
62 if (is_numeric($cod_categoria_nivel)) { 32 if (is_numeric($cod_categoria_nivel)) {
ieducar/intranet/include/pmieducar/clsPmieducarCliente.inc.php
@@ -36,58 +36,13 @@ class clsPmieducarCliente extends Model @@ -36,58 +36,13 @@ class clsPmieducarCliente extends Model
36 $this->_campos_lista = $this->_todos_campos = 'c.cod_cliente, c.ref_usuario_exc, c.ref_usuario_cad, c.ref_idpes, c.login, c.senha, c.data_cadastro, c.data_exclusao, c.ativo, c.observacoes'; 36 $this->_campos_lista = $this->_todos_campos = 'c.cod_cliente, c.ref_usuario_exc, c.ref_usuario_cad, c.ref_idpes, c.login, c.senha, c.data_cadastro, c.data_exclusao, c.ativo, c.observacoes';
37 37
38 if (is_numeric($ref_usuario_cad)) { 38 if (is_numeric($ref_usuario_cad)) {
39 - if (class_exists('clsPmieducarUsuario')) {  
40 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
41 - if (method_exists($tmp_obj, 'existe')) {  
42 - if ($tmp_obj->existe()) {  
43 - $this->ref_usuario_cad = $ref_usuario_cad;  
44 - }  
45 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
46 - if ($tmp_obj->detalhe()) {  
47 - $this->ref_usuario_cad = $ref_usuario_cad;  
48 - }  
49 - }  
50 - } else {  
51 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
52 $this->ref_usuario_cad = $ref_usuario_cad; 39 $this->ref_usuario_cad = $ref_usuario_cad;
53 - }  
54 - }  
55 } 40 }
56 if (is_numeric($ref_usuario_exc)) { 41 if (is_numeric($ref_usuario_exc)) {
57 - if (class_exists('clsPmieducarUsuario')) {  
58 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
59 - if (method_exists($tmp_obj, 'existe')) {  
60 - if ($tmp_obj->existe()) {  
61 - $this->ref_usuario_exc = $ref_usuario_exc;  
62 - }  
63 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
64 - if ($tmp_obj->detalhe()) {  
65 - $this->ref_usuario_exc = $ref_usuario_exc;  
66 - }  
67 - }  
68 - } else {  
69 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
70 $this->ref_usuario_exc = $ref_usuario_exc; 42 $this->ref_usuario_exc = $ref_usuario_exc;
71 - }  
72 - }  
73 } 43 }
74 if (is_numeric($ref_idpes)) { 44 if (is_numeric($ref_idpes)) {
75 - if (class_exists('clsCadastroFisica')) {  
76 - $tmp_obj = new clsCadastroFisica($ref_idpes);  
77 - if (method_exists($tmp_obj, 'existe')) {  
78 - if ($tmp_obj->existe()) {  
79 - $this->ref_idpes = $ref_idpes;  
80 - }  
81 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
82 - if ($tmp_obj->detalhe()) {  
83 - $this->ref_idpes = $ref_idpes;  
84 - }  
85 - }  
86 - } else {  
87 - if ($db->CampoUnico("SELECT 1 FROM cadastro.fisica WHERE idpes = '{$ref_idpes}'")) {  
88 $this->ref_idpes = $ref_idpes; 45 $this->ref_idpes = $ref_idpes;
89 - }  
90 - }  
91 } 46 }
92 47
93 if (is_numeric($cod_cliente)) { 48 if (is_numeric($cod_cliente)) {
ieducar/intranet/include/pmieducar/clsPmieducarClienteSuspensao.inc.php
@@ -24,76 +24,16 @@ class clsPmieducarClienteSuspensao extends Model @@ -24,76 +24,16 @@ class clsPmieducarClienteSuspensao extends Model
24 $this->_campos_lista = $this->_todos_campos = 'sequencial, ref_cod_cliente, ref_cod_motivo_suspensao, ref_usuario_libera, ref_usuario_suspende, dias, data_suspensao, data_liberacao'; 24 $this->_campos_lista = $this->_todos_campos = 'sequencial, ref_cod_cliente, ref_cod_motivo_suspensao, ref_usuario_libera, ref_usuario_suspende, dias, data_suspensao, data_liberacao';
25 25
26 if (is_numeric($ref_usuario_suspende)) { 26 if (is_numeric($ref_usuario_suspende)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_suspende);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_suspende = $ref_usuario_suspende;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_suspende = $ref_usuario_suspende;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_suspende}'")) {  
40 $this->ref_usuario_suspende = $ref_usuario_suspende; 27 $this->ref_usuario_suspende = $ref_usuario_suspende;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_libera)) { 29 if (is_numeric($ref_usuario_libera)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_libera);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_libera = $ref_usuario_libera;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_libera = $ref_usuario_libera;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_libera}'")) {  
58 $this->ref_usuario_libera = $ref_usuario_libera; 30 $this->ref_usuario_libera = $ref_usuario_libera;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_cod_motivo_suspensao)) { 32 if (is_numeric($ref_cod_motivo_suspensao)) {
63 - if (class_exists('clsPmieducarMotivoSuspensao')) {  
64 - $tmp_obj = new clsPmieducarMotivoSuspensao($ref_cod_motivo_suspensao);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_cod_motivo_suspensao = $ref_cod_motivo_suspensao;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_cod_motivo_suspensao = $ref_cod_motivo_suspensao;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.motivo_suspensao WHERE cod_motivo_suspensao = '{$ref_cod_motivo_suspensao}'")) {  
76 $this->ref_cod_motivo_suspensao = $ref_cod_motivo_suspensao; 33 $this->ref_cod_motivo_suspensao = $ref_cod_motivo_suspensao;
77 - }  
78 - }  
79 } 34 }
80 if (is_numeric($ref_cod_cliente)) { 35 if (is_numeric($ref_cod_cliente)) {
81 - if (class_exists('clsPmieducarCliente')) {  
82 - $tmp_obj = new clsPmieducarCliente($ref_cod_cliente);  
83 - if (method_exists($tmp_obj, 'existe')) {  
84 - if ($tmp_obj->existe()) {  
85 - $this->ref_cod_cliente = $ref_cod_cliente;  
86 - }  
87 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
88 - if ($tmp_obj->detalhe()) {  
89 - $this->ref_cod_cliente = $ref_cod_cliente;  
90 - }  
91 - }  
92 - } else {  
93 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.cliente WHERE cod_cliente = '{$ref_cod_cliente}'")) {  
94 $this->ref_cod_cliente = $ref_cod_cliente; 36 $this->ref_cod_cliente = $ref_cod_cliente;
95 - }  
96 - }  
97 } 37 }
98 38
99 if (is_numeric($sequencial)) { 39 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipo.inc.php
@@ -25,58 +25,13 @@ class clsPmieducarClienteTipo extends Model @@ -25,58 +25,13 @@ class clsPmieducarClienteTipo extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_cliente_tipo, ref_cod_biblioteca, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, data_cadastro, data_exclusao, ativo'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_cliente_tipo, ref_cod_biblioteca, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, data_cadastro, data_exclusao, ativo';
26 26
27 if (is_numeric($ref_cod_biblioteca)) { 27 if (is_numeric($ref_cod_biblioteca)) {
28 - if (class_exists('clsPmieducarBiblioteca')) {  
29 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
41 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 28 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 if (is_numeric($ref_usuario_cad)) { 33 if (is_numeric($ref_usuario_cad)) {
64 - if (class_exists('clsPmieducarUsuario')) {  
65 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
66 - if (method_exists($tmp_obj, 'existe')) {  
67 - if ($tmp_obj->existe()) {  
68 - $this->ref_usuario_cad = $ref_usuario_cad;  
69 - }  
70 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
71 - if ($tmp_obj->detalhe()) {  
72 - $this->ref_usuario_cad = $ref_usuario_cad;  
73 - }  
74 - }  
75 - } else {  
76 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
77 $this->ref_usuario_cad = $ref_usuario_cad; 34 $this->ref_usuario_cad = $ref_usuario_cad;
78 - }  
79 - }  
80 } 35 }
81 36
82 if (is_numeric($cod_cliente_tipo)) { 37 if (is_numeric($cod_cliente_tipo)) {
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipoCliente.inc.php
@@ -32,41 +32,11 @@ class clsPmieducarClienteTipoCliente extends Model @@ -32,41 +32,11 @@ class clsPmieducarClienteTipoCliente extends Model
32 $this->_campos_lista = $this->_todos_campos = 'ctc.ref_cod_cliente_tipo, ctc.ref_cod_cliente, ctc.data_cadastro, ctc.data_exclusao, ctc.ref_usuario_cad, ctc.ref_usuario_exc, ctc.ativo'; 32 $this->_campos_lista = $this->_todos_campos = 'ctc.ref_cod_cliente_tipo, ctc.ref_cod_cliente, ctc.data_cadastro, ctc.data_exclusao, ctc.ref_usuario_cad, ctc.ref_usuario_exc, ctc.ativo';
33 33
34 if (is_numeric($ref_cod_cliente_tipo)) { 34 if (is_numeric($ref_cod_cliente_tipo)) {
35 - if (class_exists('clsPmieducarClienteTipo')) {  
36 - $tmp_obj = new clsPmieducarClienteTipo($ref_cod_cliente_tipo);  
37 - if (method_exists($tmp_obj, 'existe')) {  
38 - if ($tmp_obj->existe()) {  
39 - $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;  
40 - }  
41 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
42 - if ($tmp_obj->detalhe()) {  
43 - $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;  
44 - }  
45 - }  
46 - } else {  
47 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.cliente_tipo WHERE cod_cliente_tipo = '{$ref_cod_cliente_tipo}'")) {  
48 $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo; 35 $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;
49 - }  
50 - }  
51 } 36 }
52 37
53 if (is_numeric($ref_cod_cliente)) { 38 if (is_numeric($ref_cod_cliente)) {
54 - if (class_exists('clsPmieducarCliente')) {  
55 - $tmp_obj = new clsPmieducarCliente($ref_cod_cliente);  
56 - if (method_exists($tmp_obj, 'existe')) {  
57 - if ($tmp_obj->existe()) {  
58 - $this->ref_cod_cliente = $ref_cod_cliente;  
59 - }  
60 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
61 - if ($tmp_obj->detalhe()) {  
62 - $this->ref_cod_cliente = $ref_cod_cliente;  
63 - }  
64 - }  
65 - } else {  
66 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.cliente WHERE cod_cliente = '{$ref_cod_cliente}'")) {  
67 $this->ref_cod_cliente = $ref_cod_cliente; 39 $this->ref_cod_cliente = $ref_cod_cliente;
68 - }  
69 - }  
70 } 40 }
71 41
72 if (is_string($data_cadastro)) { 42 if (is_string($data_cadastro)) {
ieducar/intranet/include/pmieducar/clsPmieducarClienteTipoExemplarTipo.inc.php
@@ -19,40 +19,10 @@ class clsPmieducarClienteTipoExemplarTipo extends Model @@ -19,40 +19,10 @@ class clsPmieducarClienteTipoExemplarTipo extends Model
19 $this->_campos_lista = $this->_todos_campos = 'ctet.ref_cod_cliente_tipo, ctet.ref_cod_exemplar_tipo, ctet.dias_emprestimo'; 19 $this->_campos_lista = $this->_todos_campos = 'ctet.ref_cod_cliente_tipo, ctet.ref_cod_exemplar_tipo, ctet.dias_emprestimo';
20 20
21 if (is_numeric($ref_cod_exemplar_tipo)) { 21 if (is_numeric($ref_cod_exemplar_tipo)) {
22 - if (class_exists('clsPmieducarExemplarTipo')) {  
23 - $tmp_obj = new clsPmieducarExemplarTipo($ref_cod_exemplar_tipo);  
24 - if (method_exists($tmp_obj, 'existe')) {  
25 - if ($tmp_obj->existe()) {  
26 - $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;  
27 - }  
28 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
29 - if ($tmp_obj->detalhe()) {  
30 - $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;  
31 - }  
32 - }  
33 - } else {  
34 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.exemplar_tipo WHERE cod_exemplar_tipo = '{$ref_cod_exemplar_tipo}'")) {  
35 $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo; 22 $this->ref_cod_exemplar_tipo = $ref_cod_exemplar_tipo;
36 - }  
37 - }  
38 } 23 }
39 if (is_numeric($ref_cod_cliente_tipo)) { 24 if (is_numeric($ref_cod_cliente_tipo)) {
40 - if (class_exists('clsPmieducarClienteTipo')) {  
41 - $tmp_obj = new clsPmieducarClienteTipo($ref_cod_cliente_tipo);  
42 - if (method_exists($tmp_obj, 'existe')) {  
43 - if ($tmp_obj->existe()) {  
44 - $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;  
45 - }  
46 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
47 - if ($tmp_obj->detalhe()) {  
48 - $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;  
49 - }  
50 - }  
51 - } else {  
52 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.cliente_tipo WHERE cod_cliente_tipo = '{$ref_cod_cliente_tipo}'")) {  
53 $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo; 25 $this->ref_cod_cliente_tipo = $ref_cod_cliente_tipo;
54 - }  
55 - }  
56 } 26 }
57 27
58 if (is_numeric($dias_emprestimo)) { 28 if (is_numeric($dias_emprestimo)) {
ieducar/intranet/include/pmieducar/clsPmieducarCoffebreakTipo.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarCoffebreakTipo extends Model @@ -25,40 +25,10 @@ class clsPmieducarCoffebreakTipo extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_coffebreak_tipo, ref_usuario_exc, ref_usuario_cad, nm_tipo, desc_tipo, custo_unitario, data_cadastro, data_exclusao, ativo'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_coffebreak_tipo, ref_usuario_exc, ref_usuario_cad, nm_tipo, desc_tipo, custo_unitario, data_cadastro, data_exclusao, ativo';
26 26
27 if (is_numeric($ref_usuario_cad)) { 27 if (is_numeric($ref_usuario_cad)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_cad = $ref_usuario_cad;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_cad = $ref_usuario_cad;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
41 $this->ref_usuario_cad = $ref_usuario_cad; 28 $this->ref_usuario_cad = $ref_usuario_cad;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_coffebreak_tipo)) { 34 if (is_numeric($cod_coffebreak_tipo)) {
ieducar/intranet/include/pmieducar/clsPmieducarCurso.inc.php
@@ -63,117 +63,27 @@ class clsPmieducarCurso extends Model @@ -63,117 +63,27 @@ class clsPmieducarCurso extends Model
63 $this->_campos_lista = $this->_todos_campos = 'cod_curso, ref_usuario_cad, ref_cod_tipo_regime, ref_cod_nivel_ensino, ref_cod_tipo_ensino, nm_curso, sgl_curso, qtd_etapas, carga_horaria, ato_poder_publico, objetivo_curso, publico_alvo, data_cadastro, data_exclusao, ativo, ref_usuario_exc, ref_cod_instituicao, padrao_ano_escolar, hora_falta, multi_seriado, modalidade_curso'; 63 $this->_campos_lista = $this->_todos_campos = 'cod_curso, ref_usuario_cad, ref_cod_tipo_regime, ref_cod_nivel_ensino, ref_cod_tipo_ensino, nm_curso, sgl_curso, qtd_etapas, carga_horaria, ato_poder_publico, objetivo_curso, publico_alvo, data_cadastro, data_exclusao, ativo, ref_usuario_exc, ref_cod_instituicao, padrao_ano_escolar, hora_falta, multi_seriado, modalidade_curso';
64 64
65 if (is_numeric($ref_cod_instituicao)) { 65 if (is_numeric($ref_cod_instituicao)) {
66 - if (class_exists('clsPmieducarInstituicao')) {  
67 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
68 - if (method_exists($tmp_obj, 'existe')) {  
69 - if ($tmp_obj->existe()) {  
70 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
71 - }  
72 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
73 - if ($tmp_obj->detalhe()) {  
74 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
75 - }  
76 - }  
77 - } else {  
78 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
79 $this->ref_cod_instituicao = $ref_cod_instituicao; 66 $this->ref_cod_instituicao = $ref_cod_instituicao;
80 - }  
81 - }  
82 } 67 }
83 68
84 if (is_numeric($ref_usuario_exc)) { 69 if (is_numeric($ref_usuario_exc)) {
85 - if (class_exists('clsPmieducarUsuario')) {  
86 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
87 - if (method_exists($tmp_obj, 'existe')) {  
88 - if ($tmp_obj->existe()) {  
89 - $this->ref_usuario_exc = $ref_usuario_exc;  
90 - }  
91 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
92 - if ($tmp_obj->detalhe()) {  
93 - $this->ref_usuario_exc = $ref_usuario_exc;  
94 - }  
95 - }  
96 - } else {  
97 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
98 $this->ref_usuario_exc = $ref_usuario_exc; 70 $this->ref_usuario_exc = $ref_usuario_exc;
99 - }  
100 - }  
101 } 71 }
102 72
103 if (is_numeric($ref_cod_tipo_regime)) { 73 if (is_numeric($ref_cod_tipo_regime)) {
104 - if (class_exists('clsPmieducarTipoRegime')) {  
105 - $tmp_obj = new clsPmieducarTipoRegime($ref_cod_tipo_regime);  
106 - if (method_exists($tmp_obj, 'existe')) {  
107 - if ($tmp_obj->existe()) {  
108 - $this->ref_cod_tipo_regime = $ref_cod_tipo_regime;  
109 - }  
110 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
111 - if ($tmp_obj->detalhe()) {  
112 - $this->ref_cod_tipo_regime = $ref_cod_tipo_regime;  
113 - }  
114 - }  
115 - } else {  
116 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.tipo_regime WHERE cod_tipo_regime = '{$ref_cod_tipo_regime}'")) {  
117 $this->ref_cod_tipo_regime = $ref_cod_tipo_regime; 74 $this->ref_cod_tipo_regime = $ref_cod_tipo_regime;
118 - }  
119 - }  
120 } 75 }
121 76
122 if (is_numeric($ref_cod_nivel_ensino)) { 77 if (is_numeric($ref_cod_nivel_ensino)) {
123 - if (class_exists('clsPmieducarNivelEnsino')) {  
124 - $tmp_obj = new clsPmieducarNivelEnsino($ref_cod_nivel_ensino);  
125 - if (method_exists($tmp_obj, 'existe')) {  
126 - if ($tmp_obj->existe()) {  
127 - $this->ref_cod_nivel_ensino = $ref_cod_nivel_ensino;  
128 - }  
129 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
130 - if ($tmp_obj->detalhe()) {  
131 - $this->ref_cod_nivel_ensino = $ref_cod_nivel_ensino;  
132 - }  
133 - }  
134 - } else {  
135 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.nivel_ensino WHERE cod_nivel_ensino = '{$ref_cod_nivel_ensino}'")) {  
136 $this->ref_cod_nivel_ensino = $ref_cod_nivel_ensino; 78 $this->ref_cod_nivel_ensino = $ref_cod_nivel_ensino;
137 - }  
138 - }  
139 } 79 }
140 80
141 if (is_numeric($ref_cod_tipo_ensino)) { 81 if (is_numeric($ref_cod_tipo_ensino)) {
142 - if (class_exists('clsPmieducarTipoEnsino')) {  
143 - $tmp_obj = new clsPmieducarTipoEnsino($ref_cod_tipo_ensino);  
144 - if (method_exists($tmp_obj, 'existe')) {  
145 - if ($tmp_obj->existe()) {  
146 - $this->ref_cod_tipo_ensino = $ref_cod_tipo_ensino;  
147 - }  
148 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
149 - if ($tmp_obj->detalhe()) {  
150 - $this->ref_cod_tipo_ensino = $ref_cod_tipo_ensino;  
151 - }  
152 - }  
153 - } else {  
154 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.tipo_ensino WHERE cod_tipo_ensino = '{$ref_cod_tipo_ensino}'")) {  
155 $this->ref_cod_tipo_ensino = $ref_cod_tipo_ensino; 82 $this->ref_cod_tipo_ensino = $ref_cod_tipo_ensino;
156 - }  
157 - }  
158 } 83 }
159 84
160 if (is_numeric($ref_usuario_cad)) { 85 if (is_numeric($ref_usuario_cad)) {
161 - if (class_exists('clsPmieducarUsuario')) {  
162 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
163 - if (method_exists($tmp_obj, 'existe')) {  
164 - if ($tmp_obj->existe()) {  
165 - $this->ref_usuario_cad = $ref_usuario_cad;  
166 - }  
167 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
168 - if ($tmp_obj->detalhe()) {  
169 - $this->ref_usuario_cad = $ref_usuario_cad;  
170 - }  
171 - }  
172 - } else {  
173 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
174 $this->ref_usuario_cad = $ref_usuario_cad; 86 $this->ref_usuario_cad = $ref_usuario_cad;
175 - }  
176 - }  
177 } 87 }
178 88
179 if (is_numeric($cod_curso)) { 89 if (is_numeric($cod_curso)) {
ieducar/intranet/include/pmieducar/clsPmieducarDisciplina.inc.php
@@ -29,58 +29,13 @@ class clsPmieducarDisciplina extends Model @@ -29,58 +29,13 @@ class clsPmieducarDisciplina extends Model
29 $this->_campos_lista = $this->_todos_campos = 'd.cod_disciplina, d.ref_usuario_exc, d.ref_usuario_cad, d.desc_disciplina, d.desc_resumida, d.abreviatura, d.carga_horaria, d.apura_falta, d.data_cadastro, d.data_exclusao, d.ativo, d.nm_disciplina, d.ref_cod_curso'; 29 $this->_campos_lista = $this->_todos_campos = 'd.cod_disciplina, d.ref_usuario_exc, d.ref_usuario_cad, d.desc_disciplina, d.desc_resumida, d.abreviatura, d.carga_horaria, d.apura_falta, d.data_cadastro, d.data_exclusao, d.ativo, d.nm_disciplina, d.ref_cod_curso';
30 30
31 if (is_numeric($ref_cod_curso)) { 31 if (is_numeric($ref_cod_curso)) {
32 - if (class_exists('clsPmieducarCurso')) {  
33 - $tmp_obj = new clsPmieducarCurso($ref_cod_curso);  
34 - if (method_exists($tmp_obj, 'existe')) {  
35 - if ($tmp_obj->existe()) {  
36 - $this->ref_cod_curso = $ref_cod_curso;  
37 - }  
38 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
39 - if ($tmp_obj->detalhe()) {  
40 - $this->ref_cod_curso = $ref_cod_curso;  
41 - }  
42 - }  
43 - } else {  
44 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.curso WHERE cod_curso = '{$ref_cod_curso}'")) {  
45 $this->ref_cod_curso = $ref_cod_curso; 32 $this->ref_cod_curso = $ref_cod_curso;
46 - }  
47 - }  
48 } 33 }
49 if (is_numeric($ref_usuario_cad)) { 34 if (is_numeric($ref_usuario_cad)) {
50 - if (class_exists('clsPmieducarUsuario')) {  
51 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
52 - if (method_exists($tmp_obj, 'existe')) {  
53 - if ($tmp_obj->existe()) {  
54 - $this->ref_usuario_cad = $ref_usuario_cad;  
55 - }  
56 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
57 - if ($tmp_obj->detalhe()) {  
58 - $this->ref_usuario_cad = $ref_usuario_cad;  
59 - }  
60 - }  
61 - } else {  
62 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
63 $this->ref_usuario_cad = $ref_usuario_cad; 35 $this->ref_usuario_cad = $ref_usuario_cad;
64 - }  
65 - }  
66 } 36 }
67 if (is_numeric($ref_usuario_exc)) { 37 if (is_numeric($ref_usuario_exc)) {
68 - if (class_exists('clsPmieducarUsuario')) {  
69 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
70 - if (method_exists($tmp_obj, 'existe')) {  
71 - if ($tmp_obj->existe()) {  
72 - $this->ref_usuario_exc = $ref_usuario_exc;  
73 - }  
74 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
75 - if ($tmp_obj->detalhe()) {  
76 - $this->ref_usuario_exc = $ref_usuario_exc;  
77 - }  
78 - }  
79 - } else {  
80 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
81 $this->ref_usuario_exc = $ref_usuario_exc; 38 $this->ref_usuario_exc = $ref_usuario_exc;
82 - }  
83 - }  
84 } 39 }
85 40
86 if (is_numeric($cod_disciplina)) { 41 if (is_numeric($cod_disciplina)) {
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaDisciplinaTopico.inc.php
@@ -20,46 +20,12 @@ class clsPmieducarDisciplinaDisciplinaTopico extends Model @@ -20,46 +20,12 @@ class clsPmieducarDisciplinaDisciplinaTopico extends Model
20 $this->_campos_lista = $this->_todos_campos = 'ref_ref_cod_disciplina, ref_ref_ref_cod_escola, ref_ref_ref_cod_serie, ref_cod_disciplina_topico'; 20 $this->_campos_lista = $this->_todos_campos = 'ref_ref_cod_disciplina, ref_ref_ref_cod_escola, ref_ref_ref_cod_serie, ref_cod_disciplina_topico';
21 21
22 if (is_numeric($ref_cod_disciplina_topico)) { 22 if (is_numeric($ref_cod_disciplina_topico)) {
23 - if (class_exists('clsPmieducarDisciplinaTopico')) {  
24 - $tmp_obj = new clsPmieducarDisciplinaTopico($ref_cod_disciplina_topico);  
25 - if (method_exists($tmp_obj, 'existe')) {  
26 - if ($tmp_obj->existe()) {  
27 - $this->ref_cod_disciplina_topico = $ref_cod_disciplina_topico;  
28 - }  
29 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
30 - if ($tmp_obj->detalhe()) {  
31 - $this->ref_cod_disciplina_topico = $ref_cod_disciplina_topico;  
32 - }  
33 - }  
34 - } else {  
35 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.disciplina_topico WHERE cod_disciplina_topico = '{$ref_cod_disciplina_topico}'")) {  
36 $this->ref_cod_disciplina_topico = $ref_cod_disciplina_topico; 23 $this->ref_cod_disciplina_topico = $ref_cod_disciplina_topico;
37 - }  
38 - }  
39 } 24 }
40 if (is_numeric($ref_ref_ref_cod_serie) && is_numeric($ref_ref_ref_cod_escola) && is_numeric($ref_ref_cod_disciplina)) { 25 if (is_numeric($ref_ref_ref_cod_serie) && is_numeric($ref_ref_ref_cod_escola) && is_numeric($ref_ref_cod_disciplina)) {
41 - if (class_exists('clsPmieducarEscolaSerieDisciplina')) {  
42 - $tmp_obj = new clsPmieducarEscolaSerieDisciplina($ref_ref_ref_cod_serie, $ref_ref_ref_cod_escola, $ref_ref_cod_disciplina);  
43 - if (method_exists($tmp_obj, 'existe')) {  
44 - if ($tmp_obj->existe()) {  
45 - $this->ref_ref_ref_cod_serie = $ref_ref_ref_cod_serie;  
46 - $this->ref_ref_ref_cod_escola = $ref_ref_ref_cod_escola;  
47 - $this->ref_ref_cod_disciplina = $ref_ref_cod_disciplina;  
48 - }  
49 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
50 - if ($tmp_obj->detalhe()) {  
51 - $this->ref_ref_ref_cod_serie = $ref_ref_ref_cod_serie;  
52 - $this->ref_ref_ref_cod_escola = $ref_ref_ref_cod_escola;  
53 - $this->ref_ref_cod_disciplina = $ref_ref_cod_disciplina;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_serie_disciplina WHERE ref_ref_cod_serie = '{$ref_ref_ref_cod_serie}' AND ref_ref_cod_escola = '{$ref_ref_ref_cod_escola}' AND ref_cod_disciplina = '{$ref_ref_cod_disciplina}'")) {  
58 $this->ref_ref_ref_cod_serie = $ref_ref_ref_cod_serie; 26 $this->ref_ref_ref_cod_serie = $ref_ref_ref_cod_serie;
59 $this->ref_ref_ref_cod_escola = $ref_ref_ref_cod_escola; 27 $this->ref_ref_ref_cod_escola = $ref_ref_ref_cod_escola;
60 $this->ref_ref_cod_disciplina = $ref_ref_cod_disciplina; 28 $this->ref_ref_cod_disciplina = $ref_ref_cod_disciplina;
61 - }  
62 - }  
63 } 29 }
64 } 30 }
65 31
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaSerie.inc.php
@@ -19,40 +19,10 @@ class clsPmieducarDisciplinaSerie extends Model @@ -19,40 +19,10 @@ class clsPmieducarDisciplinaSerie extends Model
19 $this->_campos_lista = $this->_todos_campos = 'ref_cod_disciplina, ref_cod_serie, ativo'; 19 $this->_campos_lista = $this->_todos_campos = 'ref_cod_disciplina, ref_cod_serie, ativo';
20 20
21 if (is_numeric($ref_cod_serie)) { 21 if (is_numeric($ref_cod_serie)) {
22 - if (class_exists('clsPmieducarSerie')) {  
23 - $tmp_obj = new clsPmieducarSerie($ref_cod_serie);  
24 - if (method_exists($tmp_obj, 'existe')) {  
25 - if ($tmp_obj->existe()) {  
26 - $this->ref_cod_serie = $ref_cod_serie;  
27 - }  
28 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
29 - if ($tmp_obj->detalhe()) {  
30 - $this->ref_cod_serie = $ref_cod_serie;  
31 - }  
32 - }  
33 - } else {  
34 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.serie WHERE cod_serie = '{$ref_cod_serie}'")) {  
35 $this->ref_cod_serie = $ref_cod_serie; 22 $this->ref_cod_serie = $ref_cod_serie;
36 - }  
37 - }  
38 } 23 }
39 if (is_numeric($ref_cod_disciplina)) { 24 if (is_numeric($ref_cod_disciplina)) {
40 - if (class_exists('clsPmieducarDisciplina')) {  
41 - $tmp_obj = new clsPmieducarDisciplina($ref_cod_disciplina);  
42 - if (method_exists($tmp_obj, 'existe')) {  
43 - if ($tmp_obj->existe()) {  
44 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
45 - }  
46 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
47 - if ($tmp_obj->detalhe()) {  
48 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
49 - }  
50 - }  
51 - } else {  
52 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.disciplina WHERE cod_disciplina = '{$ref_cod_disciplina}'")) {  
53 $this->ref_cod_disciplina = $ref_cod_disciplina; 25 $this->ref_cod_disciplina = $ref_cod_disciplina;
54 - }  
55 - }  
56 } 26 }
57 27
58 if (is_numeric($ativo)) { 28 if (is_numeric($ativo)) {
ieducar/intranet/include/pmieducar/clsPmieducarDisciplinaTopico.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarDisciplinaTopico extends Model @@ -24,40 +24,10 @@ class clsPmieducarDisciplinaTopico extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_disciplina_topico, ref_usuario_exc, ref_usuario_cad, nm_topico, desc_topico, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_disciplina_topico, ref_usuario_exc, ref_usuario_cad, nm_topico, desc_topico, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_usuario_cad)) { 26 if (is_numeric($ref_usuario_cad)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_cad = $ref_usuario_cad;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_cad = $ref_usuario_cad;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
40 $this->ref_usuario_cad = $ref_usuario_cad; 27 $this->ref_usuario_cad = $ref_usuario_cad;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_exc)) { 29 if (is_numeric($ref_usuario_exc)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_exc = $ref_usuario_exc;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
58 $this->ref_usuario_exc = $ref_usuario_exc; 30 $this->ref_usuario_exc = $ref_usuario_exc;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_disciplina_topico)) { 33 if (is_numeric($cod_disciplina_topico)) {
ieducar/intranet/include/pmieducar/clsPmieducarDocumentos.inc.php
@@ -30,76 +30,16 @@ class clsPmieducarDocumentos extends Model @@ -30,76 +30,16 @@ class clsPmieducarDocumentos extends Model
30 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_idorg_rg, sigla_uf_cert_civil, sigla_uf_exp_rg, rg, data_expedicao_rg, num_titulo_eleitor, zona_titulo_eleitor, secao_titulo_eleitor, tipo_certidao_civil, num_termo, num_folha, num_livro, data_emissao_certidao_civil'; 30 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_idorg_rg, sigla_uf_cert_civil, sigla_uf_exp_rg, rg, data_expedicao_rg, num_titulo_eleitor, zona_titulo_eleitor, secao_titulo_eleitor, tipo_certidao_civil, num_termo, num_folha, num_livro, data_emissao_certidao_civil';
31 31
32 if (is_numeric($ref_idorg_rg)) { 32 if (is_numeric($ref_idorg_rg)) {
33 - if (class_exists('clsCadastroOrgaoEmissorRg')) {  
34 - $tmp_obj = new clsCadastroOrgaoEmissorRg($ref_idorg_rg);  
35 - if (method_exists($tmp_obj, 'existe')) {  
36 - if ($tmp_obj->existe()) {  
37 - $this->ref_idorg_rg = $ref_idorg_rg;  
38 - }  
39 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
40 - if ($tmp_obj->detalhe()) {  
41 - $this->ref_idorg_rg = $ref_idorg_rg;  
42 - }  
43 - }  
44 - } else {  
45 - if ($db->CampoUnico("SELECT 1 FROM cadastro.orgao_emissor_rg WHERE idorg_rg = '{$ref_idorg_rg}'")) {  
46 $this->ref_idorg_rg = $ref_idorg_rg; 33 $this->ref_idorg_rg = $ref_idorg_rg;
47 - }  
48 - }  
49 } 34 }
50 if (is_string($sigla_uf_cert_civil)) { 35 if (is_string($sigla_uf_cert_civil)) {
51 - if (class_exists('clsUf')) {  
52 - $tmp_obj = new clsUf($sigla_uf_cert_civil);  
53 - if (method_exists($tmp_obj, 'existe')) {  
54 - if ($tmp_obj->existe()) {  
55 - $this->sigla_uf_cert_civil = $sigla_uf_cert_civil;  
56 - }  
57 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
58 - if ($tmp_obj->detalhe()) {  
59 - $this->sigla_uf_cert_civil = $sigla_uf_cert_civil;  
60 - }  
61 - }  
62 - } else {  
63 - if ($db->CampoUnico("SELECT 1 FROM uf WHERE sigla_uf = '{$sigla_uf_cert_civil}'")) {  
64 $this->sigla_uf_cert_civil = $sigla_uf_cert_civil; 36 $this->sigla_uf_cert_civil = $sigla_uf_cert_civil;
65 - }  
66 - }  
67 } 37 }
68 if (is_string($sigla_uf_exp_rg)) { 38 if (is_string($sigla_uf_exp_rg)) {
69 - if (class_exists('clsUf')) {  
70 - $tmp_obj = new clsUf($sigla_uf_exp_rg);  
71 - if (method_exists($tmp_obj, 'existe')) {  
72 - if ($tmp_obj->existe()) {  
73 - $this->sigla_uf_exp_rg = $sigla_uf_exp_rg;  
74 - }  
75 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
76 - if ($tmp_obj->detalhe()) {  
77 - $this->sigla_uf_exp_rg = $sigla_uf_exp_rg;  
78 - }  
79 - }  
80 - } else {  
81 - if ($db->CampoUnico("SELECT 1 FROM uf WHERE sigla_uf = '{$sigla_uf_exp_rg}'")) {  
82 $this->sigla_uf_exp_rg = $sigla_uf_exp_rg; 39 $this->sigla_uf_exp_rg = $sigla_uf_exp_rg;
83 - }  
84 - }  
85 } 40 }
86 if (is_numeric($ref_cod_pessoa_educ)) { 41 if (is_numeric($ref_cod_pessoa_educ)) {
87 - if (class_exists('clsPmieducarPessoaEduc')) {  
88 - $tmp_obj = new clsPmieducarPessoaEduc($ref_cod_pessoa_educ);  
89 - if (method_exists($tmp_obj, 'existe')) {  
90 - if ($tmp_obj->existe()) {  
91 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
92 - }  
93 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
94 - if ($tmp_obj->detalhe()) {  
95 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
96 - }  
97 - }  
98 - } else {  
99 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.pessoa_educ WHERE cod_pessoa_educ = '{$ref_cod_pessoa_educ}'")) {  
100 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ; 42 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;
101 - }  
102 - }  
103 } 43 }
104 44
105 if (is_numeric($rg)) { 45 if (is_numeric($rg)) {
ieducar/intranet/include/pmieducar/clsPmieducarEndereco.inc.php
@@ -28,64 +28,15 @@ class clsPmieducarEndereco extends Model @@ -28,64 +28,15 @@ class clsPmieducarEndereco extends Model
28 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_idbai, ref_cep, ref_idlog, ref_idtlog, ref_sigla_uf, numero, complemento, letra, andar, bloco, apartamento'; 28 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_idbai, ref_cep, ref_idlog, ref_idtlog, ref_sigla_uf, numero, complemento, letra, andar, bloco, apartamento';
29 29
30 if (is_numeric($ref_cod_pessoa_educ)) { 30 if (is_numeric($ref_cod_pessoa_educ)) {
31 - if (class_exists('clsPmieducarPessoaEduc')) {  
32 - $tmp_obj = new clsPmieducarPessoaEduc($ref_cod_pessoa_educ);  
33 - if (method_exists($tmp_obj, 'existe')) {  
34 - if ($tmp_obj->existe()) {  
35 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
36 - }  
37 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
38 - if ($tmp_obj->detalhe()) {  
39 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
40 - }  
41 - }  
42 - } else {  
43 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.pessoa_educ WHERE cod_pessoa_educ = '{$ref_cod_pessoa_educ}'")) {  
44 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ; 31 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;
45 - }  
46 - }  
47 } 32 }
48 if (is_numeric($ref_idlog) && is_numeric($ref_cep) && is_numeric($ref_idbai)) { 33 if (is_numeric($ref_idlog) && is_numeric($ref_cep) && is_numeric($ref_idbai)) {
49 - if (class_exists('clsUrbanoCepLogradouroBairro')) {  
50 - $tmp_obj = new clsUrbanoCepLogradouroBairro($ref_idlog, $ref_cep, $ref_idbai);  
51 - if (method_exists($tmp_obj, 'existe')) {  
52 - if ($tmp_obj->existe()) {  
53 - $this->ref_idlog = $ref_idlog;  
54 - $this->ref_cep = $ref_cep;  
55 - $this->ref_idbai = $ref_idbai;  
56 - }  
57 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
58 - if ($tmp_obj->detalhe()) {  
59 - $this->ref_idlog = $ref_idlog;  
60 - $this->ref_cep = $ref_cep;  
61 - $this->ref_idbai = $ref_idbai;  
62 - }  
63 - }  
64 - } else {  
65 - if ($db->CampoUnico("SELECT 1 FROM urbano.cep_logradouro_bairro WHERE idlog = '{$ref_idlog}' AND cep = '{$ref_cep}' AND idbai = '{$ref_idbai}'")) {  
66 $this->ref_idlog = $ref_idlog; 34 $this->ref_idlog = $ref_idlog;
67 $this->ref_cep = $ref_cep; 35 $this->ref_cep = $ref_cep;
68 $this->ref_idbai = $ref_idbai; 36 $this->ref_idbai = $ref_idbai;
69 - }  
70 - }  
71 } 37 }
72 if (is_string($ref_idtlog)) { 38 if (is_string($ref_idtlog)) {
73 - if (class_exists('clsUrbanoTipoLogradouro')) {  
74 - $tmp_obj = new clsUrbanoTipoLogradouro($ref_idtlog);  
75 - if (method_exists($tmp_obj, 'existe')) {  
76 - if ($tmp_obj->existe()) {  
77 - $this->ref_idtlog = $ref_idtlog;  
78 - }  
79 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
80 - if ($tmp_obj->detalhe()) {  
81 - $this->ref_idtlog = $ref_idtlog;  
82 - }  
83 - }  
84 - } else {  
85 - if ($db->CampoUnico("SELECT 1 FROM urbano.tipo_logradouro WHERE idtlog = '{$ref_idtlog}'")) {  
86 $this->ref_idtlog = $ref_idtlog; 39 $this->ref_idtlog = $ref_idtlog;
87 - }  
88 - }  
89 } 40 }
90 41
91 if (is_string($ref_sigla_uf)) { 42 if (is_string($ref_sigla_uf)) {
ieducar/intranet/include/pmieducar/clsPmieducarEnderecoExterno.inc.php
@@ -29,40 +29,10 @@ class clsPmieducarEnderecoExterno extends Model @@ -29,40 +29,10 @@ class clsPmieducarEnderecoExterno extends Model
29 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_sigla_uf, ref_idtlog, logradouro, numero, complemento, letra, bairro, cep, cidade, andar, bloco, apartamento'; 29 $this->_campos_lista = $this->_todos_campos = 'ref_cod_pessoa_educ, ref_sigla_uf, ref_idtlog, logradouro, numero, complemento, letra, bairro, cep, cidade, andar, bloco, apartamento';
30 30
31 if (is_string($ref_idtlog)) { 31 if (is_string($ref_idtlog)) {
32 - if (class_exists('clsUrbanoTipoLogradouro')) {  
33 - $tmp_obj = new clsUrbanoTipoLogradouro($ref_idtlog);  
34 - if (method_exists($tmp_obj, 'existe')) {  
35 - if ($tmp_obj->existe()) {  
36 - $this->ref_idtlog = $ref_idtlog;  
37 - }  
38 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
39 - if ($tmp_obj->detalhe()) {  
40 - $this->ref_idtlog = $ref_idtlog;  
41 - }  
42 - }  
43 - } else {  
44 - if ($db->CampoUnico("SELECT 1 FROM urbano.tipo_logradouro WHERE idtlog = '{$ref_idtlog}'")) {  
45 $this->ref_idtlog = $ref_idtlog; 32 $this->ref_idtlog = $ref_idtlog;
46 - }  
47 - }  
48 } 33 }
49 if (is_numeric($ref_cod_pessoa_educ)) { 34 if (is_numeric($ref_cod_pessoa_educ)) {
50 - if (class_exists('clsPmieducarPessoaEduc')) {  
51 - $tmp_obj = new clsPmieducarPessoaEduc($ref_cod_pessoa_educ);  
52 - if (method_exists($tmp_obj, 'existe')) {  
53 - if ($tmp_obj->existe()) {  
54 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
55 - }  
56 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
57 - if ($tmp_obj->detalhe()) {  
58 - $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;  
59 - }  
60 - }  
61 - } else {  
62 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.pessoa_educ WHERE cod_pessoa_educ = '{$ref_cod_pessoa_educ}'")) {  
63 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ; 35 $this->ref_cod_pessoa_educ = $ref_cod_pessoa_educ;
64 - }  
65 - }  
66 } 36 }
67 37
68 if (is_string($ref_sigla_uf)) { 38 if (is_string($ref_sigla_uf)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscola.inc.php
@@ -220,60 +220,15 @@ class clsPmieducarEscola extends Model @@ -220,60 +220,15 @@ class clsPmieducarEscola extends Model
220 '; 220 ';
221 221
222 if (is_numeric($ref_usuario_cad)) { 222 if (is_numeric($ref_usuario_cad)) {
223 - if (class_exists('clsPmieducarUsuario')) {  
224 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
225 - if (method_exists($tmp_obj, 'existe')) {  
226 - if ($tmp_obj->existe()) {  
227 - $this->ref_usuario_cad = $ref_usuario_cad;  
228 - }  
229 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
230 - if ($tmp_obj->detalhe()) {  
231 - $this->ref_usuario_cad = $ref_usuario_cad;  
232 - }  
233 - }  
234 - } else {  
235 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
236 $this->ref_usuario_cad = $ref_usuario_cad; 223 $this->ref_usuario_cad = $ref_usuario_cad;
237 - }  
238 - }  
239 } 224 }
240 225
241 if (is_numeric($ref_usuario_exc)) { 226 if (is_numeric($ref_usuario_exc)) {
242 - if (class_exists('clsPmieducarUsuario')) {  
243 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
244 - if (method_exists($tmp_obj, 'existe')) {  
245 - if ($tmp_obj->existe()) {  
246 - $this->ref_usuario_exc = $ref_usuario_exc;  
247 - }  
248 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
249 - if ($tmp_obj->detalhe()) {  
250 - $this->ref_usuario_exc = $ref_usuario_exc;  
251 - }  
252 - }  
253 - } else {  
254 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
255 $this->ref_usuario_exc = $ref_usuario_exc; 227 $this->ref_usuario_exc = $ref_usuario_exc;
256 - }  
257 - }  
258 } 228 }
259 229
260 if (is_numeric($ref_cod_instituicao)) { 230 if (is_numeric($ref_cod_instituicao)) {
261 - if (class_exists('clsPmieducarInstituicao')) {  
262 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
263 - if (method_exists($tmp_obj, 'existe')) {  
264 - if ($tmp_obj->existe()) {  
265 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
266 - }  
267 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
268 - if ($tmp_obj->detalhe()) {  
269 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
270 - }  
271 - }  
272 - } else {  
273 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
274 $this->ref_cod_instituicao = $ref_cod_instituicao; 231 $this->ref_cod_instituicao = $ref_cod_instituicao;
275 - }  
276 - }  
277 } 232 }
278 233
279 if (is_numeric($zona_localizacao)) { 234 if (is_numeric($zona_localizacao)) {
@@ -281,41 +236,11 @@ class clsPmieducarEscola extends Model @@ -281,41 +236,11 @@ class clsPmieducarEscola extends Model
281 } 236 }
282 237
283 if (is_numeric($ref_cod_escola_rede_ensino)) { 238 if (is_numeric($ref_cod_escola_rede_ensino)) {
284 - if (class_exists('clsPmieducarEscolaRedeEnsino')) {  
285 - $tmp_obj = new clsPmieducarEscolaRedeEnsino($ref_cod_escola_rede_ensino);  
286 - if (method_exists($tmp_obj, 'existe')) {  
287 - if ($tmp_obj->existe()) {  
288 - $this->ref_cod_escola_rede_ensino = $ref_cod_escola_rede_ensino;  
289 - }  
290 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
291 - if ($tmp_obj->detalhe()) {  
292 - $this->ref_cod_escola_rede_ensino = $ref_cod_escola_rede_ensino;  
293 - }  
294 - }  
295 - } else {  
296 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_rede_ensino WHERE cod_escola_rede_ensino = '{$ref_cod_escola_rede_ensino}'")) {  
297 $this->ref_cod_escola_rede_ensino = $ref_cod_escola_rede_ensino; 239 $this->ref_cod_escola_rede_ensino = $ref_cod_escola_rede_ensino;
298 - }  
299 - }  
300 } 240 }
301 241
302 if (is_numeric($ref_idpes)) { 242 if (is_numeric($ref_idpes)) {
303 - if (class_exists('clsCadastroJuridica')) {  
304 - $tmp_obj = new clsCadastroJuridica($ref_idpes);  
305 - if (method_exists($tmp_obj, 'existe')) {  
306 - if ($tmp_obj->existe()) {  
307 - $this->ref_idpes = $ref_idpes;  
308 - }  
309 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
310 - if ($tmp_obj->detalhe()) {  
311 - $this->ref_idpes = $ref_idpes;  
312 - }  
313 - }  
314 - } else {  
315 - if ($db->CampoUnico("SELECT 1 FROM cadastro.juridica WHERE idpes = '{$ref_idpes}'")) {  
316 $this->ref_idpes = $ref_idpes; 243 $this->ref_idpes = $ref_idpes;
317 - }  
318 - }  
319 } 244 }
320 245
321 if (is_numeric($cod_escola)) { 246 if (is_numeric($cod_escola)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaAnoLetivo.inc.php
@@ -24,58 +24,13 @@ class clsPmieducarEscolaAnoLetivo extends Model @@ -24,58 +24,13 @@ class clsPmieducarEscolaAnoLetivo extends Model
24 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ano, ref_usuario_cad, ref_usuario_exc, andamento, data_cadastro, data_exclusao, ativo, turmas_por_ano'; 24 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ano, ref_usuario_cad, ref_usuario_exc, andamento, data_cadastro, data_exclusao, ativo, turmas_por_ano';
25 25
26 if (is_numeric($ref_usuario_exc)) { 26 if (is_numeric($ref_usuario_exc)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_exc = $ref_usuario_exc;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_exc = $ref_usuario_exc;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
40 $this->ref_usuario_exc = $ref_usuario_exc; 27 $this->ref_usuario_exc = $ref_usuario_exc;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_cod_escola)) { 32 if (is_numeric($ref_cod_escola)) {
63 - if (class_exists('clsPmieducarEscola')) {  
64 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_cod_escola = $ref_cod_escola;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_cod_escola = $ref_cod_escola;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
76 $this->ref_cod_escola = $ref_cod_escola; 33 $this->ref_cod_escola = $ref_cod_escola;
77 - }  
78 - }  
79 } 34 }
80 35
81 if (is_numeric($ano)) { 36 if (is_numeric($ano)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaComplemento.inc.php
@@ -34,40 +34,10 @@ class clsPmieducarEscolaComplemento extends Model @@ -34,40 +34,10 @@ class clsPmieducarEscolaComplemento extends Model
34 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ref_usuario_exc, ref_usuario_cad, cep, numero, complemento, email, nm_escola, municipio, bairro, logradouro, ddd_telefone, telefone, ddd_fax, fax, data_cadastro, data_exclusao, ativo'; 34 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ref_usuario_exc, ref_usuario_cad, cep, numero, complemento, email, nm_escola, municipio, bairro, logradouro, ddd_telefone, telefone, ddd_fax, fax, data_cadastro, data_exclusao, ativo';
35 35
36 if (is_numeric($ref_usuario_cad)) { 36 if (is_numeric($ref_usuario_cad)) {
37 - if (class_exists('clsPmieducarUsuario')) {  
38 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
39 - if (method_exists($tmp_obj, 'existe')) {  
40 - if ($tmp_obj->existe()) {  
41 - $this->ref_usuario_cad = $ref_usuario_cad;  
42 - }  
43 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
44 - if ($tmp_obj->detalhe()) {  
45 - $this->ref_usuario_cad = $ref_usuario_cad;  
46 - }  
47 - }  
48 - } else {  
49 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
50 $this->ref_usuario_cad = $ref_usuario_cad; 37 $this->ref_usuario_cad = $ref_usuario_cad;
51 - }  
52 - }  
53 } 38 }
54 if (is_numeric($ref_usuario_exc)) { 39 if (is_numeric($ref_usuario_exc)) {
55 - if (class_exists('clsPmieducarUsuario')) {  
56 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
57 - if (method_exists($tmp_obj, 'existe')) {  
58 - if ($tmp_obj->existe()) {  
59 - $this->ref_usuario_exc = $ref_usuario_exc;  
60 - }  
61 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
62 - if ($tmp_obj->detalhe()) {  
63 - $this->ref_usuario_exc = $ref_usuario_exc;  
64 - }  
65 - }  
66 - } else {  
67 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
68 $this->ref_usuario_exc = $ref_usuario_exc; 40 $this->ref_usuario_exc = $ref_usuario_exc;
69 - }  
70 - }  
71 } 41 }
72 42
73 if (is_numeric($ref_cod_escola)) { 43 if (is_numeric($ref_cod_escola)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaCurso.inc.php
@@ -26,76 +26,16 @@ class clsPmieducarEscolaCurso extends Model @@ -26,76 +26,16 @@ class clsPmieducarEscolaCurso extends Model
26 $this->_campos_lista = $this->_todos_campos = 'ec.ref_cod_escola, ec.ref_cod_curso, ec.ref_usuario_exc, ec.ref_usuario_cad, ec.data_cadastro, ec.data_exclusao, ec.ativo, ec.autorizacao, ARRAY_TO_JSON(ec.anos_letivos) AS anos_letivos '; 26 $this->_campos_lista = $this->_todos_campos = 'ec.ref_cod_escola, ec.ref_cod_curso, ec.ref_usuario_exc, ec.ref_usuario_cad, ec.data_cadastro, ec.data_exclusao, ec.ativo, ec.autorizacao, ARRAY_TO_JSON(ec.anos_letivos) AS anos_letivos ';
27 27
28 if (is_numeric($ref_usuario_exc)) { 28 if (is_numeric($ref_usuario_exc)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_exc = $ref_usuario_exc;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_exc = $ref_usuario_exc;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
42 $this->ref_usuario_exc = $ref_usuario_exc; 29 $this->ref_usuario_exc = $ref_usuario_exc;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_cod_curso)) { 34 if (is_numeric($ref_cod_curso)) {
65 - if (class_exists('clsPmieducarCurso')) {  
66 - $tmp_obj = new clsPmieducarCurso($ref_cod_curso);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_cod_curso = $ref_cod_curso;  
70 - }  
71 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
72 - if ($tmp_obj->detalhe()) {  
73 - $this->ref_cod_curso = $ref_cod_curso;  
74 - }  
75 - }  
76 - } else {  
77 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.curso WHERE cod_curso = '{$ref_cod_curso}'")) {  
78 $this->ref_cod_curso = $ref_cod_curso; 35 $this->ref_cod_curso = $ref_cod_curso;
79 - }  
80 - }  
81 } 36 }
82 if (is_numeric($ref_cod_escola)) { 37 if (is_numeric($ref_cod_escola)) {
83 - if (class_exists('clsPmieducarEscola')) {  
84 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
85 - if (method_exists($tmp_obj, 'existe')) {  
86 - if ($tmp_obj->existe()) {  
87 - $this->ref_cod_escola = $ref_cod_escola;  
88 - }  
89 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
90 - if ($tmp_obj->detalhe()) {  
91 - $this->ref_cod_escola = $ref_cod_escola;  
92 - }  
93 - }  
94 - } else {  
95 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
96 $this->ref_cod_escola = $ref_cod_escola; 38 $this->ref_cod_escola = $ref_cod_escola;
97 - }  
98 - }  
99 } 39 }
100 40
101 if (is_string($data_cadastro)) { 41 if (is_string($data_cadastro)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaDiasLetivos.inc.php
@@ -24,58 +24,13 @@ class clsPmieducarEscolaDiasLetivos extends Model @@ -24,58 +24,13 @@ class clsPmieducarEscolaDiasLetivos extends Model
24 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ano, ref_usuario_cad, ref_usuario_exc, num_dias, data_cadastro, data_exclusao, ativo'; 24 $this->_campos_lista = $this->_todos_campos = 'ref_cod_escola, ano, ref_usuario_cad, ref_usuario_exc, num_dias, data_cadastro, data_exclusao, ativo';
25 25
26 if (is_numeric($ref_usuario_exc)) { 26 if (is_numeric($ref_usuario_exc)) {
27 - if (class_exists('clsPmieducarUsuario')) {  
28 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_usuario_exc = $ref_usuario_exc;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_usuario_exc = $ref_usuario_exc;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
40 $this->ref_usuario_exc = $ref_usuario_exc; 27 $this->ref_usuario_exc = $ref_usuario_exc;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_cod_escola)) { 32 if (is_numeric($ref_cod_escola)) {
63 - if (class_exists('clsPmieducarEscola')) {  
64 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_cod_escola = $ref_cod_escola;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_cod_escola = $ref_cod_escola;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
76 $this->ref_cod_escola = $ref_cod_escola; 33 $this->ref_cod_escola = $ref_cod_escola;
77 - }  
78 - }  
79 } 34 }
80 35
81 if (is_numeric($ano)) { 36 if (is_numeric($ano)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaLocalizacao.inc.php
@@ -24,58 +24,13 @@ class clsPmieducarEscolaLocalizacao extends Model @@ -24,58 +24,13 @@ class clsPmieducarEscolaLocalizacao extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_escola_localizacao, ref_usuario_exc, ref_usuario_cad, nm_localizacao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_escola_localizacao, ref_usuario_exc, ref_usuario_cad, nm_localizacao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao';
25 25
26 if (is_numeric($ref_cod_instituicao)) { 26 if (is_numeric($ref_cod_instituicao)) {
27 - if (class_exists('clsPmieducarInstituicao')) {  
28 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
40 $this->ref_cod_instituicao = $ref_cod_instituicao; 27 $this->ref_cod_instituicao = $ref_cod_instituicao;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_exc)) { 29 if (is_numeric($ref_usuario_exc)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_exc = $ref_usuario_exc;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
58 $this->ref_usuario_exc = $ref_usuario_exc; 30 $this->ref_usuario_exc = $ref_usuario_exc;
59 - }  
60 - }  
61 } 31 }
62 if (is_numeric($ref_usuario_cad)) { 32 if (is_numeric($ref_usuario_cad)) {
63 - if (class_exists('clsPmieducarUsuario')) {  
64 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
65 - if (method_exists($tmp_obj, 'existe')) {  
66 - if ($tmp_obj->existe()) {  
67 - $this->ref_usuario_cad = $ref_usuario_cad;  
68 - }  
69 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
70 - if ($tmp_obj->detalhe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - }  
74 - } else {  
75 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
76 $this->ref_usuario_cad = $ref_usuario_cad; 33 $this->ref_usuario_cad = $ref_usuario_cad;
77 - }  
78 - }  
79 } 34 }
80 35
81 if (is_numeric($cod_escola_localizacao)) { 36 if (is_numeric($cod_escola_localizacao)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaRedeEnsino.inc.php
@@ -24,40 +24,10 @@ class clsPmieducarEscolaRedeEnsino extends Model @@ -24,40 +24,10 @@ class clsPmieducarEscolaRedeEnsino extends Model
24 $this->_campos_lista = $this->_todos_campos = 'cod_escola_rede_ensino, ref_usuario_exc, ref_usuario_cad, nm_rede, data_cadastro, data_exclusao, ativo, ref_cod_instituicao'; 24 $this->_campos_lista = $this->_todos_campos = 'cod_escola_rede_ensino, ref_usuario_exc, ref_usuario_cad, nm_rede, data_cadastro, data_exclusao, ativo, ref_cod_instituicao';
25 25
26 if (is_numeric($ref_cod_instituicao)) { 26 if (is_numeric($ref_cod_instituicao)) {
27 - if (class_exists('clsPmieducarInstituicao')) {  
28 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
29 - if (method_exists($tmp_obj, 'existe')) {  
30 - if ($tmp_obj->existe()) {  
31 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
32 - }  
33 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
34 - if ($tmp_obj->detalhe()) {  
35 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
36 - }  
37 - }  
38 - } else {  
39 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
40 $this->ref_cod_instituicao = $ref_cod_instituicao; 27 $this->ref_cod_instituicao = $ref_cod_instituicao;
41 - }  
42 - }  
43 } 28 }
44 if (is_numeric($ref_usuario_cad)) { 29 if (is_numeric($ref_usuario_cad)) {
45 - if (class_exists('clsPmieducarUsuario')) {  
46 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
47 - if (method_exists($tmp_obj, 'existe')) {  
48 - if ($tmp_obj->existe()) {  
49 - $this->ref_usuario_cad = $ref_usuario_cad;  
50 - }  
51 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
52 - if ($tmp_obj->detalhe()) {  
53 - $this->ref_usuario_cad = $ref_usuario_cad;  
54 - }  
55 - }  
56 - } else {  
57 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
58 $this->ref_usuario_cad = $ref_usuario_cad; 30 $this->ref_usuario_cad = $ref_usuario_cad;
59 - }  
60 - }  
61 } 31 }
62 32
63 if (is_numeric($cod_escola_rede_ensino)) { 33 if (is_numeric($cod_escola_rede_ensino)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaSerie.inc.php
@@ -31,76 +31,16 @@ class clsPmieducarEscolaSerie extends Model @@ -31,76 +31,16 @@ class clsPmieducarEscolaSerie extends Model
31 $this->_campos_lista = $this->_todos_campos = 'es.ref_cod_escola, es.ref_cod_serie, es.ref_usuario_exc, es.ref_usuario_cad, es.hora_inicial, es.hora_final, es.data_cadastro, es.data_exclusao, es.ativo, es.hora_inicio_intervalo, es.hora_fim_intervalo, es.bloquear_enturmacao_sem_vagas, es.bloquear_cadastro_turma_para_serie_com_vagas, ARRAY_TO_JSON(es.anos_letivos) AS anos_letivos '; 31 $this->_campos_lista = $this->_todos_campos = 'es.ref_cod_escola, es.ref_cod_serie, es.ref_usuario_exc, es.ref_usuario_cad, es.hora_inicial, es.hora_final, es.data_cadastro, es.data_exclusao, es.ativo, es.hora_inicio_intervalo, es.hora_fim_intervalo, es.bloquear_enturmacao_sem_vagas, es.bloquear_cadastro_turma_para_serie_com_vagas, ARRAY_TO_JSON(es.anos_letivos) AS anos_letivos ';
32 32
33 if (is_numeric($ref_usuario_cad)) { 33 if (is_numeric($ref_usuario_cad)) {
34 - if (class_exists('clsPmieducarUsuario')) {  
35 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
36 - if (method_exists($tmp_obj, 'existe')) {  
37 - if ($tmp_obj->existe()) {  
38 - $this->ref_usuario_cad = $ref_usuario_cad;  
39 - }  
40 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
41 - if ($tmp_obj->detalhe()) {  
42 - $this->ref_usuario_cad = $ref_usuario_cad;  
43 - }  
44 - }  
45 - } else {  
46 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
47 $this->ref_usuario_cad = $ref_usuario_cad; 34 $this->ref_usuario_cad = $ref_usuario_cad;
48 - }  
49 - }  
50 } 35 }
51 if (is_numeric($ref_usuario_exc)) { 36 if (is_numeric($ref_usuario_exc)) {
52 - if (class_exists('clsPmieducarUsuario')) {  
53 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
54 - if (method_exists($tmp_obj, 'existe')) {  
55 - if ($tmp_obj->existe()) {  
56 - $this->ref_usuario_exc = $ref_usuario_exc;  
57 - }  
58 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
59 - if ($tmp_obj->detalhe()) {  
60 - $this->ref_usuario_exc = $ref_usuario_exc;  
61 - }  
62 - }  
63 - } else {  
64 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
65 $this->ref_usuario_exc = $ref_usuario_exc; 37 $this->ref_usuario_exc = $ref_usuario_exc;
66 - }  
67 - }  
68 } 38 }
69 if (is_numeric($ref_cod_serie)) { 39 if (is_numeric($ref_cod_serie)) {
70 - if (class_exists('clsPmieducarSerie')) {  
71 - $tmp_obj = new clsPmieducarSerie($ref_cod_serie);  
72 - if (method_exists($tmp_obj, 'existe')) {  
73 - if ($tmp_obj->existe()) {  
74 - $this->ref_cod_serie = $ref_cod_serie;  
75 - }  
76 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
77 - if ($tmp_obj->detalhe()) {  
78 - $this->ref_cod_serie = $ref_cod_serie;  
79 - }  
80 - }  
81 - } else {  
82 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.serie WHERE cod_serie = '{$ref_cod_serie}'")) {  
83 $this->ref_cod_serie = $ref_cod_serie; 40 $this->ref_cod_serie = $ref_cod_serie;
84 - }  
85 - }  
86 } 41 }
87 if (is_numeric($ref_cod_escola)) { 42 if (is_numeric($ref_cod_escola)) {
88 - if (class_exists('clsPmieducarEscola')) {  
89 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
90 - if (method_exists($tmp_obj, 'existe')) {  
91 - if ($tmp_obj->existe()) {  
92 - $this->ref_cod_escola = $ref_cod_escola;  
93 - }  
94 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
95 - if ($tmp_obj->detalhe()) {  
96 - $this->ref_cod_escola = $ref_cod_escola;  
97 - }  
98 - }  
99 - } else {  
100 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
101 $this->ref_cod_escola = $ref_cod_escola; 43 $this->ref_cod_escola = $ref_cod_escola;
102 - }  
103 - }  
104 } 44 }
105 45
106 if (($hora_inicial)) { 46 if (($hora_inicial)) {
ieducar/intranet/include/pmieducar/clsPmieducarEscolaSerieDisciplina.inc.php
@@ -43,26 +43,8 @@ class clsPmieducarEscolaSerieDisciplina extends Model @@ -43,26 +43,8 @@ class clsPmieducarEscolaSerieDisciplina extends Model
43 } 43 }
44 44
45 if (is_numeric($ref_ref_cod_escola) && is_numeric($ref_ref_cod_serie)) { 45 if (is_numeric($ref_ref_cod_escola) && is_numeric($ref_ref_cod_serie)) {
46 - if (class_exists('clsPmieducarEscolaSerie')) {  
47 - $tmp_obj = new clsPmieducarEscolaSerie($ref_ref_cod_escola, $ref_ref_cod_serie);  
48 -  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_ref_cod_escola = $ref_ref_cod_escola;  
52 - $this->ref_ref_cod_serie = $ref_ref_cod_serie;  
53 - }  
54 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
55 - if ($tmp_obj->detalhe()) {  
56 - $this->ref_ref_cod_escola = $ref_ref_cod_escola;  
57 - $this->ref_ref_cod_serie = $ref_ref_cod_serie;  
58 - }  
59 - }  
60 - } else {  
61 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_serie WHERE ref_cod_escola = '{$ref_ref_cod_escola}' AND ref_cod_serie = '{$ref_ref_cod_serie}'")) {  
62 $this->ref_ref_cod_escola = $ref_ref_cod_escola; 46 $this->ref_ref_cod_escola = $ref_ref_cod_escola;
63 $this->ref_ref_cod_serie = $ref_ref_cod_serie; 47 $this->ref_ref_cod_serie = $ref_ref_cod_serie;
64 - }  
65 - }  
66 } else { 48 } else {
67 $this->ref_ref_cod_serie = $ref_ref_cod_serie; 49 $this->ref_ref_cod_serie = $ref_ref_cod_serie;
68 } 50 }
ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php
@@ -38,112 +38,22 @@ class clsPmieducarExemplar extends Model @@ -38,112 +38,22 @@ class clsPmieducarExemplar extends Model
38 $this->_campos_lista = $this->_todos_campos = 'e.cod_exemplar, e.ref_cod_fonte, e.ref_cod_motivo_baixa, e.ref_cod_acervo, e.ref_cod_situacao, e.ref_usuario_exc, e.ref_usuario_cad, e.permite_emprestimo, e.preco, e.data_cadastro, e.data_exclusao, e.ativo, e.data_aquisicao, e.tombo, e.sequencial, e.data_baixa_exemplar'; 38 $this->_campos_lista = $this->_todos_campos = 'e.cod_exemplar, e.ref_cod_fonte, e.ref_cod_motivo_baixa, e.ref_cod_acervo, e.ref_cod_situacao, e.ref_usuario_exc, e.ref_usuario_cad, e.permite_emprestimo, e.preco, e.data_cadastro, e.data_exclusao, e.ativo, e.data_aquisicao, e.tombo, e.sequencial, e.data_baixa_exemplar';
39 39
40 if (is_numeric($ref_cod_fonte)) { 40 if (is_numeric($ref_cod_fonte)) {
41 - if (class_exists('clsPmieducarFonte')) {  
42 - $tmp_obj = new clsPmieducarFonte($ref_cod_fonte);  
43 - if (method_exists($tmp_obj, 'existe')) {  
44 - if ($tmp_obj->existe()) {  
45 - $this->ref_cod_fonte = $ref_cod_fonte;  
46 - }  
47 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
48 - if ($tmp_obj->detalhe()) {  
49 - $this->ref_cod_fonte = $ref_cod_fonte;  
50 - }  
51 - }  
52 - } else {  
53 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.fonte WHERE cod_fonte = '{$ref_cod_fonte}'")) {  
54 $this->ref_cod_fonte = $ref_cod_fonte; 41 $this->ref_cod_fonte = $ref_cod_fonte;
55 - }  
56 - }  
57 } 42 }
58 if (is_numeric($ref_cod_motivo_baixa)) { 43 if (is_numeric($ref_cod_motivo_baixa)) {
59 - if (class_exists('clsPmieducarMotivoBaixa')) {  
60 - $tmp_obj = new clsPmieducarMotivoBaixa($ref_cod_motivo_baixa);  
61 - if (method_exists($tmp_obj, 'existe')) {  
62 - if ($tmp_obj->existe()) {  
63 - $this->ref_cod_motivo_baixa = $ref_cod_motivo_baixa;  
64 - }  
65 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
66 - if ($tmp_obj->detalhe()) {  
67 - $this->ref_cod_motivo_baixa = $ref_cod_motivo_baixa;  
68 - }  
69 - }  
70 - } else {  
71 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.motivo_baixa WHERE cod_motivo_baixa = '{$ref_cod_motivo_baixa}'")) {  
72 $this->ref_cod_motivo_baixa = $ref_cod_motivo_baixa; 44 $this->ref_cod_motivo_baixa = $ref_cod_motivo_baixa;
73 - }  
74 - }  
75 } 45 }
76 if (is_numeric($ref_cod_acervo)) { 46 if (is_numeric($ref_cod_acervo)) {
77 - if (class_exists('clsPmieducarAcervo')) {  
78 - $tmp_obj = new clsPmieducarAcervo($ref_cod_acervo);  
79 - if (method_exists($tmp_obj, 'existe')) {  
80 - if ($tmp_obj->existe()) {  
81 - $this->ref_cod_acervo = $ref_cod_acervo;  
82 - }  
83 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
84 - if ($tmp_obj->detalhe()) {  
85 - $this->ref_cod_acervo = $ref_cod_acervo;  
86 - }  
87 - }  
88 - } else {  
89 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.acervo WHERE cod_acervo = '{$ref_cod_acervo}'")) {  
90 $this->ref_cod_acervo = $ref_cod_acervo; 47 $this->ref_cod_acervo = $ref_cod_acervo;
91 - }  
92 - }  
93 } 48 }
94 if (is_numeric($ref_cod_situacao)) { 49 if (is_numeric($ref_cod_situacao)) {
95 - if (class_exists('clsPmieducarSituacao')) {  
96 - $tmp_obj = new clsPmieducarSituacao($ref_cod_situacao);  
97 - if (method_exists($tmp_obj, 'existe')) {  
98 - if ($tmp_obj->existe()) {  
99 - $this->ref_cod_situacao = $ref_cod_situacao;  
100 - }  
101 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
102 - if ($tmp_obj->detalhe()) {  
103 - $this->ref_cod_situacao = $ref_cod_situacao;  
104 - }  
105 - }  
106 - } else {  
107 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.situacao WHERE cod_situacao = '{$ref_cod_situacao}'")) {  
108 $this->ref_cod_situacao = $ref_cod_situacao; 50 $this->ref_cod_situacao = $ref_cod_situacao;
109 - }  
110 - }  
111 } 51 }
112 if (is_numeric($ref_usuario_exc)) { 52 if (is_numeric($ref_usuario_exc)) {
113 - if (class_exists('clsPmieducarUsuario')) {  
114 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
115 - if (method_exists($tmp_obj, 'existe')) {  
116 - if ($tmp_obj->existe()) {  
117 - $this->ref_usuario_exc = $ref_usuario_exc;  
118 - }  
119 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
120 - if ($tmp_obj->detalhe()) {  
121 - $this->ref_usuario_exc = $ref_usuario_exc;  
122 - }  
123 - }  
124 - } else {  
125 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
126 $this->ref_usuario_exc = $ref_usuario_exc; 53 $this->ref_usuario_exc = $ref_usuario_exc;
127 - }  
128 - }  
129 } 54 }
130 if (is_numeric($ref_usuario_cad)) { 55 if (is_numeric($ref_usuario_cad)) {
131 - if (class_exists('clsPmieducarUsuario')) {  
132 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
133 - if (method_exists($tmp_obj, 'existe')) {  
134 - if ($tmp_obj->existe()) {  
135 - $this->ref_usuario_cad = $ref_usuario_cad;  
136 - }  
137 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
138 - if ($tmp_obj->detalhe()) {  
139 - $this->ref_usuario_cad = $ref_usuario_cad;  
140 - }  
141 - }  
142 - } else {  
143 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
144 $this->ref_usuario_cad = $ref_usuario_cad; 56 $this->ref_usuario_cad = $ref_usuario_cad;
145 - }  
146 - }  
147 } 57 }
148 58
149 if (is_numeric($cod_exemplar)) { 59 if (is_numeric($cod_exemplar)) {
ieducar/intranet/include/pmieducar/clsPmieducarExemplarEmprestimo.inc.php
@@ -26,76 +26,16 @@ class clsPmieducarExemplarEmprestimo extends Model @@ -26,76 +26,16 @@ class clsPmieducarExemplarEmprestimo extends Model
26 $this->_campos_lista = $this->_todos_campos = 'ee.cod_emprestimo, ee.ref_usuario_devolucao, ee.ref_usuario_cad, ee.ref_cod_cliente, ee.ref_cod_exemplar, ee.data_retirada, ee.data_devolucao, ee.valor_multa'; 26 $this->_campos_lista = $this->_todos_campos = 'ee.cod_emprestimo, ee.ref_usuario_devolucao, ee.ref_usuario_cad, ee.ref_cod_cliente, ee.ref_cod_exemplar, ee.data_retirada, ee.data_devolucao, ee.valor_multa';
27 27
28 if (is_numeric($ref_usuario_devolucao)) { 28 if (is_numeric($ref_usuario_devolucao)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_devolucao);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_devolucao = $ref_usuario_devolucao;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_devolucao = $ref_usuario_devolucao;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_devolucao}'")) {  
42 $this->ref_usuario_devolucao = $ref_usuario_devolucao; 29 $this->ref_usuario_devolucao = $ref_usuario_devolucao;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_cod_cliente)) { 34 if (is_numeric($ref_cod_cliente)) {
65 - if (class_exists('clsPmieducarCliente')) {  
66 - $tmp_obj = new clsPmieducarCliente($ref_cod_cliente);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_cod_cliente = $ref_cod_cliente;  
70 - }  
71 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
72 - if ($tmp_obj->detalhe()) {  
73 - $this->ref_cod_cliente = $ref_cod_cliente;  
74 - }  
75 - }  
76 - } else {  
77 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.cliente WHERE cod_cliente = '{$ref_cod_cliente}'")) {  
78 $this->ref_cod_cliente = $ref_cod_cliente; 35 $this->ref_cod_cliente = $ref_cod_cliente;
79 - }  
80 - }  
81 } 36 }
82 if (is_numeric($ref_cod_exemplar)) { 37 if (is_numeric($ref_cod_exemplar)) {
83 - if (class_exists('clsPmieducarExemplar')) {  
84 - $tmp_obj = new clsPmieducarExemplar($ref_cod_exemplar);  
85 - if (method_exists($tmp_obj, 'existe')) {  
86 - if ($tmp_obj->existe()) {  
87 - $this->ref_cod_exemplar = $ref_cod_exemplar;  
88 - }  
89 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
90 - if ($tmp_obj->detalhe()) {  
91 - $this->ref_cod_exemplar = $ref_cod_exemplar;  
92 - }  
93 - }  
94 - } else {  
95 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.exemplar WHERE cod_exemplar = '{$ref_cod_exemplar}'")) {  
96 $this->ref_cod_exemplar = $ref_cod_exemplar; 38 $this->ref_cod_exemplar = $ref_cod_exemplar;
97 - }  
98 - }  
99 } 39 }
100 40
101 if (is_numeric($cod_emprestimo)) { 41 if (is_numeric($cod_emprestimo)) {
@@ -111,12 +51,7 @@ class clsPmieducarExemplarEmprestimo extends Model @@ -111,12 +51,7 @@ class clsPmieducarExemplarEmprestimo extends Model
111 $this->valor_multa = $valor_multa; 51 $this->valor_multa = $valor_multa;
112 } 52 }
113 if (is_numeric($ref_cod_biblioteca)) { 53 if (is_numeric($ref_cod_biblioteca)) {
114 - if ('clsPmieducarBiblioteca') {  
115 - $obj_tmp = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
116 - if ($obj_tmp->existe()) {  
117 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 54 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
118 - }  
119 - }  
120 } 55 }
121 } 56 }
122 57
ieducar/intranet/include/pmieducar/clsPmieducarExemplarTipo.inc.php
@@ -25,58 +25,13 @@ class clsPmieducarExemplarTipo extends Model @@ -25,58 +25,13 @@ class clsPmieducarExemplarTipo extends Model
25 $this->_campos_lista = $this->_todos_campos = 'et.cod_exemplar_tipo, et.ref_cod_biblioteca, et.ref_usuario_exc, et.ref_usuario_cad, et.nm_tipo, et.descricao, et.data_cadastro, et.data_exclusao, et.ativo'; 25 $this->_campos_lista = $this->_todos_campos = 'et.cod_exemplar_tipo, et.ref_cod_biblioteca, et.ref_usuario_exc, et.ref_usuario_cad, et.nm_tipo, et.descricao, et.data_cadastro, et.data_exclusao, et.ativo';
26 26
27 if (is_numeric($ref_cod_biblioteca)) { 27 if (is_numeric($ref_cod_biblioteca)) {
28 - if (class_exists('clsPmieducarBiblioteca')) {  
29 - $tmp_obj = new clsPmieducarBiblioteca($ref_cod_biblioteca);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_cod_biblioteca = $ref_cod_biblioteca;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.biblioteca WHERE cod_biblioteca = '{$ref_cod_biblioteca}'")) {  
41 $this->ref_cod_biblioteca = $ref_cod_biblioteca; 28 $this->ref_cod_biblioteca = $ref_cod_biblioteca;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 if (is_numeric($ref_usuario_cad)) { 33 if (is_numeric($ref_usuario_cad)) {
64 - if (class_exists('clsPmieducarUsuario')) {  
65 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
66 - if (method_exists($tmp_obj, 'existe')) {  
67 - if ($tmp_obj->existe()) {  
68 - $this->ref_usuario_cad = $ref_usuario_cad;  
69 - }  
70 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
71 - if ($tmp_obj->detalhe()) {  
72 - $this->ref_usuario_cad = $ref_usuario_cad;  
73 - }  
74 - }  
75 - } else {  
76 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
77 $this->ref_usuario_cad = $ref_usuario_cad; 34 $this->ref_usuario_cad = $ref_usuario_cad;
78 - }  
79 - }  
80 } 35 }
81 36
82 if (is_numeric($cod_exemplar_tipo)) { 37 if (is_numeric($cod_exemplar_tipo)) {
ieducar/intranet/include/pmieducar/clsPmieducarFaltaAluno.inc.php
@@ -29,100 +29,21 @@ class clsPmieducarFaltaAluno extends Model @@ -29,100 +29,21 @@ class clsPmieducarFaltaAluno extends Model
29 $this->_campos_lista = $this->_todos_campos = 'cod_falta_aluno, ref_usuario_exc, ref_usuario_cad, ref_cod_serie, ref_cod_escola, ref_cod_disciplina, ref_cod_matricula, faltas, data_cadastro, data_exclusao, ativo, modulo, ref_cod_curso_disciplina'; 29 $this->_campos_lista = $this->_todos_campos = 'cod_falta_aluno, ref_usuario_exc, ref_usuario_cad, ref_cod_serie, ref_cod_escola, ref_cod_disciplina, ref_cod_matricula, faltas, data_cadastro, data_exclusao, ativo, modulo, ref_cod_curso_disciplina';
30 30
31 if (is_numeric($ref_usuario_exc)) { 31 if (is_numeric($ref_usuario_exc)) {
32 - if (class_exists('clsPmieducarUsuario')) {  
33 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
34 - if (method_exists($tmp_obj, 'existe')) {  
35 - if ($tmp_obj->existe()) {  
36 - $this->ref_usuario_exc = $ref_usuario_exc;  
37 - }  
38 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
39 - if ($tmp_obj->detalhe()) {  
40 - $this->ref_usuario_exc = $ref_usuario_exc;  
41 - }  
42 - }  
43 - } else {  
44 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
45 $this->ref_usuario_exc = $ref_usuario_exc; 32 $this->ref_usuario_exc = $ref_usuario_exc;
46 - }  
47 - }  
48 } 33 }
49 if (is_numeric($ref_usuario_cad)) { 34 if (is_numeric($ref_usuario_cad)) {
50 - if (class_exists('clsPmieducarUsuario')) {  
51 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
52 - if (method_exists($tmp_obj, 'existe')) {  
53 - if ($tmp_obj->existe()) {  
54 - $this->ref_usuario_cad = $ref_usuario_cad;  
55 - }  
56 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
57 - if ($tmp_obj->detalhe()) {  
58 - $this->ref_usuario_cad = $ref_usuario_cad;  
59 - }  
60 - }  
61 - } else {  
62 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
63 $this->ref_usuario_cad = $ref_usuario_cad; 35 $this->ref_usuario_cad = $ref_usuario_cad;
64 - }  
65 - }  
66 } 36 }
67 if (is_numeric($ref_cod_matricula)) { 37 if (is_numeric($ref_cod_matricula)) {
68 - if (class_exists('clsPmieducarMatricula')) {  
69 - $tmp_obj = new clsPmieducarMatricula($ref_cod_matricula);  
70 - if (method_exists($tmp_obj, 'existe')) {  
71 - if ($tmp_obj->existe()) {  
72 - $this->ref_cod_matricula = $ref_cod_matricula;  
73 - }  
74 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
75 - if ($tmp_obj->detalhe()) {  
76 - $this->ref_cod_matricula = $ref_cod_matricula;  
77 - }  
78 - }  
79 - } else {  
80 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula WHERE ref_cod_matricula = '{$ref_cod_matricula}'")) {  
81 $this->ref_cod_matricula = $ref_cod_matricula; 38 $this->ref_cod_matricula = $ref_cod_matricula;
82 - }  
83 - }  
84 } 39 }
85 if (is_numeric($ref_cod_disciplina) && is_numeric($ref_cod_escola) && is_numeric($ref_cod_serie)) { 40 if (is_numeric($ref_cod_disciplina) && is_numeric($ref_cod_escola) && is_numeric($ref_cod_serie)) {
86 - if (class_exists('clsPmieducarEscolaSerieDisciplina')) {  
87 - $tmp_obj = new clsPmieducarEscolaSerieDisciplina($ref_cod_serie, $ref_cod_escola, $ref_cod_disciplina);  
88 - if (method_exists($tmp_obj, 'existe')) {  
89 - if ($tmp_obj->existe()) {  
90 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
91 - $this->ref_cod_escola = $ref_cod_escola;  
92 - $this->ref_cod_serie = $ref_cod_serie;  
93 - }  
94 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
95 - if ($tmp_obj->detalhe()) {  
96 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
97 - $this->ref_cod_escola = $ref_cod_escola;  
98 - $this->ref_cod_serie = $ref_cod_serie;  
99 - }  
100 - }  
101 - } else {  
102 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_serie_disciplina WHERE ref_cod_disciplina = '{$ref_cod_disciplina}' AND ref_cod_escola = '{$ref_cod_escola}' AND ref_cod_serie = '{$ref_cod_serie}'")) {  
103 $this->ref_cod_disciplina = $ref_cod_disciplina; 41 $this->ref_cod_disciplina = $ref_cod_disciplina;
104 $this->ref_cod_escola = $ref_cod_escola; 42 $this->ref_cod_escola = $ref_cod_escola;
105 $this->ref_cod_serie = $ref_cod_serie; 43 $this->ref_cod_serie = $ref_cod_serie;
106 - }  
107 - }  
108 } 44 }
109 if (is_numeric($ref_cod_curso_disciplina)) { 45 if (is_numeric($ref_cod_curso_disciplina)) {
110 - if (class_exists('clsPmieducarDisciplina')) {  
111 - $tmp_obj = new clsPmieducarDisciplina($ref_cod_curso_disciplina);  
112 - if (method_exists($tmp_obj, 'existe')) {  
113 - if ($tmp_obj->existe()) {  
114 - $this->ref_cod_curso_disciplina = $ref_cod_curso_disciplina;  
115 - }  
116 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
117 - if ($tmp_obj->detalhe()) {  
118 - $this->ref_cod_curso_disciplina = $ref_cod_curso_disciplina;  
119 - }  
120 - }  
121 - } else {  
122 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.disciplina WHERE cod_disciplina = '{$ref_cod_curso_disciplina}'")) {  
123 $this->ref_cod_curso_disciplina = $ref_cod_curso_disciplina; 46 $this->ref_cod_curso_disciplina = $ref_cod_curso_disciplina;
124 - }  
125 - }  
126 } 47 }
127 48
128 if (is_numeric($cod_falta_aluno)) { 49 if (is_numeric($cod_falta_aluno)) {
ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtraso.inc.php
@@ -44,96 +44,20 @@ class clsPmieducarFaltaAtraso extends Model @@ -44,96 +44,20 @@ class clsPmieducarFaltaAtraso extends Model
44 $this->_campos_lista = $this->_todos_campos = 'cod_falta_atraso, ref_cod_escola, ref_ref_cod_instituicao, ref_usuario_exc, ref_usuario_cad, ref_cod_servidor, tipo, data_falta_atraso, qtd_horas, qtd_min, justificada, data_cadastro, data_exclusao, ativo'; 44 $this->_campos_lista = $this->_todos_campos = 'cod_falta_atraso, ref_cod_escola, ref_ref_cod_instituicao, ref_usuario_exc, ref_usuario_cad, ref_cod_servidor, tipo, data_falta_atraso, qtd_horas, qtd_min, justificada, data_cadastro, data_exclusao, ativo';
45 45
46 if (is_numeric($ref_cod_escola)) { 46 if (is_numeric($ref_cod_escola)) {
47 - if (class_exists('clsPmieducarEscola')) {  
48 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_cod_escola = $ref_cod_escola;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_cod_escola = $ref_cod_escola;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
60 $this->ref_cod_escola = $ref_cod_escola; 47 $this->ref_cod_escola = $ref_cod_escola;
61 - }  
62 - }  
63 } 48 }
64 49
65 if (is_numeric($ref_usuario_cad)) { 50 if (is_numeric($ref_usuario_cad)) {
66 - if (class_exists('clsPmieducarUsuario')) {  
67 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
68 - if (method_exists($tmp_obj, 'existe')) {  
69 - if ($tmp_obj->existe()) {  
70 - $this->ref_usuario_cad = $ref_usuario_cad;  
71 - }  
72 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
73 - if ($tmp_obj->detalhe()) {  
74 - $this->ref_usuario_cad = $ref_usuario_cad;  
75 - }  
76 - }  
77 - } else {  
78 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
79 $this->ref_usuario_cad = $ref_usuario_cad; 51 $this->ref_usuario_cad = $ref_usuario_cad;
80 - }  
81 - }  
82 } 52 }
83 53
84 if (is_numeric($ref_usuario_exc)) { 54 if (is_numeric($ref_usuario_exc)) {
85 - if (class_exists('clsPmieducarUsuario')) {  
86 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
87 - if (method_exists($tmp_obj, 'existe')) {  
88 - if ($tmp_obj->existe()) {  
89 - $this->ref_usuario_exc = $ref_usuario_exc;  
90 - }  
91 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
92 - if ($tmp_obj->detalhe()) {  
93 - $this->ref_usuario_exc = $ref_usuario_exc;  
94 - }  
95 - }  
96 - } else {  
97 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
98 $this->ref_usuario_exc = $ref_usuario_exc; 55 $this->ref_usuario_exc = $ref_usuario_exc;
99 - }  
100 - }  
101 } 56 }
102 57
103 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) { 58 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) {
104 - if (class_exists('clsPmieducarServidor')) {  
105 - $tmp_obj = new clsPmieducarServidor(  
106 - $ref_cod_servidor,  
107 - null,  
108 - null,  
109 - null,  
110 - null,  
111 - null,  
112 - null,  
113 - null,  
114 - $ref_ref_cod_instituicao  
115 - );  
116 -  
117 - if (method_exists($tmp_obj, 'existe')) {  
118 - if ($tmp_obj->existe()) {  
119 - $this->ref_cod_servidor = $ref_cod_servidor;  
120 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
121 - }  
122 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
123 - if ($tmp_obj->detalhe()) {  
124 - $this->ref_cod_servidor = $ref_cod_servidor;  
125 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
126 - }  
127 - }  
128 -  
129 - $this->ref_cod_servidor = $ref_cod_servidor;  
130 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
131 - } else {  
132 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.servidor WHERE cod_servidor = '{$ref_cod_servidor}' AND ref_cod_instituicao = '{$ref_ref_cod_instituicao}'")) {  
133 $this->ref_cod_servidor = $ref_cod_servidor; 59 $this->ref_cod_servidor = $ref_cod_servidor;
134 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao; 60 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;
135 - }  
136 - }  
137 } 61 }
138 62
139 if (is_numeric($cod_falta_atraso)) { 63 if (is_numeric($cod_falta_atraso)) {
ieducar/intranet/include/pmieducar/clsPmieducarFaltaAtrasoCompensado.inc.php
@@ -38,93 +38,20 @@ class clsPmieducarFaltaAtrasoCompensado extends Model @@ -38,93 +38,20 @@ class clsPmieducarFaltaAtrasoCompensado extends Model
38 $this->_campos_lista = $this->_todos_campos = 'cod_compensado, ref_cod_escola, ref_ref_cod_instituicao, ref_cod_servidor, ref_usuario_exc, ref_usuario_cad, data_inicio, data_fim, data_cadastro, data_exclusao, ativo'; 38 $this->_campos_lista = $this->_todos_campos = 'cod_compensado, ref_cod_escola, ref_ref_cod_instituicao, ref_cod_servidor, ref_usuario_exc, ref_usuario_cad, data_inicio, data_fim, data_cadastro, data_exclusao, ativo';
39 39
40 if (is_numeric($ref_cod_escola)) { 40 if (is_numeric($ref_cod_escola)) {
41 - if (class_exists('clsPmieducarEscola')) {  
42 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
43 - if (method_exists($tmp_obj, 'existe')) {  
44 - if ($tmp_obj->existe()) {  
45 - $this->ref_cod_escola = $ref_cod_escola;  
46 - }  
47 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
48 - if ($tmp_obj->detalhe()) {  
49 - $this->ref_cod_escola = $ref_cod_escola;  
50 - }  
51 - }  
52 - } else {  
53 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
54 $this->ref_cod_escola = $ref_cod_escola; 41 $this->ref_cod_escola = $ref_cod_escola;
55 - }  
56 - }  
57 } 42 }
58 43
59 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) { 44 if (is_numeric($ref_cod_servidor) && is_numeric($ref_ref_cod_instituicao)) {
60 - if (class_exists('clsPmieducarServidor')) {  
61 - $tmp_obj = new clsPmieducarServidor(  
62 - $ref_cod_servidor,  
63 - null,  
64 - null,  
65 - null,  
66 - null,  
67 - null,  
68 - null,  
69 - 1,  
70 - $ref_ref_cod_instituicao  
71 - );  
72 -  
73 - if (method_exists($tmp_obj, 'existe')) {  
74 - if ($tmp_obj->existe()) {  
75 - $this->ref_cod_servidor = $ref_cod_servidor;  
76 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
77 - }  
78 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
79 - if ($tmp_obj->detalhe()) {  
80 - $this->ref_cod_servidor = $ref_cod_servidor;  
81 - $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;  
82 - }  
83 - }  
84 - } else {  
85 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.servidor WHERE cod_servidor = '{$ref_cod_servidor}' AND ref_cod_instituicao = '{$ref_ref_cod_instituicao}'")) {  
86 $this->ref_cod_servidor = $ref_cod_servidor; 45 $this->ref_cod_servidor = $ref_cod_servidor;
87 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao; 46 $this->ref_ref_cod_instituicao = $ref_ref_cod_instituicao;
88 - }  
89 - }  
90 } 47 }
91 48
92 if (is_numeric($ref_usuario_exc)) { 49 if (is_numeric($ref_usuario_exc)) {
93 - if (class_exists('clsPmieducarUsuario')) {  
94 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
95 - if (method_exists($tmp_obj, 'existe')) {  
96 - if ($tmp_obj->existe()) {  
97 - $this->ref_usuario_exc = $ref_usuario_exc;  
98 - }  
99 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
100 - if ($tmp_obj->detalhe()) {  
101 - $this->ref_usuario_exc = $ref_usuario_exc;  
102 - }  
103 - }  
104 - } else {  
105 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
106 $this->ref_usuario_exc = $ref_usuario_exc; 50 $this->ref_usuario_exc = $ref_usuario_exc;
107 - }  
108 - }  
109 } 51 }
110 52
111 if (is_numeric($ref_usuario_cad)) { 53 if (is_numeric($ref_usuario_cad)) {
112 - if (class_exists('clsPmieducarUsuario')) {  
113 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
114 - if (method_exists($tmp_obj, 'existe')) {  
115 - if ($tmp_obj->existe()) {  
116 - $this->ref_usuario_cad = $ref_usuario_cad;  
117 - }  
118 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
119 - if ($tmp_obj->detalhe()) {  
120 - $this->ref_usuario_cad = $ref_usuario_cad;  
121 - }  
122 - }  
123 - } else {  
124 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
125 $this->ref_usuario_cad = $ref_usuario_cad; 54 $this->ref_usuario_cad = $ref_usuario_cad;
126 - }  
127 - }  
128 } 55 }
129 56
130 if (is_numeric($cod_compensado)) { 57 if (is_numeric($cod_compensado)) {
ieducar/intranet/include/pmieducar/clsPmieducarFaltas.inc.php
@@ -21,40 +21,10 @@ class clsPmieducarFaltas extends Model @@ -21,40 +21,10 @@ class clsPmieducarFaltas extends Model
21 $this->_campos_lista = $this->_todos_campos = 'ref_cod_matricula, sequencial, ref_usuario_cad, falta, data_cadastro'; 21 $this->_campos_lista = $this->_todos_campos = 'ref_cod_matricula, sequencial, ref_usuario_cad, falta, data_cadastro';
22 22
23 if (is_numeric($ref_cod_matricula)) { 23 if (is_numeric($ref_cod_matricula)) {
24 - if (class_exists('clsPmieducarMatricula')) {  
25 - $tmp_obj = new clsPmieducarMatricula($ref_cod_matricula);  
26 - if (method_exists($tmp_obj, 'existe')) {  
27 - if ($tmp_obj->existe()) {  
28 - $this->ref_cod_matricula = $ref_cod_matricula;  
29 - }  
30 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
31 - if ($tmp_obj->detalhe()) {  
32 - $this->ref_cod_matricula = $ref_cod_matricula;  
33 - }  
34 - }  
35 - } else {  
36 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula WHERE cod_matricula = '{$ref_cod_matricula}'")) {  
37 $this->ref_cod_matricula = $ref_cod_matricula; 24 $this->ref_cod_matricula = $ref_cod_matricula;
38 - }  
39 - }  
40 } 25 }
41 if (is_numeric($ref_usuario_cad)) { 26 if (is_numeric($ref_usuario_cad)) {
42 - if (class_exists('clsPmieducarUsuario')) {  
43 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
44 - if (method_exists($tmp_obj, 'existe')) {  
45 - if ($tmp_obj->existe()) {  
46 - $this->ref_usuario_cad = $ref_usuario_cad;  
47 - }  
48 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
49 - if ($tmp_obj->detalhe()) {  
50 - $this->ref_usuario_cad = $ref_usuario_cad;  
51 - }  
52 - }  
53 - } else {  
54 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
55 $this->ref_usuario_cad = $ref_usuario_cad; 27 $this->ref_usuario_cad = $ref_usuario_cad;
56 - }  
57 - }  
58 } 28 }
59 29
60 if (is_numeric($sequencial)) { 30 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarFonte.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarFonte extends Model @@ -25,40 +25,10 @@ class clsPmieducarFonte extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_fonte, ref_usuario_exc, ref_usuario_cad, nm_fonte, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_fonte, ref_usuario_exc, ref_usuario_cad, nm_fonte, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
26 26
27 if (is_numeric($ref_usuario_cad)) { 27 if (is_numeric($ref_usuario_cad)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_cad = $ref_usuario_cad;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_cad = $ref_usuario_cad;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
41 $this->ref_usuario_cad = $ref_usuario_cad; 28 $this->ref_usuario_cad = $ref_usuario_cad;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_fonte)) { 34 if (is_numeric($cod_fonte)) {
ieducar/intranet/include/pmieducar/clsPmieducarFuncao.inc.php
@@ -26,40 +26,10 @@ class clsPmieducarFuncao extends Model @@ -26,40 +26,10 @@ class clsPmieducarFuncao extends Model
26 $this->_campos_lista = $this->_todos_campos = 'cod_funcao, ref_usuario_exc, ref_usuario_cad, nm_funcao, abreviatura, professor, data_cadastro, data_exclusao, ativo, ref_cod_instituicao'; 26 $this->_campos_lista = $this->_todos_campos = 'cod_funcao, ref_usuario_exc, ref_usuario_cad, nm_funcao, abreviatura, professor, data_cadastro, data_exclusao, ativo, ref_cod_instituicao';
27 27
28 if (is_numeric($ref_usuario_exc)) { 28 if (is_numeric($ref_usuario_exc)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_exc = $ref_usuario_exc;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_exc = $ref_usuario_exc;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
42 $this->ref_usuario_exc = $ref_usuario_exc; 29 $this->ref_usuario_exc = $ref_usuario_exc;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($cod_funcao)) { 34 if (is_numeric($cod_funcao)) {
65 $this->cod_funcao = $cod_funcao; 35 $this->cod_funcao = $cod_funcao;
@@ -84,22 +54,7 @@ class clsPmieducarFuncao extends Model @@ -84,22 +54,7 @@ class clsPmieducarFuncao extends Model
84 } 54 }
85 55
86 if (is_numeric($ref_cod_instituicao)) { 56 if (is_numeric($ref_cod_instituicao)) {
87 - if (class_exists('clsPmieducarInstituicao')) {  
88 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
89 - if (method_exists($tmp_obj, 'existe')) {  
90 - if ($tmp_obj->existe()) {  
91 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
92 - }  
93 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
94 - if ($tmp_obj->detalhe()) {  
95 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
96 - }  
97 - }  
98 - } else {  
99 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
100 $this->ref_cod_instituicao = $ref_cod_instituicao; 57 $this->ref_cod_instituicao = $ref_cod_instituicao;
101 - }  
102 - }  
103 } 58 }
104 } 59 }
105 60
ieducar/intranet/include/pmieducar/clsPmieducarHabilitacao.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarHabilitacao extends Model @@ -25,40 +25,10 @@ class clsPmieducarHabilitacao extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_habilitacao, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_habilitacao, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao';
26 26
27 if (is_numeric($ref_usuario_cad)) { 27 if (is_numeric($ref_usuario_cad)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_cad = $ref_usuario_cad;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_cad = $ref_usuario_cad;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
41 $this->ref_usuario_cad = $ref_usuario_cad; 28 $this->ref_usuario_cad = $ref_usuario_cad;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_exc)) { 30 if (is_numeric($ref_usuario_exc)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_exc = $ref_usuario_exc;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_exc = $ref_usuario_exc;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
59 $this->ref_usuario_exc = $ref_usuario_exc; 31 $this->ref_usuario_exc = $ref_usuario_exc;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_habilitacao)) { 34 if (is_numeric($cod_habilitacao)) {
@@ -81,22 +51,7 @@ class clsPmieducarHabilitacao extends Model @@ -81,22 +51,7 @@ class clsPmieducarHabilitacao extends Model
81 } 51 }
82 52
83 if (is_numeric($ref_cod_instituicao)) { 53 if (is_numeric($ref_cod_instituicao)) {
84 - if (class_exists('clsPmieducarInstituicao')) {  
85 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
86 - if (method_exists($tmp_obj, 'existe')) {  
87 - if ($tmp_obj->existe()) {  
88 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
89 - }  
90 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
91 - if ($tmp_obj->detalhe()) {  
92 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
93 - }  
94 - }  
95 - } else {  
96 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE ref_cod_instituicao = '{$ref_cod_instituicao}'")) {  
97 $this->ref_cod_instituicao = $ref_cod_instituicao; 54 $this->ref_cod_instituicao = $ref_cod_instituicao;
98 - }  
99 - }  
100 } 55 }
101 } 56 }
102 57
ieducar/intranet/include/pmieducar/clsPmieducarHabilitacaoCurso.inc.php
@@ -18,40 +18,10 @@ class clsPmieducarHabilitacaoCurso extends Model @@ -18,40 +18,10 @@ class clsPmieducarHabilitacaoCurso extends Model
18 $this->_campos_lista = $this->_todos_campos = 'ref_cod_habilitacao, ref_cod_curso'; 18 $this->_campos_lista = $this->_todos_campos = 'ref_cod_habilitacao, ref_cod_curso';
19 19
20 if (is_numeric($ref_cod_curso)) { 20 if (is_numeric($ref_cod_curso)) {
21 - if (class_exists('clsPmieducarCurso')) {  
22 - $tmp_obj = new clsPmieducarCurso($ref_cod_curso);  
23 - if (method_exists($tmp_obj, 'existe')) {  
24 - if ($tmp_obj->existe()) {  
25 - $this->ref_cod_curso = $ref_cod_curso;  
26 - }  
27 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
28 - if ($tmp_obj->detalhe()) {  
29 - $this->ref_cod_curso = $ref_cod_curso;  
30 - }  
31 - }  
32 - } else {  
33 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.curso WHERE cod_curso = '{$ref_cod_curso}'")) {  
34 $this->ref_cod_curso = $ref_cod_curso; 21 $this->ref_cod_curso = $ref_cod_curso;
35 - }  
36 - }  
37 } 22 }
38 if (is_numeric($ref_cod_habilitacao)) { 23 if (is_numeric($ref_cod_habilitacao)) {
39 - if (class_exists('clsPmieducarHabilitacao')) {  
40 - $tmp_obj = new clsPmieducarHabilitacao($ref_cod_habilitacao);  
41 - if (method_exists($tmp_obj, 'existe')) {  
42 - if ($tmp_obj->existe()) {  
43 - $this->ref_cod_habilitacao = $ref_cod_habilitacao;  
44 - }  
45 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
46 - if ($tmp_obj->detalhe()) {  
47 - $this->ref_cod_habilitacao = $ref_cod_habilitacao;  
48 - }  
49 - }  
50 - } else {  
51 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.habilitacao WHERE cod_habilitacao = '{$ref_cod_habilitacao}'")) {  
52 $this->ref_cod_habilitacao = $ref_cod_habilitacao; 24 $this->ref_cod_habilitacao = $ref_cod_habilitacao;
53 - }  
54 - }  
55 } 25 }
56 } 26 }
57 27
ieducar/intranet/include/pmieducar/clsPmieducarHistoricoDisciplinas.inc.php
@@ -56,25 +56,8 @@ class clsPmieducarHistoricoDisciplinas extends Model @@ -56,25 +56,8 @@ class clsPmieducarHistoricoDisciplinas extends Model
56 ]); 56 ]);
57 57
58 if (is_numeric($ref_ref_cod_aluno) && is_numeric($ref_sequencial)) { 58 if (is_numeric($ref_ref_cod_aluno) && is_numeric($ref_sequencial)) {
59 - if (class_exists('clsPmieducarHistoricoEscolar')) {  
60 - $tmp_obj = new clsPmieducarHistoricoEscolar($ref_ref_cod_aluno, $ref_sequencial);  
61 - if (method_exists($tmp_obj, 'existe')) {  
62 - if ($tmp_obj->existe()) {  
63 - $this->ref_ref_cod_aluno = $ref_ref_cod_aluno;  
64 - $this->ref_sequencial = $ref_sequencial;  
65 - }  
66 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
67 - if ($tmp_obj->detalhe()) {  
68 - $this->ref_ref_cod_aluno = $ref_ref_cod_aluno;  
69 - $this->ref_sequencial = $ref_sequencial;  
70 - }  
71 - }  
72 - } else {  
73 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.historico_escolar WHERE ref_cod_aluno = '{$ref_ref_cod_aluno}' AND sequencial = '{$ref_sequencial}'")) {  
74 $this->ref_ref_cod_aluno = $ref_ref_cod_aluno; 59 $this->ref_ref_cod_aluno = $ref_ref_cod_aluno;
75 $this->ref_sequencial = $ref_sequencial; 60 $this->ref_sequencial = $ref_sequencial;
76 - }  
77 - }  
78 } 61 }
79 62
80 if (is_numeric($sequencial)) { 63 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarHistoricoEscolar.inc.php
@@ -46,94 +46,19 @@ class clsPmieducarHistoricoEscolar extends Model @@ -46,94 +46,19 @@ class clsPmieducarHistoricoEscolar extends Model
46 $this->_campos_lista = $this->_todos_campos = 'ref_cod_aluno, sequencial, ref_usuario_exc, ref_usuario_cad, ano, carga_horaria, dias_letivos, escola, escola_cidade, escola_uf, observacao, aprovado, data_cadastro, data_exclusao, ativo, faltas_globalizadas, ref_cod_instituicao, nm_serie, origem, extra_curricular, ref_cod_matricula, frequencia, registro, livro, folha, nm_curso, historico_grade_curso_id, aceleracao, ref_cod_escola, dependencia, posicao'; 46 $this->_campos_lista = $this->_todos_campos = 'ref_cod_aluno, sequencial, ref_usuario_exc, ref_usuario_cad, ano, carga_horaria, dias_letivos, escola, escola_cidade, escola_uf, observacao, aprovado, data_cadastro, data_exclusao, ativo, faltas_globalizadas, ref_cod_instituicao, nm_serie, origem, extra_curricular, ref_cod_matricula, frequencia, registro, livro, folha, nm_curso, historico_grade_curso_id, aceleracao, ref_cod_escola, dependencia, posicao';
47 47
48 if (is_numeric($ref_usuario_exc)) { 48 if (is_numeric($ref_usuario_exc)) {
49 - if (class_exists('clsPmieducarUsuario')) {  
50 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
51 - if (method_exists($tmp_obj, 'existe')) {  
52 - if ($tmp_obj->existe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
56 - if ($tmp_obj->detalhe()) {  
57 - $this->ref_usuario_exc = $ref_usuario_exc;  
58 - }  
59 - }  
60 - } else {  
61 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
62 $this->ref_usuario_exc = $ref_usuario_exc; 49 $this->ref_usuario_exc = $ref_usuario_exc;
63 - }  
64 - }  
65 } 50 }
66 if (is_numeric($ref_usuario_cad)) { 51 if (is_numeric($ref_usuario_cad)) {
67 - if (class_exists('clsPmieducarUsuario')) {  
68 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
69 - if (method_exists($tmp_obj, 'existe')) {  
70 - if ($tmp_obj->existe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
74 - if ($tmp_obj->detalhe()) {  
75 - $this->ref_usuario_cad = $ref_usuario_cad;  
76 - }  
77 - }  
78 - } else {  
79 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
80 $this->ref_usuario_cad = $ref_usuario_cad; 52 $this->ref_usuario_cad = $ref_usuario_cad;
81 - }  
82 - }  
83 } 53 }
84 if (is_numeric($ref_cod_aluno)) { 54 if (is_numeric($ref_cod_aluno)) {
85 - if (class_exists('clsPmieducarAluno')) {  
86 - $tmp_obj = new clsPmieducarAluno($ref_cod_aluno);  
87 - if (method_exists($tmp_obj, 'existe')) {  
88 - if ($tmp_obj->existe()) {  
89 - $this->ref_cod_aluno = $ref_cod_aluno;  
90 - }  
91 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
92 - if ($tmp_obj->detalhe()) {  
93 - $this->ref_cod_aluno = $ref_cod_aluno;  
94 - }  
95 - }  
96 - } else {  
97 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.aluno WHERE cod_aluno = '{$ref_cod_aluno}'")) {  
98 $this->ref_cod_aluno = $ref_cod_aluno; 55 $this->ref_cod_aluno = $ref_cod_aluno;
99 - }  
100 - }  
101 } 56 }
102 if (is_numeric($ref_cod_instituicao)) { 57 if (is_numeric($ref_cod_instituicao)) {
103 - if (class_exists('clsPmieducarInstituicao')) {  
104 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
105 - if (method_exists($tmp_obj, 'existe')) {  
106 - if ($tmp_obj->existe()) {  
107 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
108 - }  
109 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
110 - if ($tmp_obj->detalhe()) {  
111 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
112 - }  
113 - }  
114 - } else {  
115 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
116 $this->ref_cod_instituicao = $ref_cod_instituicao; 58 $this->ref_cod_instituicao = $ref_cod_instituicao;
117 - }  
118 - }  
119 } 59 }
120 if (is_numeric($ref_cod_matricula)) { 60 if (is_numeric($ref_cod_matricula)) {
121 - if (class_exists('clsPmieducarMatricula')) {  
122 - $tmp_obj = new clsPmieducarMatricula($ref_cod_matricula);  
123 - if (method_exists($tmp_obj, 'existe')) {  
124 - if ($tmp_obj->existe()) {  
125 - $this->ref_cod_matricula = $ref_cod_matricula;  
126 - }  
127 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
128 - if ($tmp_obj->detalhe()) {  
129 - $this->ref_cod_matricula = $ref_cod_matricula;  
130 - }  
131 - }  
132 - } else {  
133 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula WHERE cod_matricula = '{$ref_cod_matricula}'")) {  
134 $this->ref_cod_matricula = $ref_cod_matricula; 61 $this->ref_cod_matricula = $ref_cod_matricula;
135 - }  
136 - }  
137 } 62 }
138 63
139 if (is_numeric($sequencial)) { 64 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarInfraComodoFuncao.inc.php
@@ -26,58 +26,13 @@ class clsPmieducarInfraComodoFuncao extends Model @@ -26,58 +26,13 @@ class clsPmieducarInfraComodoFuncao extends Model
26 $this->_campos_lista = $this->_todos_campos = 'icf.cod_infra_comodo_funcao, icf.ref_usuario_exc, icf.ref_usuario_cad, icf.nm_funcao, icf.desc_funcao, icf.data_cadastro, icf.data_exclusao, icf.ativo, icf.ref_cod_escola '; 26 $this->_campos_lista = $this->_todos_campos = 'icf.cod_infra_comodo_funcao, icf.ref_usuario_exc, icf.ref_usuario_cad, icf.nm_funcao, icf.desc_funcao, icf.data_cadastro, icf.data_exclusao, icf.ativo, icf.ref_cod_escola ';
27 27
28 if (is_numeric($ref_usuario_cad)) { 28 if (is_numeric($ref_usuario_cad)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_cad = $ref_usuario_cad;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_cad = $ref_usuario_cad;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
42 $this->ref_usuario_cad = $ref_usuario_cad; 29 $this->ref_usuario_cad = $ref_usuario_cad;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_exc)) { 31 if (is_numeric($ref_usuario_exc)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_exc = $ref_usuario_exc;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_exc = $ref_usuario_exc;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
60 $this->ref_usuario_exc = $ref_usuario_exc; 32 $this->ref_usuario_exc = $ref_usuario_exc;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_cod_escola)) { 34 if (is_numeric($ref_cod_escola)) {
65 - if (class_exists('clsPmieducarEscola')) {  
66 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_cod_escola = $ref_cod_escola;  
70 - }  
71 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
72 - if ($tmp_obj->detalhe()) {  
73 - $this->ref_cod_escola = $ref_cod_escola;  
74 - }  
75 - }  
76 - } else {  
77 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
78 $this->ref_cod_escola = $ref_cod_escola; 35 $this->ref_cod_escola = $ref_cod_escola;
79 - }  
80 - }  
81 } 36 }
82 if (is_numeric($cod_infra_comodo_funcao)) { 37 if (is_numeric($cod_infra_comodo_funcao)) {
83 $this->cod_infra_comodo_funcao = $cod_infra_comodo_funcao; 38 $this->cod_infra_comodo_funcao = $cod_infra_comodo_funcao;
ieducar/intranet/include/pmieducar/clsPmieducarInfraPredio.inc.php
@@ -30,58 +30,13 @@ class clsPmieducarInfraPredio extends Model @@ -30,58 +30,13 @@ class clsPmieducarInfraPredio extends Model
30 $this->_campos_lista = str_replace(',', ', predio.', $this->_campos_lista); 30 $this->_campos_lista = str_replace(',', ', predio.', $this->_campos_lista);
31 31
32 if (is_numeric($ref_cod_escola)) { 32 if (is_numeric($ref_cod_escola)) {
33 - if (class_exists('clsPmieducarEscola')) {  
34 - $tmp_obj = new clsPmieducarEscola($ref_cod_escola);  
35 - if (method_exists($tmp_obj, 'existe')) {  
36 - if ($tmp_obj->existe()) {  
37 - $this->ref_cod_escola = $ref_cod_escola;  
38 - }  
39 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
40 - if ($tmp_obj->detalhe()) {  
41 - $this->ref_cod_escola = $ref_cod_escola;  
42 - }  
43 - }  
44 - } else {  
45 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola WHERE cod_escola = '{$ref_cod_escola}'")) {  
46 $this->ref_cod_escola = $ref_cod_escola; 33 $this->ref_cod_escola = $ref_cod_escola;
47 - }  
48 - }  
49 } 34 }
50 if (is_numeric($ref_usuario_exc)) { 35 if (is_numeric($ref_usuario_exc)) {
51 - if (class_exists('clsPmieducarUsuario')) {  
52 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
53 - if (method_exists($tmp_obj, 'existe')) {  
54 - if ($tmp_obj->existe()) {  
55 - $this->ref_usuario_exc = $ref_usuario_exc;  
56 - }  
57 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
58 - if ($tmp_obj->detalhe()) {  
59 - $this->ref_usuario_exc = $ref_usuario_exc;  
60 - }  
61 - }  
62 - } else {  
63 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
64 $this->ref_usuario_exc = $ref_usuario_exc; 36 $this->ref_usuario_exc = $ref_usuario_exc;
65 - }  
66 - }  
67 } 37 }
68 if (is_numeric($ref_usuario_cad)) { 38 if (is_numeric($ref_usuario_cad)) {
69 - if (class_exists('clsPmieducarUsuario')) {  
70 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
71 - if (method_exists($tmp_obj, 'existe')) {  
72 - if ($tmp_obj->existe()) {  
73 - $this->ref_usuario_cad = $ref_usuario_cad;  
74 - }  
75 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
76 - if ($tmp_obj->detalhe()) {  
77 - $this->ref_usuario_cad = $ref_usuario_cad;  
78 - }  
79 - }  
80 - } else {  
81 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
82 $this->ref_usuario_cad = $ref_usuario_cad; 39 $this->ref_usuario_cad = $ref_usuario_cad;
83 - }  
84 - }  
85 } 40 }
86 41
87 if (is_numeric($cod_infra_predio)) { 42 if (is_numeric($cod_infra_predio)) {
ieducar/intranet/include/pmieducar/clsPmieducarInfraPredioComodo.inc.php
@@ -28,76 +28,16 @@ class clsPmieducarInfraPredioComodo extends Model @@ -28,76 +28,16 @@ class clsPmieducarInfraPredioComodo extends Model
28 $this->_campos_lista = $this->_todos_campos = 'ipc.cod_infra_predio_comodo, ipc.ref_usuario_exc, ipc.ref_usuario_cad, ipc.ref_cod_infra_comodo_funcao, ipc.ref_cod_infra_predio, ipc.nm_comodo, ipc.desc_comodo, ipc.area, ipc.data_cadastro, ipc.data_exclusao, ipc.ativo'; 28 $this->_campos_lista = $this->_todos_campos = 'ipc.cod_infra_predio_comodo, ipc.ref_usuario_exc, ipc.ref_usuario_cad, ipc.ref_cod_infra_comodo_funcao, ipc.ref_cod_infra_predio, ipc.nm_comodo, ipc.desc_comodo, ipc.area, ipc.data_cadastro, ipc.data_exclusao, ipc.ativo';
29 29
30 if (is_numeric($ref_cod_infra_comodo_funcao)) { 30 if (is_numeric($ref_cod_infra_comodo_funcao)) {
31 - if (class_exists('clsPmieducarInfraComodoFuncao')) {  
32 - $tmp_obj = new clsPmieducarInfraComodoFuncao($ref_cod_infra_comodo_funcao);  
33 - if (method_exists($tmp_obj, 'existe')) {  
34 - if ($tmp_obj->existe()) {  
35 - $this->ref_cod_infra_comodo_funcao = $ref_cod_infra_comodo_funcao;  
36 - }  
37 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
38 - if ($tmp_obj->detalhe()) {  
39 - $this->ref_cod_infra_comodo_funcao = $ref_cod_infra_comodo_funcao;  
40 - }  
41 - }  
42 - } else {  
43 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.infra_comodo_funcao WHERE cod_infra_comodo_funcao = '{$ref_cod_infra_comodo_funcao}'")) {  
44 $this->ref_cod_infra_comodo_funcao = $ref_cod_infra_comodo_funcao; 31 $this->ref_cod_infra_comodo_funcao = $ref_cod_infra_comodo_funcao;
45 - }  
46 - }  
47 } 32 }
48 if (is_numeric($ref_usuario_exc)) { 33 if (is_numeric($ref_usuario_exc)) {
49 - if (class_exists('clsPmieducarUsuario')) {  
50 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
51 - if (method_exists($tmp_obj, 'existe')) {  
52 - if ($tmp_obj->existe()) {  
53 - $this->ref_usuario_exc = $ref_usuario_exc;  
54 - }  
55 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
56 - if ($tmp_obj->detalhe()) {  
57 - $this->ref_usuario_exc = $ref_usuario_exc;  
58 - }  
59 - }  
60 - } else {  
61 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
62 $this->ref_usuario_exc = $ref_usuario_exc; 34 $this->ref_usuario_exc = $ref_usuario_exc;
63 - }  
64 - }  
65 } 35 }
66 if (is_numeric($ref_usuario_cad)) { 36 if (is_numeric($ref_usuario_cad)) {
67 - if (class_exists('clsPmieducarUsuario')) {  
68 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
69 - if (method_exists($tmp_obj, 'existe')) {  
70 - if ($tmp_obj->existe()) {  
71 - $this->ref_usuario_cad = $ref_usuario_cad;  
72 - }  
73 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
74 - if ($tmp_obj->detalhe()) {  
75 - $this->ref_usuario_cad = $ref_usuario_cad;  
76 - }  
77 - }  
78 - } else {  
79 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
80 $this->ref_usuario_cad = $ref_usuario_cad; 37 $this->ref_usuario_cad = $ref_usuario_cad;
81 - }  
82 - }  
83 } 38 }
84 if (is_numeric($ref_cod_infra_predio)) { 39 if (is_numeric($ref_cod_infra_predio)) {
85 - if (class_exists('clsPmieducarInfraPredio')) {  
86 - $tmp_obj = new clsPmieducarInfraPredio($ref_cod_infra_predio);  
87 - if (method_exists($tmp_obj, 'existe')) {  
88 - if ($tmp_obj->existe()) {  
89 - $this->ref_cod_infra_predio = $ref_cod_infra_predio;  
90 - }  
91 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
92 - if ($tmp_obj->detalhe()) {  
93 - $this->ref_cod_infra_predio = $ref_cod_infra_predio;  
94 - }  
95 - }  
96 - } else {  
97 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.infra_predio WHERE cod_infra_predio = '{$ref_cod_infra_predio}'")) {  
98 $this->ref_cod_infra_predio = $ref_cod_infra_predio; 40 $this->ref_cod_infra_predio = $ref_cod_infra_predio;
99 - }  
100 - }  
101 } 41 }
102 42
103 if (is_numeric($cod_infra_predio_comodo)) { 43 if (is_numeric($cod_infra_predio_comodo)) {
ieducar/intranet/include/pmieducar/clsPmieducarInstituicao.inc.php
@@ -137,59 +137,14 @@ class clsPmieducarInstituicao extends Model @@ -137,59 +137,14 @@ class clsPmieducarInstituicao extends Model
137 '; 137 ';
138 138
139 if (is_numeric($ref_usuario_cad)) { 139 if (is_numeric($ref_usuario_cad)) {
140 - if (class_exists('clsPmieducarUsuario')) {  
141 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
142 - if (method_exists($tmp_obj, 'existe')) {  
143 - if ($tmp_obj->existe()) {  
144 - $this->ref_usuario_cad = $ref_usuario_cad;  
145 - }  
146 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
147 - if ($tmp_obj->detalhe()) {  
148 - $this->ref_usuario_cad = $ref_usuario_cad;  
149 - }  
150 - }  
151 - } else {  
152 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
153 $this->ref_usuario_cad = $ref_usuario_cad; 140 $this->ref_usuario_cad = $ref_usuario_cad;
154 - }  
155 - }  
156 } 141 }
157 142
158 if (is_numeric($ref_usuario_exc)) { 143 if (is_numeric($ref_usuario_exc)) {
159 - if (class_exists('clsPmieducarUsuario')) {  
160 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
161 - if (method_exists($tmp_obj, 'existe')) {  
162 - if ($tmp_obj->existe()) {  
163 - $this->ref_usuario_exc = $ref_usuario_exc;  
164 - }  
165 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
166 - if ($tmp_obj->detalhe()) {  
167 - $this->ref_usuario_exc = $ref_usuario_exc;  
168 - }  
169 - }  
170 - } else {  
171 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
172 $this->ref_usuario_exc = $ref_usuario_exc; 144 $this->ref_usuario_exc = $ref_usuario_exc;
173 - }  
174 - }  
175 } 145 }
176 if (is_string($ref_idtlog)) { 146 if (is_string($ref_idtlog)) {
177 - if (class_exists('clsTipoLogradouro')) {  
178 - $tmp_obj = new clsTipoLogradouro($ref_idtlog);  
179 - if (method_exists($tmp_obj, 'existe')) {  
180 - if ($tmp_obj->existe()) {  
181 - $this->ref_idtlog = $ref_idtlog;  
182 - }  
183 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
184 - if ($tmp_obj->detalhe()) {  
185 - $this->ref_idtlog = $ref_idtlog;  
186 - }  
187 - }  
188 - } else {  
189 - if ($db->CampoUnico("SELECT 1 FROM urbano.tipo_logradouro WHERE idtlog = '{$ref_idtlog}'")) {  
190 $this->ref_idtlog = $ref_idtlog; 147 $this->ref_idtlog = $ref_idtlog;
191 - }  
192 - }  
193 } 148 }
194 149
195 if (is_numeric($cod_instituicao)) { 150 if (is_numeric($cod_instituicao)) {
ieducar/intranet/include/pmieducar/clsPmieducarMatricula.inc.php
@@ -86,103 +86,23 @@ class clsPmieducarMatricula extends Model @@ -86,103 +86,23 @@ class clsPmieducarMatricula extends Model
86 $this->_campos_lista = $this->_todos_campos = 'm.cod_matricula, m.ref_cod_reserva_vaga, m.ref_ref_cod_escola, m.ref_ref_cod_serie, m.ref_usuario_exc, m.ref_usuario_cad, m.ref_cod_aluno, m.aprovado, m.data_cadastro, m.data_exclusao, m.ativo, m.ano, m.ultima_matricula, m.modulo,formando,descricao_reclassificacao,matricula_reclassificacao, m.ref_cod_curso,m.matricula_transferencia,m.semestre, m.data_matricula, m.data_cancel, m.ref_cod_abandono_tipo, m.turno_pre_matricula, m.dependencia, data_saida_escola'; 86 $this->_campos_lista = $this->_todos_campos = 'm.cod_matricula, m.ref_cod_reserva_vaga, m.ref_ref_cod_escola, m.ref_ref_cod_serie, m.ref_usuario_exc, m.ref_usuario_cad, m.ref_cod_aluno, m.aprovado, m.data_cadastro, m.data_exclusao, m.ativo, m.ano, m.ultima_matricula, m.modulo,formando,descricao_reclassificacao,matricula_reclassificacao, m.ref_cod_curso,m.matricula_transferencia,m.semestre, m.data_matricula, m.data_cancel, m.ref_cod_abandono_tipo, m.turno_pre_matricula, m.dependencia, data_saida_escola';
87 87
88 if (is_numeric($ref_usuario_exc)) { 88 if (is_numeric($ref_usuario_exc)) {
89 - if (class_exists('clsPmieducarUsuario')) {  
90 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
91 -  
92 - if (method_exists($tmp_obj, 'existe')) {  
93 - if ($tmp_obj->existe()) {  
94 - $this->ref_usuario_exc = $ref_usuario_exc;  
95 - }  
96 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
97 - if ($tmp_obj->detalhe()) {  
98 - $this->ref_usuario_exc = $ref_usuario_exc;  
99 - }  
100 - }  
101 - } else {  
102 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
103 $this->ref_usuario_exc = $ref_usuario_exc; 89 $this->ref_usuario_exc = $ref_usuario_exc;
104 - }  
105 - }  
106 } 90 }
107 91
108 if (is_numeric($ref_usuario_cad)) { 92 if (is_numeric($ref_usuario_cad)) {
109 - if (class_exists('clsPmieducarUsuario')) {  
110 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
111 -  
112 - if (method_exists($tmp_obj, 'existe')) {  
113 - if ($tmp_obj->existe()) {  
114 - $this->ref_usuario_cad = $ref_usuario_cad;  
115 - }  
116 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
117 - if ($tmp_obj->detalhe()) {  
118 - $this->ref_usuario_cad = $ref_usuario_cad;  
119 - }  
120 - }  
121 - } else {  
122 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
123 $this->ref_usuario_cad = $ref_usuario_cad; 93 $this->ref_usuario_cad = $ref_usuario_cad;
124 - }  
125 - }  
126 } 94 }
127 95
128 if (is_numeric($ref_cod_reserva_vaga)) { 96 if (is_numeric($ref_cod_reserva_vaga)) {
129 - if (class_exists('clsPmieducarReservaVaga')) {  
130 - $tmp_obj = new clsPmieducarReservaVaga($ref_cod_reserva_vaga);  
131 -  
132 - if (method_exists($tmp_obj, 'existe')) {  
133 - if ($tmp_obj->existe()) {  
134 - $this->ref_cod_reserva_vaga = $ref_cod_reserva_vaga;  
135 - }  
136 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
137 - if ($tmp_obj->detalhe()) {  
138 - $this->ref_cod_reserva_vaga = $ref_cod_reserva_vaga;  
139 - }  
140 - }  
141 - } else {  
142 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.reserva_vaga WHERE cod_reserva_vaga = '{$ref_cod_reserva_vaga}'")) {  
143 $this->ref_cod_reserva_vaga = $ref_cod_reserva_vaga; 97 $this->ref_cod_reserva_vaga = $ref_cod_reserva_vaga;
144 - }  
145 - }  
146 } 98 }
147 99
148 if (is_numeric($ref_cod_aluno)) { 100 if (is_numeric($ref_cod_aluno)) {
149 - if (class_exists('clsPmieducarAluno')) {  
150 - $tmp_obj = new clsPmieducarAluno($ref_cod_aluno);  
151 -  
152 - if (method_exists($tmp_obj, 'existe')) {  
153 - if ($tmp_obj->existe()) {  
154 - $this->ref_cod_aluno = $ref_cod_aluno;  
155 - }  
156 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
157 - if ($tmp_obj->detalhe()) {  
158 - $this->ref_cod_aluno = $ref_cod_aluno;  
159 - }  
160 - }  
161 - } else {  
162 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.aluno WHERE cod_aluno = '{$ref_cod_aluno}'")) {  
163 $this->ref_cod_aluno = $ref_cod_aluno; 101 $this->ref_cod_aluno = $ref_cod_aluno;
164 - }  
165 - }  
166 } 102 }
167 103
168 if (is_numeric($ref_cod_curso)) { 104 if (is_numeric($ref_cod_curso)) {
169 - if (class_exists('clsPmieducarCurso')) {  
170 - $tmp_obj = new clsPmieducarCurso($ref_cod_curso);  
171 -  
172 - if (method_exists($tmp_obj, 'existe')) {  
173 - if ($tmp_obj->existe()) {  
174 - $this->ref_cod_curso = $ref_cod_curso;  
175 - }  
176 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
177 - if ($tmp_obj->detalhe()) {  
178 - $this->ref_cod_curso = $ref_cod_curso;  
179 - }  
180 - }  
181 - } else {  
182 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.curso WHERE cod_curso = '{$ref_cod_curso}'")) {  
183 $this->ref_cod_curso = $ref_cod_curso; 105 $this->ref_cod_curso = $ref_cod_curso;
184 - }  
185 - }  
186 } 106 }
187 107
188 if (is_numeric($cod_matricula)) { 108 if (is_numeric($cod_matricula)) {
ieducar/intranet/include/pmieducar/clsPmieducarMatriculaExcessao.inc.php
@@ -26,52 +26,14 @@ class clsPmieducarMatriculaExcessao extends Model @@ -26,52 +26,14 @@ class clsPmieducarMatriculaExcessao extends Model
26 $this->_campos_lista = $this->_todos_campos = 'cod_aluno_excessao, ref_cod_matricula, ref_cod_turma, ref_sequencial, ref_cod_serie, ref_cod_escola, ref_cod_disciplina, reprovado_faltas, precisa_exame, permite_exame'; 26 $this->_campos_lista = $this->_todos_campos = 'cod_aluno_excessao, ref_cod_matricula, ref_cod_turma, ref_sequencial, ref_cod_serie, ref_cod_escola, ref_cod_disciplina, reprovado_faltas, precisa_exame, permite_exame';
27 27
28 if (is_numeric($ref_cod_serie) && is_numeric($ref_cod_escola) && is_numeric($ref_cod_disciplina)) { 28 if (is_numeric($ref_cod_serie) && is_numeric($ref_cod_escola) && is_numeric($ref_cod_disciplina)) {
29 - if (class_exists('clsPmieducarEscolaSerieDisciplina')) {  
30 - $tmp_obj = new clsPmieducarEscolaSerieDisciplina($ref_cod_serie, $ref_cod_escola, $ref_cod_disciplina);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_cod_serie = $ref_cod_serie;  
34 - $this->ref_cod_escola = $ref_cod_escola;  
35 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
36 - }  
37 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
38 - if ($tmp_obj->detalhe()) {  
39 - $this->ref_cod_serie = $ref_cod_serie;  
40 - $this->ref_cod_escola = $ref_cod_escola;  
41 - $this->ref_cod_disciplina = $ref_cod_disciplina;  
42 - }  
43 - }  
44 - } else {  
45 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.escola_serie_disciplina WHERE ref_ref_cod_serie = '{$ref_cod_serie}' AND ref_ref_cod_escola = '{$ref_cod_escola}' AND ref_cod_disciplina = '{$ref_cod_disciplina}'")) {  
46 $this->ref_cod_serie = $ref_cod_serie; 29 $this->ref_cod_serie = $ref_cod_serie;
47 $this->ref_cod_escola = $ref_cod_escola; 30 $this->ref_cod_escola = $ref_cod_escola;
48 $this->ref_cod_disciplina = $ref_cod_disciplina; 31 $this->ref_cod_disciplina = $ref_cod_disciplina;
49 - }  
50 - }  
51 } 32 }
52 if (is_numeric($ref_cod_matricula) && is_numeric($ref_cod_turma) && is_numeric($ref_sequencial)) { 33 if (is_numeric($ref_cod_matricula) && is_numeric($ref_cod_turma) && is_numeric($ref_sequencial)) {
53 - if (class_exists('clsPmieducarMatriculaTurma')) {  
54 - $tmp_obj = new clsPmieducarMatriculaTurma($ref_cod_matricula, $ref_cod_turma, $ref_sequencial);  
55 - if (method_exists($tmp_obj, 'existe')) {  
56 - if ($tmp_obj->existe()) {  
57 - $this->ref_cod_matricula = $ref_cod_matricula;  
58 - $this->ref_cod_turma = $ref_cod_turma;  
59 - $this->ref_sequencial = $ref_sequencial;  
60 - }  
61 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
62 - if ($tmp_obj->detalhe()) {  
63 - $this->ref_cod_matricula = $ref_cod_matricula;  
64 - $this->ref_cod_turma = $ref_cod_turma;  
65 - $this->ref_sequencial = $ref_sequencial;  
66 - }  
67 - }  
68 - } else {  
69 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula_turma WHERE ref_cod_matricula = '{$ref_cod_matricula}' AND ref_cod_turma = '{$ref_cod_turma}' AND sequencial = '{$ref_sequencial}'")) {  
70 $this->ref_cod_matricula = $ref_cod_matricula; 34 $this->ref_cod_matricula = $ref_cod_matricula;
71 $this->ref_cod_turma = $ref_cod_turma; 35 $this->ref_cod_turma = $ref_cod_turma;
72 $this->ref_sequencial = $ref_sequencial; 36 $this->ref_sequencial = $ref_sequencial;
73 - }  
74 - }  
75 } 37 }
76 38
77 if (is_numeric($cod_aluno_excessao)) { 39 if (is_numeric($cod_aluno_excessao)) {
ieducar/intranet/include/pmieducar/clsPmieducarMatriculaOcorrenciaDisciplinar.inc.php
@@ -26,76 +26,16 @@ class clsPmieducarMatriculaOcorrenciaDisciplinar extends Model @@ -26,76 +26,16 @@ class clsPmieducarMatriculaOcorrenciaDisciplinar extends Model
26 $this->_campos_lista = $this->_todos_campos = 'ref_cod_matricula, ref_cod_tipo_ocorrencia_disciplinar, sequencial, ref_usuario_exc, ref_usuario_cad, observacao, data_cadastro, data_exclusao, ativo, visivel_pais, cod_ocorrencia_disciplinar'; 26 $this->_campos_lista = $this->_todos_campos = 'ref_cod_matricula, ref_cod_tipo_ocorrencia_disciplinar, sequencial, ref_usuario_exc, ref_usuario_cad, observacao, data_cadastro, data_exclusao, ativo, visivel_pais, cod_ocorrencia_disciplinar';
27 27
28 if (is_numeric($ref_usuario_exc)) { 28 if (is_numeric($ref_usuario_exc)) {
29 - if (class_exists('clsPmieducarUsuario')) {  
30 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_usuario_exc = $ref_usuario_exc;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_usuario_exc = $ref_usuario_exc;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
42 $this->ref_usuario_exc = $ref_usuario_exc; 29 $this->ref_usuario_exc = $ref_usuario_exc;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_cod_tipo_ocorrencia_disciplinar)) { 34 if (is_numeric($ref_cod_tipo_ocorrencia_disciplinar)) {
65 - if (class_exists('clsPmieducarTipoOcorrenciaDisciplinar')) {  
66 - $tmp_obj = new clsPmieducarTipoOcorrenciaDisciplinar($ref_cod_tipo_ocorrencia_disciplinar);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_cod_tipo_ocorrencia_disciplinar = $ref_cod_tipo_ocorrencia_disciplinar;  
70 - }  
71 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
72 - if ($tmp_obj->detalhe()) {  
73 - $this->ref_cod_tipo_ocorrencia_disciplinar = $ref_cod_tipo_ocorrencia_disciplinar;  
74 - }  
75 - }  
76 - } else {  
77 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.tipo_ocorrencia_disciplinar WHERE cod_tipo_ocorrencia_disciplinar = '{$ref_cod_tipo_ocorrencia_disciplinar}'")) {  
78 $this->ref_cod_tipo_ocorrencia_disciplinar = $ref_cod_tipo_ocorrencia_disciplinar; 35 $this->ref_cod_tipo_ocorrencia_disciplinar = $ref_cod_tipo_ocorrencia_disciplinar;
79 - }  
80 - }  
81 } 36 }
82 if (is_numeric($ref_cod_matricula)) { 37 if (is_numeric($ref_cod_matricula)) {
83 - if (class_exists('clsPmieducarMatricula')) {  
84 - $tmp_obj = new clsPmieducarMatricula($ref_cod_matricula);  
85 - if (method_exists($tmp_obj, 'existe')) {  
86 - if ($tmp_obj->existe()) {  
87 - $this->ref_cod_matricula = $ref_cod_matricula;  
88 - }  
89 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
90 - if ($tmp_obj->detalhe()) {  
91 - $this->ref_cod_matricula = $ref_cod_matricula;  
92 - }  
93 - }  
94 - } else {  
95 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula WHERE cod_matricula = '{$ref_cod_matricula}'")) {  
96 $this->ref_cod_matricula = $ref_cod_matricula; 38 $this->ref_cod_matricula = $ref_cod_matricula;
97 - }  
98 - }  
99 } 39 }
100 40
101 if (is_numeric($sequencial)) { 41 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarMatriculaTurma.inc.php
@@ -54,79 +54,19 @@ class clsPmieducarMatriculaTurma extends Model @@ -54,79 +54,19 @@ class clsPmieducarMatriculaTurma extends Model
54 $this->_campos_lista = $this->_todos_campos = 'mt.ref_cod_matricula, mt.abandono, mt.reclassificado, mt.remanejado, mt.transferido, mt.falecido, mt.ref_cod_turma, mt.etapa_educacenso, mt.turma_unificada, mt.ref_usuario_exc, mt.ref_usuario_cad, mt.data_cadastro, mt.data_exclusao, mt.ativo, mt.sequencial, mt.data_enturmacao, mt.turno_id, mt.tipo_atendimento, (SELECT pes.nome FROM cadastro.pessoa pes, pmieducar.aluno alu, pmieducar.matricula mat WHERE pes.idpes = alu.ref_idpes AND mat.ref_cod_aluno = alu.cod_aluno AND mat.cod_matricula = mt.ref_cod_matricula ) AS nome, (SELECT (pes.nome) FROM cadastro.pessoa pes, pmieducar.aluno alu, pmieducar.matricula mat WHERE pes.idpes = alu.ref_idpes AND mat.ref_cod_aluno = alu.cod_aluno AND mat.cod_matricula = mt.ref_cod_matricula ) AS nome_ascii'; 54 $this->_campos_lista = $this->_todos_campos = 'mt.ref_cod_matricula, mt.abandono, mt.reclassificado, mt.remanejado, mt.transferido, mt.falecido, mt.ref_cod_turma, mt.etapa_educacenso, mt.turma_unificada, mt.ref_usuario_exc, mt.ref_usuario_cad, mt.data_cadastro, mt.data_exclusao, mt.ativo, mt.sequencial, mt.data_enturmacao, mt.turno_id, mt.tipo_atendimento, (SELECT pes.nome FROM cadastro.pessoa pes, pmieducar.aluno alu, pmieducar.matricula mat WHERE pes.idpes = alu.ref_idpes AND mat.ref_cod_aluno = alu.cod_aluno AND mat.cod_matricula = mt.ref_cod_matricula ) AS nome, (SELECT (pes.nome) FROM cadastro.pessoa pes, pmieducar.aluno alu, pmieducar.matricula mat WHERE pes.idpes = alu.ref_idpes AND mat.ref_cod_aluno = alu.cod_aluno AND mat.cod_matricula = mt.ref_cod_matricula ) AS nome_ascii';
55 55
56 if (is_numeric($ref_usuario_exc)) { 56 if (is_numeric($ref_usuario_exc)) {
57 - if (class_exists('clsPmieducarUsuario')) {  
58 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
59 - if (method_exists($tmp_obj, 'existe')) {  
60 - if ($tmp_obj->existe()) {  
61 - $this->ref_usuario_exc = $ref_usuario_exc;  
62 - }  
63 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
64 - if ($tmp_obj->detalhe()) {  
65 - $this->ref_usuario_exc = $ref_usuario_exc;  
66 - }  
67 - }  
68 - } else {  
69 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
70 $this->ref_usuario_exc = $ref_usuario_exc; 57 $this->ref_usuario_exc = $ref_usuario_exc;
71 - }  
72 - }  
73 } 58 }
74 59
75 if (is_numeric($ref_usuario_cad)) { 60 if (is_numeric($ref_usuario_cad)) {
76 - if (class_exists('clsPmieducarUsuario')) {  
77 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
78 - if (method_exists($tmp_obj, 'existe')) {  
79 - if ($tmp_obj->existe()) {  
80 - $this->ref_usuario_cad = $ref_usuario_cad;  
81 - }  
82 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
83 - if ($tmp_obj->detalhe()) {  
84 - $this->ref_usuario_cad = $ref_usuario_cad;  
85 - }  
86 - }  
87 - } else {  
88 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
89 $this->ref_usuario_cad = $ref_usuario_cad; 61 $this->ref_usuario_cad = $ref_usuario_cad;
90 - }  
91 - }  
92 } 62 }
93 63
94 if (is_numeric($ref_cod_turma)) { 64 if (is_numeric($ref_cod_turma)) {
95 - if (class_exists('clsPmieducarTurma')) {  
96 - $tmp_obj = new clsPmieducarTurma($ref_cod_turma);  
97 - if (method_exists($tmp_obj, 'existe')) {  
98 - if ($tmp_obj->existe()) {  
99 - $this->ref_cod_turma = $ref_cod_turma;  
100 - }  
101 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
102 - if ($tmp_obj->detalhe()) {  
103 - $this->ref_cod_turma = $ref_cod_turma;  
104 - }  
105 - }  
106 - } else {  
107 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.turma WHERE cod_turma = '{$ref_cod_turma}'")) {  
108 $this->ref_cod_turma = $ref_cod_turma; 65 $this->ref_cod_turma = $ref_cod_turma;
109 - }  
110 - }  
111 } 66 }
112 67
113 if (is_numeric($ref_cod_matricula)) { 68 if (is_numeric($ref_cod_matricula)) {
114 - if (class_exists('clsPmieducarMatricula')) {  
115 - $tmp_obj = new clsPmieducarMatricula($ref_cod_matricula);  
116 - if (method_exists($tmp_obj, 'existe')) {  
117 - if ($tmp_obj->existe()) {  
118 - $this->ref_cod_matricula = $ref_cod_matricula;  
119 - }  
120 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
121 - if ($tmp_obj->detalhe()) {  
122 - $this->ref_cod_matricula = $ref_cod_matricula;  
123 - }  
124 - }  
125 - } else {  
126 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.matricula WHERE cod_matricula = '{$ref_cod_matricula}'")) {  
127 $this->ref_cod_matricula = $ref_cod_matricula; 69 $this->ref_cod_matricula = $ref_cod_matricula;
128 - }  
129 - }  
130 } 70 }
131 71
132 if (!empty($data_cadastro)) { 72 if (!empty($data_cadastro)) {
@@ -146,22 +86,7 @@ class clsPmieducarMatriculaTurma extends Model @@ -146,22 +86,7 @@ class clsPmieducarMatriculaTurma extends Model
146 } 86 }
147 87
148 if (is_numeric($ref_cod_turma_transf)) { 88 if (is_numeric($ref_cod_turma_transf)) {
149 - if (class_exists('clsPmieducarTurma')) {  
150 - $tmp_obj = new clsPmieducarTurma($ref_cod_turma_transf);  
151 - if (method_exists($tmp_obj, 'existe')) {  
152 - if ($tmp_obj->existe()) {  
153 - $this->ref_cod_turma_transf = $ref_cod_turma_transf;  
154 - }  
155 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
156 - if ($tmp_obj->detalhe()) {  
157 - $this->ref_cod_turma_transf = $ref_cod_turma_transf;  
158 - }  
159 - }  
160 - } else {  
161 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.turma WHERE cod_turma = '{$ref_cod_turma_transf}'")) {  
162 $this->ref_cod_turma_transf = $ref_cod_turma_transf; 89 $this->ref_cod_turma_transf = $ref_cod_turma_transf;
163 - }  
164 - }  
165 } 90 }
166 91
167 if (is_numeric($sequencial)) { 92 if (is_numeric($sequencial)) {
ieducar/intranet/include/pmieducar/clsPmieducarModulo.inc.php
@@ -51,61 +51,15 @@ class clsPmieducarModulo extends Model @@ -51,61 +51,15 @@ class clsPmieducarModulo extends Model
51 $this->_campos_lista = $this->_todos_campos = 'cod_modulo, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, num_meses, num_semanas, data_cadastro, data_exclusao, ativo, ref_cod_instituicao, num_etapas'; 51 $this->_campos_lista = $this->_todos_campos = 'cod_modulo, ref_usuario_exc, ref_usuario_cad, nm_tipo, descricao, num_meses, num_semanas, data_cadastro, data_exclusao, ativo, ref_cod_instituicao, num_etapas';
52 52
53 if (is_numeric($ref_cod_instituicao)) { 53 if (is_numeric($ref_cod_instituicao)) {
54 - if (class_exists('clsPmieducarInstituicao')) {  
55 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
56 -  
57 - if (method_exists($tmp_obj, 'existe')) {  
58 - if ($tmp_obj->existe()) {  
59 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
60 - }  
61 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
62 - if ($tmp_obj->detalhe()) {  
63 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
64 - }  
65 - }  
66 - } else {  
67 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
68 $this->ref_cod_instituicao = $ref_cod_instituicao; 54 $this->ref_cod_instituicao = $ref_cod_instituicao;
69 - }  
70 - }  
71 } 55 }
72 56
73 if (is_numeric($ref_usuario_exc)) { 57 if (is_numeric($ref_usuario_exc)) {
74 - if (class_exists('clsPmieducarUsuario')) {  
75 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
76 - if (method_exists($tmp_obj, 'existe')) {  
77 - if ($tmp_obj->existe()) {  
78 - $this->ref_usuario_exc = $ref_usuario_exc;  
79 - }  
80 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
81 - if ($tmp_obj->detalhe()) {  
82 - $this->ref_usuario_exc = $ref_usuario_exc;  
83 - }  
84 - }  
85 - } else {  
86 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
87 $this->ref_usuario_exc = $ref_usuario_exc; 58 $this->ref_usuario_exc = $ref_usuario_exc;
88 - }  
89 - }  
90 } 59 }
91 60
92 if (is_numeric($ref_usuario_cad)) { 61 if (is_numeric($ref_usuario_cad)) {
93 - if (class_exists('clsPmieducarUsuario')) {  
94 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
95 - if (method_exists($tmp_obj, 'existe')) {  
96 - if ($tmp_obj->existe()) {  
97 - $this->ref_usuario_cad = $ref_usuario_cad;  
98 - }  
99 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
100 - if ($tmp_obj->detalhe()) {  
101 - $this->ref_usuario_cad = $ref_usuario_cad;  
102 - }  
103 - }  
104 - } else {  
105 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
106 $this->ref_usuario_cad = $ref_usuario_cad; 62 $this->ref_usuario_cad = $ref_usuario_cad;
107 - }  
108 - }  
109 } 63 }
110 64
111 if (is_numeric($cod_modulo)) { 65 if (is_numeric($cod_modulo)) {
ieducar/intranet/include/pmieducar/clsPmieducarMotivoAfastamento.inc.php
@@ -34,41 +34,11 @@ class clsPmieducarMotivoAfastamento extends Model @@ -34,41 +34,11 @@ class clsPmieducarMotivoAfastamento extends Model
34 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_afastamento, ref_usuario_exc, ref_usuario_cad, nm_motivo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao'; 34 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_afastamento, ref_usuario_exc, ref_usuario_cad, nm_motivo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_instituicao';
35 35
36 if (is_numeric($ref_usuario_cad)) { 36 if (is_numeric($ref_usuario_cad)) {
37 - if (class_exists('clsPmieducarUsuario')) {  
38 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
39 - if (method_exists($tmp_obj, 'existe')) {  
40 - if ($tmp_obj->existe()) {  
41 - $this->ref_usuario_cad = $ref_usuario_cad;  
42 - }  
43 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
44 - if ($tmp_obj->detalhe()) {  
45 - $this->ref_usuario_cad = $ref_usuario_cad;  
46 - }  
47 - }  
48 - } else {  
49 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
50 $this->ref_usuario_cad = $ref_usuario_cad; 37 $this->ref_usuario_cad = $ref_usuario_cad;
51 - }  
52 - }  
53 } 38 }
54 39
55 if (is_numeric($ref_usuario_exc)) { 40 if (is_numeric($ref_usuario_exc)) {
56 - if (class_exists('clsPmieducarUsuario')) {  
57 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
58 - if (method_exists($tmp_obj, 'existe')) {  
59 - if ($tmp_obj->existe()) {  
60 - $this->ref_usuario_exc = $ref_usuario_exc;  
61 - }  
62 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
63 - if ($tmp_obj->detalhe()) {  
64 - $this->ref_usuario_exc = $ref_usuario_exc;  
65 - }  
66 - }  
67 - } else {  
68 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
69 $this->ref_usuario_exc = $ref_usuario_exc; 41 $this->ref_usuario_exc = $ref_usuario_exc;
70 - }  
71 - }  
72 } 42 }
73 43
74 if (is_numeric($cod_motivo_afastamento)) { 44 if (is_numeric($cod_motivo_afastamento)) {
@@ -96,22 +66,7 @@ class clsPmieducarMotivoAfastamento extends Model @@ -96,22 +66,7 @@ class clsPmieducarMotivoAfastamento extends Model
96 } 66 }
97 67
98 if (is_numeric($ref_cod_instituicao)) { 68 if (is_numeric($ref_cod_instituicao)) {
99 - if (class_exists('clsPmieducarInstituicao')) {  
100 - $tmp_obj = new clsPmieducarInstituicao($ref_cod_instituicao);  
101 - if (method_exists($tmp_obj, 'existe')) {  
102 - if ($tmp_obj->existe()) {  
103 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
104 - }  
105 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
106 - if ($tmp_obj->detalhe()) {  
107 - $this->ref_cod_instituicao = $ref_cod_instituicao;  
108 - }  
109 - }  
110 - } else {  
111 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.instituicao WHERE cod_instituicao = '{$ref_cod_instituicao}'")) {  
112 $this->ref_cod_instituicao = $ref_cod_instituicao; 69 $this->ref_cod_instituicao = $ref_cod_instituicao;
113 - }  
114 - }  
115 } 70 }
116 } 71 }
117 72
ieducar/intranet/include/pmieducar/clsPmieducarMotivoBaixa.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarMotivoBaixa extends Model @@ -25,40 +25,10 @@ class clsPmieducarMotivoBaixa extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_baixa, ref_usuario_exc, ref_usuario_cad, nm_motivo_baixa, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_baixa, ref_usuario_exc, ref_usuario_cad, nm_motivo_baixa, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
26 26
27 if (is_numeric($ref_usuario_exc)) { 27 if (is_numeric($ref_usuario_exc)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_exc = $ref_usuario_exc;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_exc = $ref_usuario_exc;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
41 $this->ref_usuario_exc = $ref_usuario_exc; 28 $this->ref_usuario_exc = $ref_usuario_exc;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_cad)) { 30 if (is_numeric($ref_usuario_cad)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_cad = $ref_usuario_cad;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_cad = $ref_usuario_cad;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
59 $this->ref_usuario_cad = $ref_usuario_cad; 31 $this->ref_usuario_cad = $ref_usuario_cad;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_motivo_baixa)) { 34 if (is_numeric($cod_motivo_baixa)) {
ieducar/intranet/include/pmieducar/clsPmieducarMotivoSuspensao.inc.php
@@ -25,40 +25,10 @@ class clsPmieducarMotivoSuspensao extends Model @@ -25,40 +25,10 @@ class clsPmieducarMotivoSuspensao extends Model
25 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_suspensao, ref_usuario_exc, ref_usuario_cad, nm_motivo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca'; 25 $this->_campos_lista = $this->_todos_campos = 'cod_motivo_suspensao, ref_usuario_exc, ref_usuario_cad, nm_motivo, descricao, data_cadastro, data_exclusao, ativo, ref_cod_biblioteca';
26 26
27 if (is_numeric($ref_usuario_exc)) { 27 if (is_numeric($ref_usuario_exc)) {
28 - if (class_exists('clsPmieducarUsuario')) {  
29 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
30 - if (method_exists($tmp_obj, 'existe')) {  
31 - if ($tmp_obj->existe()) {  
32 - $this->ref_usuario_exc = $ref_usuario_exc;  
33 - }  
34 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
35 - if ($tmp_obj->detalhe()) {  
36 - $this->ref_usuario_exc = $ref_usuario_exc;  
37 - }  
38 - }  
39 - } else {  
40 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
41 $this->ref_usuario_exc = $ref_usuario_exc; 28 $this->ref_usuario_exc = $ref_usuario_exc;
42 - }  
43 - }  
44 } 29 }
45 if (is_numeric($ref_usuario_cad)) { 30 if (is_numeric($ref_usuario_cad)) {
46 - if (class_exists('clsPmieducarUsuario')) {  
47 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
48 - if (method_exists($tmp_obj, 'existe')) {  
49 - if ($tmp_obj->existe()) {  
50 - $this->ref_usuario_cad = $ref_usuario_cad;  
51 - }  
52 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
53 - if ($tmp_obj->detalhe()) {  
54 - $this->ref_usuario_cad = $ref_usuario_cad;  
55 - }  
56 - }  
57 - } else {  
58 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
59 $this->ref_usuario_cad = $ref_usuario_cad; 31 $this->ref_usuario_cad = $ref_usuario_cad;
60 - }  
61 - }  
62 } 32 }
63 33
64 if (is_numeric($cod_motivo_suspensao)) { 34 if (is_numeric($cod_motivo_suspensao)) {
ieducar/intranet/include/pmieducar/clsPmieducarNivel.inc.php
@@ -26,76 +26,16 @@ class clsPmieducarNivel extends Model @@ -26,76 +26,16 @@ class clsPmieducarNivel extends Model
26 $this->_campos_lista = $this->_todos_campos = 'cod_nivel, ref_cod_categoria_nivel, ref_usuario_exc, ref_usuario_cad, ref_cod_nivel_anterior, nm_nivel, salario_base, data_cadastro, data_exclusao, ativo'; 26 $this->_campos_lista = $this->_todos_campos = 'cod_nivel, ref_cod_categoria_nivel, ref_usuario_exc, ref_usuario_cad, ref_cod_nivel_anterior, nm_nivel, salario_base, data_cadastro, data_exclusao, ativo';
27 27
28 if (is_numeric($ref_cod_categoria_nivel)) { 28 if (is_numeric($ref_cod_categoria_nivel)) {
29 - if (class_exists('clsPmieducarCategoriaNivel')) {  
30 - $tmp_obj = new clsPmieducarCategoriaNivel($ref_cod_categoria_nivel);  
31 - if (method_exists($tmp_obj, 'existe')) {  
32 - if ($tmp_obj->existe()) {  
33 - $this->ref_cod_categoria_nivel = $ref_cod_categoria_nivel;  
34 - }  
35 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
36 - if ($tmp_obj->detalhe()) {  
37 - $this->ref_cod_categoria_nivel = $ref_cod_categoria_nivel;  
38 - }  
39 - }  
40 - } else {  
41 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.categoria_nivel WHERE cod_categoria_nivel = '{$ref_cod_categoria_nivel}'")) {  
42 $this->ref_cod_categoria_nivel = $ref_cod_categoria_nivel; 29 $this->ref_cod_categoria_nivel = $ref_cod_categoria_nivel;
43 - }  
44 - }  
45 } 30 }
46 if (is_numeric($ref_usuario_cad)) { 31 if (is_numeric($ref_usuario_cad)) {
47 - if (class_exists('clsPmieducarUsuario')) {  
48 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_cad);  
49 - if (method_exists($tmp_obj, 'existe')) {  
50 - if ($tmp_obj->existe()) {  
51 - $this->ref_usuario_cad = $ref_usuario_cad;  
52 - }  
53 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
54 - if ($tmp_obj->detalhe()) {  
55 - $this->ref_usuario_cad = $ref_usuario_cad;  
56 - }  
57 - }  
58 - } else {  
59 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_cad}'")) {  
60 $this->ref_usuario_cad = $ref_usuario_cad; 32 $this->ref_usuario_cad = $ref_usuario_cad;
61 - }  
62 - }  
63 } 33 }
64 if (is_numeric($ref_usuario_exc)) { 34 if (is_numeric($ref_usuario_exc)) {
65 - if (class_exists('clsPmieducarUsuario')) {  
66 - $tmp_obj = new clsPmieducarUsuario($ref_usuario_exc);  
67 - if (method_exists($tmp_obj, 'existe')) {  
68 - if ($tmp_obj->existe()) {  
69 - $this->ref_usuario_exc = $ref_usuario_exc;  
70 - }  
71 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
72 - if ($tmp_obj->detalhe()) {  
73 - $this->ref_usuario_exc = $ref_usuario_exc;  
74 - }  
75 - }  
76 - } else {  
77 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.usuario WHERE cod_usuario = '{$ref_usuario_exc}'")) {  
78 $this->ref_usuario_exc = $ref_usuario_exc; 35 $this->ref_usuario_exc = $ref_usuario_exc;
79 - }  
80 - }  
81 } 36 }
82 if (is_numeric($ref_cod_nivel_anterior)) { 37 if (is_numeric($ref_cod_nivel_anterior)) {
83 - if (class_exists('clsPmieducarNivel')) {  
84 - $tmp_obj = new clsPmieducarNivel($ref_cod_nivel_anterior);  
85 - if (method_exists($tmp_obj, 'existe')) {  
86 - if ($tmp_obj->existe()) {  
87 - $this->ref_cod_nivel_anterior = $ref_cod_nivel_anterior;  
88 - }  
89 - } elseif (method_exists($tmp_obj, 'detalhe')) {  
90 - if ($tmp_obj->detalhe()) {  
91 - $this->ref_cod_nivel_anterior = $ref_cod_nivel_anterior;  
92 - }  
93 - }  
94 - } else {  
95 - if ($db->CampoUnico("SELECT 1 FROM pmieducar.nivel WHERE cod_nivel = '{$ref_cod_nivel_anterior}'")) {  
96 $this->ref_cod_nivel_anterior = $ref_cod_nivel_anterior; 38 $this->ref_cod_nivel_anterior = $ref_cod_nivel_anterior;
97 - }  
98 - }  
99 } 39 }
100 40
101 if (is_numeric($cod_nivel)) { 41 if (is_numeric($cod_nivel)) {