82 lines
2.7 KiB
PHP
82 lines
2.7 KiB
PHP
<script type="text/javascript">
|
|
init_file("question_manager.js");
|
|
</script>
|
|
|
|
<h1>
|
|
Jeux
|
|
</h1>
|
|
<h4>
|
|
<?php
|
|
echo $group->getReponse_0() . ", " . $group->getReponse_1() . " ou les 2 ?";
|
|
?>
|
|
</h4>
|
|
<p class="center_item">
|
|
Vous allez avoir une série de question.
|
|
La réponse est soit <?php echo $group->getReponse_0(); ?>,
|
|
soit <?php echo $group->getReponse_1() ?> ou les 2 propositions.
|
|
<br/>
|
|
Votre partie sera chronomètrée.
|
|
<br/>
|
|
Il y a <?php echo count($group->getQuestion()); ?> questions.
|
|
<br/>
|
|
Quand vous serez prêt,
|
|
appuyez sur le bouton suivant pour commencer la partie !
|
|
</p>
|
|
<h5 id="time">
|
|
</h5>
|
|
<div>
|
|
<form method="post" action="/" id="form_start">
|
|
<fieldset>
|
|
<button type="button" onclick="javascript:startgame()">C'est partit !</button>
|
|
</fieldset>
|
|
</form>
|
|
|
|
<form method="post" id="form_q" action="index.php?page=game" style="visibility: hidden">
|
|
<fieldset>
|
|
<br/>
|
|
<label id="form_q_text">
|
|
<?php
|
|
$questions = $group->getQuestion();
|
|
echo $questions[0]->getQuestion();
|
|
?>
|
|
</label>
|
|
<br/>
|
|
<button id="form_q_b0" class="bigbutton" type="button" onclick="javascript:shownext('q0a0')">
|
|
<?php echo $group->getReponse_0(); ?>
|
|
</button>
|
|
<button id="form_q_b1" class="bigbutton" type="button" onclick="javascript:shownext('q0a1')">
|
|
<?php echo $group->getReponse_1(); ?>
|
|
</button>
|
|
<br/>
|
|
<button id="form_q_b2" class="bigbutton" type="button" onclick="javascript:shownext('q0a2')">
|
|
Les 2
|
|
</button>
|
|
<br/>
|
|
<button id="form_q_send" type="submit" style="visibility: hidden">Terminer</button>
|
|
<br/>
|
|
<br/>
|
|
<input type="hidden" id="form_q_time" name="time" value=""/>
|
|
<input type="hidden" id="form_questions_id" name="questions_id" value="<?php
|
|
//Label contenant les identifiants des questions, séparé par des |
|
|
$questions = $group->getQuestion();
|
|
foreach ($questions as $question)
|
|
{
|
|
echo $question->getId() . "|";
|
|
}
|
|
?>
|
|
"/>
|
|
|
|
|
|
<?php
|
|
$i = 0;
|
|
foreach ($group->getQuestion() as $question)
|
|
{
|
|
echo "<input type='hidden' name='saveq$i' id='saveq$i' />\n";
|
|
echo "<label style='visibility: hidden' id='form_q$i'>" . $question->getQuestion() . "</label>\n";
|
|
$i++;
|
|
}
|
|
?>
|
|
|
|
</fieldset>
|
|
</form>
|
|
</div>
|