-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotificacoes.php
69 lines (60 loc) · 2.48 KB
/
notificacoes.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
<style>
*{margin: 0; padding: 0; box-sizing: border-box;}
.form_load{display: none; vertical-align: middle; margin-left: 15px; margin-top: -2px;}
.trigger{display: none; padding: 15px; background: #ccc; color: #000; margin-bottom: 20px; font-size: 0.8em; font-weight: bolder}
.trigger-error{background: #e4b4b4;}
.trigger-success{background: #b4e4b9;}
.loadmore{display: inline-block; margin-top: 25px; text-transform: uppercase; font-size: 0.7em; background: #555; color: #fff; padding: 10px; cursor: pointer;}
.centro{
text-align: center;
}
</style>
<div class="j_list">
<ul class="timeline-both-side">
<?php
//$id_colab_logado = filter_input(INPUT_GET, 'idc');
$id_colab_logado = $userlogin->getId();
$setor = filter_input(INPUT_GET, 'setor');
$notiCtrl = new NotificacaoCtrl();
$notificacoes = $notiCtrl->visualizarNotif($id_colab_logado, $setor);
$count = 1;
foreach ($notificacoes as $key => $log) {
// echo $log->getId();
if ($count % 2 == 0) {
$class = " class=\"opposite-side\" ";
} else {
$class = " ";
}
$count++;
$colabCtrl = new UsuarioCtrl();
$id_colab = $log->getId_colab();
$colab = $colabCtrl->buscarBD("*", "WHERE id = '$id_colab' ");
if ($colab == null) {
$colab = "Sistema";
} else {
$colab = Formatar::prefixEmail($colab[0]->getLogin());
}
?>
<li <?= $class ?>>
<div class="border-line"></div>
<div class="timeline-description">
<p><?= $log->getAtividade() . ' - por <b>' . $colab . '</b> - <i>' . Formatar::dataTimeLine($log->getData()) . '</i>' ?></p>
</div>
</li>
<?php
$notiCtrl->setarVisualizacao($log, $id_colab_logado);
}
if (!empty($notificacoes)) {
$notiCtrl->setDataAtual($id_colab_logado);
}
?>
<!-- <li class="j_insert"> </li>-->
</ul>
<!-- <div class="j_insert"></div>-->
<!-- <div class="centro">
<a rel="j_list" class="j_load loadmore">Carregar mais</a>
<img class="form_load" src="imagens/load.gif" alt="[CARREGANDO...]" title="CARREGANDO..."/>
</div>-->
</div>
<script src="js/jquery.js"></script>
<script src="js/timeline.js"></script>