<?php
// +----------------------------------------------------------------------+
// | Fantastic File Database |
// +----------------------------------------------------------------------+
// | By Tony Baird |
// | Copyright (c) 2003 Fantastic Scripts |
// | http://fscripts.com |
// +----------------------------------------------------------------------+
// | Fantastic File Database Can be modified freely as long as copyright |
// | is intact and this is left at the top of every source file |
// +----------------------------------------------------------------------+
// | memberlist.php |
// | Date Started: March 9, 2003 |
// | Last Modified: March 10, 2003 |
// +----------------------------------------------------------------------+
Class MemberList {
//*************************************************/
// Just seing what we are doing
//*************************************************/
function MemberList() {
global $tpl,$mysql,$online,$ffdb;
if ($_REQUEST['action']=="memberlist") {
$this->ShowMembers();
}
}
//*************************************************/
// Users Profile we always want to see these don't
// we? Of course so!
//*************************************************/
function ShowMembers() {
global $tpl,$mysql,$online,$ffdb,$online,$CONFIG;
if ($_REQUEST['page']) {
$page=$_REQUEST['page'];
} else {
$page=1;
}
if ($_REQUEST['orderby']) {
$orderby=$_REQUEST['orderby'];
} else {
$_REQUEST['orderby']="date_joined";
}
$tpl->LoadTemplate("memberlist","templates/$online->skin/memberlist.tpl");
$ffdb->DivideData("SELECT * FROM ffdb_users",$page,$CONFIG[members_per_page]);
$ffdb->MakePages("<a href=\"filedb.php?page={eachpage}&action=memberlist&orderby=$orderby\">{eachpage}</a> ","<b>({page})</b> ","<a href=\"filedb.php?page=1&action=memberlist&orderby=$orderby\">« First Page</a> ","<a href=\"filedb.php?page={eachpage}&action=memberlist&orderby=$orderby\">Last Page »</a>",$page,$ffdb->num_pages);
if ($orderby=="date_joined") {
$orderby_query="ORDER BY date_joined ASC";
}
$mysql->Query("SELECT * FROM ffdb_users WHERE user_id!=".$CONFIG['guest_id']." AND username !='Deleted User' $orderby_query LIMIT $ffdb->data_bottom,$ffdb->data_top");
while ($show_user=mysql_fetch_array($mysql->result_id)) {
$date_joined=date($CONFIG['memberlist_date_format'],$show_user[date_joined]);
$memberlist_array = array(
'username'=>$show_user[username],
'date_joined'=>$date_joined,
'num_comments'=>$show_user[num_comments],
'num_ratings'=>$show_user[num_ratings],
'num_downloads'=>$show_user[num_downloads],
'user_title'=>$show_user[user_title],
'site_name'=>$show_user[site_name],
'site_url'=>$show_user[site_url],
'interests'=>$show_user[interests],
'location'=>$show_user[location],
'icq'=>$show_user[icq],
'aim'=>$show_user[aim],
'msn'=>$show_user[msn],
'user_id'=>$show_user[user_id]
);
$tpl->ParseTemplate("memberlist",$memberlist_array,"Yes");
}
$tpl->LoadTemplate("memberlist_top","templates/$online->skin/memberlist_top.tpl");
$tpl->ParseTemplate("memberlist_top",$memberlist_top_array,"No");
$tpl->LoadTemplate("memberlist_bottom","templates/$online->skin/memberlist_bottom.tpl");
$memberlist_bottom_array = array(
'pagelist'=>$ffdb->pages
);
$tpl->ParseTemplate("memberlist_bottom",$memberlist_bottom_array,"No");
$tpl->PrintTemplate("memberlist_top");
$tpl->PrintTemplate("memberlist");
$tpl->PrintTemplate("memberlist_bottom");
}
}
?>