<?php
//||_____________________RadhikaGB_____________________||//
//||---------------------------------------------------||//
//||Page ID : account.php ||//
//||Build ID : 2505100832 ||//
//||Support : http://softacme.com/radhikagb ||//
//|| Jai Shri RADHA RANI... ||//
//||---------------------------------------------------||//
?>
<?php
require_once("data.php");
while(isset($_POST['submitted'])) {
if($_POST[username] == null)
$errors['username'] = true;
if($_POST[password] == null)
$errors['password'] = true;
if($_POST[password_new] == null)
$errors['password_new'] = true;
if($_POST[password] == $_POST[password_new])
{}
else {
$errors['pfields'] = true;
}
if(isset($errors)){
break;
}
$password=md5($_POST[password_new].$_POST[password_new]);
mysql_query("UPDATE superuser SET username='$_POST[username]', password='$password'");
$done = "true";
break;
}
if(isset($errors)) {
echo "<font face=\"arial\" size=\"2\" color=\"#FD0071\">\n";
echo "<ul>OOPS, Please correct following errors</font><br />\n";
}
if($errors['username'])
echo' <li><font color="#FD0071" face="arial" size="1"> Please enter your username</font><br / ></li>' . "\n";
if($errors['password'])
echo' <li><font color="#FD0071" face="arial" size="1"> Please enter your Password</font><br /></li>' . "\n";
if($errors['password2'])
echo'<li> <font color="#FD0071" face="arial" size="1"> Please enter your Re-Password</font><br /></li>' . "\n";
if($errors['pfields'])
echo' <li><font color="#FD0071" face="arial" size="1"> Both passwords are not matched</font></li>' . "\n";
if(isset($errors)) {
echo'</ul><hr noshade size="1">';
}
if($done == "true"){
echo'• <font size=2 color=#00C3AF>Your setting has been successfully changed</font>';
echo'<hr noshade size="1">';
?>
<script type="text/javascript">
<!--
window.location = "index.php?done=account"
//-->
</script>
<?php
exit;
}
?>
<html>
<head>
<title>Account Settings</title>
</head>
<body onLoad="setTimeout('delayer()', 5000)">
<h1>Accounts Settings</h1><hr noshade size="1">
<form id="submitform" action="account.php" method="post">
<table width="50%" border="0" callpadding="0" cellspacing="0">
<tr><td>Admin Name</td><td><input type="text" value="<?php echo $data[adminame];?>" name="username" size="10"></td></tr>
<tr><td>Password</td><td><input type="password" name="password" size="10"></td></tr>
<tr><td>New Password</td><td><input type="password" name="password_new" size="10"></td></tr>
<tr><td></td><td><input type="hidden" name="submitted" value="true" />
<input type="submit" class="button" value=" SAVE " /></td></table>
</body>
</html>