$cash){ echo("

You don't have enough cash to upgrade account!
You will need to Deposit Cash into your Account Cash.

"); } else { $date = date("Y-m-d H:i:s"); $res = mysql_query("update user set dcash=dcash-$cost+$cash1, acctype=$pkg where id=$usrid"); $resnew = mysql_query("insert into adminearn set usrid=$usrid, name='$name', email='$email', transaction_type='User Upgraded Account To: $accname', howmuch='0', prossdate='$date', comm='$cost'"); echo ("

Account Upgraded

Refresh

"); exit; } } echo("
Upgrade Account

"); $res = mysql_query("select acctype.name, acctype.id from user, acctype where user.id=$usrid && acctype.id=user.acctype"); $accid = mysql_result($res, 0, "id"); $accname = mysql_result($res, 0, "name"); $biglst = mysql_result(mysql_query("select count(*) from acctype where id"), 0); echo("

Your account type is $accname
"); if ($accid == $biglst){ echo("and you can not upgrade it.

"); } else { echo("and you can upgrade it to:

"); $res = mysql_query("select * from acctype where id!=1 && id!=$accid order by id asc"); for ($i = 0; $i < mysql_num_rows($res); $i++){ $a_id = mysql_result($res, $i, "id"); $a_name = mysql_result($res, $i, "name"); $a_descr = mysql_result($res, $i, "descr"); $a_cost = mysql_result($res, $i, "cost"); $refhowmany = mysql_result($res, $i, "refhowmany"); $allowdownloadarea = mysql_result($res, $i, "allowdownloadarea"); if($allowdownloadarea == 1){ $allowdownloadarea = "Yes"; } else { $allowdownloadarea = "No"; } echo(""); } echo("

Upgrade Account
$a_name
Cost: $$a_cost

How many free Reffers?: $refhowmany
You Can Access Download Area: $allowdownloadarea
$a_descr

"); } echo("


"); require('footer_inc.php'); mysql_close; ?>