From f2a409889747c694e14cca2e68c8e0151ca91b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Mon, 18 Jun 2012 20:57:57 +0200 Subject: [PATCH] Use header.html in all pages --- Course.class.php | 9 ++++--- changeQuestion.php | 32 ++----------------------- header.html | 17 +++++++++++++ index.php | 47 +----------------------------------- subscribeAction.php | 2 -- thanks.php | 17 +++---------- thanksConfirmation.php | 16 +------------ thanksRefused.php | 16 +------------ thanksValidation.php | 16 +------------ validateChangeQuestion.php | 49 -------------------------------------- validation.php | 17 ++----------- 11 files changed, 34 insertions(+), 204 deletions(-) create mode 100644 header.html delete mode 100644 validateChangeQuestion.php diff --git a/Course.class.php b/Course.class.php index 6739e4d..a5cf01f 100644 --- a/Course.class.php +++ b/Course.class.php @@ -58,9 +58,12 @@ class Course $treeXML = new DOMDocument('1.0', 'UTF-8'); if (@$treeXML->load($filename)) - return new Course($treeXML->getElementById($id)); - else - return null; + { + $c = $treeXML->getElementById($id); + if ($c) + return new Course($c); + } + return null; } public static function setCourses($courses, $filename = "courses.xml") diff --git a/changeQuestion.php b/changeQuestion.php index 99270b4..10d7050 100644 --- a/changeQuestion.php +++ b/changeQuestion.php @@ -1,32 +1,4 @@ - - - - - Every Questions (BETA) - - - - -
- - - -

Nemubot Questions (BETA)

-
+
isValidated())

... ou la confirmer telle quelle !

- Si la question vous semble corect, vous pouvez directement + Si la question vous semble correcte, vous pouvez directement la confirmer ici :

+ + + + + + + AskWeb (BETA) + + + +
+ + + +

Nemubot Questions (BETA)

+
diff --git a/index.php b/index.php index c2b7ca0..af4c825 100644 --- a/index.php +++ b/index.php @@ -1,47 +1,4 @@ - - - - - - - AskWeb (BETA) - - - - - -
- -

Nemubot AskWeb (BETA)

-
- +
icon @@ -178,8 +135,6 @@ foreach($cs as $c)
- - diff --git a/subscribeAction.php b/subscribeAction.php index 1a79783..96d2bd7 100644 --- a/subscribeAction.php +++ b/subscribeAction.php @@ -1,6 +1,5 @@ - - - - Every Questions (BETA) - - - -
- - - -

Nemubot Questions (BETA)

-
get_question($id); diff --git a/thanksConfirmation.php b/thanksConfirmation.php index bbbfd92..ef593c2 100644 --- a/thanksConfirmation.php +++ b/thanksConfirmation.php @@ -1,18 +1,4 @@ - - - - - - - AskWeb (BETA) - - -
- - - -

Nemubot Questions

-
+

Merci de votre participation

diff --git a/thanksRefused.php b/thanksRefused.php index 2963da3..a993e93 100644 --- a/thanksRefused.php +++ b/thanksRefused.php @@ -1,18 +1,4 @@ - - - - - - Every Questions (BETA) - - - -
- - - -

Nemubot Questions (BETA)

-
+

- - - - - Every Questions (BETA) - - - -
- - - -

Nemubot Questions (BETA)

-
+

- - $value) - { - if ($key == "question") - $question = $value; - else if ($key == "course") - $course = $value; - else if (preg_match("#^answer#", $key) && $key != "") - $answers[] = $value; - } - - //Check we have at least a question and an answer -/* - if (empty($question)) - die("Veuillez indiquer une question !"); - else if (count($answers) <= 0) - die("Veuillez indiquer au moins une réponse correcte !"); - else - { - $file = new QuestionsFile('questions.xml'); - $id = $_POST['id']; - $quest = $file->get_question($id); - $quest->setCourse($couse); - $quest->setQuestion($question); - $quest->setAnswer($answers); - - $file->save(); - echo "File saved"; - - header("Location: ./confirmation.php?id=" . $quest->getId()); -*/ -?> \ No newline at end of file diff --git a/validation.php b/validation.php index f7856ae..e42105b 100644 --- a/validation.php +++ b/validation.php @@ -1,19 +1,5 @@ - - - - - - Every Questions (BETA) - - - -
- - - -

Nemubot Questions (BETA)

-

+