2012-05-24 18:26:17 +00:00
|
|
|
1;3001;0c<!DOCTYPE html>
|
2012-05-22 15:01:33 +00:00
|
|
|
|
|
|
|
<?php
|
2012-05-23 12:56:34 +00:00
|
|
|
include("Question.class.php");
|
|
|
|
include("QuestionsFile.class.php");
|
2012-05-22 15:01:33 +00:00
|
|
|
|
2012-05-23 12:56:34 +00:00
|
|
|
$id = $_GET['id'];
|
|
|
|
$file = new QuestionsFile("questions.xml");
|
|
|
|
$question = $file->get_question($id);
|
2012-05-22 15:01:33 +00:00
|
|
|
|
2012-05-24 14:22:35 +00:00
|
|
|
$message = "Question validated maddafakka";
|
|
|
|
|
2012-05-22 15:01:33 +00:00
|
|
|
?>
|
|
|
|
|
2012-05-22 14:05:46 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf8" />
|
2012-05-24 12:19:45 +00:00
|
|
|
<link rel="Stylesheet" href="styleConfirmation.css" />
|
2012-05-22 14:05:46 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2012-05-24 12:19:45 +00:00
|
|
|
<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>
|
2012-05-22 14:05:46 +00:00
|
|
|
<h1>Validation de la question</h1>
|
2012-05-23 12:56:34 +00:00
|
|
|
<h3>Rappel de la question</h3>
|
2012-05-24 13:59:13 +00:00
|
|
|
<?php if (!$question)
|
|
|
|
{
|
|
|
|
echo "La question n'existe pas.";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$question->print_test();
|
|
|
|
|
2012-05-24 14:22:35 +00:00
|
|
|
echo "\n\n";
|
2012-05-24 13:59:13 +00:00
|
|
|
}
|
|
|
|
?><br/>
|
2012-05-22 14:05:46 +00:00
|
|
|
|
|
|
|
<input type="button" value="Valider la question"
|
2012-05-24 14:22:35 +00:00
|
|
|
onclick=
|
|
|
|
"<?php
|
2012-05-24 18:26:17 +00:00
|
|
|
if ($question->isValidated() == 1)
|
2012-05-24 14:22:35 +00:00
|
|
|
{
|
|
|
|
$message = 'Votre question à déjà été validée'
|
|
|
|
. ' Merci de ne pas vous acharner.';
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$question->validated();
|
|
|
|
$file->save();
|
|
|
|
$message = 'Question validée';
|
|
|
|
}
|
|
|
|
?>;
|
|
|
|
alert('<?php echo $message; ?>');"/>
|
2012-05-24 12:19:45 +00:00
|
|
|
</section>
|
2012-05-22 14:05:46 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|