1<?php 2 3 4//fix for Opera XMLHttpRequests 5if(!count($_POST) && $HTTP_RAW_POST_DATA){ 6 parse_str($HTTP_RAW_POST_DATA, $_POST); 7} 8 9if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../../'); 10define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 11 12require_once(DOKU_INC.'inc/init.php'); 13require_once(DOKU_INC.'inc/common.php'); 14 15//close session 16session_write_close(); 17 18require_once(DOKU_INC.'inc/parser/xhtml.php'); 19 20require_once('class_quiz.php'); 21 22$param = array(); 23 24$param['learning'] = $_POST['quiz_learning']; 25$param['rndchoice'] = $_POST['quiz_rndchoice']; 26$param['rndquest'] = $_POST['quiz_rndquest']; 27$param['highscores'] = $_POST['quiz_highscore']; 28$param['showintro'] = $_POST['quiz_showintro']; 29 30$quiz=new quiz($_POST['quiz_id'], $param); 31echo $quiz->do_quiz_here(); 32 33?>