/var/www/vhosts/sivana.com.br/httpdocs/area-associado/filtro_area.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
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

<?php include_once("../_private/conectar.php"); 
include_once(
"../admin/itens.php"); 





$id$_GET['id'];
$estado $_GET['est'];


if (isset(
$_POST['area'])){
    
$area $_POST['area'];
}else{
    
$area $_GET['area'];
}

if (isset(
$_POST['grau'])){
    
$grau $_POST['grau'];
}else{
    
$grau $_GET['grau'];
}
if (isset(
$_POST['trabalha'])){
    
$trabalha $_POST['trabalha'];
}else{
    
$trabalha $_GET['trabalha'];
}
if (isset(
$_POST['idadei'])){
    
$idadei $_POST['idadei'];
}else{
    
$idadei $_GET['idadei'];
}
if (isset(
$_POST['idadef'])){
    
$idadef $_POST['idadef'];
}else{
    
$idadef $_GET['idadef'];
}
if (isset(
$_POST['cidade'])){
    
$cidade $_POST['cidade'];
}else{
    
$cidade $_GET['cidade'];
}

if (isset(
$_POST['senac'])){
    
$senac $_POST['senac'];
}else{
    
$senac $_GET['senac'];
}

if(!isset(
$_GET["seed"])) {        
$seed rand();   
// Caso ainda não exista uma semente, cria a semente via PHP.    
} else {       
$seed addslashes($_GET["seed"]);  
// Caso já exista uma semente, utiliza a que foi passada na url. (o addslashes é por questão de segurança)   
}    

                        
$selecionar "select curriculo.nome, curriculo.idcurriculo, curriculo.cidade,  (YEAR(CURDATE())-YEAR(data_nascimento)) - (RIGHT(CURDATE(),5)<RIGHT(data_nascimento,5)) as idade, curriculo.fone, curriculo.trabalha  from curriculo where ativado='s' ";
                        if (
$area!=''){
                            
$selecionar .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM curriculo_areas_interesse left outer join areas_interesse on (curriculo_areas_interesse.areas_interesse_idareas_interesse = areas_interesse.idareas_interesse) WHERE areas_interesse.idareas_interesse = '$area')
"
;
                        }
                        if (
$senac=='s'){
                            
$selecionar .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM capacitacao WHERE capacitacao.lugar = 's')
"
;
                        }
                        if (
$grau!=''){
                
$selecionar .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM formacao left outer join grau_inst on (formacao.grau_inst_idgrau_inst = grau_inst.idgrau_inst) WHERE idgrau_inst = '$grau')
"
;
                        }
                        
                        if (
$trabalha!=''){
                
$selecionar .= " and curriculo.trabalha  = '$trabalha'
"
;
                        }
                        if ((
$idadei!='') && ($idadef=='')){
                
$selecionar .= " and (YEAR(CURDATE())-YEAR(data_nascimento)) - (RIGHT(CURDATE(),5)<RIGHT(data_nascimento,5)) = '$idadei'
"
;
}                    
                    if ((
$idadei!='') && ($idadef!='')){
                
$selecionar .= " and (YEAR(CURDATE())-YEAR(data_nascimento)) - (RIGHT(CURDATE(),5)<RIGHT(data_nascimento,5)) between '$idadei' and '$idadef'
"
;
                        }
                    if (
$cidade!=''){
                
$selecionar .= " and cidade like '$cidade%'
"
;
                        }
                        
//$selecionar .= " and(DATEDIFF( now( ) , curriculo.data_ativacao ) <= 90) group by idcurriculo order by RAND($seed)";
                        
$selecionar .= "order by RAND($seed)";
                        
                        
                        
                        
                        
$sel_cont "SELECT COUNT(*) as total  from curriculo where ativado='s'";
                        if (
$area!=''){
                            
$sel_cont .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM curriculo_areas_interesse left outer join areas_interesse on (curriculo_areas_interesse.areas_interesse_idareas_interesse = areas_interesse.idareas_interesse) WHERE areas_interesse.idareas_interesse = '$area')
"
;
                        }
                        if (
$grau!=''){
                
$sel_cont .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM formacao left outer join grau_inst on (formacao.grau_inst_idgrau_inst = grau_inst.idgrau_inst) WHERE idgrau_inst = '$grau')
"
;
                        }
                        if (
$senac=='s'){
                            
$sel_cont .= " and idcurriculo = ANY (SELECT curriculo_idcurriculo fROM capacitacao WHERE capacitacao.lugar = 's')
"
;
                        }
                        if (
$trabalha!=''){
                
$sel_cont .= " and curriculo.trabalha  = '$trabalha'
"
;
                        }
                        if ((
$idadei!='') && ($idadef=='')){
                
$sel_cont .= " and (YEAR(CURDATE())-YEAR(data_nascimento)) - (RIGHT(CURDATE(),5)<RIGHT(data_nascimento,5)) = '$idadei'
"
;
}                    
                    if ((
$idadei!='') && ($idadef!='')){
                
$sel_cont .= " and (YEAR(CURDATE())-YEAR(data_nascimento)) - (RIGHT(CURDATE(),5)<RIGHT(data_nascimento,5)) between '$idadei' and '$idadef'
"
;
                        }
                    if (
$cidade!=''){
                
$sel_cont .= " and cidade like '$cidade%'
"
;
                        }
                        
                        
//$sel_cont .=" and(DATEDIFF( now( ) , curriculo.data_ativacao ) <= 90)";
                        
                        
$sql mysql_query($selecionar) or die("erro ao selecionar".mysql_error());
                        
$total mysql_num_rows($sql);
                        
                        
                        
$sql_cont=  mysql_query($sel_cont) or die("erro ao selecionar2".mysql_error());
                        
$row_cont=mysql_fetch_assoc($sql_cont);
                        
                        
$count=$row_cont["total"];
                    
                
//COMEÇA A PAGINAÇAO //        
                        
if (isset($_GET['qtde'])){
                            
$showrecs $_GET['qtde'];
                        }else{
                            
$showrecs =20;
                        }
                            
$pagerange 10;
                        
                        if(
is_numeric(@$_GET["page"])){
                            
$page = @$_GET["page"];  
                        }else{
                            
$page =1;
                        }
                        if (!isset(
$page)) $page 1;
                        
                     
                      if (
$count $showrecs != 0) {
                        
$pagecount intval($count $showrecs) + 1;
                      }
                      else {
                        
$pagecount intval($count $showrecs);
                      }
                      
$startrec $showrecs * ($page 1);
                      if (
$startrec $count) {@mysql_data_seek($sql$startrec);}
                      
$reccount min($showrecs $page$count);
                      
                    
?>
    
<?php        
                    
                    
                        
                        
function showpagenav($page$pagecount)
                        {
                        global 
$seed;
                        
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td bgcolor="#F0F0F0"><table width="260" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#F0F0F0">
                        <tr valign="middle">
                        <?php if ($page 1) { ?>
                        <td align="right"><table width="65" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td width="20" align="center" valign="middle" class="bt_prev">&nbsp;</td>
                        <td width="60" class="bt_dir"><a href="<?php $_SERVER['PHP_SELF'?>?p=2&page=<?php echo $page 1 ?><?php if(isset($_GET['qtde'])){ echo '&qtde='.$_GET['qtde']; }?><?php if ((isset($_POST['area'])) && ($_POST['area']!='')){ echo '&amp;area='.$_POST['area'];}?><?php if ((isset($_GET['area'])) && ($_GET['area']!='')){ echo '&amp;area='.$_GET['area'];}?><?php if ((isset($_POST['grau'])) && ($_POST['grau']!='')){ echo '&amp;grau='.$_POST['grau'];}?><?php if ((isset($_GET['grau'])) && ($_GET['grau']!='')){ echo '&amp;grau='.$_GET['grau'];}?>
<?php 
if ($_POST['trabalha']!=''){ echo '&amp;trabalha='.$_POST['trabalha'];}?><?php if ($_GET['trabalha']!=''){ echo '&amp;trabalha='.$_GET['trabalha'];}?><?php if ($_POST['idadei']!=''){ echo '&amp;idadei='.$_POST['idadei'];}?><?php if ($_GET['idadei']!=''){ echo '&amp;idadei='.$_GET['idadei'];}?>
<?php 
if ($_POST['idadef']!=''){ echo '&amp;idadef='.$_POST['idadef'];}?><?php if ($_GET['idadef']!=''){ echo '&amp;idadef='.$_GET['idadef'];}?>
<?php 
if ($_POST['cidade']!=''){ echo '&amp;cidade='.$_POST['cidade'];}?><?php if ($_GET['cidade']!=''){ echo '&amp;cidade='.$_GET['cidade'];}?>&amp;seed=<? echo $seed;?>">Anterior</a></td>

                        </tr>
                        </table></td>
                        <?php } else {?>
                        <td align="right"><table width="65" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td width="20" align="center" valign="middle" class="bt_prev">&nbsp;</td>
                        <td width="60" class="bt_dir">Anterior</td>
                        </tr>
                        </table></td>
                        <?php
                        
}
                        global     
$startrec;        
                        global 
$pagerange;
                        global 
$reccount;
                        global 
$total;
                        if (
$pagecount 1) {
                        
                        if (
$pagecount $pagerange != 0) {
                        
$rangecount intval($pagecount $pagerange) + 1;
                        }
                        else {
                        
$rangecount intval($pagecount $pagerange);
                        }
                        for (
$i 1$i $rangecount 1$i++) {
                        
$startpage = (($i 1) * $pagerange) + 1;
                        
$count min($i $pagerange$pagecount);
                        
                        if (((
$page >= $startpage) && ($page <= ($i $pagerange)))) {
                        for (
$j $startpage$j $count 1$j++) {
                        if (
$j == $page) {
                        
?>
                        <td class="bt_nav"><font size="2" face="Arial, Helvetica, sans-serif"><b><?php echo $j ?></b></font></td>
                        <?php } else { ?>
                        <td class="bt_nav"><font size="2" face="Arial, Helvetica, sans-serif"><a href="<?php $_SERVER['PHP_SELF'?>?p=2&page=<?php echo $j ?><?php if(isset($_GET['qtde'])){ echo '&qtde='.$_GET['qtde']; }?><?php if ((isset($_POST['area'])) && ($_POST['area']!='')){ echo '&amp;area='.$_POST['area'];}?><?php if ((isset($_GET['area'])) && ($_GET['area']!='')){ echo '&amp;area='.$_GET['area'];}?><?php if ((isset($_POST['grau'])) && ($_POST['grau']!='')){ echo '&amp;grau='.$_POST['grau'];}?><?php if ((isset($_GET['grau'])) && ($_GET['grau']!='')){ echo '&amp;grau='.$_GET['grau'];}?>
<?php 
if ($_POST['trabalha']!=''){ echo '&amp;trabalha='.$_POST['trabalha'];}?><?php if ($_GET['trabalha']!=''){ echo '&amp;trabalha='.$_GET['trabalha'];}?><?php if ($_POST['idadei']!=''){ echo '&amp;idadei='.$_POST['idadei'];}?><?php if ($_GET['idadei']!=''){ echo '&amp;idadei='.$_GET['idadei'];}?>
<?php 
if ($_POST['idadef']!=''){ echo '&amp;idadef='.$_POST['idadef'];}?><?php if ($_GET['idadef']!=''){ echo '&amp;idadef='.$_GET['idadef'];}?>
<?php 
if ($_POST['cidade']!=''){ echo '&amp;cidade='.$_POST['cidade'];}?><?php if ($_GET['cidade']!=''){ echo '&amp;cidade='.$_GET['cidade'];}?>&amp;seed=<? echo $seed;?>">
<?php echo $j ?></a></font></td>
                        <?php } } } else { ?>
                        <td class="bt_nav"><font size="2" face="Arial, Helvetica, sans-serif"><a href="<?php $_SERVER['PHP_SELF'?>?page=<?php echo $startpage ?><?php if(isset($_GET['qtde'])){ echo '&qtde='.$_GET['qtde']; }?><?php if ((isset($_POST['area'])) && ($_POST['area']!='')){ echo '&amp;area='.$_POST['area'];}?><?php if ((isset($_GET['area'])) && ($_GET['area']!='')){ echo '&amp;area='.$_GET['area'];}?><?php if ((isset($_POST['grau'])) && ($_POST['grau']!='')){ echo '&amp;grau='.$_POST['grau'];}?><?php if ((isset($_GET['grau'])) && ($_GET['grau']!='')){ echo '&amp;grau='.$_GET['grau'];}?>
<?php 
if ($_POST['trabalha']!=''){ echo '&amp;trabalha='.$_POST['trabalha'];}?><?php if ($_GET['trabalha']!=''){ echo '&amp;trabalha='.$_GET['trabalha'];}?><?php if ($_POST['idadei']!=''){ echo '&amp;idadei='.$_POST['idadei'];}?><?php if ($_GET['idadei']!=''){ echo '&amp;idadei='.$_GET['idadei'];}?>
<?php 
if ($_POST['idadef']!=''){ echo '&amp;idadef='.$_POST['idadef'];}?><?php if ($_GET['idadef']!=''){ echo '&amp;idadef='.$_GET['idadef'];}?>
<?php 
if ($_POST['cidade']!=''){ echo '&amp;cidade='.$_POST['cidade'];}?><?php if ($_GET['cidade']!=''){ echo '&amp;cidade='.$_GET['cidade'];}?>&amp;seed=<? echo $seed;?>">
<?php echo $startpage ."..." .$count ?></a></font></td>
                        <?php } } } ?>
                        <?php if ($page $pagecount) { ?>
                        <td align="left">
                        <table width="80" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td align="center" valign="middle" class="bt_left"><a href="<?php $_SERVER['PHP_SELF'?>?p=2&page=<?php echo $page 1 ?><?php if(isset($_GET['qtde'])){ echo '&qtde='.$_GET['qtde']; }?><?php if ((isset($_POST['area'])) && ($_POST['area']!='')){ echo '&amp;area='.$_POST['area'];}?><?php if ((isset($_GET['area'])) && ($_GET['area']!='')){ echo '&amp;area='.$_GET['area'];}?><?php if ((isset($_POST['grau'])) && ($_POST['grau']!='')){ echo '&amp;grau='.$_POST['grau'];}?><?php if ((isset($_GET['grau'])) && ($_GET['grau']!='')){ echo '&amp;grau='.$_GET['grau'];}?>
<?php 
if ($_POST['trabalha']!=''){ echo '&amp;trabalha='.$_POST['trabalha'];}?><?php if ($_GET['trabalha']!=''){ echo '&amp;trabalha='.$_GET['trabalha'];}?><?php if ($_POST['idadei']!=''){ echo '&amp;idadei='.$_POST['idadei'];}?><?php if ($_GET['idadei']!=''){ echo '&amp;idadei='.$_GET['idadei'];}?>
<?php 
if ($_POST['idadef']!=''){ echo '&amp;idadef='.$_POST['idadef'];}?><?php if ($_GET['idadef']!=''){ echo '&amp;idadef='.$_GET['idadef'];}?>
<?php 
if ($_POST['cidade']!=''){ echo '&amp;cidade='.$_POST['cidade'];}?><?php if ($_GET['cidade']!=''){ echo '&amp;cidade='.$_GET['cidade'];}?>&amp;seed=<? echo $seed;?>">Pr&oacute;xima</a></td>
                        <td class="bt_next">&nbsp;</td>
                        </tr>
                        </table></td>
                        <?php } else {?>
                        <td align="left">
                        <table width="80" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td align="center" valign="middle" class="bt_left">Pr&oacute;xima</td>
                        <td class="bt_next">&nbsp;</td>
                        </tr>
                        </table></td>                     
                        <?php ?>
                        </tr>
                        </table></td>
                        </tr>
                        <tr>
                        <td bgcolor="#FFFFFF">
                       <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="bt_registros">
                    <tr><td>
                    
                      Registros mostrados <?php echo $startrec 1 ?> - <?php echo $reccount ?> de <?php echo $total ?></td>
                    </tr>
                    </table>
                        </td>
                        </tr>
</table>
                        
                        <?php 
                    
                    
?>
                    
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="class_tit">
  <tr>
    <td width="5%" height="16" align="center"><img src="images/bts/cont.png" width="48" height="48" /></td>
    <td width="77%" style="vertical-align: middle;">BANCO DE TALENTOS (Pesquisar por &Aacute;rea de Interesse)</td>
    <td width="18%" align="center"><a href="principal.php"><img src="images/bts/voltar.jpg" width="55" height="50" class="imagem" /></a></td>
  </tr>
</table>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="se_itens">
  <tr>
    <td height="52"><div class="widgetcontent span12">
      <form id="form1" name="form1" method="post" action="?p=2" onkeypress="MM_jumpMenu('parent',this,0)" class="stdform">
        <div class="span4 pull-left">
        <label>&Aacute;rea de Interesse:</label>
          <span class="field">
            <select id="area"  name="area" >
            <option value="" >Selecione uma área</option>
            
            <?php 
            $cur 
$l['idcurriculo'];
            
$s_area mysql_query("select * from areas_interesse")or die ("Erro ao selecionar");
            while (
$s mysql_fetch_array($s_area)){ 
            
$id_area $s['idareas_interesse'];
            
$s_area1 mysql_query("select * from curriculo_areas_interesse left outer join areas_interesse on (curriculo_areas_interesse.areas_interesse_idareas_interesse = areas_interesse.idareas_interesse) where curriculo_idcurriculo='$cur' and areas_interesse_idareas_interesse='$id_area' ")or die ("Erro ao selecionar");
            
$countmysql_num_rows($s_area1);?>
            
            <option value="<?php echo $s['idareas_interesse']; ?><?php if (($_POST['area']==$s['idareas_interesse']) ||($_GET['area']==$s['idareas_interesse'] )){ echo 'selected="selected"';}?>><?php echo $s['area']; ?></option>
            <?php }
            
?>   
            </select>       </span>
            </div>
          <div class="span6  pull-left">
        <label>Idade entre</label>
           <span class="field"> 
            <input name="idadei" type="text" id="idadei" size="5" value="<?php if ($_POST['idadei']!=''){echo $_POST['idadei'];} if ($_GET['idadei']!=''){echo $_GET['idadei'];} ?>"  class="input-small"/>
 e 
 <input name="idadef" type="text" id="idadef" size="5" value="<?php if ($_POST['idadef']!=''){echo $_POST['idadef'];} if ($_GET['idadef']!=''){echo $_GET['idadef'];} ?>"class="input-small"/>
            </label></span>
          </div>
        <div class="span4 pull-left">
        <label>Grau de Escolaridade:</label>
          <span class="field"><select name="grau" id="grau">
              <option value="">Selecione</option>
              <?

   $sql_grau 
"SELECT * FROM grau_inst";
   
$resultado_grau mysql_query($sql_grau) or die ("Problema na Consulta");
    while(
$l_forminha mysql_fetch_array($resultado_grau))
       {
?>
              <option value="<?=$l_forminha['idgrau_inst'?><?php if (($_POST['grau']==$l_forminha['idgrau_inst'])|| ($_GET['grau']==$l_forminha['idgrau_inst'])){ echo 'selected="selected"';}?>>
              <?=$l_forminha['grau'?>
              </option>
              <?
       
}
?>
            </select>          </span>
            </div>
            <div class="span6">
          <label>Cidade:</label>
          <span class="field">
            <input type="text" name="cidade" id="cidade"  value="<?php if ($_POST['cidade']!=''){echo $_POST['cidade'];} if ($_GET['cidade']!=''){echo $_GET['cidade'];} ?>"/></span>
          </div>
        <div class="span4">
         <label>Pode estar trabalhando atualmente:</label>
          <span class="field">
            <select name="trabalha" id="trabalha">
              <option value="">Selecione</option>
              <option value="s" <?php if (($_POST['trabalha']=='s')|| ($_GET['trabalha']=='s')){ echo 'selected="selected"';}?>>Sim</option>
              <option value="n" <?php if (($_POST['trabalha']=='n') || ($_GET['trabalha']=='n')){ echo 'selected="selected"';}?>>N&atilde;o</option>
            </select>
          </label></span>
          </div>
       
          <div class="clearfix"></div>
        <div class="span6">
          <label>
            <input type="image" name="imageField" id="imageField" src="images/bt_pesq.gif" /></label>
            <label> <a href="?p=2"><img src="images/bt_limp.gif" width="81" height="23" border="0" /></a></label></div>
         
      </form>
    </div></td>
  </tr>
</table>
<br />
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="borda">
  <tr class="t_tit">
    <td width="2%">#</td>
    <td width="2%">&nbsp;</td>
    <td width="25%">Nome</td>
    <td width="4%">Idade</td>
    <td width="25%">&Aacute;reas de Interesse</td>
    <td width="11%">Grau de esc.</td>
    <td width="15%">Fone</td>
    <td width="13%">Cidade</td>
    <td width="3%">&nbsp;</td>
  </tr>
  <?php 
  
if ($total 0) {

    for (
$i $startrec$i $reccount$i++)    {
        
$dados mysql_fetch_assoc($sql); 
        
$style "trbranco";
        if (
$i != 0) {
         
$style "trcinza";
    }
        
$contador$i+1;
    
?> 
  <tr  class="<?php echo $style ?>">
    <td align="center" class="colun" ><?php echo $contador?></td>
    <td align="center" class="colun"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center"><a href="mostrar_cand.php?id=<?php echo base64_encode($dados['idcurriculo']);?>&pag=1<?php if ((isset($_REQUEST['area'])) && ($_REQUEST['area']!='')){ echo '&amp;area='.$_REQUEST['area'];}?><?php if ((isset($_REQUEST['grau'])) && ($_REQUEST['grau']!='')){ echo '&amp;grau='.$_REQUEST['grau'];}?>
<?php 
if ($_REQUEST['trabalha']!=''){ echo '&amp;trabalha='.$_REQUEST['trabalha'];}?><?php if ($_REQUEST['idadei']!=''){ echo '&amp;idadei='.$_REQUEST['idadei'];}?><?php if ($_REQUEST['idadef']!=''){ echo '&amp;idadef='.$_REQUEST['idadef'];}?><?php if ($_REQUEST['cidade']!=''){ echo '&amp;cidade='.$_REQUEST['cidade'];}?><?php if ($_GET['page']!=''){ echo '&amp;page='.$_GET['page'];}?>&amp;seed=<? echo $seed;?>"><img src="../admin/images/mark_f2.png" width="21" height="21" border="0" /></a></td>
        </tr>
    </table></td>
    <td align="left" class="colun"><?php echo $dados['nome']; ?></td>
    <td align="center" class="colun"><?php echo $dados['idade']; ?></td>
    <td align="center" class="colun"> <?php 
        $cur 
$dados['idcurriculo'];
        
$s_area mysql_query("select * from curriculo_areas_interesse left outer join areas_interesse on (curriculo_areas_interesse.areas_interesse_idareas_interesse = areas_interesse.idareas_interesse) where curriculo_idcurriculo='$cur'")or die ("Erro ao selecionar");
        while (
$s mysql_fetch_array($s_area)){ 
        echo 
$s['area'].'<br>'
        }
            
?>        </td>
    <td align="center" class="colun">
    <?php 
        $cur 
$dados['idcurriculo'];
        
$s_grau mysql_query("select * from formacao left outer join grau_inst on (formacao.grau_inst_idgrau_inst = grau_inst.idgrau_inst) where curriculo_idcurriculo='$cur'")or die ("Erro ao selecionar");
        while (
$s mysql_fetch_array($s_grau)){ 
        echo 
$s['grau'].'<br>'
        }
            
?></td>
    <td align="center" class="colun"><?php echo $dados['fone']; ?></td>
    <td align="center" class="colun"><?php echo $dados['cidade']; ?></td>
    <td align="center" class="colun"><?php 
        $s_cap 
mysql_query("SELECT curriculo_idcurriculo from capacitacao WHERE capacitacao.lugar = 's' and curriculo_idcurriculo='$cur' group by curriculo_idcurriculo")or die ("Erro ao selecionar");
            
$to_cap mysql_num_rows($s_cap);
            if (
$to_cap 0){
             echo 
'<img src="images/senac.gif" width="26" height="25" align="absmiddle" />';
            }
           
?></td>
  </tr>
  <?php } while ($dados mysql_fetch_assoc($sql)); 
  }else{
?>
  <tr>
  <td colspan="9"> Nao h&aacute; registros </td></tr>
  <?php ?>
</table>
<?php showpagenav($page$pagecount); 
?>