(count($modal_verbs)-1) || $modalTest<0) $modalTest = -1; $title = "Modal Verbs in the Past (".($modalTest==-1?"personal modal verbs":"modal verb \"".$modal_verbs[$modalTest][3].($modalTest==2?" to":"")."\"").", 1 agent, ".($isSpoken?"spoken":"written")." style, ".($isPersScript?"Persian script":"transcription").")"; $bodyParams = ($isSpoken?'text="#FFFFFF" bgcolor="#808080"':'text="#000000" bgcolor="#FFFF00"'); function GetQuestion($person, $negative, $verb) { global $isPersScript; $persons = array(1 => 'I', 'You', 'He/she/it', 'We', 'You', 'They'); $persons2 = array(1 => 'me', 'you', 'him/her/it', 'us', 'you', 'them'); // $be = array(1 => 'am', 'are', 'is', 'are', 'are', 'are'); $be = array(1 => 'was', 'were', 'was', 'were', 'were', 'were'); $words = explode(' ', $verb); // if there is a preposition after the verb if ($verb=='be possible for') $question = 'It '; else $question = $persons[$person].' '; if ($negative) { if ($words[0]=='be') { if ($verb=='be possible for') $question .= $be[3] . " not"; else $question .= $be[$person] . " not"; } elseif ($words[0]=='must') { $question .= $words[0] . " not"; } else { $question .= "did not $words[0]"; } } else { if ($words[0]=='be') { if ($verb=='be possible for') $question .= $be[3]; else $question .= $be[$person]; } else { $question .= verbPast($words[0]); } } for ($i=1; $i321".($id?"":" AND (e1.hassnd=1 OR e1.hassndtest=1)")." AND e2.style=0".($id?" AND e1.id=$id":" ORDER BY RAND()").";"); else $r = mysql_query("SELECT * FROM pvc_verbs WHERE id<>26 AND isnew=0 AND level=1 AND style=0".($id?"":" AND (hassnd=1 OR hassndtest=1)")." AND translation IS NOT NULL".($id?" AND id=$id":" ORDER BY RAND()").";"); $row = mysql_fetch_assoc($r); if ($row===false) exit("The verb is not found"); $verb_id = $row['id']; if ($isPersScript) { $randomVerb = $row['pers_inf']; $presStem = $row['pers_presstem']; } else { $randomVerb = $row['trans_inf']; $presStem = $row['trans_presstem']; } $presStemTrans = $row['trans_presstem']; $engVerb = $row['translation']; $engVerbs = explode(',', $engVerb); $engVerb = $engVerbs[0]; if (substr($engVerb, 0, 3)=='to ') $engVerb = substr($engVerb, 3); // $tags = explode(',', $row['tags']); // if (!empty($row['tags'])) { // for ($i=0; $i4) { $modals[] = $modal_ar[rand(0, count($modal_ar)-1)]; } else { $modals[] = $modal; } if (in_array($qtypes[$j], array(3, 5, 7))) { $persons[$j] = $persons[$answer]; } // only one YOU should be among answers if ($qtypes[$j]==2) { if ($persons[$answer]==2 && $persons[$j]==5) { $persons[$j] = array_pop($persons); } if ($persons[$answer]==5 && $persons[$j]==2) { $persons[$j] = array_pop($persons); } } // if ($modals[$j]==2) { // $persons[$j] = 3; // $tenses[$j] = $neg[$j] ? 17 : 7; // } } $data = "$verb_id:$engVerb:".implode(",", $modals).":$answer:".implode(",", $persons).":".implode(",", $tenses).":".implode(",", $qtypes).":".implode(",", $neg).":".implode(",", $perf); $data = base64_encode($data); } $pastStem = substr($randomVerb, 0, strlen($randomVerb)-2); ?> .css"> \n

$title

\n"; print "



You have answered the question correctly.


Try another question.


Back to the Persian Verb Conjugator
\n"; if ($id) print "Basic Verb Conjugation Tests
"; exit("Back to the Persian Tests

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

Please translate to Persian:

".GetQuestion($persons[$answer], $neg[$answer], $modal_verbs[$modal][3])." $engVerb"; if ($modal!=2) { print ($perf[$answer]==1 ? " (perfective)" : " (imperfective)"); } print "."; $modalsnd = $modal_verbs[$modal][4]."-"; if ($modal==2) $modalsnd .= ($neg[$answer]==1?17:7); elseif ($perf[$answer]==1) $modalsnd .= ($neg[$answer]==1?12:1); else $modalsnd .= ($neg[$answer]==1?13:2); $modalsnd .= "-".($modal>=2?3:$persons[$answer]); if ($r = mysql_query("SELECT snd_file FROM pvcsound WHERE homophone=\"$modalsnd\"")) { if ($homophone = mysql_fetch_row($r)) { $modalsnd = trim($homophone[0]); } } $verbsnd = $verb_id."-".$tenses[$answer]."-".$persons[$answer]; if ($r = mysql_query("SELECT snd_file FROM pvcsound WHERE homophone=\"$verbsnd\"")) { if ($homophone = mysql_fetch_row($r)) { $verbsnd = trim($homophone[0]); } } $audiobtn = ""; if (file_exists("../pvc/snd/$verbsnd.mp3") && file_exists("../pvc/snd/$modalsnd.mp3")) { $mp3file = $modalsnd."-s-".$verbsnd; if (!file_exists("tempsnd/$mp3file.mp3")) { $f1c = file_get_contents("../pvc/snd/$modalsnd.mp3"); $f2c = file_get_contents("../pvc/snd/s.mp3"); $f3c = file_get_contents("../pvc/snd/$verbsnd.mp3"); if ($f1c!==false && $f2c!==false && $f3c!==false) { file_put_contents("tempsnd/$mp3file.mp3", $f1c.$f2c.$f3c); $audiobtn = "

"; } } else { $audiobtn = "

"; } } print "$audiobtn"; for ($j=1; $j<=4; $j++) { if ($modal==2) $tense = ($neg[$j-1]==1?17:7); elseif ($perf[$j-1]==1) $tense = ($neg[$j-1]==1?12:1); else $tense = ($neg[$j-1]==1?13:2); $modal_verb = Conjugate($modal_verbs[$modals[$j-1]][0], $modal_verbs[$modals[$j-1]][1], $modal_verbs[$modals[$j-1]][2], $tense, (in_array($modals[$j-1], array(2, 3))?3:$persons[$j-1])); $compound = "$modal_verb "; print ""; } print "
".Conjugate($compound.$pastStem, $compound.$presStem, $presStemTrans, $tenses[$j-1], $persons[$j-1])."
"; } print "

"; ?>

Back to the Persian Verb Conjugator Basic Verb Conjugation Tests"; ?>

Back to the Persian Tests