4) $t = 1; $questions = array(); $answers = array(); $filenames = array(); switch ($t) { case 1: $test_title = "Question or Statement in Present Perfect?"; $bgcolor = "#99CC00"; $questions[1] = array("نشسته‌م؟", "نشسته‌ی؟", "نشسته؟", "نشسته‌یم؟", "نشسته‌ین؟", "نشسته‌ن؟"); $questions[2] = array("نشسته‌م.", "نشسته‌ی.", "نشسته.", "نشسته‌یم.", "نشسته‌ین.", "نشسته‌ن."); $answers[1] = array("Have I sat down?", "Have you sat down?", "Has he/she/it sat down?", "Have we sat down?", "Have you sat down?", "Have they sat down?"); $answers[2] = array("I have sat down.", "You have sat down.", "He/she/it has sat down.", "We have sat down.", "You have sat down.", "They have sat down."); $filenames[1] = array("stress1Series1_1", "stress1Series1_3", "stress1Series1_5", "stress1Series1_7", "stress1Series1_9", "stress1Series1_11"); $filenames[2] = array("stress1Series1_2", "stress1Series1_4", "stress1Series1_6", "stress1Series1_8", "stress1Series1_10", "stress1Series1_12"); break; case 2: $test_title = "Simple Past or Present Perfect?"; $bgcolor = "#FFCC00"; $questions[1] = array("نشستم.", "نشستی.", "نشست.", "نشستیم.", "نشستین.", "نشستن."); $questions[2] = array("نشسته‌م.", "نشسته‌ی.", "نشسته.", "نشسته‌یم.", "نشسته‌ین.", "نشسته‌ن."); $answers[1] = array("I sat down.", "You sat down.", "He/she/it sat down.", "We sat down.", "You sat down.", "They sat down."); $answers[2] = array("I have sat down.", "You have sat down.", "He/she/it has sat down.", "We have sat down.", "You have sat down.", "They have sat down."); $filenames[1] = array("stress1Series2_13", "stress1Series2_15", "stress1Series2_17", "stress1Series2_19", "stress1Series2_21", "stress1Series2_23"); $filenames[2] = array("stress1Series2_14", "stress1Series2_16", "stress1Series2_18", "stress1Series2_20", "stress1Series2_22", "stress1Series2_24"); break; case 3: $test_title = "With the word \"alone,\" Question or Statement?"; $bgcolor = "#99CCFF"; $questions[1] = array("تنها نشسته‌م؟", "تنها نشسته‌ی؟", "تنها نشسته؟", "تنها نشسته‌یم؟", "تنها نشسته‌ین؟", "تنها نشسته‌ن؟"); $questions[2] = array("تنها نشسته‌م.", "تنها نشسته‌ی.", "تنها نشسته.", "تنها نشسته‌یم.", "تنها نشسته‌ین.", "تنها نشسته‌ن."); $answers[1] = array("Have I sat down alone?", "Have you sat down alone?", "Has he/she/it sat down alone?", "Have we sat down alone?", "Have you sat down alone?", "Have they sat down alone?"); $answers[2] = array("I have sat down alone.", "You have sat down alone.", "He/she/it has sat down alone.", "We have sat down alone.", "You have sat down alone.", "They have sat down alone."); $filenames[1] = array("stress1Series3_25", "stress1Series3_27", "stress1Series3_29", "stress1Series3_31", "stress1Series3_33", "stress1Series3_35"); $filenames[2] = array("stress1Series3_26", "stress1Series3_28", "stress1Series3_30", "stress1Series3_32", "stress1Series3_34", "stress1Series3_36"); break; case 4: $test_title = "Positive or Negative Question in Present Perfect?"; $bgcolor = "#E7B6CE"; $questions[1] = array("تنها نشسته‌م؟", "تنها نشسته‌ی؟", "تنها نشسته؟", "تنها نشسته‌یم؟", "تنها نشسته‌ین؟", "تنها نشسته‌ن؟"); $questions[2] = array("تنها ننشسته‌م؟", "تنها ننشسته‌ی؟", "تنها ننشسته؟", "تنها ننشسته‌یم؟", "تنها ننشسته‌ین؟", "تنها ننشسته‌ن؟"); $answers[1] = array("Have I sat down alone?", "Have you sat down alone?", "Has he/she/it sat down alone?", "Have we sat down alone?", "Have you sat down alone?", "Have they sat down alone?"); $answers[2] = array("Have I not sat down alone?", "Have you not sat down alone?", "Has he/she/it not sat down alone?", "Have we not sat down alone?", "Have you not sat down alone?", "Have they not sat down alone?"); $filenames[1] = array("stress1Series4_37", "stress1Series4_39", "stress1Series4_41", "stress1Series4_43", "stress1Series4_45", "stress1Series4_47"); $filenames[2] = array("stress1Series4_38", "stress1Series4_40", "stress1Series4_42", "stress1Series4_44", "stress1Series4_46", "stress1Series4_48"); break; } if (isset($_POST['check'])) { $data = $_POST['data']; $newdata = explode(":", base64_decode($data)); $answer = $newdata[0]; $question = $newdata[1]; $sides = explode(",", $newdata[2]); } else { srand((float)microtime() * 1000000); $answer = rand(1, 2); $question = rand(0, 5); $sides = array(1, 2); shuffle($sides); $data = "$answer:$question:".implode(",", $sides); $data = base64_encode($data); } ?> \n

$test_title

\n"; print "

You have answered the question correctly:

".$questions[$answer][$question]."

".$answers[$answer][$question]."

Try to answer another question.\n"; exit("

Back to the Tests

"); } print "\n"; } else { print "\n"; } ?>

You are wrong! Please try again!"; } print "

Listen to the audio and then select the right answer from the choices below."; ?>

".$answers[$sides[0]][$question].""; print "".$answers[$sides[1]][$question].""; } print "

"; ?>


Back to the Tests