<?php /********<эту хрень надо вставить куданить>********/ $f = file('base.txt'); if (!$f[$_GET['del']]) { $body = "<table border=0>"; for ($i=0;$i<count($f);$i++) { $body .= "<tr> <td>$f[$i]</td> <td><a href=\"?del=$i\">Удалить этот баннер</a></td> </tr>"; } $body .= "</table>"; }else{ $f[$_GET['del']] = null; $towrite = implode($f); $open=fopen("base.txt","w"); fwrite($open,$towrite); fclose($open); header("Location: $_SERVER[HTTP_REFERER]"); } echo $body; /********</эту хрень надо вставить куданить>********/ ?>
<?php /********<эту хрень надо вставить куданить>********/ $f = file('base.txt'); if (!$f[$_GET['del']]) { $body = "<table border=0>"; for ($i=0;$i<count($f);$i++) { $body .= "<tr> <td>$f[$i]</td> <td><a href=\"?del=$i\">Удалить этот баннер</a></td> </tr>"; } $body .= "</table>"; }else{ $del_img = explode('"',$_GET['del']); #1 строка unlink('img/' . $del_img[3]); #2 строка $f[$_GET['del']] = null; $towrite = implode($f); $open=fopen("base.txt","w"); fwrite($open,$towrite); fclose($open); header("Location: $_SERVER[HTTP_REFERER]"); } echo $body; /********</эту хрень надо вставить куданить>********/ ?>