<?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();
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$new_creds = $_POST['new'];
$cred_user = $_POST['credUser'];
include("inc/header.inc.php");
include("inc/dbinfo.inc.php");
if ($access == "admin") {
$query = "UPDATE `users` SET `credits` = '$new_creds' WHERE `username` = '$cred_user' LIMIT 1";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
else {
?>
<p align="center">Credits updated</p>
<?
}
}
else {
include("inc/restricted.inc.php");
}
include("inc/footer.inc.php");
?>