<br /> // -------------------------------------------------<br /> // Grab all posts with calendar events for this month<br /> $query = "<br /> SELECT B_Subject,B_CalDay,B_Board,B_Approved<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_CalYear='$year'<br /> AND B_CalMonth='$month'<br /> ";<br /> $sth = $dbh -> do_query($query,__LINE__,__FILE__);<br /> while(list($subject,$topicday,$board,$approved) = $dbh -> fetch_array($sth)) {<br /> if ($approved != "yes") {<br /> continue;<br /> }<br /> if (!in_array($board,$canview)) {<br /> continue;<br /> }<br /> if (!isset($marray[$topicday])) {<br /> $marray[$topicday] = " ( {$ubbt_lang['TOPIC']}: $subject ) \n";<br /> }<br /> else {<br /> $marray[$topicday] .= " ( {$ubbt_lang['TOPIC']}: $subject ) \n ";<br /> }<br />