2) $limit_param = 0; } $theme = 0; if (isset($_GET['theme'])) { $theme = intval($_GET['theme']); if ($theme<0) $theme = 0; } ?> Persian Simple Verbs

Persian Simple Verbs - Persian Compound Verbs

Limit verbs to: 0) print " - "; $link = $limit_titles[$i]; if ($i!==$limit_param) { $link = "0?"&limit=".$limit[$i]:"")."'>$link"; } print $link; } print "

"; $r = mysql_query("SELECT * FROM pvc_topics WHERE t_id=$theme"); if ($topic = mysql_fetch_assoc($r)) { print "Theme: $topic[t_name]"; } else { print "Limit to a theme"; } print " v

\n"; $ctable = ''; $sortby = "v1.pers_inf"; $r = mysql_query(" SELECT v1.*, v2.id sp_id, v2.pers_inf sp_pers_inf, v2.pers_presstem sp_pers_presstem, v2.trans_inf sp_trans_inf, v2.trans_presstem sp_trans_presstem, v2.hassnd sp_hassnd, v2.hassndtest sp_hassndtest FROM $table v1 LEFT JOIN $table v2 ON v2.style_id=v1.id ".($theme>0 ? "LEFT JOIN ( SELECT * FROM pvc_verb_topics vt WHERE vt.topic_id=$theme ) t ON t.verb_id=v1.id" : '')." WHERE v1.comp_id=-1 AND (v1.style=0 AND (v2.style<>0 OR v2.id IS NULL) OR v1.style=1 AND v1.style_id = -1)".($limit_param>0?" AND v1.level".($limit_param==2?'!':'')."=1":"").($theme>0?" AND NOT t.topic_id IS NULL":"")." ORDER BY $sortby") or die(mysql_error()); $prev_header = ''; $headers = array(); while ($row = mysql_fetch_assoc($r)) { if (substr($row['pers_inf'], 0, 2)!=$prev_header) { $prev_header = substr($row['pers_inf'], 0, 2); $headers[] = "$prev_header"; $ctable .= " "; $c_type = $row['comp_type']; } // Find the default spoken verb if (!is_null($row['sp_id'])) { $id = $row['sp_id']; do { $rt = mysql_query("SELECT * FROM $table WHERE style_id=$id"); if ($sprow = mysql_fetch_assoc($rt)) { $id = $sprow['id']; if ($sprow['style']==2) { // default spoken break; } } else { $id = -1; } } while ($id!=-1); } $ctable .= " "; } $headers_text = implode(' - ', $headers); if (!empty($headers_text)) { print "

$headers_text

\n"; } print $ctable; ?>
Transcription English Translation Perso-Arabic Script
spoken written نوشتاری گفتاری
^
".$prev_header."
"; if ($row['style'] == 1) { $ctable .= "$row[trans_inf]"; if ($row['hassnd']==1/* || $row['sp_hassndtest']==1*/) { $ctable .= " *"; } $ctable .= "  "; } else { if (!is_null($row['sp_id'])) { if ($id!=-1) { $ctable .= "$sprow[trans_inf]"; } else { $ctable .= "$row[sp_trans_inf]"; } if ($row['sp_hassnd']==1/* || $row['sp_hassndtest']==1*/) { $ctable .= " *"; } } else { $ctable .= " "; } $ctable .= " $row[trans_inf]"; } // if ($row['hassnd']==1 || $row['hassndtest']==1) { // $ctable .= " *"; // } $ctable .= " "; $translation = $row['translation']; $tags = $row['tags']; if (empty($translation)) $ctable .= "not found"; else { $trans_ar = explode(",", $translation); $tags_ar = explode(",", $tags); $prev_meaning_tags = ''; for ($i=0; $i0) { $trans_ar[$i-1] .= ';'; } for ($k=0; $k$row[pers_inf]"; if ($row['hassnd']==1/* || $row['sp_hassndtest']==1*/) { $ctable .= " *"; } } else { $ctable .= " $row[pers_inf]"; // if ($row['hassnd']==1 || $row['hassndtest']==1) { // $ctable .= " *"; // } $ctable .= " "; if (!is_null($row['sp_id'])) { if ($id!=-1) { $ctable .= "$sprow[pers_inf]"; } else { $ctable .= "$row[sp_pers_inf]"; } if ($row['sp_hassnd']==1/* || $row['sp_hassndtest']==1*/) { $ctable .= " *"; } } else { $ctable .= " "; } } $ctable .= "