Benjo85au
01-18-2006, 08:28 PM
Hi,
I've created my own module that shows the next 10 upcoming events. When I add this to a module as including the PHP file and even choosing clean code. It stuffs up my navbar making only a couple of items show and in the wrong order. Is there a fix for this or am I just being dumb?
<?PHP
echo '<tr><td>';
//chdir("../"); //change to your forum path
require('./global.php');
$events = $db->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title
FROM vb_event
WHERE calendarid = 1 AND dateline_from >= UNIX_TIMESTAMP()
ORDER BY dateline_from LIMIT 10");
if ($db->num_rows($events)) {
while ($event = $db->fetch_array($events)) {
#$timestring=$event[dateline_from],false,true,false,true;
$dateevent= vbdate("M j, Y", $event[dateline_from],false,true,false,true);
echo "<center><font size=\"-2\" face=\"arial, helvetica\" color=\"000000\">$dateevent</font><br></center><font size=\"-1\" face=\"arial, helvetica\"><b><a href='http://www.wvcruiseclub.com/forum/calendar.php?do=getinfo&e=$event[eventid]&c=1'>$event[title]</a></b></font>";
}
//}
} else {
echo "<font class=\"heading\" face=\"arial, helvetica\" size=\"1\" color=\"000000\"><b><a href='http://www.wvcruiseclub.com/forum/calendar.php?c=1&do=displaymonth'>Upcoming Events</a></b></font></td><br><font size=\"-1\" face=\"arial, helvetica\" color=\"000000\"><b>No Events Upcoming Currently</b></font>";
}
echo '</td></tr>';
?>
Any help would be appreciated.
Regardz :)
I've created my own module that shows the next 10 upcoming events. When I add this to a module as including the PHP file and even choosing clean code. It stuffs up my navbar making only a couple of items show and in the wrong order. Is there a fix for this or am I just being dumb?
<?PHP
echo '<tr><td>';
//chdir("../"); //change to your forum path
require('./global.php');
$events = $db->query ("SELECT UNIX_TIMESTAMP() AS dateline, dateline_from, eventid, title
FROM vb_event
WHERE calendarid = 1 AND dateline_from >= UNIX_TIMESTAMP()
ORDER BY dateline_from LIMIT 10");
if ($db->num_rows($events)) {
while ($event = $db->fetch_array($events)) {
#$timestring=$event[dateline_from],false,true,false,true;
$dateevent= vbdate("M j, Y", $event[dateline_from],false,true,false,true);
echo "<center><font size=\"-2\" face=\"arial, helvetica\" color=\"000000\">$dateevent</font><br></center><font size=\"-1\" face=\"arial, helvetica\"><b><a href='http://www.wvcruiseclub.com/forum/calendar.php?do=getinfo&e=$event[eventid]&c=1'>$event[title]</a></b></font>";
}
//}
} else {
echo "<font class=\"heading\" face=\"arial, helvetica\" size=\"1\" color=\"000000\"><b><a href='http://www.wvcruiseclub.com/forum/calendar.php?c=1&do=displaymonth'>Upcoming Events</a></b></font></td><br><font size=\"-1\" face=\"arial, helvetica\" color=\"000000\"><b>No Events Upcoming Currently</b></font>";
}
echo '</td></tr>';
?>
Any help would be appreciated.
Regardz :)