<?php

include("../includes/site_config.php");
include('../session_handler.inc');

$area = 'member';
if(isset($_REQUEST['bl_id'])){
$bl_id=form_get('bl_id');
mysql_query("DELETE from blacklist where MD5(black_id)='$bl_id'") or die(mysql_error());
}
?>
<?php include("include/header.php"); ?>
<style type="text/css">
<!--
.style1 {color: #FF0000;
	font-weight: bold;
}
-->
</style>

<div class="mainwidth">
<div class="admin-page-header"><div class="admin-page-heading">&nbsp;&nbsp;<?=BLACK_ADMIN?></div></div>
<div class="clear"></div>
<div class="admin-page">
<table width="100%" align="<?php print("$CONST_TABLE_ALIGN"); ?>" border="0" cellspacing="<?php print("$CONST_TABLE_CELLSPACING"); ?>" cellpadding="<?php print("$CONST_TABLE_CELLPADDING"); ?>"><!--DWLayoutTable-->

  <tr>
    <td width="10" height="3"><td>
      <?php
	  
        $query = "  SELECT *
                    FROM blacklist 
                 ";
$result=mysql_query($query, $link) or die(mysql_error());
$num = mysql_num_rows($result);
?>
<table width=100%>
    <!--<tr align=left>
      <td align=center colspan=3><?=$num?> <?php echo GENERAL_FOUND_USERS ?></td>
    </tr>-->
    <tr align=left>
      <th><?php echo BLACK_TITLE ?></td><th><?php echo "Date"; ?></td><td>&nbsp;</td>
	</tr>
<?
while ($row = mysql_fetch_object($result)){?>
    <tr>
    <td width="50%"><?=$row->blacklist_ip?></td><td width=50%><?=date("$CONST_FORMAT_DATE_SHORT",strtotime($row->black_date))?></td>	<td><? if($DEMO==false){?><a href="<?=$_SERVER['PHP_SELF']?>?bl_id=<?=md5($row->black_id)?>" onClick="javascript:return confirm('Are you sure you want to Unblock this IP?')">delete</a><? }?></td>      </tr>
<? } ?>
   <!-- <tr align=left>
      <td align=center colspan=3><?=$num?> <?php echo GENERAL_FOUND_USERS ?></td>
    </tr>-->
  </table>
    <td colspan="2"></td>
  </tr>
  <tr>
    <td height="57" colspan="2" valign="top"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><span class="style1">Note:</span> This Blacklist is a result of taking a username from the main admin area and clicking the button &quot;Blacklist&quot;. That will remove that users account and profile and it will also take their IP Address and add it to the above Blacklist. They will not be allowed to Register or Login to the site if their IP Address is on the above Blacklist. If you have Blacklisted someone and want to allow them to use the site again,  then delete their IP Address from above and they will be allowed to Register and Login to the site. For more information, see the Admin Guide.</p></td>
    <td width="4">&nbsp;</td>
  </tr>
  <tr>
    <td height="1"></td>
    <td width="100%"></td>
    <td></td>
  </tr>
</table>
</div><div class="admin-page-bottom"></div></div>
<?php include("include/footer.php"); ?>