"; $check_invoice=$d->query("select * from ".$db_prefix."invoice where client_ID='$myID' order by invoice_ID desc"); $invoice_results=$d->numrows($check_invoice); if($invoice_results > 0 ){ echo "
$font Current Invoices

"; while($invoice_data=$d->fetch_array($check_invoice)){ $invoice_ID=$invoice_data['invoice_ID']; $invoiced_date=$invoice_data['Invoiced_date']; $amount=$invoice_data['Amount_Due']; $status=$invoice_data['Active']; $due=$invoice_data['Date_Due']; if($status == "0"){ $active="$fontOutStanding"; $owed=$owed + $amount; }else{ $active="$fontPaid"; $balance=$balance + $amount; } echo "$font Invoice: 0000".$invoice_ID." [".$invoiced_date."] ($".$amount.") - $active: Due $due
"; } }else{ echo "$font No invoices found for this customer."; } if(empty($balance)){ $balance="0.00"; } if(empty($owed)){ $owed="0.00"; } echo "

OutStanding Balance: $".$owed."
Current Balance: $".$balance."

"; echo "
$font Packages
"; $check_assign=$d->query("select * from ".$db_prefix."assigned where client_ID='$myID'"); $total=$d->numrows($check_assign); if($total > 0 ){ echo ""; while($assignd=$d->fetch_array($check_assign)){ $p_id=$assignd['package_id']; $domain=$assignd['domain']; $active=$assignd['active']; $getpackages=$d->query("select * from ".$db_prefix."package where package_id='$p_id'"); $pdata=$d->fetch_array($getpackages); $cost=$pdata['package_cost']; $setupcost=$pdata['package_setupcost']; if($pdata['package_method'] == "Monthly"){ $cost=$cost; }elseif($pdata['package_method'] == "Yearly"){ $cost = $cost * 12; }elseif($pdata['package_method'] == "Quaterly"){ $cost= $cost * 4; } $totalcost = $totalcost + $cost; $totalsetupcost = $totalsetupcost + $setupcost; if($active == "0"){ echo " "; }else{ echo " "; } unset($cost); } echo "
$font".$pdata['package_name']."
$domain
$font Setup Cost: $".$setupcost." $font ".$pdata['package_method']." $font Cost: $".$cost."
$font".$pdata['package_name']."
$font $domain
$font Setup Cost: $".$setupcost." $font ".$pdata['package_method']." $font Cost: $".$cost."
"; }else{ echo "$font No Packages"; } echo "


"; }elseif($_SESSION['type'] == "5"){ echo "$font
Your account has been canceled.

"; } foot(); ?>