-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangepw.php
More file actions
70 lines (69 loc) · 1.9 KB
/
Copy pathchangepw.php
File metadata and controls
70 lines (69 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
session_start();
include("functions.php");
if(isset($_POST['oldpass']) && isset($_POST['newpass']) && isset($_POST['newpass_c']))
{
if( $_POST['newpass'] == $_POST['newpass_c'])
{
if(changePassword($_POST['oldpass'], $_POST['newpass']))
{
header("Location: http://schwerdainbolt.de/c/changepw.php?s=1");
exit;
}
else
{
$err = array();
$err[] = "Altes Passwort falsch!";
}
}
else
{
$err = array();
$err[] = "Neues Passwort nicht 2x gleich!";
}
}
else if(!(!isset($_POST['oldpass']) && !isset($_POST['newpass']) && !isset($_POST['newpass_c'])))
{
$err = array();
$err[] = "Nicht alle Felder ausgefüllt!";
}
?>
<html>
<head>
<title>Passwort ändern</title>
<link rel="stylesheet" href="<?php echo $_SESSION['style']; ?>.css">
</head>
<body>
<?php if(isset($_GET['s']))
{
echo "<p>Passwort geändert</p>";
}
if(!empty($err)){ foreach($err as $e){ echo "<p>$e</p>"; }}?>
<form action="#" method="post">
<table width="300px" border="0" cellpadding="3" cellspacing="1">
<tr>
<td width="140" align="left">Altes Passwort:</td>
</tr>
<tr>
<td align="left"><input type="password" name="oldpass" value="" style="width:100%"></td>
</tr>
<tr>
<td width="140" align="left">Neues Password:</td>
</tr>
<tr>
<td align="left"><input type="password" name="newpass" value="" style="width:100%"></td>
</tr>
<tr>
<td width="140" align="left">Neues Password bestätigen:</td>
</tr>
<tr>
<td align="left"><input type="password" name="newpass_c" value="" style="width:100%"></td>
</tr>
<tr>
<td colspan="2" align="left" nowrap><br><input type="submit" name="send" value="ändern" style="width:99%"></td>
</tr>
</table>
</form>
<p><a href="index.php">Menü</a><br><br><a href="logout.php">Logout</a><br>keks: <?php echo isset($_COOKIE['userid'])?"yep":"nope"; ?></p>
</body>
</html>