Subversion Repositories personal-webbase

Rev

Rev 4 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
<?php
2
 
3 daniel-mar 3
if (!defined('IBLEGAL')) die('Kann nicht ohne Personal WebBase ausgef&uuml;hrt werden.');
2 daniel-mar 4
 
5
  if ($aktion == 'delete')
6
  {
7
    $res = db_query("SELECT `table`, `modul` FROM `".$mysql_zugangsdaten['praefix']."module` WHERE `id` = '".db_escape($id)."'");
8
    $row = db_fetch($res);
9
 
8 daniel-mar 10
    if (is_dir('modules/'.wb_dir_escape($row['modul'])))
2 daniel-mar 11
    {
12
      db_query("TRUNCATE TABLE `".$mysql_zugangsdaten['praefix'].$row['table']."`");
13
    }
14
    else
15
    {
16
      db_query("DROP TABLE `".$mysql_zugangsdaten['praefix'].$row['table']."`");
17
    }
18
 
8 daniel-mar 19
    if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul));
2 daniel-mar 20
  }
21
 
3 daniel-mar 22
?>