Rev 11 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9 | daniel-mar | 1 | <?php |
2 | |||
14 | daniel-mar | 3 | if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.'); |
9 | daniel-mar | 4 | |
5 | // Sicherheitsabschnitt |
||
6 | |||
7 | $ary = explode('/', $_SERVER['PHP_SELF']); |
||
8 | |||
9 | if (($konfiguration['main_administration']['admin_pwd'] == '') && ($ary[count($ary)-1] != 'style.css.php')) |
||
10 | { |
||
11 | $fehler = ''; |
||
12 | if (isset($_REQUEST['setapwd']) && ($_REQUEST['setapwd'] == '1')) |
||
13 | { |
||
14 | if ($apw1 == '') |
||
15 | $fehler .= '<font color="#FF0000">Fehler: Es muss ein Passwort angegeben werden!</font><br><br>'; |
||
16 | |||
17 | if ($apw1 != $apw2) |
||
18 | $fehler .= '<font color="#FF0000">Fehler: Die beiden Passwörter sind verschieden!</font><br><br>'; |
||
19 | |||
20 | if (($validuser != $mysql_zugangsdaten['username']) || ($validpass != $mysql_zugangsdaten['passwort'])) |
||
21 | $fehler .= '<font color="#FF0000">Fehler: Die MySQL-Validierungsdaten sind falsch!</font><br><br>'; |
||
22 | |||
23 | if ($fehler == '') |
||
24 | { |
||
11 | daniel-mar | 25 | ib_change_config('admin_pwd', md5($apw1), 'main_administration');// TODO: use sha3 hash, salted and peppered |
9 | daniel-mar | 26 | if (!headers_sent()) header('location:'.$_SERVER['PHP_SELF']); |
27 | } |
||
28 | } |
||
29 | die($header.'<h1>Aktivierung von Personal WebBase</h1>Personal WebBase nutzt derzeit noch das Administratorpasswort, das bei der Auslieferung gesetzt wurde. Sie <u>müssen</u> ein eigenes Administratorpasswort eingeben!<br><br> |
||
30 | Bitte loggen Sie sich danach in den Administrationsbereich ein, um ggf. die Konfigurationswerte anzupassen.<br><br><form action="'.$_SERVER['PHP_SELF'].'" method="POST"> |
||
31 | <input type="hidden" name="setapwd" value="1"> |
||
32 | <table cellpadding="0" cellspacing="0" border="0"> |
||
33 | <tr><td width="225">Administratorpasswort festlegen auf:</td><td> </td><td><input type="password" name="apw1" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';"></td></tr> |
||
34 | <tr><td>Eingabe wiederholen:</td><td> </td><td><input type="password" name="apw2" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';"></td></tr> |
||
35 | </table><br>Damit Personal WebBase sicherstellen kann, dass Sie derjenige sind, der Personal WebBase auch installiert hat, geben Sie bitte jetzt noch die MySQL-Zugangsdaten ein, das Sie in der Konfigurationsdatei <code>includes/config.inc.php</code> bei <code>$mysql_zugangsdaten[\'username\']</code> und <code>$mysql_zugangsdaten[\'passwort\']</code> eingetragen haben.<br><br> |
||
36 | <table cellpadding="0" cellspacing="0" border="0"> |
||
37 | <tr><td width="225">MySQL-Benutzername:</td><td> </td><td><input type="text" name="validuser" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';"></td></tr> |
||
38 | <tr><td width="225">MySQL-Passwort:</td><td> </td><td><input type="password" name="validpass" class="normal" onmouseover="this.className=\'highlight\';" onmouseout="this.className=\'normal\';"></td></tr> |
||
39 | <tr><td colspan="2"><br><input type="submit" value="Festlegen" class="button" onmouseover="this.className=\'button_act\';" onmouseout="this.className=\'button\';"></td></tr> |
||
40 | </table><br>'.$fehler.' |
||
41 | </form>'.$footer); |
||
42 | } |
||
43 | |||
44 | ?> |