File size: 4.08Kb
<?php
session_start();
if(!isset($_SESSION["user"]))
{
header("location: index.html");
}
?>
<html>
<title>Showing Locked User</title>
<body>
<?php
include("setup.php");
$tk= $_GET['token'];
$uu= $_GET['uu'];
$token= md5("pass");
if($token == $tk & $uu == $user){
$nickid=$_REQUEST["nick"];
$ipid=$_REQUEST["ip"];
$bid=$_REQUEST["b"];
require '../pteam.php';
if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };
$rowpage=10; // Number of files show in per pages
$start_from = ($page-1) * $rowpage;
$sql = "SELECT * FROM chat_users ORDER BY id DESC limit $start_from,$rowpage";
$page2=$page+1;
$start_from2 = ($page2-1) * $rowpage;
$sql2 = "SELECT * FROM chat_users ORDER BY id DESC limit $start_from2,$rowpage";
$sql3 = "SELECT * FROM chat_users ORDER BY id DESC";
//count rows start
$resultcountrow = mysql_query($sql2) or die(mysql_error());
$num_rows = mysql_num_rows($resultcountrow);
//count row end
$result = mysql_query($sql) or die(mysql_error());
$result2 = mysql_query($sql3) or die(mysql_error());
if (mysql_num_rows($result) == 0)
{
echo"<table border='1'>";
echo"<th>ID</th>";
echo"<th>Nick</th>";
echo"<th>IP</th>";
echo"<th>Room</th>";
echo"<th>Browser</th>";
echo "<tr><td>No rows found,nothing to print.</td></td>";
echo"</td></tr>";
echo"</table>";
echo"<br/><br/>";
echo"<< <a href='adminpanel.php?uu=$uu&token=$token'>Back To AdminPanel</a>";
echo"<br/><br/>";
echo"<a href='logout.php'><b>LogOut</b></a>";
}
else
{
//File List start
echo"<b><u>Showing Current Blocked User Detailes</u><b><br/>";
$num_rows = mysql_num_rows($result2);
echo "$num_rows User Loging";
echo"<table border='1'>";
echo"<th>Block</th>";
echo"<th>ID</th>";
echo"<th>Nick</th>";
echo"<th>IP</th>";
echo"<th>Room</th>";
echo"<th>Browser</th>";
while ($row = mysql_fetch_assoc($result)) {
echo"<tr>";
echo"<td>";
echo"(<a href=add2.php?uu=$uu&token=$token&nick={$row['nick']}&ip={$row['ip']}>Block</a>)";
echo"</td><td>";
echo"{$row['id']}";
echo"</td><td>";
echo"<a href=add2.php?uu=$uu&token=$token&nick={$row['nick']} >{$row['nick']}</a>";
echo"</td><td>";
echo"<a href=add2.php?uu=$uu&token=$token&nick=&ip={$row['ip']} >{$row['ip']}</a>";
echo"</td><td>";
echo"<a href=chat.php?uu=$uu&token=$token&c={$row['room']}>{$row['room']}</a>";
echo"</td><td>";
echo"{$row['br']}";
echo"</td></tr>";
//File List end
};
if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };
$pgnext = ($page+1);
$pgprevious = ($page-1);
// paging system
echo"<br/>";
echo"<table>";
echo"<tr>";
echo"<td>";
if($page!="1")
{
echo " <a href='showloginuser.php?uu=$uu&token=$token&page=".$pgprevious."'>< Prev</a> ";
echo "| <a href='showloginuser.php?uu=$uu&token=$token&page=".$pgprevious."'>".$pgprevious."</a> |";
}
echo"</td><td>";
echo"| $page |";
echo"</td><td>";
if (mysql_num_rows($resultcountrow) != 0)
{
echo "| <a href='showloginuser.php?uu=$uu&token=$token&page=".$pgnext."'>".$pgnext."</a> |";
echo " <a href='showloginuser.php?uu=$uu&token=$token&page=".$pgnext."'>Next ></a> ";
}
echo"</td></tr>";
echo"</table>";
$sql = "SELECT * FROM chat_settings ORDER BY id DESC ";
$result = mysql_query($sql) or die(mysql_error());
/////END GETTING ROOMNAME FROM MYSQL/////
echo"Show User By Room:<br/>";
while ($row = mysql_fetch_assoc($result)) {
echo"-) <a href='showloginuserbyroomname.php?uu=$uu&token=$token&c={$row['room']}'>{$row['room']}</a><br/>";
}
// paging system end
echo"<br/>";
echo"<< <a href=showblockid.php?uu=$uu&token=$token>Show Blocked Nick</a>";
echo"<br/>";
echo"<br/>";
echo"<< <a href='adminpanel.php?uu=$uu&token=$token'>Back To AdminPanel</a>";
echo"<br/><br/>";
echo"<a href='logout.php'><b>LogOut</b></a>";
}
}
?>
</body>
</html>