<?php
  include("cap.php");

  $file=array();
  $file=file("conf/bl.txt");

$topic_count_page=50;
 if(!isset($_GET['page']) || !is_numeric(@$_GET['page']) || @$_GET['page']<1 )$page=1;
 else $page=$_GET['page'];
 if($page > ceil(count($file)/ $topic_count_page))$page=1;
 $start=$page * $topic_count_page-$topic_count_page;
 $pages=ceil(count($file)/ $topic_count_page);
 if(empty($_GET['ind']) || !is_numeric(@$_GET['ind']) || @$_GET['ind']>ceil($pages/$topic_count_page)  || @$_GET['ind']<1)$index=1;
 else $index= $_GET['ind'];
?>

 <TABLE class=tabcap >
 <tr ><td id=head>:: Чёрный список :: </td></tr >
 </table>
 <TABLE class=tab >
 
 <tr ><td >

 <?php
   if(!count($file))echo "Список пуст";
   else
     {
        echo"<table width=70% bgcolor=#ffffff  CELLPADDING=10 CELLSPACING=0>";
        for($x=$start,$y=0; $x<count($file); $x++,$y++)
            {
               if($y==$topic_count_page)break;
               $file[$x]=trim($file[$x]);
               $expl=explode("*",$file[$x]);
               echo"<tr><td id=bl>$expl[0]</td> <td id=bl>$expl[1]</td> <td id=bl>$expl[2]</td>  <td id=bl><a href=bl.php?id=$expl[2]>удалить</a></td></tr>";

            }
       echo"</table>";
     }

?>

</td></tr>
 </table/tr
