I have a widget
PHP Code:
ob_start();
$output_bits = '';
$today_m = date('m');
$today_y = date('Y');
$spacer = $today_m;
$get_schedule = vB::$db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "thread
WHERE prefixid IN('Chapter_Event', 'other')
ORDER BY UNIX_TIMESTAMP(STR_TO_DATE(LEFT(title, 10), '%m/%d/%Y')) ASC
");
while ($schedule = vB::$db->fetch_array($get_schedule))
{
if (strtotime(substr($schedule['title'], 0, 10)) < (TIMENOW - 86400))
{
continue;
}
$str = substr($schedule['title'], 0, 2); // get month of event to add space between months
if ($str == $spacer)
{
$output_bits .= '<a target="_blank" href="showthread.php?t=' . $schedule['threadid'] . '">' . $schedule['title'] . '</a><br />';
}
else
{
$output_bits .= '<hr><a target="_blank" href="showthread.php?t=' . $schedule['threadid'] . '">' . $schedule['title'] . '</a><br />';
}
$spacer = $str;
}
vB::$db->free_result($get_schedule);
$output = $output_bits;
ob_end_clean();
which creates a calendar of events on
http://www.nccbmwcca.org based on the date in the subject.
I need to be able to output this script to a simple standalone webpage.
Anyone whip it up for me? Please?