#"); } else { print("#"); } for($i=1;$i<=26;$i++) { print(" | "); if($pattern==chr(96+$i)) { print("".chr(96+$i).""); } else { print("".chr(96+$i).""); } } print(" ]
\n"); } function goodfleche($wanted,$current) { if($wanted==$current) { $fleche="fleche1a"; } else { $fleche="fleche1b"; } return $fleche; } $users_per_page=$user["userlistusers"]; if (!$order) $order="name"; $pattern=$_REQUEST['pattern']; if(($order=="name")&&(!$pattern)) { $pattern=chr(mt_rand(96,122)); if($pattern==chr(96)) { $pattern="#"; } } if(($order=="name")&&($pattern=="#")) { $sqlwhere="(nickname LIKE '0%')||(nickname LIKE '1%')||(nickname LIKE '2%')||(nickname LIKE '3%')||(nickname LIKE '4%')||(nickname LIKE '5%')||(nickname LIKE '6%')||(nickname LIKE '7%')||(nickname LIKE '8%')||(nickname LIKE '9%')"; } else { $sqlwhere="nickname LIKE '".$pattern."%'"; } switch($order) { case "name": $query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; break; case "age": $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY quand"; if(($page<=0)||(!$page)) { $page=1; } $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $cquery="SELECT count(0) FROM users ORDER BY quand"; break; case "glops": $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY glops DESC"; if(($page<=0)||(!$page)) { $page=1; } $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $cquery="SELECT count(0) FROM users ORDER BY glops DESC"; break; case "level": $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY level ASC, quand"; if(($page<=0)||(!$page)) { $page=1; } $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $cquery="SELECT count(0) FROM users ORDER BY quand"; break; default: $query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; break; } $result = mysql_query($query); while($tmp = mysql_fetch_array($result)) { $users[]=$tmp; } $result=mysql_query($cquery); $nbusers=mysql_result($result,0); $sortlink="userlist.php?page=".$page."&order="; $result=mysql_query("SELECT MAX(glops) FROM users"); $maxglops=mysql_result($result,0); /* // best glopper for($i=0;$i$maxglops) { $maxglops=$users[$i]['glops']; } }*/ /* for($i=0;$i$maxprods) { $maxprods=$users[$i]["prods"]; } $result=mysql_query("SELECT count(0) FROM groups WHERE added=".$users[$i]["id"]); $users[$i]["groups"]=mysql_result($result,0); if($users[$i]["groups"]>$maxgroups) { $maxgroups=$users[$i]["groups"]; } $result=mysql_query("SELECT count(0) FROM parties WHERE added=".$users[$i]["id"]); $users[$i]["party"]=mysql_result($result,0); if($users[$i]["party"]>$maxparty) { $maxparty=$users[$i]["party"]; } $result=mysql_query("SELECT count(0) FROM comments WHERE who=".$users[$i]["id"]); $users[$i]["comments"]=mysql_result($result,0); if($users[$i]["comments"]>$maxcomments) { $maxcomments=$users[$i]["comments"]; } $users[$i]["total"]=4*$users[$i]["prods"]+3*$users[$i]["groups"]+2*$users[$i]["party"]+1*$users[$i]["comments"]; if($users[$i]["total"]>$maxtotal) { $maxtotal=$users[$i]["total"]; } } if(!$maxprods)$maxprods=1; if(!$maxgroups)$maxgroups=1; if(!$maxparty)$maxparty=1; if(!$maxcomments)$maxcomments=1; if(!$maxtotal)$maxtotal=1; */ if(!$maxglops)$maxglops=1; ?>
"); } else { print(""); } $myyear=substr($users[$i]["quand"],0,4); $mymonth=substr($users[$i]["quand"],5,2); $myday=substr($users[$i]["quand"],8,2); $myhour=substr($users[$i]["quand"],11,2); $myminute=substr($users[$i]["quand"],14,2); $mysecond=substr($users[$i]["quand"],17,2); $age=time()-mktime($myhour,$myminute,$mysecond,$mymonth,$myday,$myyear); $nbdays=floor($age/(60*60*24)); // $nbtotal[$users[$i]["id"]]=$nbprods[$users[$i]["id"]]+$nbgroups[$users[$i]["id"]]+$nbnews[$users[$i]["id"]]+$nbcomments[$users[$i]["id"]]; ?>
.gif" width="13" height="12" border="0">
nickname
.gif" width="13" height="12" border="0">
age
.gif" width="13" height="12" border="0">
level
.gif" width="13" height="12" border="0">
glöps
prods added
groups added
party added
comments added
total
"> " width="16" height="16" border="0">

">
=2): ?>

  previous page

 
next page