This repository has been archived on 2020-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
nemubot-askweb/validation.php
2012-05-24 15:59:13 +02:00

52 lines
1.0 KiB
PHP

<!DOCTYPE html>
<?php
include("Question.class.php");
include("QuestionsFile.class.php");
$id = $_GET['id'];
$file = new QuestionsFile("questions.xml");
$question = $file->get_question($id);
?>
<html>
<head>
<meta charset="utf8" />
<link rel="Stylesheet" href="styleConfirmation.css" />
</head>
<body>
<header>
<div id="main_title">
<a href="http://www.h2g2.com" target="_blank">
<img src="marvin-robot_normal.png" alt="" id="banner"/>
</a>
<h1>Nemubot Questions</h1>
</div>
</header>
<section>
<h1>Validation de la question</h1>
<h3>Rappel de la question</h3>
<?php if (!$question)
{
echo "La question n'existe pas.";
}
else
{
$question->print_test();
echo "Vous pouvez valider la question. Cliquez simplement sur le
lien ci dessous.\n";
}
?><br/>
<input type="button" value="Valider la question"
onclick="<?php $question->validated(); $file->save() ?>;
alert('Question confirmée');"/>
</section>
</body>
</html>