<?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'];
$type = "CreditCheck";
$_SESSION['type'] = $type;
include("inc/header.inc.php");
include("inc/dbinfo.inc.php");
if ($access == "forbidden") {
include("inc/restricted.inc.php");
}
elseif ($access == "locked") {
include("inc/restricted.inc.php");
}
else {
$query = "SELECT credits FROM users WHERE username = '$user'";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$credits = mysql_fetch_row($result);
$remaining = $credits[0];
?>
<p align="center">You have <?echo $remaining?> credits remaining</p>
<?
if ($access == "admin") {
?>
<form method="POST" name="cred_check_form" action="do_send.php">
<p align="center"><input type="submit" value="Check master account credits" name="B1"></p>
</form>
<?
}
}
include("inc/footer.inc.php");
?>