42fec70edf
Can refuse a question (email the author) Can modify question before validation
65 lines
1.8 KiB
PHP
65 lines
1.8 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="Stylesheet" href="style.css">
|
|
<title>Every Questions (BETA)</title>
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<a href="http://www.h2g2.com" target="_blank">
|
|
<img src="marvin-robot_normal.png" alt="" id="banner"/>
|
|
</a>
|
|
<h1>Nemubot Questions (BETA)</h1>
|
|
</header>
|
|
<?php
|
|
|
|
include("Question.class.php");
|
|
include("QuestionsFile.class.php");
|
|
|
|
$id = $_GET['id'];
|
|
$file = new QuestionsFile("questions.xml");
|
|
$question = $file->get_question($id);
|
|
|
|
?>
|
|
<section id="introduction">
|
|
<article>
|
|
<h2>Validation de la question</h2>
|
|
<h3>Rappel de la question</h3>
|
|
<?php
|
|
if (!isset($question))
|
|
echo "La question n'existe pas.";
|
|
else
|
|
{
|
|
?>
|
|
<p>
|
|
<strong>Cours concerné :</strong> <?php echo $question->getCourse()->getName(); ?><br><br>
|
|
<strong>Question posée :</strong> <?php echo $question->getQuestion(); ?><br><br>
|
|
<strong>Réponses valides exhaustives :</strong>
|
|
</p>
|
|
<?php
|
|
echo "<ul>";
|
|
foreach($question->getAnswer() as $a)
|
|
echo "<li>".$a."</li>";
|
|
echo "</ul>";
|
|
?>
|
|
<form method="post"
|
|
class="invalidation"
|
|
action="thanksRefused.php">
|
|
<input type="hidden" name="id" value="<?php echo $question->getId() ?>">
|
|
<input type="submit" value="Refuser la question">
|
|
</form>
|
|
<form method="post"
|
|
class="validation"
|
|
action="thanksValidation.php">
|
|
<input type="hidden" name="id" value="<?php echo $question->getId() ?>">
|
|
<input type="submit" value="Valider la question">
|
|
</form>
|
|
<span style="clear: both; display: block;"></span>
|
|
<?php } ?>
|
|
</article>
|
|
</section>
|
|
<body>
|
|
</html>
|