Location: PHPKode > projects > Admin Control Panel 2 > mul/mulsearchip.php
<?php
session_start();
if ($_SESSION['login'] != "1")
{
header('Location: mulogin.php');
exit();
}
?>
<html>
<head>
<title>ACP 2 SE - Multi Tool</title>
	<style type="text/css">
        @import 'layout.css';
    </style>
    <link href="main.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor='#000000' text="#FFFFFF">
<?
include("../lib/config.inc.php");
mysql_connect("$sqlhost", "$sqluser", "$sqlpassword")or die("cannot connect");
mysql_select_db("$sqldb")or die("cannot select DB");

if ($_POST['submit'] && $_POST['name']) 
{ 
	$ip = $_POST['name'];
	 echo "<center>";
     echo "<form method=\"POST\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; 
     echo "<h1>Search User by IP</h1>";
	 
     echo "<label class=\"addmsg\">IP:</label>"; 
     echo "<input type=\"text\" name=\"name\" value=\"" . $_POST['name'] . "\"><br><br>"; 
     echo "<input type=\"submit\" name=\"submit\" value=\"Search\"></p>"; 
     echo "</form>";
	echo "Gezocht naar: ".$ip ;
	$sql = "SELECT * FROM bb".$n."_users WHERE reg_ipaddress = '$ip'";  
    $res = mysql_query($sql); 

    if ($res) {
		echo "<table border='1' cellpadding='2' cellspacing='2' width='800'>
		<tr bgcolor='#C0C0C0'>
		<th width='100'>Name:</th>	
		<th width='100'>Mail:</th>
		<th width='150'>Postcount:</th>	
		<th width='350'>IP:</th>
		<th width='350'>pass md5:</th>
		</tr>";
		while($row = mysql_fetch_array($res))
		  {
		  echo "<tr>";
		  echo "<td height='15'>" . $row['username'] . "</td>"; 
		  echo "<td height='15'>" . $row['email'] . "</td>";
		  echo "<td height='15'>" . $row['userposts'] . "</td>";	
	      echo "<td height='15'><a href=\"multi2.php?ip=" . $row['reg_ipaddress'] . "\">" . $row['reg_ipaddress'] . "</a></td>";
	      echo "<td height='15'><a href=\"multi3.php?md5=" . $row['password'] . "\">" . $row['password'] . "</a></td>";
		  echo "</tr>";
		  }
		echo "<tr><td bgcolor='#c0c0c0'colspan='5'>&nbsp;</td></tr></table></center>";
	}
    else
	{
    	echo "<p>Couldn't find a user with that IP. Try Again.</p>"; 
	}
		echo "</center>";
} 
else 
{ 
     if ($_POST['submit']) 
         echo "<p>There's one field you need to fill in. And even that you haven't done.</p>"; 
     
     echo "<center>";
     echo "<form method=\"POST\" action=\"" . $_SERVER['PHP_SELF'] . "\">"; 
     echo "<h1>Search User by IP</h1>";
	 
     echo "<label class=\"addmsg\">IP:</label>"; 
     echo "<input type=\"text\" name=\"name\" value=\"" . $_POST['name'] . "\"><br><br>"; 
     echo "<input type=\"submit\" name=\"submit\" value=\"Search\"></p>"; 
     echo "</form>";
     echo "</center>";
     
} 
?>
<?php
include("../lib/config.inc.php");
mysql_connect("$sqlhost", "$sqluser", "$sqlpassword")or die("cannot connect");
mysql_select_db("$sqldb")or die("cannot select DB");
$sql = 'SELECT * FROM `acp2se` LIMIT 0, 30'; 
$result=mysql_query($sql);

if($result){
	while($row = mysql_fetch_array($result))
	  {
	  echo "</p>";
	  echo "<center>" . $row['Version'] . "</center>"; 
	  echo "<center>" . $row['Copy'] . "</center>";
	  }

	echo "<tr><td bgcolor='#c0c0c0'colspan='5'>&nbsp;</td></tr></table></center>";

}
else {
	echo "</p><b>Instal first the ACP 2 SE information!</br>&copy; 2007 The Chaser - Kinger7</b>";
}
mysql_close();
?>
</body>
</html>
Return current item: Admin Control Panel 2