0)) exit; mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='".$data['login']."'"); ?> Mafiaplace - Mihran Search 0) ? $_GET['b']*10 : 0; $dbres = mysql_query("SELECT `login`,`IP`,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[logs]` WHERE `area`='hqIP' ORDER BY `code`"); while($member = mysql_fetch_object($dbres)) $IPs[$member->IP] .= ",{$member->login}:{$member->time},"; foreach($IPs as $IP => $logins) { if(! preg_match('/,,/',$logins)) unset($IPs[$IP]); } $total = count($IPs); $x = 0; print " \n"; print " \n"; print " \n"; else { if($begin/10 == 0) print "<< "; else print "<< "; for($i=0; $i<$total/10; $i++) { print "". ($i+1) ." "; } if($begin+10 >= $total) print ">>"; else print ">>"; } } else if($_GET['p'] == "search") { if(isset($_GET['x']) && $_GET['t'] == "users") { $begin = ($_GET['b'] >= 0) ? $_GET['b']*30 : 0; $field = "IP"; if($_GET['f'] == "login") $field = "login"; $x = preg_replace('/\*/','%',$_GET['x']); $x = preg_replace('/_/','\_',$x); $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `$field` LIKE '$x'"); $total = mysql_num_rows($dbres); $x = preg_replace('/%/','*',$x); print "Aantal resultaten: $total
\n"; print << ENDHTML; $x = preg_replace('/\*/','%',$x); if($_GET['s'] == "login") $dbres = mysql_query("SELECT `login`,`IP`,`email` FROM `[users]` WHERE `$field` LIKE '$x' ORDER BY `login` LIMIT $begin,30"); else if($_GET['s'] == "ip") $dbres = mysql_query("SELECT `login`,`IP`,`email` FROM `[users]` WHERE `$field` LIKE '$x' ORDER BY `ip` LIMIT $begin,30"); else $dbres = mysql_query("SELECT `login`,`IP`,`email` FROM `[users]` WHERE `$field` LIKE '$x' ORDER BY `$field` LIMIT $begin,30"); for($j=$begin+1; $member = mysql_fetch_object($dbres); $j++) { print << ENDHTML; } $dbres = mysql_query("SELECT `id` FROM `[users]` WHERE `$field` LIKE '$x' ORDER BY `$field`"); print "
Multi-Accounts
\n"; foreach($IPs as $IP => $logins) { if($x >= $begin && $x < $begin+10) { foreach(split(',,',$logins) as $login) { $login = preg_replace('/(^,|,$)/','',$login); list($login,$online) = split(':',$login); print << ENDHTML; } print " \n\n"; } $x++; } print "
[R] [D] [P] [I] $login $IP $online

"; if($total <= 10) print "< 1 >
Login IP
$j [R] [D] [P] [I] {$member->login} {$member->IP}
\n\n\n
"; if(mysql_num_rows($dbres) <= 30) print "< 1 >
\n"; else { $x = preg_replace('/%/','*',$x); if($begin/30 == 0) print "<< "; else print "<< "; for($i=0; $i". ($i+1) ." "; } if($begin+30 >= mysql_num_rows($dbres)) print ">> "; else print ">>"; } } else if(isset($_GET['x']) && $_GET['t'] == "hqLogs") { $begin = ($_GET['b'] >= 0) ? $_GET['b']*30 : 0; $x = preg_replace('/\*/','%',$_GET['x']); $x = preg_replace('/_/','\_',$x); if($_GET['s'] == "ip") $sort = "ORDER BY `IP`"; else if($_GET['s'] == "fIP") $sort = "ORDER BY `forwardedFor`"; else if($_GET['s'] == "online") $sort = "ORDER BY `online`"; else $sort = "ORDER BY `login`"; if($_GET['f'] == "bothIP") $dbres = mysql_query("SELECT `login`,`IP`,`forwardedFor`,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[logs]` WHERE (`IP` LIKE '$x' OR `forwardedFor` LIKE '$x') AND `area`='hqIP' $sort LIMIT $begin,30"); else if($_GET['f'] == "ip") $dbres = mysql_query("SELECT `login`,`IP`,`forwardedFor`,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[logs]` WHERE `IP` LIKE '$x' AND `area`='hqIP' $sort LIMIT $begin,30"); else if($_GET['f'] == "fIP") $dbres = mysql_query("SELECT `login`,`IP`,`forwardedFor`,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[logs]` WHERE `forwardedFor` LIKE '$x' AND `area`='hqIP' $sort LIMIT $begin,30"); else $dbres = mysql_query("SELECT `login`,`IP`,`forwardedFor`,DATE_FORMAT(`time`,'%d-%m-%Y %H:%i') AS `time` FROM `[logs]` WHERE `login` LIKE '$x' AND `area`='hqIP' $sort LIMIT $begin,30"); $total = mysql_num_rows($dbres); $x = preg_replace('/%/','*',$x); print "Aantal resultaten: $total
\n"; print << Login IP Forwarded Online: ENDHTML; for($j=$begin+1; $member = mysql_fetch_object($dbres); $j++) { print <<$j [R] [D] [P] [I] {$member->login} {$member->IP} {$member->forwardedFor} {$member->time} ENDHTML; } print "\n\n\n
"; if($total <= 30) print "< 1 >
\n"; else { $x = preg_replace('/%/','*',$x); if($begin/30 == 0) print "<< "; else print "<< "; for($i=0; $i<$total/30; $i++) { print "". ($i+1) ." "; } if($begin+30 >= mysql_num_rows($dbres)) print ">> "; else print ">>"; } } else { print <<Zoek - Users
Zoek op: login
IP

Gebruik * als wildcard

Zoek - HeadQuarter Logs
Zoek op: login
IP
X-Forwarded-For
IP & X-Forwarded-For

Gebruik * als wildcard

ENDHTML; } } ?>