Battlefield Players.com - Player Search
" .$hash;
if ($_REQUEST['searching'] =="yes")
{
echo "You searched for: " .$guid , " in " .$field ,"'s";
echo "";
echo "
Results
";
if ($_REQUEST['guid'] == "")
{
echo "
You forgot to enter a search term";
exit;
}
echo "
";
$rpp = 25;
if(!$page || $page == 1){
$start = 0;
}else{
$offset = $page-1;
$start = ($offset * $rpp);
}
Print "
";
Print "";
Print "| Alias: | ";
Print "CD Hash: | ";
Print "First Seen: | ";
Print "Last Seen: |
";
{
echo $row['val'] . '
';
}
$db = mysql_connect('localhost', 'bfplayers', '66948940') or die(mysql_error());
mysql_select_db('bfplayers', $db);
$res = mysql_query("
SELECT DISTINCT a.alias_string,
MIN(s.time_first) AS time_first,
MAX(IF(s.time_last IS NULL, sv.last_update, s.time_last)) AS time_last
FROM aliases AS a, guids AS g, sessions AS s, servers AS sv
WHERE s.alias_key=a.alias_key
AND s.guid_key=g.guid_key
AND s.server_key=sv.server_key
AND g.guid_string LIKE '%${_REQUEST['guid']}%'
GROUP BY alias_string
ORDER BY alias_string ASC LIMIT $start, 25", $db) or die(mysql_error());
while ($row = mysql_fetch_assoc($res)) {
// print "${row['alias_string']} was first seen at: ${row['time_first']} and last seen at: ${row['time_last']}
\n";
{
Print "";
Print "| ${row['alias_string']} | ";
Print "${row['guid_string']} | ";
Print "${row['time_first']} | ";
Print "${row['time_last']} |
";}
}
Print "
";
if($page > 1){
$prevpage = $page - 1;
}
$currentend = $start + 25;
if($page > 1){
$prevpage = $page - 1;
}
$currentend = $start + 25;
if(mysql_num_rows($res)>$currentend)
{
if(!$page){
$nextpage = 2;
}else{
$nextpage = $page + 1;
}
}
if ($prevpage || $nextpage) {
if($prevpage){
echo ("Previous
Page");
}else{
echo ("");
}
if($nextpage){
echo ("Next
Page");
}else{
echo ("");
}
}
$anymatches=mysql_num_rows($res);
if ($anymatches == 0)
{
echo "Sorry, but we can not find a CD-hash to match your search term
";
}
else
echo "Total number of matching records: " .$anymatches , "";
echo "
Start page: " .$start;
echo "
Current page: " .$page;
echo "
next page: " .$nextpage;
echo "
End page: " .$currentend;
mysql_close($db);
}
?>