Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
<?php
2
//Dc-shout2.0 (c)devilcoderz 2004
3
 
4
include "header.php";
5
include "config.php";
6
include "functions.php";
7
if (!session_is_registered(username)) {
8
echo "Your not loged in!" ;
9
}
10
else
11
{
12
if ($submit)
13
{
14
if (!$_POST['pass'] )
15
{
16
die('You did not put in a password.<u><a href=javascript:%20history.back(-2)>Back</a></u>.') ;
17
}
18
$password = md5 ($_POST[pass]) ;
19
$user= $_SESSION[username] ;
20
$sql ="UPDATE dc_admin SET  password='$password' WHERE user='$user' ";
21
$result = mysql_query($sql) or die(mysql_error());
22
echo "Password changed!" ;
23
}
24
else
25
{
26
echo "<b>what would you like you new pass to be?</b>" ;
27
?>
28
<form method="POST" action="cpass.php">
29
<input type="password" name="pass" >
30
<input type="submit" value="Change" name="submit"> 
31
</form>
32
<?
33
}
34
}
35
include "footer.php";
36
?>
37
 
38