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ührt werden.'); |
2 | daniel-mar | 4 | |
5 | if ($ib_user_type == 0) |
||
6 | { |
||
7 | die($header.'Keine Zugriffsberechtigung'.$footer); |
||
8 | } |
||
9 | else if ($ib_user_type == 1) |
||
10 | { |
||
11 | if ($ib_user_passwort != $pwd) |
||
12 | { |
||
8 | daniel-mar | 13 | die($header.'<h1>Verwaltung</h1>Das Passwort zur Verifizierung ist nicht korrekt.<br><br><a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a>'.$footer); |
2 | daniel-mar | 14 | } |
15 | else |
||
16 | { |
||
17 | if ($aktion == 'pwd_aendern') |
||
18 | { |
||
19 | if ($newpwd1 != $newpwd2) |
||
20 | { |
||
8 | daniel-mar | 21 | die($header.'<h1>Verwaltung</h1>Die 2 Passwörter stimmen nicht überein.<br><br><a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a>'.$footer); |
2 | daniel-mar | 22 | } |
23 | else |
||
24 | { |
||
25 | if ($newpwd1 == '') |
||
26 | { |
||
8 | daniel-mar | 27 | die($header.'<h1>Verwaltung</h1>Sie müssen ein Passwort eingeben.<br><br><a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a>'.$footer); |
2 | daniel-mar | 28 | } |
29 | else |
||
30 | { |
||
31 | db_query("UPDATE `".$mysql_zugangsdaten['praefix']."users` SET `passwort` = '".md5($newpwd1)."' WHERE `username` = '".db_escape($ib_user_username)."'"); |
||
32 | $_SESSION['ib_user_passwort'] = $newpwd1; |
||
8 | daniel-mar | 33 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'&fertig=1'); |
2 | daniel-mar | 34 | } |
35 | } |
||
36 | } |
||
37 | |||
38 | if ($aktion == 'acc_dele') |
||
39 | { |
||
40 | if ($konfiguration[$modul]['allow_user_selfdelete'] == 1) |
||
41 | { |
||
42 | if (strtoupper($sic) != 'OK') |
||
43 | { |
||
8 | daniel-mar | 44 | die($header.'<h1>Verwaltung</h1>Zum Löschen müssen Sie die Sicherheitsfrage beantworten.<br><br><a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a>'.$footer); |
2 | daniel-mar | 45 | } |
46 | else |
||
47 | { |
||
48 | /* foreach ($tabellen as $m1 => $m2) |
||
49 | { |
||
50 | db_query("DELETE FROM `".$mysql_zugangsdaten['praefix'].db_escape($m2)."` WHERE `user` = '".$benutzer['id']."'"); |
||
51 | if (db_affected_rows() > 0) |
||
52 | db_query("OPTIMIZE TABLE `".$mysql_zugangsdaten['praefix'].db_escape($m2)."`"); |
||
53 | } |
||
54 | |||
55 | unset($m1); |
||
56 | unset($m2); */ |
||
57 | |||
58 | db_query("DELETE FROM `".$mysql_zugangsdaten['praefix']."users` WHERE `username` = '".db_escape($ib_user_username)."'"); |
||
59 | if (db_affected_rows() > 0) |
||
60 | db_query("OPTIMIZE TABLE `".$mysql_zugangsdaten['praefix']."users`"); |
||
61 | |||
62 | @session_unset(); |
||
63 | @session_destroy(); |
||
64 | echo '<html><script type="text/javascript" language="JavaScript"> |
||
65 | <!-- |
||
66 | parent.location.href=\'index.php\'; |
||
67 | // --> |
||
68 | </script></html>'; |
||
69 | } |
||
70 | } |
||
71 | else |
||
72 | { |
||
8 | daniel-mar | 73 | die($header.'<h1>Verwaltung</h1>Der Administrator hat Selbstlöschungen deaktiviert.<br><br><a href="'.$_SERVER['PHP_SELF'].'?seite=inhalt&modul='.urlencode($modul).'">Zurück</a>'.$footer); |
2 | daniel-mar | 74 | } |
75 | } |
||
76 | } |
||
77 | } |
||
78 | else if ($ib_user_type == 2) |
||
79 | { |
||
80 | if ($aktion == 'changekonfig') |
||
81 | { |
||
82 | if ((!isset($userselfdel)) || (($userselfdel == '') || (($userselfdel != '') && ($userselfdel != '1')))) $userselfdel = 0; |
||
83 | |||
84 | ib_change_config('allow_user_selfdelete', $userselfdel, $modul); |
||
85 | |||
86 | if (!isset($vonmodul)) $vonmodul = 'admin_konfig'; |
||
87 | if (!isset($vonseite)) $vonseite = 'inhalt'; |
||
88 | |||
8 | daniel-mar | 89 | if (!headers_sent()) header('location: '.$_SERVER['PHP_SELF'].'?seite='.urlencode($vonseite).'&modul='.urlencode($vonmodul)); |
2 | daniel-mar | 90 | } |
91 | } |
||
92 | |||
3 | daniel-mar | 93 | ?> |