forked from science-ation/science-ation
- Snazz up the important dates page a bit. Also add a unix timestamp query to
show how we could, eventually, use that to format the date. But for now, leave it printing the ISO date.
This commit is contained in:
parent
8ef21626f2
commit
6fc2118646
@ -27,10 +27,16 @@
|
|||||||
|
|
||||||
echo "<table>";
|
echo "<table>";
|
||||||
|
|
||||||
$q=mysql_query("SELECT * FROM dates WHERE year='".$config['FAIRYEAR']."' ORDER BY date");
|
$q=mysql_query("SELECT *,UNIX_TIMESTAMP(date) AS udate FROM dates WHERE year='{$config['FAIRYEAR']}' ORDER BY date");
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
{
|
{
|
||||||
echo "<tr><td>".i18n($r->description)."</td><td>$r->date</td></tr>";
|
$trclass = ($trclass == 'odd') ? 'even' : 'odd';
|
||||||
|
if($r->date == '0000-00-00 00:00:00')
|
||||||
|
$d = i18n("not specified");
|
||||||
|
else
|
||||||
|
$d = $r->date;
|
||||||
|
//$d = strftime("%a %b %e, %Y, %H:%M", $r->udate);
|
||||||
|
echo "<tr class=\"$trclass\"><td>".i18n($r->description)."</td><td>$d</td></tr>";
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user