Commit 312b9483859f14061a5f187eeab1b758894e26e8

Authored by Lucas D'Avila
1 parent bd0f6561
Exists in master

Removido arquivos desnecessários.

ieducar/info.php
@@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
1 -<?php  
2 -  
3 -/**  
4 - * Visualização da configuração do PHP.  
5 - *  
6 - * Apague este arquivo uma vez que seu i-Educar estiver em produção por razões de segurança.  
7 - * Utilize para verificar se os módulos necessários foram instalados.  
8 - *  
9 - */  
10 -  
11 -phpinfo();  
ieducar/intranet/climaDADOS.html
@@ -1,106 +0,0 @@ @@ -1,106 +0,0 @@
1 -<!doctype html public "-//w3c//dtd html 4.0 transitional//en">  
2 -<html>  
3 -<head>  
4 - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  
5 - <meta http-equiv="Expires" content="17 Jun 2007 09:00">  
6 - <title>Dados Meteorol&oacute;gicos</title>  
7 -</head>  
8 -<body text="#000000" bgcolor="#FFFFFF" link="#000099" vlink="#000099" alink="#FF0000">  
9 -<map name="univali_cttmar"><area shape="rect" coords="0,0,333,24" href="http://www.univali.br"><area  
10 -shape="rect" coords="0,25,333,43" href="http://www.cttmar.univali.br"></map><map name="barra_navega"  
11 -><area shape="rect" coords="0,0,37,14" href="index.html"><area shape="rect" coords="38,0,148,14"  
12 -href="previsao.htm"><area shape="rect" coords="149,0,279,14" href="DADOS.HTM"><area shape="rect"  
13 -coords="280,0,396,14" href="IMAGENS.HTM"><area shape="rect" coords="400,0,480,14" href=  
14 -"INFORMACOES.HTM"></map><map name="regioes"><area shape="rect" coords="452,35,538,54" href=  
15 -"Norte.htm"><area shape="rect" coords="451,176,540,190" href="Central.htm"><area shape="rect"  
16 -coords="387,289,458,306" href="Sul.htm"></map>  
17 -<center><table COLS=1 WIDTH="80%" >  
18 -<caption>  
19 -<blockquote>  
20 -<blockquote>  
21 -<center><img ISMAP SRC="figuras/univali_cttmar.gif" BORDER=0 usemap="#univali_cttmar" height=44  
22 -width=334></center>  
23 -</blockquote>  
24 -</blockquote>  
25 -  
26 -<font face="Arial,Helvetica">Esta&ccedil;&atilde;o Meteorol&oacute;gica  
27 -Autom&aacute;tica - Itaja&iacute; - SC</font>  
28 -<br><font face="Arial,Helvetica">Qui 17/05/2007 09:00</font>  
29 -<br>&nbsp;  
30 -<center><table COLS=2 WIDTH="100%" >  
31 -<tr>  
32 -<td><b><font face="Arial,Helvetica"><font color="#000000">Temperatura Ambiente</font></font></b></td  
33 ->  
34 -  
35 -<td><b><font face="Arial,Helvetica"><font color="#000000">17.7&ordm;C</font></font></b></td>  
36 -</tr>  
37 -  
38 -<tr>  
39 -<td><b><font face="Arial,Helvetica"><font color="#000000">Dire&ccedil;&atilde;o/Velocidade  
40 -do Vento</font></font></b></td>  
41 -  
42 -<td><b><font face="Arial,Helvetica"><font color="#000000">NNW - 6 km/h</font></font></b></td>  
43 -</tr>  
44 -  
45 -<tr>  
46 -<td><b><font face="Arial,Helvetica"><font color="#000000">Umidade</font></font></b></td>  
47 -  
48 -<td><b><font face="Arial,Helvetica"><font color="#000000">94%</font></font></b></td>  
49 -</tr>  
50 -  
51 -<tr>  
52 -<td><b><font face="Arial,Helvetica"><font color="#000000">Press&atilde;o  
53 -Atmosf&eacute;rica</font></font></b></td>  
54 -  
55 -<td><b><font face="Arial,Helvetica"><font color="#000000">1020.1 mb</font></font></b></td>  
56 -</tr>  
57 -  
58 -<tr>  
59 -<td><b><font face="Arial,Helvetica"><font color="#000000">Chuva Di&aacute;ria</font></font></b></td>  
60 -  
61 -<td><b><font face="Arial,Helvetica"><font color="#000000">10.0 mm</font></font></b></td>  
62 -</tr>  
63 -  
64 -<tr>  
65 -<td><b><font face="Arial,Helvetica"><font color="#000000">Ponto de Orvalho</font></font></b></td>  
66 -  
67 -<td><b><font face="Arial,Helvetica"><font color="#000000">16.7&ordm;C</font></font></b></td>  
68 -</tr>  
69 -  
70 -<tr>  
71 -<td><b><font face="Arial,Helvetica"><font color="#000000">&nbsp;&nbsp;&nbsp;  
72 -&Iacute;ndice de Resfriamento pelo Vento*</font></font></b></td>  
73 -  
74 -<td><b><font face="Arial,Helvetica"><font color="#000000">17.7&ordm;C</font></font></b></td>  
75 -</tr>  
76 -  
77 -<tr>  
78 -<td><b><font face="Arial,Helvetica"><font color="#000000">&nbsp;&nbsp;&nbsp;  
79 -&Iacute;ndice de Desconforto T&eacute;rmico**</font></font></b></td>  
80 -  
81 -<td><b><font face="Arial,Helvetica"><font color="#000000">17.7&ordm;C</font></font></b></td>  
82 -</tr>  
83 -  
84 -<tr>  
85 -<td><font face="Arial,Helvetica"><font color="#000000">* <font size=-1>Temperatura  
86 -+ vento</font></font></font>  
87 -<br><font face="Arial,Helvetica"><font color="#000000"><font size=-1>**Temperatura  
88 -+ umidade</font></font></font></td>  
89 -  
90 -<td></td>  
91 -</tr>  
92 -</table></center>  
93 -  
94 -<center>  
95 -<p><img ISMAP SRC="figuras/barra_navega.gif" BORDER=0 usemap="#barra_navega" height=16 width=482>  
96 -</center>  
97 -</caption>  
98 -  
99 -<tr>  
100 -<td></td>  
101 -</tr>  
102 -</table></center>  
103 -  
104 -</body>  
105 -</html>  
106 -  
ieducar/intranet/climaNORTE.html
@@ -1,797 +0,0 @@ @@ -1,797 +0,0 @@
1 -<!-- saved from url=(0022)http://internet.e-mail -->  
2 -<!doctype html public "-//w3c//dtd html 4.0 transitional//en">  
3 -<html>  
4 -<head>  
5 - <meta http-equiv="Content-Type" content="text/html;  
6 - charset=iso-8859-1">  
7 - <meta http-equiv="Expires" content="Ano 2007 00:00">  
8 - <title>Previs&atilde;o do Tempo</title>  
9 -</head>  
10 -<body text="#000000" bgcolor="#FFFFFF" link="#000099" vlink="#000099"  
11 -alink=  
12 -"#FF0000">  
13 -<map name="barra_navega"><area shape="rect" coords="0,0,37,14" href=  
14 -"index.html"  
15 -><area shape="rect"  
16 -coords="38,0,148,14" href="previsao.htm"><area shape="rect" coords=  
17 -"149,0,279,14" href="DADOS.HTM">  
18 -<area shape="rect" coords="280,0,396,14" href="IMAGENS.HTM"><area  
19 -shape="rect"  
20 -coords="400,0,480,14"  
21 -href="INFORMACOES.HTM"></map>  
22 -<center><b><font face="Arial"><font size=+0>Previs&atilde;o do Tempo -  
23 -Litoral Norte</font></font></b>  
24 -<br><font face="Arial"><font size=-1>Quinta-feira</font></font>  
25 -<p><font face="Arial,Helvetica"><font size=-1>Aconselhamos pressionar  
26 -<i>Reload  
27 -</i>  
28 -ou <i>Atualizar</i> no seu</font></font>  
29 -<br><font face="Arial,Helvetica"><font size=-1>browser caso a  
30 -previs&atilde;o  
31 -do tempo n&atilde;o esteja atualizada.</font></font>  
32 -<br><font face="Arial,Helvetica"><font size=-1>&nbsp;</font></font>  
33 -</center>  
34 -  
35 -<center><table COLS=1 WIDTH="60%" >  
36 -<tr>  
37 -<td><b><font face="Arial,Helvetica"><font  
38 -color="#000099">Quinta-feira&nbsp;&nbsp;17/Mai/2007</font></font></b>  
39 -</td>  
40 -</tr>  
41 -  
42 -<tr>  
43 -<td><img SRC="simbolos/chuva.jpg" height=89 width=124>&nbsp;<img  
44 -SRC="simbolos/nenhum.jpg"  
45 -height=89 width=124>&nbsp;  
46 -<img SRC="simbolos/nenhum.jpg" height=89 width=124></td>  
47 -</tr>  
48 -  
49 -<tr>  
50 -<td>  
51 -<li>  
52 -<font face="Arial,Helvetica"><font size=-1>Céu com muita nebulosidade  
53 -com condições de chuva no período.  
54 -</font>  
55 -</font></li>  
56 -</td>  
57 -</tr>  
58 -  
59 -<tr>  
60 -<td>  
61 -<li>  
62 -<font face="Arial,Helvetica"><font size=-1><b>Temperatura:</b>  
63 -m&iacute;nima  
64 -17&deg;C e m&aacute;xima 22&deg;C</font></font></li>  
65 -</td>  
66 -</tr>  
67 -  
68 -<tr>  
69 -<td>  
70 -<li>  
71 -<font face="Arial,Helvetica"><font size=-1><b>Vento:</b> girando de  
72 -sul/sudeste pela manhã e sudeste/sul a tarde, fraco a moderado no  
73 -decorrer do dia.  
74 -</font>  
75 -</font></li>  
76 -</td>  
77 -</tr>  
78 -  
79 -<tr>  
80 -<td>  
81 -<li>  
82 -<font face="Arial,Helvetica"><font size=-1><b>Estado do mar:</b>  
83 -direção de sudeste com ondas de até 0,5 m.  
84 -</font></font>  
85 -</li>  
86 -</td>  
87 -</tr>  
88 -  
89 -<tr>  
90 -<td>  
91 -<hr WIDTH="100%"></td>  
92 -</tr>  
93 -</table></center>  
94 -  
95 -<center><table COLS=1 WIDTH="60%" >  
96 -<tr>  
97 -<td><b><font face="Arial,Helvetica"><font  
98 -color="#000099">Sexta-feira&nbsp;&nbsp;18/Mai/2007  
99 -</font></font></b>  
100 -</td>  
101 -</tr>  
102 -  
103 -<tr>  
104 -<td><img SRC="simbolos/chuva.jpg" height=89 width=124>&nbsp;<img  
105 -SRC="simbolos/nenhum.jpg"  
106 -height=89 width=124>&nbsp;  
107 -<img SRC="simbolos/nenhum.jpg" height=89 width=124></td>  
108 -</tr>  
109 -  
110 -<tr>  
111 -<td>  
112 -<li>  
113 -<font face="Arial,Helvetica"><font size=-1>Céu com muita nebulosidade  
114 -com condições de chuva no período.  
115 -</font></font></li>  
116 -</td>  
117 -</tr>  
118 -  
119 -<tr>  
120 -<td>  
121 -<li>  
122 -<font face="Arial,Helvetica"><font size=-1><b>Temperatura:</b>  
123 -m&iacute;nima  
124 -17&deg;C e m&aacute;xima 22&deg;C  
125 -</font></font></li>  
126 -</td>  
127 -</tr>  
128 -  
129 -<tr>  
130 -<td>  
131 -<li>  
132 -<font face="Arial,Helvetica"><font size=-1><b>Vento:</b> girando de  
133 -sul/sudeste pela manhã e sudeste a tarde, fraco a moderado no decorrer  
134 -do dia.  
135 -</font></font></li>  
136 -</td>  
137 -</tr>  
138 -  
139 -<tr>  
140 -<td>  
141 -<li>  
142 -<font face="Arial,Helvetica"><font size=-1><b>Estado do mar:</b>  
143 -direção de sudeste com ondas de até 0,5 m.  
144 -</font></font>  
145 -</li>  
146 -</td>  
147 -</tr>  
148 -  
149 -<tr>  
150 -<td>  
151 -<hr WIDTH="100%"></td>  
152 -</tr>  
153 -</table></center>  
154 -  
155 -<center><table COLS=1 WIDTH="60%" >  
156 -<tr>  
157 -<td><b><font face="Arial,Helvetica"><font  
158 -color="#000099">Sábado&nbsp;&nbsp;19/Mai/2007</font></font></b>  
159 -</td>  
160 -</tr>  
161 -  
162 -<tr>  
163 -<td><img SRC="simbolos/chuva.jpg" height=89 width=124>&nbsp;<img  
164 -SRC="simbolos/nenhum.jpg"  
165 -height=89 width=124>&nbsp;  
166 -<img SRC="simbolos/nenhum.jpg" height=89 width=124></td>  
167 -</tr>  
168 -<tr>  
169 -<td>  
170 -<li>  
171 -<font face="Arial,Helvetica"><font size=-1>Céu com muita nebulosidade  
172 -com condições de chuva no período.  
173 -</font></font></li>  
174 -</td>  
175 -</tr>  
176 -  
177 -<tr>  
178 -<td>  
179 -<li>  
180 -<font face="Arial,Helvetica"><font size=-1><b>Temperatura:</b>  
181 -m&iacute;nima  
182 -16&deg;C e m&aacute;xima 21&deg;C  
183 -</font></font></li>  
184 -</td>  
185 -</tr>  
186 -  
187 -<tr>  
188 -<td>  
189 -<li>  
190 -<font face="Arial,Helvetica"><font size=-1><b>Vento:</b> girando de  
191 -sudeste pela manhã e sudeste a tarde, fraco a moderado no  
192 -decorrer do dia.  
193 -</font></font></li>  
194 -</td>  
195 -</tr>  
196 -  
197 -<tr>  
198 -<td>  
199 -<li>  
200 -<font face="Arial,Helvetica"><font size=-1><b>Estado do mar:</b>  
201 -direção de sudeste com ondas de até 0,5 m.  
202 -</font></font></li>  
203 -</td>  
204 -</tr>  
205 -  
206 -<tr>  
207 -<td>  
208 -<hr WIDTH="100%"></td>  
209 -</tr>  
210 -</table></center>  
211 -  
212 -<center><table COLS=1 WIDTH="60%" >  
213 -<tr>  
214 -<td><b><font face="Arial,Helvetica"><font color="#FF0000"><font size=-  
215 -1></font>  
216 -</font></font></b></td>  
217 -</tr>  
218 -</table></center>  
219 -  
220 -<center>  
221 -<p>  
222 -<tr>  
223 -<td>  
224 -<li>  
225 -<font face="Arial"><font size=+0><b>TENDÊNCIA:</font></font></b><font  
226 -face="Arial"><font size=+0><font  
227 -color="#000099"> ++++  
228 -</font></font>  
229 -</li>  
230 -</td>  
231 -</tr>  
232 -</p>  
233 -</center>  
234 -  
235 -<center>  
236 -<p><img ISMAP SRC="figuras/barra_navega.gif" BORDER=0 usemap=  
237 -"#barra_navega"  
238 -height=16 width=482>  
239 -</center>  
240 -  
241 -</body>  
242 -</html>  
243 -  
244 -  
245 -  
246 -  
247 -  
248 -  
249 -  
250 -  
251 -  
252 -  
253 -  
254 -  
255 -  
256 -  
257 -  
258 -  
259 -  
260 -  
261 -  
262 -  
263 -  
264 -  
265 -  
266 -  
267 -  
268 -  
269 -  
270 -  
271 -  
272 -  
273 -  
274 -  
275 -  
276 -  
277 -  
278 -  
279 -  
280 -  
281 -  
282 -  
283 -  
284 -  
285 -  
286 -  
287 -  
288 -  
289 -  
290 -  
291 -  
292 -  
293 -  
294 -  
295 -  
296 -  
297 -  
298 -  
299 -  
300 -  
301 -  
302 -  
303 -  
304 -  
305 -  
306 -  
307 -  
308 -  
309 -  
310 -  
311 -  
312 -  
313 -  
314 -  
315 -  
316 -  
317 -  
318 -  
319 -  
320 -  
321 -  
322 -  
323 -  
324 -  
325 -  
326 -  
327 -  
328 -  
329 -  
330 -  
331 -  
332 -  
333 -  
334 -  
335 -  
336 -  
337 -  
338 -  
339 -  
340 -  
341 -  
342 -  
343 -  
344 -  
345 -  
346 -  
347 -  
348 -  
349 -  
350 -  
351 -  
352 -  
353 -  
354 -  
355 -  
356 -  
357 -  
358 -  
359 -  
360 -  
361 -  
362 -  
363 -  
364 -  
365 -  
366 -  
367 -  
368 -  
369 -  
370 -  
371 -  
372 -  
373 -  
374 -  
375 -  
376 -  
377 -  
378 -  
379 -  
380 -  
381 -  
382 -  
383 -  
384 -  
385 -  
386 -  
387 -  
388 -  
389 -  
390 -  
391 -  
392 -  
393 -  
394 -  
395 -  
396 -  
397 -  
398 -  
399 -  
400 -  
401 -  
402 -  
403 -  
404 -  
405 -  
406 -  
407 -  
408 -  
409 -  
410 -  
411 -  
412 -  
413 -  
414 -  
415 -  
416 -  
417 -  
418 -  
419 -  
420 -  
421 -  
422 -  
423 -  
424 -  
425 -  
426 -  
427 -  
428 -  
429 -  
430 -  
431 -  
432 -  
433 -  
434 -  
435 -  
436 -  
437 -  
438 -  
439 -  
440 -  
441 -  
442 -  
443 -  
444 -  
445 -  
446 -  
447 -  
448 -  
449 -  
450 -  
451 -  
452 -  
453 -  
454 -  
455 -  
456 -  
457 -  
458 -  
459 -  
460 -  
461 -  
462 -  
463 -  
464 -  
465 -  
466 -  
467 -  
468 -  
469 -  
470 -  
471 -  
472 -  
473 -  
474 -  
475 -  
476 -  
477 -  
478 -  
479 -  
480 -  
481 -  
482 -  
483 -  
484 -  
485 -  
486 -  
487 -  
488 -  
489 -  
490 -  
491 -  
492 -  
493 -  
494 -  
495 -  
496 -  
497 -  
498 -  
499 -  
500 -  
501 -  
502 -  
503 -  
504 -  
505 -  
506 -  
507 -  
508 -  
509 -  
510 -  
511 -  
512 -  
513 -  
514 -  
515 -  
516 -  
517 -  
518 -  
519 -  
520 -  
521 -  
522 -  
523 -  
524 -  
525 -  
526 -  
527 -  
528 -  
529 -  
530 -  
531 -  
532 -  
533 -  
534 -  
535 -  
536 -  
537 -  
538 -  
539 -  
540 -  
541 -  
542 -  
543 -  
544 -  
545 -  
546 -  
547 -  
548 -  
549 -  
550 -  
551 -  
552 -  
553 -  
554 -  
555 -  
556 -  
557 -  
558 -  
559 -  
560 -  
561 -  
562 -  
563 -  
564 -  
565 -  
566 -  
567 -  
568 -  
569 -  
570 -  
571 -  
572 -  
573 -  
574 -  
575 -  
576 -  
577 -  
578 -  
579 -  
580 -  
581 -  
582 -  
583 -  
584 -  
585 -  
586 -  
587 -  
588 -  
589 -  
590 -  
591 -  
592 -  
593 -  
594 -  
595 -  
596 -  
597 -  
598 -  
599 -  
600 -  
601 -  
602 -  
603 -  
604 -  
605 -  
606 -  
607 -  
608 -  
609 -  
610 -  
611 -  
612 -  
613 -  
614 -  
615 -  
616 -  
617 -  
618 -  
619 -  
620 -  
621 -  
622 -  
623 -  
624 -  
625 -  
626 -  
627 -  
628 -  
629 -  
630 -  
631 -  
632 -  
633 -  
634 -  
635 -  
636 -  
637 -  
638 -  
639 -  
640 -  
641 -  
642 -  
643 -  
644 -  
645 -  
646 -  
647 -  
648 -  
649 -  
650 -  
651 -  
652 -  
653 -  
654 -  
655 -  
656 -  
657 -  
658 -  
659 -  
660 -  
661 -  
662 -  
663 -  
664 -  
665 -  
666 -  
667 -  
668 -  
669 -  
670 -  
671 -  
672 -  
673 -  
674 -  
675 -  
676 -  
677 -  
678 -  
679 -  
680 -  
681 -  
682 -  
683 -  
684 -  
685 -  
686 -  
687 -  
688 -  
689 -  
690 -  
691 -  
692 -  
693 -  
694 -  
695 -  
696 -  
697 -  
698 -  
699 -  
700 -  
701 -  
702 -  
703 -  
704 -  
705 -  
706 -  
707 -  
708 -  
709 -  
710 -  
711 -  
712 -  
713 -  
714 -  
715 -  
716 -  
717 -  
718 -  
719 -  
720 -  
721 -  
722 -  
723 -  
724 -  
725 -  
726 -  
727 -  
728 -  
729 -  
730 -  
731 -  
732 -  
733 -  
734 -  
735 -  
736 -  
737 -  
738 -  
739 -  
740 -  
741 -  
742 -  
743 -  
744 -  
745 -  
746 -  
747 -  
748 -  
749 -  
750 -  
751 -  
752 -  
753 -  
754 -  
755 -  
756 -  
757 -  
758 -  
759 -  
760 -  
761 -  
762 -  
763 -  
764 -  
765 -  
766 -  
767 -  
768 -  
769 -  
770 -  
771 -  
772 -  
773 -  
774 -  
775 -  
776 -  
777 -  
778 -  
779 -  
780 -  
781 -  
782 -  
783 -  
784 -  
785 -  
786 -  
787 -  
788 -  
789 -  
790 -  
791 -  
792 -  
793 -  
794 -  
795 -  
796 -  
797 -  
ieducar/intranet/educar_aluno_cad.php-old
@@ -1,2012 +0,0 @@ @@ -1,2012 +0,0 @@
1 -<?php  
2 - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
3 - * *  
4 - * @author Prefeitura Municipal de Itajaí *  
5 - * @updated 29/03/2007 *  
6 - * Pacote: i-PLB Software Público Livre e Brasileiro *  
7 - * *  
8 - * Copyright (C) 2006 PMI - Prefeitura Municipal de Itajaí *  
9 - * ctima@itajai.sc.gov.br *  
10 - * *  
11 - * Este programa é software livre, você pode redistribuí-lo e/ou *  
12 - * modificá-lo sob os termos da Licença Pública Geral GNU, conforme *  
13 - * publicada pela Free Software Foundation, tanto a versão 2 da *  
14 - * Licença como (a seu critério) qualquer versão mais nova. *  
15 - * *  
16 - * Este programa é distribuído na expectativa de ser útil, mas SEM *  
17 - * QUALQUER GARANTIA. Sem mesmo a garantia implícita de COMERCIALI- *  
18 - * ZAÇÃO ou de ADEQUAÇÃO A QUALQUER PROPÓSITO EM PARTICULAR. Con- *  
19 - * sulte a Licença Pública Geral GNU para obter mais detalhes. *  
20 - * *  
21 - * Você deve ter recebido uma cópia da Licença Pública Geral GNU *  
22 - * junto com este programa. Se não, escreva para a Free Software *  
23 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *  
24 - * 02111-1307, USA. *  
25 - * *  
26 - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */  
27 -require_once ("include/clsBase.inc.php");  
28 -require_once ("include/clsCadastro.inc.php");  
29 -require_once ("include/clsBanco.inc.php");  
30 -require_once( "include/pmieducar/geral.inc.php" );  
31 -  
32 -class clsIndexBase extends clsBase  
33 -{  
34 - function Formular()  
35 - {  
36 - $this->SetTitulo( "{$this->_instituicao} i-Educar - Aluno" );  
37 - $this->processoAp = "578";  
38 - }  
39 -}  
40 -  
41 -class indice extends clsCadastro  
42 -{  
43 - /**  
44 - * Referencia pega da session para o idpes do usuario atual  
45 - *  
46 - * @var int  
47 - */  
48 - var $pessoa_logada;  
49 -  
50 - var $cod_aluno;  
51 - var $ref_idpes_responsavel;  
52 - var $idpes_pai;  
53 - var $idpes_mae;  
54 - //var $ref_cod_pessoa_educ;  
55 - var $ref_cod_aluno_beneficio;  
56 - var $ref_cod_religiao;  
57 - var $ref_idpes;  
58 - var $nm_mae;  
59 - var $cpf_mae;  
60 - var $nm_pai;  
61 - var $cpf_pai;  
62 -  
63 - var $ref_cod_raca;  
64 -  
65 - var $foto_excluida = 0;  
66 - var $analfabeto;  
67 - var $foto_antiga;  
68 -  
69 -  
70 - var $passo;  
71 - var $nome;  
72 -  
73 - var $caminho_foto;  
74 - //var $cpf;  
75 - //var $sexo;  
76 -  
77 - //pessoa_oprot  
78 -  
79 - var $email;  
80 - var $ddd_fone_1;  
81 - var $fone_1;  
82 - var $ddd_fone_2;  
83 - var $fone_2;  
84 - var $ddd_mov;  
85 - var $fone_mov;  
86 - var $ddd_fax;  
87 - var $fone_fax;  
88 -  
89 - //fisica  
90 - var $data_nascimento;  
91 - var $sexo;  
92 - var $cpf;  
93 -  
94 - //juridica  
95 - var $cnpj;  
96 - var $nm_fantasia;  
97 - var $insc_estadual;  
98 - var $nome_contato;  
99 -  
100 - var $foto;  
101 - var $tipo_responsavel;  
102 -  
103 - //var $id_cep;  
104 - var $id_bairro;  
105 - var $id_logradouro;  
106 -  
107 - var $idtlog;  
108 -  
109 - var $numero;  
110 - var $letra;  
111 - var $complemento;  
112 - var $andar;  
113 - var $apartamento;  
114 - var $bloco;  
115 - ///  
116 - var $deficiencia;  
117 - var $deficiencia_exc;  
118 -  
119 - //endereco_externo  
120 - var $ref_sigla_uf;  
121 - var $ref_sigla_uf_;  
122 - var $ref_idtlog;  
123 - var $id_cidade;  
124 - var $id_cep;  
125 - var $ref_idtlog_;  
126 - var $id_log;  
127 -  
128 - var $pais_origem;  
129 -  
130 - //  
131 - var $cep_;  
132 - var $nm_bairro;  
133 - var $nm_logradouro;  
134 -  
135 -  
136 - var $ref_cod_pessoa_deficiencia;  
137 -  
138 - var $isEnderecoExterno = 0;  
139 -  
140 - var $endereco_original_is_externo;  
141 - //var $isEnderecoExterno_ = 0;  
142 -  
143 - //var $rg;  
144 - var $cpf_;  
145 - var $ideciv;  
146 -  
147 - var $inc;  
148 - var $exc;  
149 - var $back;  
150 -  
151 - var $url;  
152 -  
153 - var $nacionalidade;  
154 - var $idmun_nascimento;  
155 -  
156 - var $rg,  
157 - $data_exp_rg,  
158 - $sigla_uf_exp_rg,  
159 - $tipo_cert_civil,  
160 - $num_termo,  
161 - $num_livro,  
162 - $num_folha,  
163 - $data_emissao_cert_civil,  
164 - $sigla_uf_cert_civil,  
165 - $cartorio_cert_civil,  
166 - $num_cart_trabalho,  
167 - $serie_cart_trabalho,  
168 - $data_emissao_cart_trabalho,  
169 - $sigla_uf_cart_trabalho,  
170 - $num_tit_eleitor,  
171 - $zona_tit_eleitor,  
172 - $secao_tit_eleitor,  
173 - $idorg_exp_rg;  
174 -  
175 - var $sem_cpf;  
176 -  
177 - var $ref_cod_sistema;  
178 -  
179 - var $retorno;  
180 - var $tab_habilitado;  
181 -  
182 - function Inicializar()  
183 - {  
184 - @session_start();  
185 - $this->pessoa_logada = $_SESSION['id_pessoa'];  
186 - @session_write_close();  
187 -  
188 - $this->tab_habilitado = true;  
189 -  
190 - $this->cod_aluno= $_GET["cod_aluno"];  
191 -  
192 - $this->retorno = "Novo";  
193 -  
194 - $obj_permissoes = new clsPermissoes();  
195 - $obj_permissoes->permissao_cadastra( 578, $this->pessoa_logada,7, "educar_aluno_lst.php" );  
196 -  
197 - if( is_numeric( $this->cod_aluno ) )  
198 - {  
199 - $ref_cod_aluno = $this->cod_aluno;  
200 - $obj = new clsPmieducarAluno( $this->cod_aluno );  
201 - $registro = $obj->detalhe();  
202 - if( $registro )  
203 - {  
204 - foreach( $registro AS $campo => $val )  
205 - { // passa todos os valores obtidos no registro para atributos do objeto  
206 - $this->$campo = $val;  
207 - }  
208 -  
209 - $obj_matricula = new clsPmieducarMatricula();  
210 - $lst_matricula = $obj_matricula->lista( null, null, null, null, null, null, $this->cod_aluno );  
211 - if( $lst_matricula )  
212 - {  
213 - //** verificao de permissao para exclusao  
214 - $this->fexcluir = $obj_permissoes->permissao_excluir(578,$this->pessoa_logada,7);  
215 - }  
216 - $this->retorno = "Editar";  
217 - $this->tab_habilitado = false;  
218 - }  
219 - }  
220 - $this->url_cancelar = ($this->cod_aluno) ? "educar_aluno_det.php?cod_aluno={$this->cod_aluno}" : "educar_aluno_lst.php";  
221 - $this->nome_url_cancelar = "Cancelar";  
222 -  
223 - return $this->retorno;  
224 - }  
225 -  
226 - function Gerar()  
227 - {  
228 - $this->fexcluir = false;  
229 - $this->campoTabInicio("educar_cad", "", true);  
230 - $this->campoOculto("retorno",$this->retorno);  
231 -  
232 - $this->campoOculto("bloqueado", 1);  
233 -  
234 - if(is_int((int)$this->cpf) && !empty($this->cpf))  
235 - {  
236 - $cpf = int2CPF($this->cpf);  
237 - }  
238 - else  
239 - {  
240 - $cpf = $this->cpf;  
241 - }  
242 - if (!$this->cod_aluno)  
243 - {  
244 - $this->campoAdicionaTab("CPF", $this->tab_habilitado);  
245 - $opcoes = array( "" => "Pesquise a pessoa clicando na lupa ao lado" );  
246 - $this->campoCpf("cpf_","CPF",$cpf,false,"<img border='0' onclick=\"pesquisa_valores_popless('educar_pesquisa_aluno_lst2.php?campo1=ref_idpes&campo3=cpf&campo4=cpf_', 'nome')\" src=\"imagens/lupa.png\">");  
247 - }  
248 - $this->campoOculto("ref_idpes",$this->ref_idpes);  
249 - $this->campoAdicionaTab("Dados Pessoais", $this->tab_habilitado);  
250 - if( $this->cod_aluno)  
251 - {  
252 - $obj_matricula = new clsPmieducarMatricula();  
253 -  
254 - $lst_matricula = $obj_matricula->lista( null, null, null, null, null, null, $this->cod_aluno );  
255 -  
256 - }  
257 - if(!empty($this->ref_idpes))  
258 - {  
259 - $obj_aluno = new clsPmieducarAluno();  
260 - $lista_aluno = $obj_aluno->lista(null,null,null,null,null,$this->ref_idpes,null,null,null,null);  
261 - if($lista_aluno)  
262 - {  
263 - $det_aluno = array_shift($lista_aluno);  
264 - }  
265 - }  
266 -  
267 - if($det_aluno['cod_aluno'] )  
268 - {  
269 - $this->cod_aluno = $det_aluno['cod_aluno'];  
270 - $this->ref_cod_aluno_beneficio = $det_aluno['ref_cod_aluno_beneficio'];  
271 - $this->ref_cod_religiao = $det_aluno['ref_cod_religiao'];  
272 - $this->caminho_foto = $det_aluno['caminho_foto'];  
273 - }  
274 -  
275 - $this->campoOculto("cod_aluno",$this->cod_aluno);  
276 - $this->campoOculto("ref_idpes",$this->ref_idpes);  
277 - if( $this->ref_idpes != "NULL")  
278 - {  
279 - if( $this->ref_idpes)  
280 - {  
281 - $obj_pessoa = new clsPessoaFj($this->ref_idpes);  
282 - $det_pessoa = $obj_pessoa->detalhe();  
283 -  
284 - $obj_fisica = new clsFisica($this->ref_idpes);  
285 - $det_fisica = $obj_fisica->detalhe();  
286 -  
287 - $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes );  
288 - $det_fisica_raca = $obj_fisica_raca->detalhe();  
289 - $this->ref_cod_raca = $det_fisica_raca['ref_cod_raca'];  
290 -  
291 - $this->nome = $det_pessoa["nome"];  
292 -  
293 - $this->email = $det_pessoa["email"];  
294 -  
295 - $this->ideciv = $det_fisica["ideciv"]->ideciv;  
296 -  
297 - $this->data_nascimento = dataToBrasil($det_fisica["data_nasc"]);  
298 -  
299 - $this->cpf = $det_fisica["cpf"];  
300 - $obj_documento = new clsDocumento($this->ref_idpes);  
301 - $obj_documento_det = $obj_documento->detalhe();  
302 -  
303 - $this->ddd_fone_1 = $det_pessoa["ddd_1"];  
304 - $this->fone_1 = $det_pessoa["fone_1"];  
305 -  
306 - $this->ddd_fone_2 = $det_pessoa["ddd_2"];  
307 - $this->fone_2 = $det_pessoa["fone_2"];  
308 -  
309 - $this->ddd_fax = $det_pessoa["ddd_fax"];  
310 - $this->fone_fax= $det_pessoa["fone_fax"];  
311 -  
312 - $this->ddd_mov = $det_pessoa["ddd_mov"];  
313 - $this->fone_mov = $det_pessoa["fone_mov"];  
314 -  
315 - $this->email = $det_pessoa["email"];  
316 - $this->url = $det_pessoa["url"];  
317 -  
318 - $this->sexo = $det_fisica["sexo"];  
319 -  
320 - $this->nacionalidade = $det_fisica["nacionalidade"];  
321 - $this->idmun_nascimento = $det_fisica["idmun_nascimento"]->idmun;  
322 -  
323 - $detalhe_pais_origem = $det_fisica["idpais_estrangeiro"]->detalhe();  
324 - $this->pais_origem = $detalhe_pais_origem["idpais"];  
325 -  
326 - $this->ref_idpes_responsavel = $det_fisica["idpes_responsavel"];  
327 - $this->idpes_pai = $det_fisica["idpes_pai"];  
328 - $this->idpes_mae = $det_fisica["idpes_mae"];  
329 -  
330 - $obj_aluno = new clsPmieducarAluno(null,null,null,null,null,$this->ref_idpes );  
331 - $detalhe_aluno = $obj_aluno->detalhe();  
332 - if( $detalhe_aluno )  
333 - {  
334 - $this->nm_pai = $detalhe_aluno["nm_pai"];  
335 - $this->nm_mae = $detalhe_aluno["nm_mae"];  
336 - }  
337 -  
338 - $obj_endereco = new clsPessoaEndereco($this->ref_idpes);  
339 -  
340 - if($obj_endereco_det = $obj_endereco->detalhe())  
341 - {  
342 - $this->isEnderecoExterno = 0;  
343 -  
344 - $this->id_cep = $obj_endereco_det['cep']->cep;  
345 - //$this->cep_ = $obj_endereco_det['ref_cep'];  
346 - $this->id_bairro = $obj_endereco_det['idbai']->idbai;  
347 - $this->id_logradouro = $obj_endereco_det['idlog']->idlog;  
348 - $this->numero = $obj_endereco_det['numero'];  
349 - $this->letra = $obj_endereco_det['letra'];  
350 - $this->complemento = $obj_endereco_det['complemento'];  
351 - $this->andar = $obj_endereco_det['andar'];  
352 - $this->apartamento = $obj_endereco_det['apartamento'];  
353 - $this->bloco = $obj_endereco_det['bloco'];  
354 -  
355 - $this->ref_idtlog = $obj_endereco_det['idtlog'];  
356 - $this->nm_bairro = $obj_endereco_det['bairro'];  
357 - $this->nm_logradouro = $obj_endereco_det['logradouro'];  
358 -  
359 - $this->cep_ = int2CEP($this->id_cep);  
360 -  
361 -  
362 - }  
363 - else  
364 - {  
365 -  
366 - $obj_endereco = new clsEnderecoExterno($this->ref_idpes);  
367 -  
368 - if($obj_endereco_det = $obj_endereco->detalhe())  
369 - {  
370 -  
371 - $this->isEnderecoExterno = 1;  
372 -  
373 - $this->id_cep = $obj_endereco_det['cep'];  
374 - $this->cidade = $obj_endereco_det['cidade'];  
375 - $this->nm_bairro = $obj_endereco_det['bairro'];  
376 - $this->nm_logradouro = $obj_endereco_det['logradouro'];  
377 -  
378 - $this->id_bairro = null;  
379 - $this->id_logradouro = null;  
380 - $this->numero = $obj_endereco_det['numero'];  
381 - $this->letra = $obj_endereco_det['letra'];  
382 - $this->complemento = $obj_endereco_det['complemento'];  
383 - $this->andar = $obj_endereco_det['andar'];  
384 - $this->apartamento = $obj_endereco_det['apartamento'];  
385 - $this->bloco = $obj_endereco_det['bloco'];  
386 -  
387 - $this->ref_idtlog = $this->idtlog = $obj_endereco_det['idtlog']->idtlog;  
388 - $this->ref_sigla_uf = $this->ref_sigla_uf_ = $obj_endereco_det['sigla_uf']->sigla_uf;  
389 - $this->cep_ = int2CEP($this->id_cep);  
390 - }  
391 - }  
392 - }  
393 - }  
394 -  
395 - if($this->isEnderecoExterno == 0)  
396 - {  
397 -  
398 - $obj_bairro = new clsBairro($this->id_bairro);  
399 - $this->cep_ = int2CEP($this->id_cep);  
400 -  
401 - $obj_bairro_det = $obj_bairro->detalhe();  
402 -  
403 - if($obj_bairro_det)  
404 - {  
405 -  
406 - $this->nm_bairro = $obj_bairro_det["nome"];  
407 - }  
408 -  
409 - $obj_log = new clsLogradouro($this->id_logradouro);  
410 - $obj_log_det = $obj_log->detalhe();  
411 -  
412 - if($obj_log_det)  
413 - {  
414 -  
415 - $this->nm_logradouro = $obj_log_det["nome"];  
416 -  
417 - $this->ref_idtlog = $obj_log_det["idtlog"]->idtlog;  
418 - $obj_mun = new clsMunicipio( $obj_log_det["idmun"]);  
419 - $det_mun = $obj_mun->detalhe();  
420 -  
421 - if($det_mun)  
422 - {  
423 - $this->cidade = ucfirst(strtolower($det_mun["nome"]));  
424 - }  
425 -  
426 - $this->ref_sigla_uf = $this->ref_sigla_uf_ = $det_mun['sigla_uf']->sigla_uf;  
427 - }  
428 -  
429 - $obj_bairro = new clsBairro($obj_endereco_det["ref_idbai"]);  
430 - $obj_bairro_det = $obj_bairro->detalhe();  
431 -  
432 - if($obj_bairro_det)  
433 - {  
434 -  
435 - $this->nm_bairro = $obj_bairro_det["nome"];  
436 - }  
437 - }  
438 - $this->campoTexto("nome","Nome",$this->nome,30,100,true);  
439 -  
440 - if($this->cpf && $this->ref_idpes)  
441 - {  
442 - if(!$this->cpf)  
443 - {  
444 - $this->campoRotulo("cpf_2","CPF",$this->cpf);  
445 - }  
446 - else  
447 - {  
448 - $this->campoRotulo("cpf_2","CPF",int2CPF($this->cpf));  
449 - }  
450 -  
451 - }  
452 - else  
453 - {  
454 - if(!$this->cpf)  
455 - {  
456 - $this->campoCpf("cpf_2","CPF",$this->cpf);  
457 - $this->campoOculto("sem_cpf",1);  
458 - }  
459 - else  
460 - {  
461 - $this->campoCpf("cpf_2","CPF",int2CPF($this->cpf),false);  
462 - }  
463 -  
464 - }  
465 -  
466 - $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true);  
467 -  
468 - $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino");  
469 - $this->campoLista("sexo","Sexo",$lista,$this->sexo);  
470 -  
471 - $obj_estado_civil = new clsEstadoCivil();  
472 - $obj_estado_civil_lista = $obj_estado_civil->lista();  
473 -  
474 - $lista_estado_civil = array('' => "Selecione");  
475 -  
476 - if($obj_estado_civil_lista)  
477 - {  
478 -  
479 - foreach ($obj_estado_civil_lista as $estado_civil)  
480 - {  
481 - $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"];  
482 - }  
483 -  
484 - }  
485 -  
486 - $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv);  
487 -  
488 - $obj_religiao = new clsPmieducarReligiao();  
489 - $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1);  
490 -  
491 - $lista_religiao = array('NULL' => "Selecione");  
492 - if($obj_religia_lista)  
493 - {  
494 -  
495 - foreach ($obj_religia_lista as $religiao)  
496 - {  
497 - $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"];  
498 - }  
499 -  
500 - }  
501 - $this->campoLista("ref_cod_religiao","Religi&atilde;o",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false);  
502 -  
503 - $opcoes_raca = array( "" => "Selecione" );  
504 - $obj_raca = new clsCadastroRaca();  
505 - $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true );  
506 - if ($lst_raca)  
507 - {  
508 - foreach ($lst_raca as $raca)  
509 - {  
510 - $opcoes_raca[$raca['cod_raca']] = $raca['nm_raca'];  
511 - }  
512 - }  
513 - $this->campoLista("ref_cod_raca","Ra&ccedil;a",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false);  
514 -  
515 - $this->campoQuebra2("#224488");  
516 -  
517 - if($this->idpes_pai)  
518 - {  
519 - $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai);  
520 - $det_pessoa_pai = $obj_pessoa_pai->detalhe();  
521 - if($det_pessoa_pai)  
522 - {  
523 - $this->nm_pai = $det_pessoa_pai["nome"];  
524 - //cpf  
525 - $obj_cpf = new clsFisica($this->idpes_pai);  
526 - $det_cpf = $obj_cpf->detalhe();  
527 - if( $det_cpf["cpf"] )  
528 - {  
529 - $this->cpf_pai = int2CPF( $det_cpf["cpf"] );  
530 - }  
531 - }  
532 - }  
533 - if($this->idpes_mae)  
534 - {  
535 - $obj_pessoa_mae = new clsPessoaFj($this->idpes_mae);  
536 - $det_pessoa_mae = $obj_pessoa_mae->detalhe();  
537 - if($det_pessoa_mae)  
538 - {  
539 - $this->nm_mae = $det_pessoa_mae["nome"];  
540 - //cpf  
541 - $obj_cpf = new clsFisica($this->idpes_mae);  
542 - $det_cpf = $obj_cpf->detalhe();  
543 - if( $det_cpf["cpf"] )  
544 - {  
545 - $this->cpf_mae = int2CPF( $det_cpf["cpf"] );  
546 - }  
547 - }  
548 - }  
549 - $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false);  
550 -  
551 - $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": " &nbsp; &nbsp; (preencher sempre que possível)");  
552 -  
553 - $this->campoTexto("nm_mae","Nome da M&atilde;e",$this->nm_mae,30,255,false);  
554 - $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": " &nbsp; &nbsp; (preencher sempre que possível)");  
555 -  
556 - $lista = array('' => "Responsável");  
557 -  
558 - if($this->ref_idpes_responsavel != "NULL")  
559 - {  
560 - $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel);  
561 - $det_pessoa_resp = $obj_pessoa_resp->detalhe();  
562 - if($det_pessoa_resp)  
563 - {  
564 - $lista[$det_pessoa_resp["idpes"]] = $det_pessoa_resp["nome"];  
565 - }  
566 - }  
567 - $parametros = new clsParametrosPesquisas();  
568 - $parametros->setSubmit( 0 );  
569 - $parametros->adicionaCampoSelect( "ref_idpes_responsavel", "idpes", "nome" );  
570 - $parametros->setPessoa('F');  
571 - $parametros->setPessoaNovo('S');  
572 - $parametros->setPessoaCPF('N');  
573 - $parametros->setPessoaTela('frame');  
574 - $parametros->setCodSistema(1);  
575 - $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false);  
576 -  
577 - $this->campoQuebra2("#224488");  
578 -  
579 - if($this->tipo_responsavel)  
580 - {  
581 - if($this->nm_pai)  
582 - $this->tipo_responsavel = 'p';  
583 - elseif($this->nm_mae)  
584 - $this->tipo_responsavel = 'm';  
585 - elseif($this->ref_idpes_responsavel)  
586 - $this->tipo_responsavel = 'r';  
587 - }  
588 -  
589 - $this->campoRadio("tipo_responsavel","Respons&aacute;vel",array('' => "Sem Responsável",'p' => "Pai",'m' => "M&atilde;e",'r' => "Respons&aacute;vel",),$this->tipo_responsavel);  
590 -  
591 -  
592 - $this->campoQuebra2("#224488");  
593 -  
594 - $disabled = $this->isEnderecoExterno ? false : true ;  
595 -  
596 - $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno);  
597 -  
598 - $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\'miolo\' id=\'miolo\' frameborder=\'0\' height=\'100%\' width=\'500\' marginheight=\'0\' marginwidth=\'0\' src=\'educar_pesquisa_cep_log_bairro.php?campo1=nm_bairro&campo2=id_bairro&campo3=id_cep&campo4=nm_logradouro&campo5=id_logradouro&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog_&campo9=isEnderecoExterno&campo10=cep_&campo11=ref_sigla_uf_&campo12=ref_idtlog&campo13=id_cidade\'></iframe>');\">", $disabled);  
599 -  
600 - $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled);  
601 -  
602 - $obj_uf = new clsUf(false, false, 1);  
603 - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf");  
604 - $array_uf = Array('' => "Selecione um estado");  
605 - foreach ($lst_uf as $uf)  
606 - {  
607 - $array_uf[$uf['sigla_uf']] = $uf['nome'];  
608 - }  
609 -  
610 - $this->campoLista("ref_sigla_uf_", " &nbsp; Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled);  
611 -  
612 - $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled);  
613 -  
614 - $tipo_logradouro_array = array('' => "Tipo de Logradouro");  
615 -  
616 - $obj_tipo_logradouro = new clsTipoLogradouro();  
617 - $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista();  
618 - if($obj_tipo_logradouro_lista)  
619 - {  
620 - foreach ($obj_tipo_logradouro_lista as $key => $tipo_log)  
621 - {  
622 - $tipo_logradouro_array[$tipo_log["idtlog"]] = $tipo_log["descricao"];  
623 - }  
624 - }  
625 - $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true);  
626 -// $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",false,true);  
627 -  
628 - $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled );  
629 -  
630 - $this->campoNumero( "numero", "N&uacute;mero", $this->numero, 4, 6, false, "", "", false, false, true );  
631 - $this->campoTexto( "letra", " &nbsp; Letra", $this->letra, 4, 1, false );  
632 - $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false );  
633 - $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false );  
634 - $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true );  
635 - $this->campoNumero( "apartamento", " &nbsp; Apartamento", $this->apartamento, 4, 6, false );  
636 -  
637 - $lista_mun_nasc = array('NULL' => "Selecione a cidade");  
638 -  
639 - $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento);  
640 - $det_mun_nasc = $obj_mun_nasc->detalhe();  
641 -  
642 - if($det_mun_nasc["nome"])  
643 - {  
644 - $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"];  
645 - }  
646 -  
647 - $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true );  
648 -  
649 - $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1;  
650 - $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro");  
651 - $this->campoLista("nacionalidade","Nacionalidade",$lista_nacionalidade,$this->nacionalidade,"tmpObj = document.getElementById('pais_origem');if(this.value!=1){tmpObj.disabled=false;}else{tmpObj.selectedIndex = 27;tmpObj.disabled=true;}",true,"","","",false);  
652 -  
653 - $lista_pais_origem = array('NULL' => "País de origem");  
654 - $obj_pais = new clsPais();  
655 - $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc");  
656 - if($obj_pais_lista)  
657 - {  
658 - foreach ($obj_pais_lista as $key => $pais)  
659 - {  
660 - $lista_pais_origem[$pais["idpais"]] = $pais["nome"];  
661 - }  
662 - }  
663 -  
664 - // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo  
665 - $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem;  
666 - $this->campoLista("pais_origem"," &nbsp; País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false);  
667 -  
668 - $this->campoQuebra2("#224488");  
669 -  
670 - $obj_beneficio = new clsPmieducarAlunoBeneficio();  
671 - $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1);  
672 -  
673 - $lista_beneficio = array('NULL' => "Selecione");  
674 -  
675 - if($obj_beneficio_lista)  
676 - {  
677 -  
678 - foreach ($obj_beneficio_lista as $beneficio)  
679 - {  
680 - $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"];  
681 - }  
682 -  
683 - }  
684 -  
685 - $this->campoLista("ref_cod_aluno_beneficio","Benef&iacute;cio",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false);  
686 -  
687 - $lista_analfabeto = array( '1' => 'N&atilde;o' , 0 => "Sim");  
688 - $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false);  
689 -  
690 - $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true);  
691 - $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11);  
692 - $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true);  
693 - $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11);  
694 -  
695 - $this->campoEmail("email","Email",$this->email,30,255,false);  
696 - if(!empty($this->caminho_foto))  
697 - {  
698 - $this->campoRotulo("foto_antiga_","Arquivo","<img src='arquivos/educar/aluno/small/{$this->caminho_foto}' border='0'> <a href='javascript:void(0);' onclick=\"document.getElementById('foto_excluida').value=1;setVisibility('tr_foto_antiga_',false);setVisibility('tr_foto',true);\"> <img src=\"imagens/nvp_bola_xis.gif\" border=\"0\"></a>");  
699 - }  
700 - $this->campoOculto("foto_excluida", 0);  
701 - $this->campoArquivo("foto", "Foto","", "20","",false);  
702 -  
703 - $this->campoOculto( "id_bairro", $this->id_bairro);  
704 - $this->campoOculto( "id_cep", $this->id_cep);  
705 - $this->campoOculto( "id_logradouro", $this->id_logradouro);  
706 - $this->campoOculto( "id_cidade", $this->id_cidade);  
707 - $this->campoOculto("ref_idtlog_", $this->ref_idtlog);  
708 - $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf);  
709 -  
710 - $this->campoTexto("nome","Nome",$this->nome,30,100,true);  
711 -  
712 - if($this->cpf && $this->ref_idpes)  
713 - {  
714 - if(!$this->cpf)  
715 - {  
716 - $this->campoRotulo("cpf_2","CPF",$this->cpf);  
717 - }  
718 - else  
719 - {  
720 - $this->campoRotulo("cpf_2","CPF",int2CPF($this->cpf));  
721 - }  
722 - }  
723 - else  
724 - {  
725 - if(!$this->cpf)  
726 - {  
727 - $this->campoOculto("sem_cpf",1);  
728 - }  
729 - }  
730 -  
731 - $this->campoData("data_nascimento","Data de Nascimento",$this->data_nascimento,true);  
732 -  
733 - $lista = array('' => "Selecione", 'F' => "Feminino", 'M' => "Masculino");  
734 - $this->campoLista("sexo","Sexo",$lista,$this->sexo);  
735 -  
736 - $obj_estado_civil = new clsEstadoCivil();  
737 - $obj_estado_civil_lista = $obj_estado_civil->lista();  
738 -  
739 - $lista_estado_civil = array('' => "Selecione");  
740 -  
741 - if($obj_estado_civil_lista)  
742 - {  
743 -  
744 - foreach ($obj_estado_civil_lista as $estado_civil)  
745 - {  
746 - $lista_estado_civil[$estado_civil["ideciv"]] = $estado_civil["descricao"];  
747 - }  
748 -  
749 - }  
750 -  
751 - $this->campoLista("ideciv","Estado Civil",$lista_estado_civil,$this->ideciv);  
752 -  
753 - $obj_religiao = new clsPmieducarReligiao();  
754 - $obj_religia_lista = $obj_religiao->lista(null,null,null,null,null,null,null,null,1);  
755 -  
756 - $lista_religiao = array('NULL' => "Selecione");  
757 - if($obj_religia_lista)  
758 - {  
759 -  
760 - foreach ($obj_religia_lista as $religiao)  
761 - {  
762 - $lista_religiao[$religiao["cod_religiao"]] = $religiao["nm_religiao"];  
763 - }  
764 -  
765 - }  
766 - $this->campoLista("ref_cod_religiao","Religi&atilde;o",$lista_religiao,$this->ref_cod_religiao,"",false,"","","",false);  
767 -  
768 - $opcoes_raca = array( "" => "Selecione" );  
769 - $obj_raca = new clsCadastroRaca();  
770 - $lst_raca = $obj_raca->lista( null,null,null,null,null,null,null,true );  
771 - if ($lst_raca)  
772 - {  
773 - foreach ($lst_raca as $raca)  
774 - {  
775 - $opcoes_raca[$raca['cod_raca']] = $raca['nm_raca'];  
776 - }  
777 - }  
778 - $this->campoLista("ref_cod_raca","Ra&ccedil;a",$opcoes_raca,$this->ref_cod_raca,"",false,"","","",false);  
779 -  
780 - $this->campoQuebra2("#224488");  
781 -  
782 - if($this->idpes_pai)  
783 - {  
784 - $obj_pessoa_pai = new clsPessoaFj($this->idpes_pai);  
785 - $det_pessoa_pai = $obj_pessoa_pai->detalhe();  
786 - if($det_pessoa_pai)  
787 - {  
788 - $this->nm_pai = $det_pessoa_pai["nome"];  
789 - //cpf  
790 - $obj_cpf = new clsFisica($this->idpes_pai);  
791 - $det_cpf = $obj_cpf->detalhe();  
792 - if( $det_cpf["cpf"] )  
793 - {  
794 - $this->cpf_pai = int2CPF( $det_cpf["cpf"] );  
795 - }  
796 - }  
797 - }  
798 - if($this->idpes_mae)  
799 - {  
800 - $obj_pessoa_mae = new clsPessoaFj($this->idpes_mae);  
801 - $det_pessoa_mae = $obj_pessoa_mae->detalhe();  
802 - if($det_pessoa_mae)  
803 - {  
804 - $this->nm_mae = $det_pessoa_mae["nome"];  
805 - //cpf  
806 - $obj_cpf = new clsFisica($this->idpes_mae);  
807 - $det_cpf = $obj_cpf->detalhe();  
808 - if( $det_cpf["cpf"] )  
809 - {  
810 - $this->cpf_mae = int2CPF( $det_cpf["cpf"] );  
811 - }  
812 - }  
813 - }  
814 - $this->campoTexto("nm_pai","Nome do Pai",$this->nm_pai,30,255,false);  
815 - $this->campoCpf("cpf_pai","CPF pai",$this->cpf_pai, false, $this->cpf_pai ? "": " &nbsp; &nbsp; (preencher sempre que possível)");  
816 -  
817 - $this->campoTexto("nm_mae","Nome da M&atilde;e",$this->nm_mae,30,255,false);  
818 - $this->campoCpf("cpf_mae","CPF mãe",$this->cpf_mae, false, $this->cpf_mae ? "": " &nbsp; &nbsp; (preencher sempre que possível)");  
819 -  
820 - $lista = array('' => "Responsável");  
821 -  
822 - if($this->ref_idpes_responsavel != "NULL")  
823 - {  
824 - $obj_pessoa_resp = new clsPessoaFj($this->ref_idpes_responsavel);  
825 - $det_pessoa_resp = $obj_pessoa_resp->detalhe();  
826 - if($det_pessoa_resp)  
827 - {  
828 - $lista[$det_pessoa_resp["idpes"]] = $det_pessoa_resp["nome"];  
829 - }  
830 - }  
831 - $parametros = new clsParametrosPesquisas();  
832 - $parametros->setSubmit( 0 );  
833 - $parametros->adicionaCampoSelect( "ref_idpes_responsavel", "idpes", "nome" );  
834 - $parametros->setPessoa('F');  
835 - $parametros->setPessoaNovo('S');  
836 - $parametros->setPessoaCPF('N');  
837 - $parametros->setPessoaTela('frame');  
838 - $parametros->setCodSistema(1);  
839 - $this->campoListaPesq( "ref_idpes_responsavel", "Responsavel", $lista, $this->ref_idpes_responsavel, "pesquisa_pessoa_lst.php", "", false, "", "", null, null, "", false, $parametros->serializaCampos(), false);  
840 -  
841 - $this->campoQuebra2("#224488");  
842 - if(!$this->tipo_responsavel)  
843 - {  
844 - if($this->nm_pai)  
845 - $this->tipo_responsavel = 'p';  
846 - elseif($this->nm_mae)  
847 - $this->tipo_responsavel = 'm';  
848 - elseif($this->ref_idpes_responsavel)  
849 - $this->tipo_responsavel = 'r';  
850 - }  
851 -  
852 - $this->campoRadio("tipo_responsavel","Respons&aacute;vel",array('' => "Sem Responsável",'p' => "Pai",'m' => "M&atilde;e",'r' => "Respons&aacute;vel",),$this->tipo_responsavel);  
853 -  
854 - $this->campoQuebra2("#224488");  
855 -  
856 - $disabled = $this->isEnderecoExterno ? false : true ;  
857 -  
858 - $this->campoOculto("isEnderecoExterno",$this->isEnderecoExterno);  
859 -  
860 - $this->campoCep("cep_", "CEP", $this->cep_, true, "-", "<img id='lupa' src=\"imagens/lupa.png\" border=\"0\" onclick=\"showExpansivel( 500,500, '<iframe name=\'miolo\' id=\'miolo\' frameborder=\'0\' height=\'100%\' width=\'500\' marginheight=\'0\' marginwidth=\'0\' src=\'educar_pesquisa_cep_log_bairro.php?campo1=nm_bairro&campo2=id_bairro&campo3=id_cep&campo4=nm_logradouro&campo5=id_logradouro&campo6=ref_sigla_uf&campo7=cidade&campo8=ref_idtlog_&campo9=isEnderecoExterno&campo10=cep_&campo11=ref_sigla_uf_&campo12=ref_idtlog&campo13=id_cidade\'></iframe>');\">", $disabled);  
861 -  
862 - $this->campoTexto( "cidade", "Cidade", $this->cidade, 30, 255, true,false,true,"","","","",$disabled);  
863 -  
864 - $obj_uf = new clsUf(false, false, 1);  
865 - $lst_uf = $obj_uf->lista(false, false, 1, false, false, "sigla_uf");  
866 - $array_uf = Array('' => "Selecione um estado");  
867 - foreach ($lst_uf as $uf)  
868 - {  
869 - $array_uf[$uf['sigla_uf']] = $uf['nome'];  
870 - }  
871 -  
872 - $this->campoLista("ref_sigla_uf_", " &nbsp; Estado", $array_uf, $this->ref_sigla_uf, "", false, "","", $disabled);  
873 -  
874 - $this->campoTexto( "nm_bairro", "Bairro", $this->nm_bairro, 30, 255, true ,false,false,"","","","",$disabled);  
875 -  
876 - $tipo_logradouro_array = array('' => "Tipo de Logradouro");  
877 -  
878 - $obj_tipo_logradouro = new clsTipoLogradouro();  
879 - $obj_tipo_logradouro_lista = $obj_tipo_logradouro->lista();  
880 - if($obj_tipo_logradouro_lista)  
881 - {  
882 - foreach ($obj_tipo_logradouro_lista as $key => $tipo_log)  
883 - {  
884 - $tipo_logradouro_array[$tipo_log["idtlog"]] = $tipo_log["descricao"];  
885 - }  
886 - }  
887 - $this->campoLista("ref_idtlog","Logradouro",$tipo_logradouro_array,$this->ref_idtlog,"",true,"","",$this->isEnderecoExterno?false:true,true);  
888 -  
889 - $this->campoTexto( "nm_logradouro", "Logradouro", $this->nm_logradouro, 30, 255, true ,false,false,"","","","",$disabled );  
890 -  
891 - $this->campoNumero( "numero", "N&uacute;mero", $this->numero, 4, 6, false, "", "", false, false, true );  
892 - $this->campoTexto( "letra", " &nbsp; Letra", $this->letra, 4, 1, false );  
893 - $this->campoTexto( "complemento", "Complemento", $this->complemento, 30, 50, false );  
894 - $this->campoTexto( "bloco", "Bloco", $this->bloco, 30, 50, false );  
895 - $this->campoNumero( "andar", "Andar", $this->andar, 4, 2, false, "", "", false, false, true );  
896 - $this->campoNumero( "apartamento", " &nbsp; Apartamento", $this->apartamento, 4, 6, false );  
897 -  
898 - $lista_mun_nasc = array('NULL' => "Selecione a cidade");  
899 -  
900 - $obj_mun_nasc = new clsMunicipio($this->idmun_nascimento);  
901 - $det_mun_nasc = $obj_mun_nasc->detalhe();  
902 -  
903 - if($det_mun_nasc["nome"])  
904 - {  
905 - $lista_mun_nasc[$det_mun_nasc["idmun"]] = $det_mun_nasc["nome"];  
906 - }  
907 -  
908 - $this->campoListaPesq( "idmun_nascimento", "Naturalidade", $lista_mun_nasc, $this->idmun_nascimento, "educar_pesquisa_municipio_lst.php?campo1=idmun_nascimento", "", false, "", "", null, null, "",true );  
909 -  
910 - $this->nacionalidade =($this->nacionalidade)?$this->nacionalidade:1;  
911 - $lista_nacionalidade = array('NULL' => "Selecione", '1' => "Brasileiro", '2' => "Naturalizado Brasileiro", '3' => "Estrangeiro");  
912 - $this->campoLista("nacionalidade","Nacionalidade",$lista_nacionalidade,$this->nacionalidade,"tmpObj = document.getElementById('pais_origem');if(this.value!=1){tmpObj.disabled=false;}else{tmpObj.selectedIndex = 27;tmpObj.disabled=true;}",true,"","","",false);  
913 -  
914 - $lista_pais_origem = array('NULL' => "País de origem");  
915 - $obj_pais = new clsPais();  
916 - $obj_pais_lista = $obj_pais->lista(null,null,null,"","","nome asc");  
917 - if($obj_pais_lista)  
918 - {  
919 - foreach ($obj_pais_lista as $key => $pais)  
920 - {  
921 - $lista_pais_origem[$pais["idpais"]] = $pais["nome"];  
922 - }  
923 - }  
924 -  
925 - // se a nacionalidade for "BRASILEIRO" seleciona o brasil e deixa inativo  
926 - $this->pais_origem = ($this->nacionalidade == 1)?1:$this->pais_origem;  
927 - $this->campoLista("pais_origem"," &nbsp; País de Origem",$lista_pais_origem,$this->pais_origem,"","","","",($this->nacionalidade == 1),false);  
928 -  
929 - $this->campoQuebra2("#224488");  
930 -  
931 - $obj_beneficio = new clsPmieducarAlunoBeneficio();  
932 - $obj_beneficio_lista = $obj_beneficio->lista(null,null,null,null,null,null,null,null,null,1);  
933 -  
934 - $lista_beneficio = array('NULL' => "Selecione");  
935 -  
936 - if($obj_beneficio_lista)  
937 - {  
938 -  
939 - foreach ($obj_beneficio_lista as $beneficio)  
940 - {  
941 - $lista_beneficio[$beneficio["cod_aluno_beneficio"]] = $beneficio["nm_beneficio"];  
942 - }  
943 -  
944 - }  
945 -  
946 - $this->campoLista("ref_cod_aluno_beneficio","Benef&iacute;cio",$lista_beneficio,$this->ref_cod_aluno_beneficio,"",false,"","",false,false);  
947 -  
948 - $lista_analfabeto = array( '1' => 'N&atilde;o' , 0 => "Sim");  
949 - $this->campoLista("analfabeto","Alfabetizado",$lista_analfabeto,$this->analfabeto,"",false,"","",false,false);  
950 -  
951 - $this->campoNumero("ddd_fone_1", "Telefone", $this->ddd_fone_1, 1, 3, false, "", "", false, false, true);  
952 - $this->campoNumero("fone_1", "Telefone", $this->fone_1, 11, 11);  
953 - $this->campoNumero("ddd_mov", "Celular", $this->ddd_mov, 1, 3, false, "", "", false, false, true);  
954 - $this->campoNumero("fone_mov", "Celular", $this->fone_mov, 11, 11);  
955 -  
956 - $this->campoEmail("email","Email",$this->email,30,255,false);  
957 - if(!empty($this->caminho_foto))  
958 - {  
959 - $this->campoRotulo("foto_antiga_","Arquivo","<img src='arquivos/educar/aluno/small/{$this->caminho_foto}' border='0'> <a href='javascript:void(0);' onclick=\"document.getElementById('foto_excluida').value=1;setVisibility('tr_foto_antiga_',false);setVisibility('tr_foto',true);\"> <img src=\"imagens/nvp_bola_xis.gif\" border=\"0\"></a>");  
960 - }  
961 -  
962 - $this->campoArquivo("foto", "Foto","", "20","",false);  
963 -  
964 - $this->campoOculto( "id_bairro", $this->id_bairro);  
965 - $this->campoOculto( "id_cep", $this->id_cep);  
966 - $this->campoOculto( "id_logradouro", $this->id_logradouro);  
967 - $this->campoOculto( "id_cidade", $this->id_cidade);  
968 - $this->campoOculto("ref_idtlog_", $this->ref_idtlog);  
969 - $this->campoOculto("ref_sigla_uf", $this->ref_sigla_uf);  
970 - $this->campoOculto("cpf",$this->cpf);  
971 -  
972 - $this->campoAdicionaTab("Deficiência", $this->tab_habilitado);  
973 -  
974 - if($this->ref_idpes)  
975 - {  
976 - $obj_deficiencia_pessoa = new clsCadastroFisicaDeficiencia();  
977 - $obj_deficiencia_pessoa_lista = $obj_deficiencia_pessoa->lista($this->ref_idpes);  
978 -  
979 - }  
980 -  
981 - if($this->inc != 2 && !$this->exc)  
982 - {  
983 - if($obj_deficiencia_pessoa_lista)  
984 - {  
985 - $deficiencia_pessoa = array();  
986 - foreach ($obj_deficiencia_pessoa_lista as $deficiencia)  
987 - {  
988 - $obj_def = new clsCadastroDeficiencia($deficiencia["ref_cod_deficiencia"]);  
989 - $det_def = $obj_def->detalhe();  
990 - $deficiencia_pessoa[$deficiencia["ref_cod_deficiencia"]] = $det_def["nm_deficiencia"];  
991 - }  
992 - $deficiencia_aluno = array();  
993 - $deficiencia_aluno = $deficiencia_pessoa;  
994 - }  
995 - }  
996 -  
997 -  
998 - $obj_deficiencias = new clsCadastroDeficiencia();  
999 - $lista_deficiencias = $obj_deficiencias->lista();  
1000 -  
1001 - $lista = array('' => "Selecione");  
1002 -  
1003 - if($lista_deficiencias)  
1004 - {  
1005 -  
1006 - foreach ($lista_deficiencias as $deficiencia)  
1007 - {  
1008 - $lista[$deficiencia["cod_deficiencia"]] = $deficiencia["nm_deficiencia"];  
1009 - }  
1010 -  
1011 - }  
1012 -  
1013 - $oculto = $tabela = "";  
1014 - if($deficiencia_aluno)  
1015 - {  
1016 - foreach ($deficiencia_aluno as $indice => $valor)  
1017 - {  
1018 - $cor_fundo = $cor_fundo == "#D1DADF" ? "#E4E9ED" : "#D1DADF";  
1019 - $tabela .= "<tr id=\"tr_{$indice}\" bgcolor=\"{$cor_fundo}\" style=\"padding-right: 10px;\">";  
1020 - $tabela .= "<td>{$valor}</td>";  
1021 - $tabela .= "<td align=\"right\" style=\"padding-right: 10px;\">";  
1022 - $tabela .= "<img border=\"0\" onclick=\"excluirLinhaDeficiencia({$indice})\"  
1023 - style=\"cursor: pointer;\" src=\"imagens/banco_imagens/excluirrr.gif\"  
1024 - title=\"Excluir\">";  
1025 - $tabela .= "</td></tr>";  
1026 - $oculto .= "<input type=\"hidden\" id=\"oc_defic[{$indice}]\" name=\"oc_defic[{$indice}]\" value=\"{$indice}\">";  
1027 - }  
1028 - }  
1029 - $this->campoLista("ref_cod_pessoa_deficiencia","Defici&ecirc;ncia",$lista,$this->ref_cod_pessoa_deficiencia,"",false,"","",false,$obrigatorio);  
1030 - $this->campoRotulo("incluir2", "Incluir defici&ecirc;ncia", "<a href='#' onclick=\"adicionaDeficiencia();\"><img src='imagens/banco_imagens/entrada2.gif' title='Incluir' border=0></a>");  
1031 - $this->campoRotulo("tab_defic", "Deficiências", "<table id='tabela_deficiencia' cellspacing='0' cellpadding='2'><tbody>{$tabela}</tbody></table><div id='ocultos_defic'>{$oculto}</div>");  
1032 -  
1033 - $this->campoOculto("inc", "");  
1034 - $this->campoOculto("exc", "");  
1035 -  
1036 - $this->campoAdicionaTab("Outros Dados", $this->tab_habilitado);  
1037 -  
1038 - if($this->ref_idpes)  
1039 - {  
1040 - $ObjDocumento = new clsDocumento($this->ref_idpes);  
1041 - $detalheDocumento = $ObjDocumento->detalhe();  
1042 -  
1043 - $this->rg = $detalheDocumento['rg'];  
1044 -  
1045 - if($detalheDocumento['data_exp_rg'])  
1046 - {  
1047 - $this->data_exp_rg = date( "d/m/Y", strtotime( substr($detalheDocumento['data_exp_rg'],0,19) ) );  
1048 - }  
1049 -  
1050 - $this->sigla_uf_exp_rg = $detalheDocumento['sigla_uf_exp_rg'];  
1051 - $this->tipo_cert_civil = $detalheDocumento['tipo_cert_civil'];  
1052 - $this->num_termo = $detalheDocumento['num_termo'];  
1053 - $this->num_livro = $detalheDocumento['num_livro'];  
1054 - $this->num_folha = $detalheDocumento['num_folha'];  
1055 -  
1056 - if($detalheDocumento['data_emissao_cert_civil'])  
1057 - {  
1058 - $this->data_emissao_cert_civil = date( "d/m/Y", strtotime( substr($detalheDocumento['data_emissao_cert_civil'],0,19) ) );  
1059 - }  
1060 -  
1061 - $this->sigla_uf_cert_civil = $detalheDocumento['sigla_uf_cert_civil'];  
1062 -  
1063 - $this->cartorio_cert_civil = $detalheDocumento['cartorio_cert_civil'];  
1064 - $this->num_cart_trabalho = $detalheDocumento['num_cart_trabalho'];  
1065 - $this->serie_cart_trabalho = $detalheDocumento['serie_cart_trabalho'];  
1066 -  
1067 - if($detalheDocumento['data_emissao_cart_trabalho'])  
1068 - {  
1069 - $this->data_emissao_cart_trabalho = date( "d/m/Y", strtotime( substr($detalheDocumento['data_emissao_cart_trabalho'],0,19) ) );  
1070 - }  
1071 -  
1072 - $this->sigla_uf_cart_trabalho = $detalheDocumento['sigla_uf_cart_trabalho'];  
1073 - $this->num_tit_eleitor = $detalheDocumento['num_tit_eleitor'];  
1074 - $this->zona_tit_eleitor = $detalheDocumento['zona_tit_eleitor'];  
1075 - $this->secao_tit_eleitor = $detalheDocumento['secao_tit_eleitor'];  
1076 - $this->idorg_exp_rg = $detalheDocumento['idorg_exp_rg'];  
1077 - }  
1078 -  
1079 - $objUf = new clsUf();  
1080 - $listauf = $objUf->lista();  
1081 - $listaEstado = array("0"=>"Selecione");  
1082 - if($listauf)  
1083 - {  
1084 - foreach ($listauf as $uf) {  
1085 - $listaEstado[$uf['sigla_uf']] = $uf['sigla_uf'];  
1086 - }  
1087 - }  
1088 -  
1089 - $objOrgaoEmissorRg = new clsOrgaoEmissorRg();  
1090 - $listaOrgaoEmissorRg = $objOrgaoEmissorRg->lista();  
1091 - $listaOrgao = array("0"=>"Selecione");  
1092 - if($listaOrgaoEmissorRg)  
1093 - {  
1094 - foreach ($listaOrgaoEmissorRg as $orgaoemissor)  
1095 - {  
1096 - $listaOrgao[$orgaoemissor['idorg_rg']] = $orgaoemissor['sigla'];  
1097 - }  
1098 - }  
1099 -  
1100 - $this->campoOculto( "idpes", $this->idpes);  
1101 -  
1102 - $this->campoTexto("rg", "Rg", $this->rg, "10", "10", false);  
1103 - $this->campoData("data_exp_rg", "Data Expedição RG", $this->data_exp_rg, false);  
1104 - $this->campoLista("idorg_exp_rg", "Órgão Expedição RG", $listaOrgao, $this->idorg_exp_rg, false, false, false, false, false,false);  
1105 - $this->campoLista("sigla_uf_exp_rg", "Estado Expedidor", $listaEstado, $this->sigla_uf_exp_rg, false, false, false, false, false,false);  
1106 -  
1107 - $lista_tipo_cert_civil = array();  
1108 - $lista_tipo_cert_civil["0"] = "Selecione";  
1109 - $lista_tipo_cert_civil[91] = "Nascimento";  
1110 - $lista_tipo_cert_civil[92] = "Casamento";  
1111 - $this->campoLista( "tipo_cert_civil", "Tipo Certificado Civil", $lista_tipo_cert_civil, $this->tipo_cert_civil,null,null,null,null,null,false);  
1112 -  
1113 - $this->campoTexto("num_termo", "Termo", $this->num_termo, "8", "8", false);  
1114 - $this->campoNumero("num_livro", "Livro", $this->num_livro, "8", "8", false);  
1115 - $this->campoTexto("num_folha", "Folha", $this->num_folha, "4", "4", false);  
1116 - $this->campoData("data_emissao_cert_civil", "Emissão Certidão Civil", $this->data_emissao_cert_civil, false);  
1117 - $this->campoLista("sigla_uf_cert_civil", "Sigla Certidão Civil", $listaEstado, $this->sigla_uf_cert_civil, false, false, false, false, false,false);  
1118 - $this->campoMemo("cartorio_cert_civil", "Cartório", $this->cartorio_cert_civil, "35", "4", false,false);  
1119 - $this->campoTexto("num_tit_eleitor", "Título de Eleitor", $this->num_tit_eleitor, "13", "13", false);  
1120 - $this->campoTexto("zona_tit_eleitor", "Zona", $this->zona_tit_eleitor, "4", "4", false);  
1121 - $this->campoTexto("secao_tit_eleitor", "Seção", $this->secao_tit_eleitor, "10", "10", false);  
1122 -  
1123 - $this->campoTabFim();  
1124 - }  
1125 -  
1126 - function Novo()  
1127 - {  
1128 - @session_start();  
1129 - $this->pessoa_logada = $_SESSION['id_pessoa'];  
1130 - @session_write_close();  
1131 -  
1132 - if (!$this->cpf && $this->cpf_2)  
1133 - {  
1134 - $cpf = idFederal2int($this->cpf_2);  
1135 - $obj_pessoa_fisica = new clsPessoaFisica();  
1136 - $lst_pessoa_fisica = $obj_pessoa_fisica->lista(null, $cpf);  
1137 - if ($lst_pessoa_fisica)  
1138 - {  
1139 - $this->mensagem = "CPF Já Cadastrado";  
1140 - return false;  
1141 - die();  
1142 - }  
1143 - else  
1144 - die("CPF Não Existente");  
1145 - }  
1146 - $obj_pessoa = new clsPessoa_($this->ref_idpes);  
1147 - if($obj_pessoa->detalhe())  
1148 - {  
1149 - $obj_pessoa = new clsPessoa_($this->ref_idpes,$this->nome,null,$this->url,null,$this->pessoa_logada,null,$this->email);  
1150 - if(!$obj_pessoa->edita())  
1151 - {  
1152 - return false;  
1153 - }  
1154 - }  
1155 - else  
1156 - {  
1157 - $obj_pessoa = new clsPessoa_($this->ref_idpes,$this->nome,null,$this->url,'F',$this->pessoa_logada,null,$this->email);  
1158 - if(!$this->ref_idpes = $obj_pessoa->cadastra())  
1159 - {  
1160 - return false;  
1161 - }  
1162 - }  
1163 -  
1164 - if(!$this->cpf)  
1165 - {  
1166 - $this->ref_cod_sistema = 1;  
1167 - }  
1168 - else  
1169 - {  
1170 - $this->ref_cod_sistema = "NULL";  
1171 - }  
1172 -  
1173 - if( is_string( $this->cpf_pai ) && $this->cpf_pai != "")  
1174 - {  
1175 -  
1176 - $this->cpf_pai = idFederal2int($this->cpf_pai);  
1177 - $obj_cpf = new clsFisica(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,$this->cpf_pai);  
1178 - $detalhe_cpf = $obj_cpf->detalheCPF();  
1179 - if( $detalhe_cpf )  
1180 - {  
1181 - $this->idpes_pai = $detalhe_cpf["idpes"];  
1182 - $obj_pessoa = new clsPessoa_($this->idpes_pai);  
1183 - $det_pessoa = $obj_pessoa->detalhe();  
1184 - if( $det_pessoa )  
1185 - {  
1186 - if($this->nm_pai)  
1187 - {  
1188 - $obj_pessoa = new clsPessoa_($this->idpes_pai,$this->nm_pai);  
1189 - $obj_pessoa->edita();  
1190 - }  
1191 - else  
1192 - {  
1193 -  
1194 - $this->nm_pai = $det_pessoa["nome"];  
1195 -  
1196 - }  
1197 - }  
1198 - }  
1199 - else  
1200 - {  
1201 - // cria uma pessoa para o pai  
1202 - $obj_pessoa = new clsPessoa_(false,$this->nm_pai,$this->pessoa_logada,false,'F');  
1203 - $idpes = $obj_pessoa->cadastra();  
1204 - if( $idpes )  
1205 - {  
1206 - $this->idpes_pai = $idpes;  
1207 - //cadastra como pesso Fisica  
1208 - $obj_fisica = new clsFisica($idpes,false,'M',false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,$this->pessoa_logada,null,null,$this->cpf_pai);  
1209 - $obj_fisica->cadastra();  
1210 - }  
1211 - }  
1212 - }  
1213 - else  
1214 - {  
1215 - $this->idpes_pai = "NULL";  
1216 - }  
1217 -  
1218 - if( is_string( $this->cpf_mae ) && $this->cpf_mae != "")  
1219 - {  
1220 - $this->cpf_mae = idFederal2int($this->cpf_mae);  
1221 - $obj_cpf = new clsFisica(false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,$this->cpf_mae);  
1222 - $detalhe_cpf = $obj_cpf->detalheCPF();  
1223 - if( $detalhe_cpf )  
1224 - {  
1225 - $this->idpes_mae = $detalhe_cpf["idpes"];  
1226 - $obj_pessoa = new clsPessoa_($this->idpes_mae);  
1227 - $det_pessoa = $obj_pessoa->detalhe();  
1228 - if($det_pessoa)  
1229 - {  
1230 - if($this->nm_mae)  
1231 - {  
1232 - $obj_pessoa = new clsPessoa_($this->idpes_mae,$this->nm_mae);  
1233 - $obj_pessoa->edita();  
1234 - }  
1235 - else  
1236 - {  
1237 -  
1238 - $this->nm_mae = $det_pessoa["nome"];  
1239 -  
1240 - }  
1241 - }  
1242 -  
1243 - }  
1244 - else  
1245 - {  
1246 - // cria uma pessoa para a mae  
1247 - $obj_pessoa = new clsPessoa_(false,$this->nm_mae,$this->pessoa_logada,false,'F');  
1248 - $idpes = $obj_pessoa->cadastra();  
1249 - if( $idpes )  
1250 - {  
1251 - $this->idpes_mae = $idpes;  
1252 - //cadastra como pesso Fisica  
1253 - $obj_fisica = new clsFisica($idpes,false,'F',false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,$this->pessoa_logada,null,null,$this->cpf_mae);  
1254 - $obj_fisica->cadastra();  
1255 - }  
1256 - }  
1257 - }  
1258 - else  
1259 - {  
1260 - $this->idpes_mae = "NULL";  
1261 - }  
1262 -  
1263 - $obj_fisica = new clsFisica($this->ref_idpes,dataToBanco($this->data_nascimento),$this->sexo,$this->idpes_mae,$this->idpes_pai,$this->ref_idpes_responsavel,null,$this->ideciv,null,null,null,$this->nacionalidade,$this->pais_origem,null,$this->idmun_nascimento,null,null,null,null,null,null,null,null,$this->pessoa_logada,$this->ref_cod_sistema,$this->cpf);  
1264 - if($obj_fisica->detalhe())  
1265 - {  
1266 - if(!$this->ref_idpes_responsavel)  
1267 - $this->ref_idpes_responsavel = "NULL";  
1268 -  
1269 - $obj_fisica = new clsFisica($this->ref_idpes,dataToBanco($this->data_nascimento),$this->sexo,$this->idpes_mae,$this->idpes_pai,$this->ref_idpes_responsavel,null,$this->ideciv,null,null,null,$this->nacionalidade,$this->pais_origem,null,$this->idmun_nascimento,null,null,null,null,null,null,null,null,$this->pessoa_logada,$this->ref_cod_sistema);  
1270 - if(!$obj_fisica->edita())  
1271 - {  
1272 - return false;  
1273 - }  
1274 - }  
1275 - else  
1276 - {  
1277 - $obj_fisica = new clsFisica($this->ref_idpes,dataToBanco($this->data_nascimento),$this->sexo,$this->idpes_mae,$this->idpes_pai,$this->ref_idpes_responsavel,null,$this->ideciv,null,null,null,$this->nacionalidade,$this->pais_origem,null,$this->idmun_nascimento,null,null,null,null,null,null,null,null,$this->pessoa_logada,$this->ref_cod_sistema,$this->cpf);  
1278 - if(!$obj_fisica->cadastra())  
1279 - {  
1280 - return false;  
1281 - }  
1282 - }  
1283 -  
1284 - if(is_numeric($this->ref_cod_raca))  
1285 - {  
1286 - $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes );  
1287 - if ($obj_fisica_raca->existe())  
1288 - {  
1289 -  
1290 - $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca );  
1291 - $obj_fisica_raca->edita();  
1292 -  
1293 - }  
1294 - else  
1295 - {  
1296 -  
1297 - $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca );  
1298 - $obj_fisica_raca->cadastra();  
1299 -  
1300 - }  
1301 - }  
1302 - else  
1303 - {  
1304 - $obj_fisica_raca = new clsCadastroFisicaRaca( $this->ref_idpes, $this->ref_cod_raca );  
1305 - $obj_fisica_raca->excluir();  
1306 - }  
1307 -  
1308 - $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 1, $this->fone_1, $this->ddd_fone_1 );  
1309 - if ( $objTelefone->detalhe() )  
1310 - {  
1311 - $objTelefone->edita();  
1312 - }  
1313 - else  
1314 - {  
1315 - $objTelefone->cadastra();  
1316 - }  
1317 -  
1318 - $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 2, $this->fone_2, $this->ddd_fone_2 );  
1319 - if ( $objTelefone->detalhe() )  
1320 - {  
1321 - $objTelefone->edita();  
1322 - }  
1323 - else  
1324 - {  
1325 - $objTelefone->cadastra();  
1326 - }  
1327 -  
1328 - $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 3, $this->fone_mov, $this->ddd_mov );  
1329 - if ( $objTelefone->detalhe() )  
1330 - {  
1331 - $objTelefone->edita();  
1332 - }  
1333 - else  
1334 - {  
1335 - $objTelefone->cadastra();  
1336 - }  
1337 -  
1338 - $objTelefone = new clsPessoaTelefone( $this->ref_idpes, 4, $this->fone_fax, $this->ddd_fax );  
1339 - if ( $objTelefone->detalhe() )  
1340 - {  
1341 - $objTelefone->edita();  
1342 - }  
1343 - else  
1344 - {  
1345 - $objTelefone->cadastra();  
1346 - }  
1347 -  
1348 - if($this->isEnderecoExterno)  
1349 - {  
1350 - $this->cep_ = str_replace("-","",$this->cep_);  
1351 - $obj_endereco = new clsEnderecoExterno($this->ref_idpes,1,$this->ref_idtlog,$this->nm_logradouro,$this->numero,$this->letra,$this->complemento,$this->nm_bairro, $this->cep_,$this->cidade,$this->ref_sigla_uf_,null,$this->bloco,$this->apartamento,$this->andar,null,$this->pessoa_logada);  
1352 -  
1353 - if($obj_endereco->existe())  
1354 - {  
1355 - if(!$obj_endereco->edita())  
1356 - {  
1357 - return false;  
1358 - }  
1359 - }  
1360 - else  
1361 - {  
1362 -  
1363 - if(!$obj_endereco->cadastra())  
1364 - {  
1365 - return false;  
1366 - }  
1367 - }  
1368 -  
1369 - if($this->endereco_original_is_externo != $this->isEnderecoExterno)  
1370 - {  
1371 - $obj_endereco = new clsPessoaEndereco($this->ref_idpes);  
1372 - $obj_endereco->exclui();  
1373 - }  
1374 -  
1375 - }  
1376 - else  
1377 - {  
1378 - $obj_endereco = new clsPessoaEndereco($this->ref_idpes,$this->id_cep,$this->id_logradouro,$this->id_bairro,$this->numero,$this->complemento,null,$this->letra,$this->bloco,$this->apartamento,$this->andar,null,$this->pessoa_logada);  
1379 - if($obj_endereco->existe())  
1380 - {  
1381 - if(!$obj_endereco->edita())  
1382 - {  
1383 - return false;  
1384 - }  
1385 - }  
1386 - else  
1387 - {  
1388 - if(!$obj_endereco->cadastra())  
1389 - {  
1390 - return false;  
1391 - }  
1392 - }  
1393 - if($this->endereco_original_is_externo != $this->isEnderecoExterno)  
1394 - {  
1395 - $obj_endereco = new clsEnderecoExterno($this->ref_idpes);  
1396 - $obj_endereco->exclui();  
1397 - }  
1398 - }  
1399 -  
1400 -  
1401 - $this->deficiencia_exc = $_POST['oc_defic_exc'];  
1402 - if($this->deficiencia_exc)  
1403 - {  
1404 - foreach ($this->deficiencia_exc as $key => $deficiencia)  
1405 - {  
1406 - $obj_deficiencia_pessoa = new clsCadastroFisicaDeficiencia($this->ref_idpes,$deficiencia);  
1407 - if($obj_deficiencia_pessoa->detalhe())  
1408 - {  
1409 - $obj_deficiencia_pessoa->excluir();  
1410 - }  
1411 - }  
1412 - }  
1413 - $this->deficiencia = $_POST['oc_defic'];  
1414 - if($this->deficiencia)  
1415 - {  
1416 - foreach ($this->deficiencia as $key => $deficiencia)  
1417 - {  
1418 - $obj_deficiencia_pessoa = new clsCadastroFisicaDeficiencia($this->ref_idpes,$key);  
1419 - if(!$obj_deficiencia_pessoa->detalhe())  
1420 - {  
1421 - $obj_deficiencia_pessoa->cadastra();  
1422 - }  
1423 - }  
1424 - }  
1425 -  
1426 -  
1427 - if($this->data_emissao_cart_trabalho)  
1428 - {  
1429 - $this->data_emissao_cart_trabalho = explode("/",$this->data_emissao_cart_trabalho);  
1430 - $this->data_emissao_cart_trabalho = "{$this->data_emissao_cart_trabalho[2]}/{$this->data_emissao_cart_trabalho[1]}/{$this->data_emissao_cart_trabalho[0]}";  
1431 - }  
1432 - if($this->data_emissao_cert_civil)  
1433 - {  
1434 - $this->data_emissao_cert_civil = explode("/",$this->data_emissao_cert_civil);  
1435 - $this->data_emissao_cert_civil = "{$this->data_emissao_cert_civil[2]}/{$this->data_emissao_cert_civil[1]}/{$this->data_emissao_cert_civil[0]}";  
1436 - }  
1437 - if($this->data_exp_rg)  
1438 - {  
1439 - $this->data_exp_rg = explode("/",$this->data_exp_rg);  
1440 - $this->data_exp_rg = "{$this->data_exp_rg[2]}/{$this->data_exp_rg[1]}/{$this->data_exp_rg[0]}";  
1441 -  
1442 - }  
1443 -  
1444 - $ObjDocumento = new clsDocumento($this->ref_idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg );  
1445 - if($ObjDocumento->detalhe())  
1446 - {  
1447 - $ObjDocumento = new clsDocumento($this->ref_idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg );  
1448 - if(!$ObjDocumento->edita() )  
1449 - {  
1450 - return false;  
1451 - }  
1452 - }  
1453 - else  
1454 - {  
1455 - $ObjDocumento = new clsDocumento($this->ref_idpes, $this->rg, $this->data_exp_rg, $this->sigla_uf_exp_rg, $this->tipo_cert_civil, $this->num_termo, $this->num_livro, $this->num_folha, $this->data_emissao_cert_civil, $this->sigla_uf_cert_civil, $this->cartorio_cert_civil, $this->num_cart_trabalho, $this->serie_cart_trabalho, $this->data_emissao_cart_trabalho, $this->sigla_uf_cart_trabalho, $this->num_tit_eleitor, $this->zona_tit_eleitor, $this->secao_tit_eleitor, $this->idorg_exp_rg );  
1456 - if(!$ObjDocumento->cadastra() )  
1457 - {  
1458 - return false;  
1459 - }  
1460 - }  
1461 - if(/*$this->caminho_foto*/$this->foto && $this->foto["error"] == 0)  
1462 - {  
1463 - $this->foto = $this->geraFotos(/*$this->caminho_foto*/$this->foto["tmp_name"]);  
1464 - $obj = new clsPmieducarAluno(null,$this->ref_cod_aluno_beneficio,$this->ref_cod_religiao,$this->pessoa_logada,$this->pessoa_logada,$this->ref_idpes,null,null,1,$this->foto,$this->analfabeto,$this->nm_pai,$this->nm_mae );  
1465 - $obj_det = $obj->detalhe();  
1466 - if($obj_det)  
1467 - {  
1468 - if($obj_det["caminho_foto"])  
1469 - {  
1470 - $this->caminho_foto = $obj_det["caminho_foto"];  
1471 - }  
1472 - $this->foto_excluida = 1;  
1473 - }  
1474 - }  
1475 - elseif($this->foto_excluida == 1)  
1476 - {  
1477 - $this->foto = "NULL";  
1478 - }  
1479 - elseif (!$this->foto_excluida)  
1480 - {  
1481 - $this->foto = $this->foto_antiga;  
1482 - }  
1483 -  
1484 -  
1485 - if($this->foto_excluida)  
1486 - {  
1487 - if(file_exists("arquivos/educar/aluno/big/{$this->caminho_foto}"))  
1488 - {  
1489 - unlink("arquivos/educar/aluno/big/{$this->caminho_foto}");  
1490 - }  
1491 -  
1492 - if(file_exists("arquivos/educar/aluno/small/{$this->caminho_foto}"))  
1493 - {  
1494 - unlink("arquivos/educar/aluno/small/{$this->caminho_foto}");  
1495 - }  
1496 -  
1497 - if(file_exists("arquivos/educar/aluno/original/{$this->caminho_foto}"))  
1498 - {  
1499 - unlink("arquivos/educar/aluno/original/{$this->caminho_foto}");  
1500 - }  
1501 -  
1502 - }  
1503 -  
1504 - if(is_numeric($this->idpes_mae) && $this->idpes_mae != "NULL")  
1505 - $this->nm_mae = "NULL";  
1506 -  
1507 - if(is_numeric($this->idpes_pai) && $this->idpes_pai != "NULL")  
1508 - $this->nm_pai = "NULL";  
1509 -  
1510 - if(!$this->cod_aluno)  
1511 - {  
1512 - $obj = new clsPmieducarAluno(null,$this->ref_cod_aluno_beneficio,$this->ref_cod_religiao,$this->pessoa_logada,$this->pessoa_logada,$this->ref_idpes,null,null,1,$this->foto, $this->analfabeto, $this->nm_pai,$this->nm_mae, $this->tipo_responsavel );  
1513 - if($this->ref_idpes)  
1514 - {  
1515 - if($obj->existePessoa())  
1516 - {  
1517 - $obj->edita();  
1518 - }  
1519 - else  
1520 - {  
1521 - $obj->cadastra();  
1522 - }  
1523 -  
1524 - }  
1525 - }  
1526 - else  
1527 - {  
1528 - $obj = new clsPmieducarAluno($this->cod_aluno,$this->ref_cod_aluno_beneficio,$this->ref_cod_religiao,$this->pessoa_logada,$this->pessoa_logada,$this->ref_idpes,null,null,1,$this->foto,$this->analfabeto, $this->nm_pai,$this->nm_mae, $this->tipo_responsavel );  
1529 - if($this->ref_idpes)  
1530 - {  
1531 - if($obj->existePessoa())  
1532 - {  
1533 - $obj->edita();  
1534 - }  
1535 - else  
1536 - {  
1537 - $obj->cadastra();  
1538 - }  
1539 - }  
1540 - }  
1541 - header("location: educar_aluno_det.php?cod_aluno={$this->cod_aluno}");  
1542 - die();  
1543 - return true;  
1544 - }  
1545 -  
1546 - function Editar()  
1547 - {  
1548 - $this->Novo();  
1549 - }  
1550 -  
1551 - function Excluir()  
1552 - {  
1553 - @session_start();  
1554 - $this->pessoa_logada = $_SESSION['id_pessoa'];  
1555 - @session_write_close();  
1556 - $obj = new clsPmieducarAluno($this->cod_aluno, $this->ref_cod_aluno_beneficio, $this->ref_cod_religiao, $this->pessoa_logada, $this->pessoa_logada, $this->ref_idpes, $this->data_cadastro, $this->data_exclusao, 0);  
1557 - $excluiu = $obj->excluir();  
1558 - if( $excluiu )  
1559 - {  
1560 - $this->mensagem .= "Exclus&atilde;o efetuada com sucesso.<br>";  
1561 - header( "Location: educar_aluno_lst.php" );  
1562 - die();  
1563 - return true;  
1564 - }  
1565 -  
1566 - $this->mensagem = "Exclus&atilde;o n&atilde;o realizada.<br>";  
1567 - echo "<!--\nErro ao excluir clsPmieducarAluno\nvalores obrigatorios\nif( is_numeric( $this->cod_aluno ) && is_numeric( $this->ref_usuario_exc ) )\n-->";  
1568 - return false;  
1569 - }  
1570 -  
1571 - function geraFotos($fotoOriginal)  
1572 - {  
1573 - if(!file_exists($fotoOriginal))  
1574 - {  
1575 - return;  
1576 - }  
1577 - list ($imagewidth, $imageheight, $img_type) = @GetImageSize($fotoOriginal);  
1578 - $src_img_original = "";  
1579 -  
1580 - $fim_largura = $imagewidth;  
1581 - $fim_altura = $imageheight;  
1582 -  
1583 - $extensao = ($img_type == "2") ? ".jpg" : (($img_type == "3") ? ".png" : "");  
1584 - $nome_do_arquivo = array_pop(explode("/",$fotoOriginal)).$extensao;  
1585 - $caminhoDaBig = "arquivos/educar/aluno/big/{$nome_do_arquivo}";  
1586 - $caminhoDaFotoOriginal = "arquivos/educar/aluno/original/{$nome_do_arquivo}";  
1587 - if ($imagewidth > 700)  
1588 - {  
1589 - $new_w = 700;  
1590 - $ratio = ($imagewidth / $new_w);  
1591 - $new_h = ceil($imageheight / $ratio);  
1592 -  
1593 - $fim_largura = $new_w;  
1594 - $fim_altura = $new_h;  
1595 -  
1596 - if ( !file_exists($caminhoDaBig) )  
1597 - {  
1598 - if ($img_type=="2")  
1599 - {  
1600 - $src_img_original = @imagecreatefromjpeg($fotoOriginal);  
1601 - $dst_img = @imagecreatetruecolor($new_w,$new_h);  
1602 - imagecopyresized($dst_img,$src_img_original,0,0,0,0,$new_w,$new_h,imagesx($src_img_original),imagesy($src_img_original));  
1603 - imagejpeg($dst_img, $caminhoDaBig);  
1604 - }  
1605 - else if ($img_type=="3")  
1606 - {  
1607 - $src_img_original=@ImageCreateFrompng($fotoOriginal);  
1608 -  
1609 - $dst_img=@imagecreatetruecolor($new_w,$new_h);  
1610 - ImageCopyResized($dst_img,$src_img_original,0,0,0,0,$new_w,$new_h,ImageSX($src_img_original),ImageSY($src_img_original));  
1611 - Imagepng($dst_img, $caminhoDaBig);  
1612 - }  
1613 - }  
1614 - }  
1615 - else  
1616 - {  
1617 -  
1618 - if ( !file_exists($caminhoDaBig) )  
1619 - {  
1620 - copy ($fotoOriginal, $caminhoDaBig);  
1621 -  
1622 - if ($img_type=="2")  
1623 - {  
1624 - $src_img_original = @imagecreatefromjpeg($fotoOriginal);  
1625 - }  
1626 - else if ($img_type=="3")  
1627 - {  
1628 - $src_img_original=@imagecreatefrompng($fotoOriginal);  
1629 - }  
1630 - }  
1631 - }  
1632 -  
1633 - $new_w = 100;  
1634 - $ratio = ($imagewidth / $new_w);  
1635 - $new_h = round($imageheight / $ratio);  
1636 -  
1637 - $caminhoDaSmall = "arquivos/educar/aluno/small/{$nome_do_arquivo}";  
1638 -  
1639 -  
1640 - if ( /*!*/file_exists($caminhoDaBig) )  
1641 - {  
1642 - if ($img_type=="2")  
1643 - {  
1644 -  
1645 - $dst_img = @imagecreatetruecolor($new_w,$new_h);  
1646 - @imagecopyresized($dst_img,$src_img_original,0,0,0,0,$new_w,$new_h,imagesx($src_img_original),imagesy($src_img_original));  
1647 -  
1648 - @imagejpeg($dst_img, $caminhoDaSmall);  
1649 -  
1650 - }  
1651 - else if ($img_type=="3")  
1652 - {  
1653 - $dst_img=@imagecreatetruecolor($new_w,$new_h);  
1654 - @imageCopyResized($dst_img,$src_img_original,0,0,0,0,$new_w,$new_h,ImageSX($src_img_original),imageSY($src_img_original));  
1655 -  
1656 - @imagepng($dst_img, $caminhoDaSmall);  
1657 -  
1658 - }else if ($img_type=="1")  
1659 - {  
1660 - $dst_img=@imagecreatefromgif($src_img_original);  
1661 - @imageCopyResized($dst_img,$src_img_original,0,0,0,0,$new_w,$new_h,ImageSX($src_img_original),imageSY($src_img_original));  
1662 -  
1663 - imagegif($dst_img, $caminhoDaSmall);  
1664 -  
1665 - }  
1666 - }  
1667 -  
1668 - copy($fotoOriginal, $caminhoDaFotoOriginal);  
1669 - if( ! ( file_exists( $fotoOriginal ) && file_exists( $caminhoDaSmall ) && file_exists( $caminhoDaBig ) ) )  
1670 - {  
1671 -  
1672 - die( "<center><br>Um erro ocorreu ao inserir a foto.<br>Por favor tente novamente.</center>" );  
1673 - }  
1674 - if(file_exists($fotoOriginal))  
1675 - {  
1676 - unlink($fotoOriginal);  
1677 - }  
1678 - return $nome_do_arquivo;  
1679 - }  
1680 -}  
1681 -  
1682 -// cria uma extensao da classe base  
1683 -$pagina = new clsIndexBase();  
1684 -// cria o conteudo  
1685 -$miolo = new indice();  
1686 -// adiciona o conteudo na clsBase  
1687 -$pagina->addForm( $miolo );  
1688 -// gera o html  
1689 -$pagina->MakeAll();  
1690 -?>  
1691 -  
1692 -<script type="text/javascript">  
1693 -  
1694 - var campos = document.getElementsByName('tipo_responsavel');  
1695 - for(var i=1;i<campos.length;i++)  
1696 - {  
1697 - campos[i].onclick = function()  
1698 - {  
1699 - analizador();  
1700 - }  
1701 - }  
1702 -  
1703 - function analizador()  
1704 - {  
1705 - var id_check = 0;  
1706 - for(var i=1;i<campos.length;i++)  
1707 - {  
1708 - if(campos[i].checked)  
1709 - {  
1710 -  
1711 - switch(campos[i].value)  
1712 - {  
1713 -  
1714 - case 'p':  
1715 - id_check = 1;  
1716 - if(!campo_pai.value)  
1717 - {  
1718 - alert("Preencha o campo 'Nome do Pai' para poder seleciona-lo!");  
1719 - campo_pai.focus();  
1720 - id_check = 0;  
1721 - }  
1722 - break;  
1723 -  
1724 - case 'm':  
1725 - id_check = 2;  
1726 - if(!campo_mae.value)  
1727 - {  
1728 - alert("Preencha o campo 'Nome da Mãe' para poder seleciona-lo!");  
1729 - campo_mae.focus();  
1730 - id_check = 0;  
1731 - }  
1732 - break;  
1733 -  
1734 - case 'r':  
1735 - id_check = 3;  
1736 - if(!campo_resp.value)  
1737 - {  
1738 - alert("Preencha o campo 'Responsável' para poder seleciona-lo!");  
1739 - campo_resp.focus();  
1740 - id_check = 0;  
1741 - }  
1742 - break;  
1743 - }  
1744 - }  
1745 - }  
1746 -  
1747 - if(id_check)  
1748 - campos[id_check].checked = true;  
1749 - else  
1750 - analizador2();  
1751 -  
1752 - }  
1753 -  
1754 -  
1755 - var campo_pai = $('nm_pai');  
1756 - campo_pai.onkeyup = function()  
1757 - {  
1758 - if(campo_pai.value)  
1759 - campos[1].checked = true;  
1760 - else  
1761 - analizador2();  
1762 -  
1763 - }  
1764 -  
1765 - var campo_mae = $('nm_mae');  
1766 - campo_mae.onkeyup = function()  
1767 - {  
1768 - if(campo_pai.value)  
1769 - {  
1770 - campos[1].checked = true;  
1771 - return;  
1772 - }  
1773 - if(campo_mae.value)  
1774 - campos[2].checked = true;  
1775 - else  
1776 - analizador2();  
1777 - }  
1778 -  
1779 - var campo_resp = $('ref_idpes_responsavel');  
1780 - campo_resp.onchange = function()  
1781 - {  
1782 -  
1783 - if(campo_resp.value)  
1784 - campos[3].checked = true;  
1785 - else if(campo_mae.value)  
1786 - {  
1787 - campos[2].checked = true;  
1788 - return;  
1789 - }  
1790 - else  
1791 - analizador2();  
1792 - }  
1793 -  
1794 -  
1795 - function analizador2()  
1796 - {  
1797 - var id_check = 0;  
1798 -  
1799 - if(campo_pai.value)  
1800 - campo_pai.onkeyup();  
1801 - else if(campo_mae.value)  
1802 - campo_mae.onkeyup();  
1803 - else if(campo_resp.value)  
1804 - campo_resp.onchange();  
1805 - else  
1806 - campos[0].checked = true;  
1807 -  
1808 - }  
1809 -  
1810 - var cor_fundo;  
1811 - function adicionaDeficiencia()  
1812 - {  
1813 - if ($F('ref_cod_pessoa_deficiencia') == '')  
1814 - {  
1815 - alert("Selecione uma deficiência para adicionar");  
1816 - }  
1817 - else  
1818 - {  
1819 - var tabela = $('tabela_deficiencia');  
1820 - var cod_deficiencia;  
1821 - var nm_deficiencia;  
1822 - cod_deficiencia = $F('ref_cod_pessoa_deficiencia');  
1823 - nm_deficiencia = $('ref_cod_pessoa_deficiencia').options[$('ref_cod_pessoa_deficiencia').selectedIndex].text;  
1824 - if (!$('tr_'+cod_deficiencia))  
1825 - {  
1826 - cor_fundo = cor_fundo == "#D1DADF" ? "#E4E9ED" : "#D1DADF";  
1827 - var row = document.createElement('tr');  
1828 - row.setAttribute('id', 'tr_'+cod_deficiencia);  
1829 - row.setAttribute('align', 'center');  
1830 - row.style.backgroundColor = cor_fundo;  
1831 -  
1832 - var cell1 = document.createElement('td');  
1833 - cell1.setAttribute('align', 'right');  
1834 - cell1.setAttribute('style', 'padding-right:10px;');  
1835 -  
1836 - var cell2 = document.createElement('td');  
1837 -  
1838 - var img = "<img border='0' title='Excluir' src='imagens/banco_imagens/excluirrr.gif' style='cursor:pointer' onclick='excluirLinhaDeficiencia("+cod_deficiencia+")'>";  
1839 -  
1840 - var text = document.createTextNode(nm_deficiencia);  
1841 -  
1842 - cell1.innerHTML = img;  
1843 - cell2.appendChild(text);  
1844 - row.appendChild(cell2);  
1845 - row.appendChild(cell1);  
1846 - tabela.firstChild.appendChild(row);  
1847 -  
1848 - var area = document.getElementById('ocultos_defic');  
1849 - var input = document.createElement('input');  
1850 - input.setAttribute('type', 'hidden');  
1851 - input.setAttribute('id', 'oc_defic['+cod_deficiencia+']');  
1852 - input.setAttribute('name', 'oc_defic['+cod_deficiencia+']');  
1853 - input.setAttribute('value', cod_deficiencia);  
1854 - area.appendChild(input);  
1855 - }  
1856 - else  
1857 - {  
1858 - alert('Deficiência já Selecionada');  
1859 - }  
1860 - }  
1861 - }  
1862 -  
1863 - function excluirLinhaDeficiencia(cod_deficiencia)  
1864 - {  
1865 - var cor = "";  
1866 - var tabela = $('tabela_deficiencia').firstChild;  
1867 - var deficiencia = 'tr_'+cod_deficiencia;  
1868 - for(var i=0; i<tabela.childNodes.length; i++)  
1869 - {  
1870 - if(tabela.childNodes[i])  
1871 - {  
1872 - if(tabela.childNodes[i].id == deficiencia)  
1873 - {  
1874 - cor = tabela.childNodes[i].bgColor;  
1875 - tabela.removeChild(tabela.childNodes[i]);  
1876 - }  
1877 - if(cor != "" && tabela.childNodes[i] && tabela.childNodes[i].tagName == 'TR')  
1878 - {  
1879 - tabela.childNodes[i].bgColor = cor;  
1880 - cor = (cor == "#d1dadf") ? "#e4e9ed" : "#d1dadf";  
1881 - }  
1882 - }  
1883 - }  
1884 - var area = document.getElementById('ocultos_defic');  
1885 - deficiencia = 'oc_defic['+cod_deficiencia+']';  
1886 - for(var i=0; i<area.childNodes.length; i++ )  
1887 - {  
1888 - if(area.childNodes[i])  
1889 - {  
1890 - if(area.childNodes[i].id == deficiencia)  
1891 - {  
1892 - area.removeChild(area.childNodes[i]);  
1893 - var areaExc = document.getElementById('ocultos_defic');  
1894 - var inputExc = document.createElement('input');  
1895 - inputExc.setAttribute('type', 'hidden');  
1896 - inputExc.setAttribute('id', 'oc_defic_exc['+cod_deficiencia+']');  
1897 - inputExc.setAttribute('name', 'oc_defic_exc['+cod_deficiencia+']');  
1898 - inputExc.setAttribute('value', cod_deficiencia);  
1899 - areaExc.appendChild(inputExc);  
1900 -  
1901 - }  
1902 - }  
1903 - }  
1904 - }  
1905 -  
1906 - <? if (!$_GET["cod_aluno"]) { ?>  
1907 -  
1908 - Event.observe(window, 'load', Init, false);  
1909 -  
1910 - function Init()  
1911 - {  
1912 - elemento = $$("div#content1 img");  
1913 - elemento[1].setAttribute('onClick', 'bloqueia();');  
1914 - $('btn_enviar').disabled = true;  
1915 - $('btn_enviar').className='botaolistagemdisabled';  
1916 - }  
1917 -  
1918 - function passaPagina()  
1919 - {  
1920 - LTb0("0", "2");  
1921 - }  
1922 -  
1923 - function bloqueia()  
1924 - {  
1925 - if (($F('cpf_') != '' && $F('cpf') == '' && $F('bloqueado') == 1) || $F('cpf_') != $F('cpf_2'))  
1926 - {  
1927 - $('btn_enviar').disabled = false;  
1928 - $('btn_enviar').className='botaolistagemdisabled';  
1929 - $('btn_enviar').value = 'Aguarde...';  
1930 - var cpf = $('cpf_').value;  
1931 - var xml_dados_pessoa = new ajax(getDados);  
1932 - xml_dados_pessoa.envia("educar_aluno_cad_xml.php?cpf="+cpf);  
1933 -  
1934 - }  
1935 - else if ($F('cpf') != '' || $F('bloqueado') == 0)  
1936 - {  
1937 - validaTab(1);  
1938 - LTb0("0", "2");  
1939 - $('btn_enviar').disabled = false;  
1940 - $('btn_enviar').className = 'botaolistagem';  
1941 - }  
1942 - else  
1943 - {  
1944 - alert('Você deve preencher o campo CPF');  
1945 - }  
1946 - }  
1947 -  
1948 - function getDados(xml_dados)  
1949 - {  
1950 - var DOM_array = xml_dados.getElementsByTagName( 'dados' );  
1951 -  
1952 - if(DOM_array.length)  
1953 - {  
1954 - var elementos;  
1955 - for (var i = 1; i <5; i++)  
1956 - {  
1957 - elementos = $$("div#content"+i+" input");  
1958 - for (var j = 0; j < elementos.length; j++)  
1959 - {  
1960 - if (elementos[j].id != "cpf" && elementos[j].id != "cpf_")  
1961 - elementos[j].value = '';  
1962 - }  
1963 - }  
1964 - var libera = false;  
1965 - for (var i = 0; i < DOM_array[0].childNodes.length; i++)  
1966 - {  
1967 - if (DOM_array[0].childNodes[i].nodeType == 1)  
1968 - {  
1969 - try  
1970 - {  
1971 - libera = true;  
1972 - if (DOM_array[0].childNodes[i].firstChild.nodeValue != '')  
1973 - document.getElementById(DOM_array[0].childNodes[i].nodeName).value = DOM_array[0].childNodes[i].firstChild.nodeValue;  
1974 - }  
1975 - catch(e)  
1976 - {  
1977 - continue;  
1978 - }  
1979 - }  
1980 - }  
1981 - $('cpf_2').disabled = true;  
1982 -  
1983 - if (libera)  
1984 - {  
1985 - validaTab(1);  
1986 - LTb0("0", "2");  
1987 - $('btn_enviar').disabled = false;  
1988 - $('bloqueado').value = 0;  
1989 - $('btn_enviar').className = 'botaolistagem';  
1990 - }  
1991 - else  
1992 - {  
1993 - validaTab(1);  
1994 - LTb0("0", "2");  
1995 - $('btn_enviar').disabled = false;  
1996 - $('bloqueado').value = 0;  
1997 - $('btn_enviar').className = 'botaolistagem';  
1998 - $('cpf_2').value = $F('cpf_');  
1999 - /*$('btn_enviar').disabled = true;  
2000 - $('btn_enviar').className='botaolistagemdisabled';  
2001 - $('cpf').value = "";  
2002 - $('bloqueado').value = 1;  
2003 - alert("Não existe pessoa com esse CPF");*/  
2004 - }  
2005 - $('btn_enviar').value = "Salvar";  
2006 - }  
2007 - $('btn_enviar').value = 'Salvar';  
2008 - }  
2009 -  
2010 - <?}?>  
2011 -  
2012 -</script>  
2013 \ No newline at end of file 0 \ No newline at end of file
ieducar/intranet/imagens/logo_itajai.ico.old
No preview for this file type