";
$result = db_select("SELECT cat FROM $config[ftable] GROUP BY cat");
while($cat = db_getarray($result))
{
$result2 = db_select("SELECT * FROM $config[ftable] WHERE cat='$cat[cat]' ORDER BY ftitle ASC");
if (!$cat[cat])
$cat[cat] = $lang[gf];
print "";
print "";
$i = 0;
while($row = db_getarray($result2))
{
$i = $i + 1;
if ($i % 2) $bgcolor = $config['color_b'];
else $bgcolor = $config['color_a'];
$date[$i] = lastdate($row[fname]);
if ($date[$i])
{
if ($config['24hour'])
$format = "l, F j H:i";
else
$format = "l, F j h:i a";
$datetext = date($format,sql_to_unix_time($date[$i]));
}
else
{
$datetext = " ";
}
if (sql_to_unix_time($date[$i]) > $forumsess[$realm][lastvisit])
{
$icon = "
|
| |||||||||||||
";
print "";
while($row = db_getarray($result))
{
$i = $i + 1;
if ($i % 2) $bgcolor = $config['color_b'];
else $bgcolor = $config['color_a'];
if ($row[icon])
$icon = "
|
|
";
while($row = db_getarray($result))
{
$i = $i + 1;
$options = $row[useropts];
if ($i % 2) $bgcolor = $config['color_b'];
else $bgcolor = $config['color_a'];
if (($row[rank])&&($row[votes]))
{
$score = $row[rank]/$row[votes];
$rank = round($score, 0);
$score = round($score, 2);
}
else
{
$rank = FALSE;
}
if ($config['24hour'])
$format = "l, F j Y H:i";
else
$format = "l, F j Y h:i A";
$datetext = date($format,sql_to_unix_time($row[posttime]));
?>
|