View Single Post
  #15  
Old 04-20-2012, 10:39 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 117,678
SilverDragonTears is on a distinguished road
Default

I was looking at the wrong page. What you have now should work. Try this

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>";

}
__________________

Check out SilvaTales
Reply With Quote