From a1c1244e142e006a78c26c6ac52ca9b38f5177ce Mon Sep 17 00:00:00 2001 From: Bertrand Date: Wed, 23 May 2012 14:56:34 +0200 Subject: [PATCH] php probleme on validaion page --- Question.class.php | 2 +- questions.php | 10 +++++++--- validation.php | 22 ++++++++++++---------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Question.class.php b/Question.class.php index 691c92e..dfbe638 100644 --- a/Question.class.php +++ b/Question.class.php @@ -93,7 +93,7 @@ class Question return $qnode; } - public function isValidated() + public function validated() { $this->validated = true; } diff --git a/questions.php b/questions.php index c7204bd..eac5e87 100755 --- a/questions.php +++ b/questions.php @@ -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 "; - $message = "Bonjour,\n"; + $message = 'Bonjour,\n Adresse de validation: + $validationAddress . $quest->getId()'; if (mail($to, $subject, $message, $headers)) { @@ -106,8 +110,8 @@ else

URL de validation:
- Valider la question + getId() ?>>Valider la question

diff --git a/validation.php b/validation.php index bcef17f..eb2491c 100644 --- a/validation.php +++ b/validation.php @@ -1,17 +1,16 @@ get_question($id); +$question->print_test(); - $questions = $file->get_question($id); - $question->print_test(); -} ?> @@ -21,11 +20,14 @@ function print_question()

Validation de la question

+

Rappel de la question

+ print_test() ?>
+ Vous pouvez valider la question. Cliquez simplement sur le lien ci dessous.
+ onclick='validate() ?>'/>