<?php

$birthday = "No";
$result = mysql_query( "SELECT * FROM $userstable ORDER BY intId" );
$num_rowsb = mysql_num_rows( $result );
$totalusers = $num_rowsb;
//Work Out Birthdays
while ( $a_row = mysql_fetch_object( $result ) )
{
    if ( $a_row->intBirthDay == $sday )
    {
        if ( $a_row->intBirthMonth == $smonth )
        {
            if ( $birthday == "No" )
            {
                print "<table border=1 cellpadding=10 cellspacing=0 style=border-collapse: collapse bordercolor=#111111 bgcolor=$fgcolour>
                <tr><td><font face=$font size=2>Members celebrating their birthdays today: ";
                $birthday = "Yes";
            }
            print "<a href=\"profile.php?userid=$a_row->strName&groupid=$groupid\">$a_row->strName</a>&nbsp;";
        }
    }
}

if ( $birthday == "Yes" )
{
    print "</td></tr></table>";
}

//Work out other special days...

if ( $sday == 25 )
{
    if ( $smonth == 12 )
    {
        print "<br><font face=$font size=3 COLOR=RED><b>MERRY CHRISTMAS!</b></font>";
    }
}
print "<font color=\"$bgcolour\" size=1>GrimForum V5.0 by Matt Squirrell - &copy; HSMX Web Design 2003 - Sponsored By <a href=\"http://www.hsmx.com\" target=\"_blank\" title=\"High SpiritS Mobile Disco's\"><font color=\"$bgcolour\" size=0>High SpiritS Mobile Disco's</a><font color=\"$fontcolor\" size=\"$fontsize\">";
if ( $sday == 31 )
{
    if ( $smonth == 10 )
    {
        print "<br><font face=$font size=3 COLOR=RED><b>HAPPY HALLOWE'EN!</b></font>";
    }
}

if ( $sday == 1 )
{
    if ( $smonth == 1 )
    {
        print "<br><font face=$font size=3 COLOR=RED><b>HAPPY NEW YEAR!</b></font>";
    }
}

?>