-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.php
70 lines (60 loc) · 2.3 KB
/
stats.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 error_reporting(E_ALL); ?>
<html>
<head>
<meta charset='utf-8' />
<link rel="stylesheet" type="text/css" href="styles/reset.css?v=1" />
<link rel="stylesheet" type="text/css" href="styles/main.css?v=1" />
</head>
<body style="background-color:#fff;font-family:Arial;color:#000;text-align:left;padding:20px;">
<?php
//ini_set('display_errors', '1');
include("includes.php");
$questions = getQuestions();
foreach($questions as $q){
//var_dump($q);
//print_r($q);
echo '<div style="padding-left:10px;padding-top:20px;font-size:1.2em;">'.$q["content"].'</div>';
echo '<div style="padding-left:20px;font-size:0.8em;">';
$medias = getItems($q["id"]);
if(count($medias) > 0){
echo '<div style="font-weight:bold;padding:5px;">'.count($medias).' témoignages</div>';
foreach($medias as $m){
$comments = getItemComments($m);
$metas = getMetas($m);
if(is_object($m)) $m = (array)$m;
$title = $m["title"];
if(strlen($title) <= 0) $title = "[PAS DE TITRE]";
echo '<div style="padding-left:10px;padding-top:5px">└ '.$title.' - '.count($comments).' commentaire(s)</div>';
/*
echo '<div style="padding-left:10px;">';
if(count($comments) > 0){
foreach($comments as $c){
if(is_object($c)) $c = (array)$c;
echo '<div style="padding-left:10px;padding-top:5px">└ '.$c["content"].'</div>';
}
}else{
echo '<div>pas de commentaire</div>';
}
echo '</div>';
*/
//var_dump($metas);
if(count($metas) > 0){
foreach($metas as $meta){
if(is_object($meta)) $meta = (array)$meta;
//var_dump($meta);
echo '<div style="padding-left:30px;">'.$meta["name"]." : ".$meta["content"].'</div>';
}
}
//var_dump($metas);
}
}else{
echo '<div>pas de témoignage</div>';
}
echo '</div>';
}
//print_r($data->queries);
?>
<?php include("analytics.php"); ?>
<?php include("text-to-speech-toggle.php"); ?>
</body>
</html>