<?

//acting ...
if ($sys['act'] && !$tmp['cancelAction']) {
	require_once($sys['root']."/system/actions/".$sys['act'].".inc");
}


$iconfolder = "images/icons/filetypes/small";




require_once($sys['root']."/system/templates/popup/header.inc");
?>

<table cellspacing="0" cellpadding="0" border="0" style="width:100%;height:100%;background-color:#F2F2F2">
<tr>
    <td background="images/popup/top-bg.gif" height="26">&nbsp;</td>
</tr>

<tr>
    <td style="padding:10px;" valign="top">
<!-- Popup Contents -->

<table border="1" cellspacing="0" cellpadding="3" width="100%">
<tr style="color:white;font-weight:bold;background-color:darkgray">
<td><?$lang->display("User");?></td>
<td colspan="2"><?$lang->display("File uploaded");?></td>
<td><?$lang->display("Date");?></td>
</tr>
<?
$rs = $db->query("SELECT ".$settings->config['last_uploads_tablename'].".uid,".$settings->config['last_uploads_tablename'].".path,".$settings->config['last_uploads_tablename'].".date,".$settings->config['interauth_tablename'].".username  FROM ".$settings->config['last_uploads_tablename'].",".$settings->config['interauth_tablename']." WHERE ".$settings->config['last_uploads_tablename'].".uid=".$settings->config['interauth_tablename'].".id ORDER BY ".$settings->config['last_uploads_tablename'].".date DESC");


while (!$rs->EOF) {
?>
<tr>
<td selectable="1"><?echo $rs->fields["username"];?></td>
<?
$extension = $fm->getExtension($fm->basename($rs->fields["path"]));
$fileinfo = $fm->fileTypeInfo($extension);
?>
<td><img src="<?echo gluePath("images/icons/filetypes/small/", $fileinfo['icon']);?>" width="16" height="16" border="0" alt=""></td>
<td><?echo $rs->fields["path"];?></td>
<td><?echo date("d-M G:i", $rs->fields["date"]);?></td>
</tr>
<?
	$rs->MoveNext();
}
?>
</table>
	</td>
</tr>
<tr>
    <td align="center" height="20">
<div style="position:relative;top:16px;z-index:1">
<?
$tpl->btn(
$lang->get("Ok"), 
"window.close();self.close();"
);
?>
</div>
	</td>
</tr>
<tr>
    <td background="images/popup/bottom-bg.gif" height="46">&nbsp;</td>
</tr>
</table>
<?
require_once($sys['root']."/system/templates/popup/footer.inc");
?>