Subversion Repositories personal-webbase

Rev

Rev 4 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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