View Single Post
  #14  
Old 04-20-2012, 10:36 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 95,214
AlexC is an unknown quantity at this point
Default

Okay, it's like 12:30 here and I think I found the query but I have no idea if I did - where do I put this? :c

Code:
	// We did not specify a user, so show the memberlist
	$article_title = "Memberlist";
	$article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("css/pagination.css");
	$query = "SELECT * FROM ".constant("PREFIX")."users ORDER BY uid ASC";
	$stmt = $adopts->query($query);
	$rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.".constant("DOMAIN").constant("SCRIPTPATH")."/profile.php");
    $pagination->setPage($_GET[page]);

	$stmt = $adopts->select("users", array(), "1 ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}");	
	while ($row = $stmt->fetchObject()){
		$status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":"";
		$article_content .= "<strong><a href='http://www.ratties.x10.mx/forum/member.php?action=profile&uid='{$row->uid}'>{$star}{$row->username}</a></strong><br />";
	}

	$article_content .= "<br />{$pagination->showPage()}</div>";

}
here is the member list part of the code.
__________________
Reply With Quote