Код:
echo "<center>Please select one term from the following list:</center><br><br>"
."<table border=\"0\" align=\"center\">";
$result3 = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE UPPER(title) LIKE '$ltr%' AND eid='$eid'");
$numrows = $db->sql_numrows($result3);
if ($numrows == 0) {
echo "<center><i>"._NOCONTENTFORLETTER." ".$ltr.".</i></center>";
}
while ($row3 = $db->sql_fetchrow($result3)) {
$tid = intval($row3['tid']);
$title = filter($row3['title'], "nohtml");
echo "<tr><td><a href=\"modules.php?name=$module_name&op=content&tid=$tid\ ">$title</a></td></tr>";
}
echo "</table><br><br>";
Код:
echo "<center>Please select one term from the following list:</center><br><br>";
$result3 = $db->sql_query("SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE UPPER(title) LIKE '$ltr%' AND eid='$eid'");
$numrows = $db->sql_numrows($result3);
if ($numrows == 0) {
echo "<center><i>"._NOCONTENTFORLETTER." ".$ltr.".</i></center>";
}else{
echo "<table border=\"0\" align=\"center\"><tr>";
$i=1;
while ($row3 = $db->sql_fetchrow($result3)) {
$tid = intval($row3['tid']);
$title = filter($row3['title'], "nohtml");
echo "<td><a href='modules.php?name=$module_name&op=content&tid =$tid'>$title</a></td>";
if($i==2) { // два столбца
echo "</tr><tr>";
$i=1;
}else
$i++;
}
}
echo "</tr></table><br><br>";