php probleme on validaion page
This commit is contained in:
parent
25f8396455
commit
a1c1244e14
@ -93,7 +93,7 @@ class Question
|
||||
return $qnode;
|
||||
}
|
||||
|
||||
public function isValidated()
|
||||
public function validated()
|
||||
{
|
||||
$this->validated = true;
|
||||
}
|
||||
|
@ -10,6 +10,9 @@ include("Question.class.php");
|
||||
include("QuestionsFile.class.php");
|
||||
|
||||
|
||||
// Change this variable depending on the server
|
||||
$validationAddress = "http://178.170.101.82/~Cccompany/nemubot_askweb/validation.php?id=";
|
||||
|
||||
if (isset ($_POST['send']))
|
||||
{
|
||||
//Gets parameters: course, question and answers
|
||||
@ -57,7 +60,8 @@ if (isset ($_POST['send']))
|
||||
$to = "bertrand.cournaud@gmail.com";
|
||||
$subject = "[Nemubot] Validation d'une question";
|
||||
$headers = "From: Nemubot <bot@nemunai.re>";
|
||||
$message = "Bonjour,\n";
|
||||
$message = 'Bonjour,\n Adresse de validation:
|
||||
$validationAddress . $quest->getId()';
|
||||
|
||||
if (mail($to, $subject, $message, $headers))
|
||||
{
|
||||
@ -106,8 +110,8 @@ else
|
||||
</p>
|
||||
<p>
|
||||
URL de validation:<br/>
|
||||
<a href='http://178.170.101.82/~Cccompany/nemubot_askweb/validation.php?id=
|
||||
<?php echo $quest->getId() ?>'>Valider la question</a>
|
||||
<a href=<?php echo
|
||||
$validationAddress . $quest->getId() ?>>Valider la question</a>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
|
@ -1,17 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<?php
|
||||
include("Question.class.php");
|
||||
include("QuestionsFile.class.php");
|
||||
include("Question.class.php");
|
||||
include("QuestionsFile.class.php");
|
||||
|
||||
function print_question()
|
||||
{
|
||||
$id = $_GET['id'];
|
||||
$file = new QuestionsFile('questions.xml');
|
||||
$id = $_GET['id'];
|
||||
echo $id;
|
||||
|
||||
$file = new QuestionsFile("questions.xml");
|
||||
$question = $file->get_question($id);
|
||||
$question->print_test();
|
||||
|
||||
$questions = $file->get_question($id);
|
||||
$question->print_test();
|
||||
}
|
||||
?>
|
||||
|
||||
<html>
|
||||
@ -21,11 +20,14 @@ function print_question()
|
||||
<body>
|
||||
|
||||
<h1>Validation de la question</h1>
|
||||
<h3>Rappel de la question</h3>
|
||||
<?php $question->print_test() ?><br/>
|
||||
|
||||
Vous pouvez valider la question. Cliquez simplement sur le
|
||||
lien ci dessous.<br/>
|
||||
|
||||
<input type="button" value="Valider la question"
|
||||
onclick="<?php print_questions(); ?>"/>
|
||||
onclick='<?php $question->validate() ?>'/>
|
||||
|
||||
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user