Просмотр файла gta/gb/del.php

Размер файла: 734B
  1. <?php
  2. require 'incs/ini.php';
  3. require 'incs/header.php';
  4. include 'fig/head.php';
  5. echo '<div class="hu2">';
  6. if(isset($_SESSION['sgb_admp']) && isset($_GET['clear'])){
  7. $f=fopen('incs/book.dat','w');
  8. fclose($f);
  9. echo '<br /><b><center>Гocтeвaя oчищeнa.</center></b>' ;
  10. }elseif(isset($_SESSION['sgb_admp']) && isset($_GET['n'])){
  11. $n=intval($_GET['n']);
  12. $arr=file('incs/book.dat');
  13. unset($arr[$n]);
  14. $f=fopen('incs/book.dat','w');
  15. $d=implode('',$arr);
  16. fputs($f,$d);
  17. fclose($f);
  18. echo '<br /><strong><center>Cooбщeниe удaлeнo.</center></strong>';
  19. }else echo('Дocтуп зaпpeщён.');
  20. echo '<br />&larr; <a href="index.php'.psid().'">Вернуться</a><hr />';
  21. include 'fig/nizz.php';
  22. ?>