-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblocks.php
43 lines (36 loc) · 1.34 KB
/
blocks.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
<!--DESENVOLVIDO POR
TOP Artes - Impressões Vídeos e WEB
topartes.com
André Aguiar
31 3327-5397
-->
<?php include(SQL_PATH."slc_categMateria.php");
while($row_RsMateriaCateg = mysqli_fetch_assoc($RsMateriaCateg)){
$materia = $row_RsMateriaCateg["materia"];
$idMateria = $row_RsMateriaCateg["id"];
$idCategoria = $row_RsMateriaCateg["fk_categoria"];
include(SQL_PATH."conta_perguntasMateria.php");
$row_RsQtdPerguntas = mysqli_fetch_assoc($RsQtdPerguntasMateria);
$row_RsPerguntasRespondidas = mysqli_fetch_assoc($RsPerguntasRespondidas);
$media = $row_RsPerguntasRespondidas['perg_respondidas'] * 100 / ($row_RsQtdPerguntas["qtd_perguntasMateria"] == 0 ? 1 : $row_RsQtdPerguntas["qtd_perguntasMateria"]);
if($media <= 30 ){
$div_class = "critico";
}elseif($media > 30 && $media < 80){
$div_class = "alerta";
}else{
$div_class = "satisfatorio";
}?>
<div class="col-3 <?php echo($div_class);?>" onclick="MM_goToURL('parent','?p=categorias&materia=<?php echo ($idMateria); ?>');return document.MM_returnValue">
<h1>
<i class="fa fa-book"> </i>
<?php echo $materia; ?>
</h1>
<h1>
<?php echo($row_RsQtdPerguntas["qtd_perguntasMateria"]); ?>
</h1>
<p>Perguntas</p>
<p><?php echo ($row_RsPerguntasRespondidas['perg_respondidas']); ?>
Questões respondidas</p>
</div>
<?php } ?>