Shlurp
25-08-2006, 10:12 PM
<?
ob_start();
include('config.php');
if(!$logged[username])
{
echo("<font face=\"verdana\" size=\"1\">");
}
else # Theyre Logged In
{
switch($_GET[points]) # Allows Us To Use One Page For Whole Page
{
default:
echo("Welcome to the Bank <b>$logged[username]</b><br><br>What would you like to do today..<br /><br />+ <a href=\"?points=deposit\" style=\"text-decoration: none\">Deposit Points</a><br />+ <a href=\"?points=withdraw\" style=\"text-decoration: none\">Withdraw Points</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
case 'deposit':
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$points = $f[points];
if($points == "0")
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
elseif(!$_POST[deposit])
{
echo("<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
echo("<form method=\"POST\"><input type=\"text\" name=\"store\"><br><br>
<input type=\"submit\" name=\"deposit\" value=\"Deposit\"></form>");
}
else
{
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$points = $f[points];
$store = $_POST[store];
if($store > $points)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
if($store == NULL)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to deposit..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
$deposit = $f[deposit];
$calc = $points - $store;
$add = $store + $deposit;
$done = mysql_query("UPDATE users SET deposit = '$add', points = '$calc' WHERE username = '$logged[username]'");
echo("<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $store points were added to your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
}
}
break;
case 'withdraw':
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$withdraw = $f[deposit];
if($withdraw == "0")
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
elseif(!$_POST[withdraw])
{
echo("<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
echo("<form method=\"POST\"><input type=\"text\" name=\"take\"><br><br>
<input type=\"submit\" name=\"withdraw\" value=\"Withdraw\"></form>");
}
else
{
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$withdraw = $f[deposit];
$take = $_POST[take];
if($take > $withdraw)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
if($take == NULL)
{
echo(<font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to withdraw..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
$deposit = $f[deposit];
$calc = $deposit - $take;
$grab = $take + $points;
$done = mysql_query("UPDATE users SET points = '$grab', deposit = '$calc' WHERE username = '$logged[username]'");
echo("<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $take points were withdrawn from your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
}
}
break;
}
}
?>
it ses unexpected < on line 86 but i cnt find n e fing help me pls
ob_start();
include('config.php');
if(!$logged[username])
{
echo("<font face=\"verdana\" size=\"1\">");
}
else # Theyre Logged In
{
switch($_GET[points]) # Allows Us To Use One Page For Whole Page
{
default:
echo("Welcome to the Bank <b>$logged[username]</b><br><br>What would you like to do today..<br /><br />+ <a href=\"?points=deposit\" style=\"text-decoration: none\">Deposit Points</a><br />+ <a href=\"?points=withdraw\" style=\"text-decoration: none\">Withdraw Points</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
case 'deposit':
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$points = $f[points];
if($points == "0")
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
elseif(!$_POST[deposit])
{
echo("<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
echo("<form method=\"POST\"><input type=\"text\" name=\"store\"><br><br>
<input type=\"submit\" name=\"deposit\" value=\"Deposit\"></form>");
}
else
{
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$points = $f[points];
$store = $_POST[store];
if($store > $points)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
if($store == NULL)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to deposit..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
$deposit = $f[deposit];
$calc = $points - $store;
$add = $store + $deposit;
$done = mysql_query("UPDATE users SET deposit = '$add', points = '$calc' WHERE username = '$logged[username]'");
echo("<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $store points were added to your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
}
}
break;
case 'withdraw':
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$withdraw = $f[deposit];
if($withdraw == "0")
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You have no points..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
elseif(!$_POST[withdraw])
{
echo("<font face=\"verdana\" size=\"1\"><b>How many points would you like to deposit..</b><br><br>");
echo("<form method=\"POST\"><input type=\"text\" name=\"take\"><br><br>
<input type=\"submit\" name=\"withdraw\" value=\"Withdraw\"></form>");
}
else
{
$find = mysql_query("SELECT * FROM users WHERE username = '$logged[username]'");
$f = mysql_fetch_array($find);
$withdraw = $f[deposit];
$take = $_POST[take];
if($take > $withdraw)
{
echo("<font face=\"verdana\" size=\"1\"><b>Error;</b> You do not have enough points to carry out this transaction..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
if($take == NULL)
{
echo(<font face=\"verdana\" size=\"1\"><b>Error;</b> You didnt enter an amount to withdraw..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
else
{
$deposit = $f[deposit];
$calc = $deposit - $take;
$grab = $take + $points;
$done = mysql_query("UPDATE users SET points = '$grab', deposit = '$calc' WHERE username = '$logged[username]'");
echo("<font face=\"verdana\" size=\"1\"><b>Thankyou</b><br><br>Your transaction was successfull and $take points were withdrawn from your bank account..<br /><br />+ <a href=\"bank.php\" style=\"text-decoration: none\">Go to Bank</a><br />+ <a href=\"login.php\" style=\"text-decoration: none\">Back to Main Page</a>");
}
}
}
break;
}
}
?>
it ses unexpected < on line 86 but i cnt find n e fing help me pls