<?PHP

/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net
[BEGIN_SED]
File=admin.pfs.allpfs.php
Version=101
Updated=2006-mar-15
Type=Core.admin
Author=Neocrome
Description=Administration panel
[END_SED]
==================== */

if ( !defined('SED_CODE') || !defined('SED_ADMIN') ) { die('Wrong URL.'); }

list($usr['auth_read'], $usr['auth_write'], $usr['isadmin']) = sed_auth('pfs', 'a');
sed_block($usr['isadmin']);

$adminpath[] = array ("admin.php?m=other", $L['Other']);
$adminpath[] = array ("admin.php?m=pfs", $L['PFS']);
$adminpath[] = array ("admin.php?m=pfs&amp;s=allpfs", $L['adm_allpfs']);
$adminhelp = $L['adm_help_allpfs'];

unset ($disp_list);

$sql = sed_sql_query("SELECT DISTINCT p.pfs_userid, u.user_name, u.user_id, COUNT(*) FROM $db_users AS u, $db_pfs AS p WHERE p.pfs_userid=u.user_id GROUP BY p.pfs_userid ORDER BY u.user_name ASC");

while ($row = sed_sql_fetcharray($sql))
	{
	$disp_list .= "<tr>";
	$disp_list .= "<td>[<a href=\"pfs.php?userid=".$row['user_id']."\">e</a>]</td>";
	$disp_list .= "<td>".sed_build_user($row['user_id'], $row['user_name'])."</td>";
 	$disp_list .= "<td>".$row['COUNT(*)']."</td>";
	$disp_list .= "</tr>";
	}

$adminmain .= "<table class=\"cells\">";
$adminmain .= "<tr><td class=\"coltop\">".$L['Edit']."</td><td class=\"coltop\">".$L['User']."</td>";
$adminmain .= "<td class=\"coltop\">".$L['Files']."</td></tr>".$disp_list."</table>";

?>
