DrawTop("Publications", "PUBLICATIONS", false);
$conn = Connect();
?>
Publications by topic |
$groups = mysql_query('SELECT * FROM Groups WHERE Parent_ID = 1');
for ($i = 0; $group = mysql_fetch_array($groups); $i++)
{
if ($i % 5 == 0)
echo '';
$name = $group['Name'];
echo '';
}
?>
|
Publications by type and year |
$groups = mysql_query('SELECT * FROM Groups WHERE Parent_ID = 2');
for ($i = 0; $group = mysql_fetch_array($groups); $i++)
{
if ($i % 5 == 0)
echo '';
$name = $group['Name'];
echo '';
}
?>
|
RECENT PUBLICATIONS
$articles = mysql_query('SELECT * FROM Articles WHERE Is_Recent = 1 ORDER BY Article_ID');
while ($article = mysql_fetch_array($articles))
DrawArticle($article);
?>
PUBLICATIONS BY TOPIC
$groups = mysql_query('SELECT * FROM Groups WHERE Parent_ID = 1');
while ($group = mysql_fetch_array($groups))
{
$articles = mysql_query('SELECT Articles.* FROM Articles JOIN Articles_In_Groups ON Articles.Article_ID = Articles_In_Groups.Article_ID WHERE Group_ID = ' . $group['Group_ID'] . ' ORDER BY Year DESC');
for ($i = 0; $article = mysql_fetch_array($articles); $i++)
{
if ($i == 0)
{
$name = $group['Name'];
echo '
' . PHP_EOL;
echo '' . $name . ' | ' . PHP_EOL;
echo 'Back to top | ' . PHP_EOL;
echo '
' . PHP_EOL;
}
DrawArticle($article);
}
}
?>
PUBLICATIONS BY TYPE AND YEAR
$groups = mysql_query('SELECT * FROM Groups WHERE Parent_ID = 2');
while ($group = mysql_fetch_array($groups))
{
$articles = mysql_query('SELECT Articles.* FROM Articles JOIN Articles_In_Groups ON Articles.Article_ID = Articles_In_Groups.Article_ID WHERE Group_ID = ' . $group['Group_ID'] . ' ORDER BY Year DESC');
for ($i = 0; $article = mysql_fetch_array($articles); $i++)
{
if ($i == 0)
{
$name = $group['Name'];
echo '
' . PHP_EOL;
echo '' . $name . ' | ' . PHP_EOL;
echo 'Back to top | ' . PHP_EOL;
echo '
' . PHP_EOL;
}
DrawArticle($article);
}
}
?>
Disconnect($conn);
DrawBottom();
?>