- 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:
dave 2007-12-22 23:42:25 +00:00
parent 8ef21626f2
commit 6fc2118646

View File

@ -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>";