<?php
/**
 * pragmaMx  Content Management System
 * Copyright (c) 2005 pragmaMx Dev Team - http://pragmaMx.org
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 */

if (!defined("mxMainFileLoaded")) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
# mxGetLangfile($module_name);
$index = 1;

include_once("header.php");

OpenTable();
echo "<table width=\"550\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
echo "<tr>";
echo "<td width=\"550\" valign=\"top\">";

echo "<center><b>Neuste Fotos</b></center><br>";
##############Neustes Foto###############
$foto_query = "SELECT MAX(date), typ,anzahl,aid FROM ${prefix}_avatar GROUP BY date DESC LIMIT 0,50";
$result = sql_query($foto_query);

// Listen wir das Zeug auf:

echo "<table width=\"90%\" border=\"0\" align=\"center\"><tr>\n";

$colcounter=1;
while (list($date,$typ,$anzahl, $aid, ) = sql_fetch_row($result))
{
$av_end = explode("|",$typ);
echo "<td align=\"center\"><center><a href=\"modules.php?name=Userinfo&uname=$aid\"><img style=\"border-left: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000;\" src='".MX_PATH_MEMBERAVATAR."/".$av_end[$anzahl-1]."' alt=\"$aid\" border=\"0\" alt=\"\"  width=\"85\" height=\"85\" /><br>$aid</a></center></td>";
if (floor($colcounter/5)==1)
{
echo "</tr><tr>\n";
        $colcounter=0;
}
$colcounter++;
}
echo "</tr></table>\n";

############
echo "</td>";
echo "</tr>";
echo "</table>";


CloseTable();

include_once("footer.php");
?>