-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpesquisasRecebidasAcaoSocial.php
70 lines (49 loc) · 2.17 KB
/
pesquisasRecebidasAcaoSocial.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
<?php
require_once 'includes/connectMongo.php';
require_once 'includes/config.php';
require_once 'header.php';
/* Vou conectar com a collections familias */
try {
$familias = $dbMongo->familias;
} catch (Exception $e) {
$sql = 'insert into log(error_msg) values ("erro de conversao")';
$db->query($sql);
}
$query = array("responsavel.tipopesquisa" => "acaosocial");
$questionarios = $familias->find($query);
?>
<div class="main">
<div class="speedbar">
<div class="speedbar-nav">Cadastro Famílias</div>
</div>
<!--Table Styling-->
<div class="grid-1">
<div class="title-grid">Pesquisas Recebidas</div>
<div class="content-gird">
<table class="display" id="example">
<thead>
<tr>
<th class="th_date">Data</th>
<th class="th_status">Entrevistador</th>
<th class="th_date">Nome da Ação</th>
<th class="th_id">Abrir</th>
</tr>
</thead>
<tbody>
<?php
foreach ($questionarios as $questionario) { ?>
<tr class="item">
<td><span class="published"><?=$questionario['responsavel']['datapesquisa']?></span></td>
<td><?=$questionario['responsavel']['nomeresponsavel']?></td>
<td><?=$questionario['acaosocial']['nomeacao']?></td>
<td class="action"><a target="_blank" href="printQuestionario.php?id=<?=$questionario['_id']?>&tipoPesquisa=<?=$questionario['responsavel']['tipopesquisa']?>"><img src="images/arrow.png" alt="abrir"></a></td>
</tr>
<?php } ?>
</table>
<div class="clear"> </div>
</div>
</div>
</div><!-- END MAIN-->
<?php
require_once 'barralateral.php';
require_once 'footer.php';