-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_content-default.php
68 lines (63 loc) · 2.6 KB
/
_content-default.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
<div class="container">
<div class="alert alert-success text-center" role="alert">
You played <strong><?php echo $riddle->riddle->title; ?></strong>
with the RIDDLE ID <strong><?php echo $riddle->riddle->id; ?></strong>
and TYPE <strong><?php echo $riddle->riddle->type; ?></strong>
</div>
<div class="jumbotron text-center">
<h1><?php
echo $riddle->resultData->title ?
$riddle->resultData->title :
$riddle->riddle->title;
?>
</h1>
<p class="lead"><?php echo $riddle->resultData->description; ?></p>
</div>
<?php if ($riddle->answers): ?>
<div class="page-header text-center">
<h2>Questions and answers</h2>
</div>
<div class="list-group">
<?php $numberAnswers = count($riddle->answers); ?>
<?php foreach ($riddle->answers as $_k => $_answer): ?>
<?php $_count = ($_k + 1) . '/' . $numberAnswers; ?>
<a href="#" class="list-group-item">
<?php if ('quiz' === $riddle->riddle->type): ?>
<span class="badge" style="background:<?php echo $_answer->correct ? 'green' : 'red'; ?>">
<?php echo $_answer->correct ? 'Correct' : 'Wrong'; ?>
</span>
<?php endif; ?>
<h4 class="list-group-item-heading">
<?php echo $_k + 1; ?>. <?php echo $_answer->question; ?>
</h4>
<p class="list-group-item-text">
<?php echo $_answer->answer; ?>
</p>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<div class="page-header text-center">
<h2>Lead data</h2>
</div>
<?php if ($riddle->lead): ?>
<div class="list-group">
<?php foreach ($riddle->lead as $_field => $_value): ?>
<a href="#" class="list-group-item">
<h4 class="list-group-item-heading">
<?php echo $_field; ?>
</h4>
<p class="list-group-item-text">
<?php echo $_value; ?>
</p>
</a>
<?php endforeach; ?>
</div>
<?php else: ?>
<p><i>No lead data</i></p>
<?php endif; ?>
<div class="page-header text-center">
<h2>For developers: dumping passed data</h2>
</div>
<pre><?php var_dump($riddle); ?></pre>
</div>