Quote:
Originally Posted by magmaink
Alright dammit....I am completely clueless in regards to php but I still managed to figure this one out. on the timestring code......you have to add "+= 86400" in order to compensate for the missing 24 hours.....Here's my code:
PHP Code:
$events = $DB_site->query ("SELECT UNIX_TIMESTAMP( ) AS dateline, dateline_from, eventid, title
FROM event
WHERE calendarid = 1 AND dateline_from > UNIX_TIMESTAMP( )
ORDER BY dateline_from
LIMIT 10");
if ($DB_site->num_rows($events)) {
while ($event = $DB_site->fetch_array($events)) {
$timestring=$event['dateline_from'] += 86400;
$dateevent=date("m-d-Y",$timestring);
echo "$dateevent <a href=\"/vb/calendar.php?$session[sessionurl]do=getinfo&day=$day&e=$event[eventid]&c=$event[calendarid]\">$event[title]</a><br />";
}
} else {
echo $vh_upcomingevents .= " -- no events currently listed -- ";
}
|
Will the above work for 3.0.3? I am also looking for something to get the last X threads and polls.... any one?
Coll