I've haven't tried it, but I'm assuming this can be done by storing the user's choice somewhere and changing the sort order based on that. So in myadopts.php, there's this line:
PHP Code:
$stmt = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY totalclicks LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
Maybe make a column in phpMyAdmin called sort and put the stmt line in an if statement; sort of like this:
PHP Code:
$sort = $mysidia->db->select("users", array("sort"), "username = '{$mysidia->user->username}'");
if($sort = 'clicks'){
$stmt = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY totalclicks LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
}
elseif($sort = 'level'){
$stmt = $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' ORDER BY level LIMIT {$pagination->getLimit()},{$pagination->getRowsperPage()}");
}
//etc...
(This is just psuedo-code, so I doubt it would work as-is)