<?php
/******************************************************************************
************** Simple SMS Site Software *********************************
************** SSSSv1.0*****************************************************
************** by (aq) limited http://aql.com *******************************
************** All Rights Reserved ******************************************
************** Please read COPYRIGHT file prior to modification********
********************************************************************************/
session_start();
$edituser = $_POST['D1'];
$new1 = $_POST['new1'];
$new2 = $_POST['new2'];
include("inc/header.inc.php");
include("inc/dbinfo.inc.php");
if ($access == 'admin') {
if ($new1 != $new2) {
?>
<p align="center">New passwords do not match</p>
<form method="POST" name="return_form" action="login.php">
<p align="center"><input type="submit" value="Return" name="B1"></p>
</form>
<?
exit;
}
else {
$new1 = md5($new1);
$query = "UPDATE `users` SET `password` = '$new1' WHERE `username` = '$edituser' LIMIT 1";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
else {
?>
<p align="center">Password updated</p>
<?
}
}
}
else {
include("inc/restricted.inc.php");
}
include("inc/footer.inc.php");
?>