add to clan';
$id = $_GET['id'];
$nickname=getnickname($id);
$squads=getsquads();
echo'
';
}
elseif($_GET['action']=="adduser") {
echo'';
}
elseif($_GET['action']=="profile") {
echo'Edit profile
';
$id = $_GET['id'];
$ds = mysql_fetch_array(safe_query("SELECT * FROM ".PREFIX."user WHERE userID='$id'"));
echo'';
}
else {
$search = $_POST['search'];
$page = $_GET['page'];
$type = $_GET['type'];
$sort = $_GET['sort'];
if($search) $alle = safe_query("SELECT userID FROM ".PREFIX."user WHERE nickname LIKE '$search'");
else $alle = safe_query("SELECT userID FROM ".PREFIX."user");
$gesamt = mysql_num_rows($alle);
$pages=1;
if(!isset($page)) $page = 1;
if(!isset($sort)) $sort="nickname";
if(!isset($type)) $type = "DESC";
$max=$maxusers;
for ($n=$max; $n<=$gesamt; $n+=$max) {
if($gesamt>$n) $pages++;
}
if($pages>1) {
$page_link = makepagelink("admincenter.php?site=users&sort=$sort&type=$type&search=$search", $page, $pages);
$page_link = str_replace('images/', '../images/', $page_link);
}
if ($page == "1") {
if($search) $ergebnis = safe_query("SELECT * FROM ".PREFIX."user WHERE nickname LIKE '$search' ORDER BY $sort $type LIMIT 0,$max");
else $ergebnis = safe_query("SELECT * FROM ".PREFIX."user ORDER BY $sort $type LIMIT 0,$max");
if($type=="DESC") $n=$gesamt;
else $n=1;
}
else {
$start=$page*$max-$max;
if($search) $ergebnis = safe_query("SELECT * FROM ".PREFIX."user WHERE nickname LIKE '$search' ORDER BY $sort $type LIMIT $start,$max");
else $ergebnis = safe_query("SELECT * FROM ".PREFIX."user ORDER BY $sort $type LIMIT $start,$max");
if($type=="DESC") $n = ($gesamt)-$page*$max+$max;
else $n = ($gesamt+1)-$page*$max+$max;
}
echo'users
';
$anz=mysql_num_rows($ergebnis);
if($anz) {
if($type=="ASC")
$sorter='Sort: ';
else
$sorter='Sort: ';
echo'';
echo'
Add user';
}
else echo'no users found';
}
?>