<body>
<?
$login = stripslashes($_COOKIE['logSiteMU']);
if (empty($login)) { 
?>
<p>&nbsp;</p>
<p align="center"><b><font color="#FF0000" face="Verdana" size="2">
Você não está conectado no site.</font></b></p>
<?} else {
?>
<div align="center">
  <center>
  <font color="#663300" face="Verdana" size="2">
Relação de contas com o mesmo IP</font>
<STYLE type=text/css>
A:link { text-decoration: none}
A:visited { text-decoration: none}
A:hover {color: #000099; text-decoration: none}
</style>
<script>
function MuGoias(theURL,winName,features) {
  	window.open(theURL,winName,'toolbar=0,location=0,status=0,menubar=0,scrollbars=no,resizable=0,width=550,height=230');
}
</script>
<?
include("config.php");
$login = stripslashes($_GET['ip']);
$sql_char_check = mssql_query("SELECT memb___id, IP, ConnectStat, ConnectTM, DisConnectTM FROM MEMB_STAT WHERE IP = '$login' ORDER BY memb___id"); 
$char_check = mssql_num_rows($sql_char_check); 

if ($char_check <= 0) { 
?>
<p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
<p align="center"><b><font color="#663300" face="Verdana" size="2">
IP não encontrado.</font></b></p>
<?} else {
?>
         <table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#996600" width="100%" id="AutoNumber3">
            <tr>
              <td width="4%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Nº</font></td>
              <td width="15%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Login</font></td>
              <td width="4%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">sts</font></td>
              <td width="19%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Início da conecção</font></td>
              <td width="21%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Final da conecção</font></td>
              <td width="16%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">IP</font></td>
              <td width="9%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Opção1</font></td>
              <td width="12%" align="center" bgcolor="#996600">
              <font face="Verdana" size="2" color="#FFFFFF">Opção2</font></td>
            </tr>
<?
for ($i=0;$i<$char_check; ++$i) {
$row = mssql_fetch_row($sql_char_check);

$query1 = "select bloc_code from MEMB_INFO WHERE memb___id='$row[0]'";
$result1 = mssql_query( $query1 );
$row1 = mssql_fetch_row($result1);
?>
  
            <tr>
              <td width="4%" align="center"><font face="Verdana" size="2"><?=$i+1?></font></td>
              <td width="15%" align="center"><b><a href="javascript:MuGoias('desc.php?char=<?=$row[0]?>&status=<?=$row1[0]?>')">
              <font color="#000000" face="Verdana" size="2"><?=$row[0]?></font></b></a></td>
              <td width="4%" align="center"><b><font face="Verdana" size="2"><?=$row[2]?></font></b></td>
              <td width="19%" align="center">
              <font face="Verdana" size="1" color="#808080"><?=$row[3]?></font></td>
              <td width="21%" align="center">
              <font face="Verdana" size="1" color="#808080"><?=$row[4]?></font></td>
              <td width="16%" align="center"><font face="Verdana" size="2">
              <?=$row[1]?></font></td>
              <td width="9%" align="center"><a href="bloc.php?bloc=0&IP=<?=$row[1]?>&char=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000">Desb.</a></font></td>
              <td width="12%" align="center"><a href="bloc.php?bloc=1&IP=<?=$row[1]?>&char=<?=$row[0]?>"><font face="Verdana" size="2" color="#000000"><b><?=$row1[0]?></b> 
              - Block</a></font></td>
            </tr>
<?}?></table>
<?}
}?>