
07-19-2003, 08:24 PM
|
|
|
Join Date: Nov 2001
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Today at 06:45 PM Gary W said this in Post #4
Here you go 
I changed include() to require(), you should use require instead of include, because the script becomes useless if it can't include the global.php
Only use include() if the script can still execute without including the file.
PHP Code:
<?php
require('../global.php');
$events = $DB_site->query("SELECT event, DATE_FORMAT(eventdate,'%d %M') AS date, eventdate, eventid, subject
FROM calendar_events
WHERE public = 1 AND eventdate >= NOW()
ORDER BY eventdate LIMIT 8");
if ($DB_site->num_rows($events)) {
echo "<ul>";
while ($event = $DB_site->fetch_array($events)) {
$timestring=strtotime($event['date']);
$date=date("l jS F",$timestring);
echo "<li><font size=\"1\">".$date." <a
href='calendar.php?s=$session[sessionhash]&action=getinfo&eventid=".$event['eventid']."'>".$event['subject']."</a> <br>
";
}
} else {
echo "No Events";
}
echo "</ul>";
?>
|
This gives me the date like
2003-07-23
Rather than
Friday 23rd June
Dave
|