<?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'];
$credit_user = $_POST['D1'];
include("inc/dbinfo.inc.php");
include("inc/header.inc.php");
if ($access == "admin") {
$query = "SELECT credits FROM users WHERE username = '$credit_user'";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row = mysql_fetch_row($result);
?>
<form method="POST" name="credit_form" action="do_adjust_credit.php">
<tr>
<td>
<h1>Adjust User Credits</h1>
</tr>
<tr>
<td>
<h2>User</h2>
<?echo $credit_user;?>
<input type="hidden" name="credUser" size="0" value="<?echo $credit_user?>">
<h2>Current Credits</h2>
<?echo $row[0]?>
<h2>New Credits</h2>
<input type="text" name="new">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit" name="B1">
</td>
</tr>
</form>
<?
}
else {
include("inc/restricted.inc.php");
}
include("inc/footer.inc.php");
?>