query("DELETE FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id'])); $query_delete_order = $db->query("DELETE FROM OGP_DB_PREFIXbilling_carts WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id'])); } if(isset($_POST['paid'])) { $query_set_as_paid = $db->query("UPDATE OGP_DB_PREFIXbilling_carts SET paid=1 WHERE cart_id=".$db->realEscapeSingle($_POST['cart_id'])); } $status_array = array ( "not_paid" => 0, "paid" => 1, "procesing_payment" => 2, "paid_and_installed" => 3 ); ?> isAdmin( $_SESSION['user_id'] ); $user_id = $_SESSION['user_id']; //SHOW THE NUMBER OF SERVERS RENTED AND EXPECTED INCOME if($isAdmin) { echo "

Accounting

"; $servercount = 0; $income = 0; $paidOrders = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE status > 0"); foreach($paidOrders as $inc) { $servercount = $servercount +1; $income = $income + $inc['max_players'] * $inc['price']; } echo "Total Rented Gameservers: $servercount
"; echo "Total Income: $" . number_format( $income , 2 ) . "
"; } foreach($status_array as $status => $paid_value) { if($isAdmin or $status > "not_paid") { if ($isAdmin){ $carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." order by cart_id DESC"); }else{ $carts = $db->resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_carts WHERE paid =" . $db->realEscapeSingle($paid_value) ." AND user_id = " . $user_id ." order by cart_id DESC"); } if( $carts > 0 ) { if ($paid_value == 1) {?>

Not Installed

1) {?>

resultQuery("SELECT * FROM OGP_DB_PREFIXbilling_orders WHERE cart_id=".$db->realEscapeSingle($cart['cart_id'])." order by order_id DESC" ); $subtotal = 0; foreach($orders as $order) { if($order['qty'] > 1) $order['invoice_duration'] = $order['invoice_duration']."s"; ?> '0' ? "".get_lang('active')."":$order_status; $order_status = $order['status'] == '0' ? "".get_lang('unpaid')."":$order_status; $order_status = $order['status'] == '-1' ? "".get_lang('invoice_due')."":$order_status; $order_status = $order['status'] == '-2' ? "".get_lang('suspended')."":$order_status; $order_status = $order['status'] == '-3' ? "".get_lang('renewed')."":$order_status; $order_status = $order['status'] == '-99' ? "".get_lang('expired')."":$order_status; $finish_date = date('d/M/Y H:i',$order['finish_date']); echo ""; } ?>
slot price Paid Date Expiration dates
getUserById($order['user_id']); echo $user['users_login'];?> Status: $order_status"; echo "
Expiration: $finish_date
">
"> ">
">
">
$".number_format( $subtotal , 2 ). " " .$cart['currency']."
"; ?>
0) { $result = $db->resultquery("SELECT * from OGP_DB_PREFIXbilling_coupons WHERE id = '". $cart['coupon_id'] . "'"); foreach($result as $coupon){ $coupon_savings = $subtotal * ($coupon['discount']/ 100); echo "Sub-total c/discount $" .number_format( ($subtotal - $coupon_savings) , 2 ).$cart['currency']."
"; echo "Coupon (".$coupon['code'].") - $" .number_format( $coupon_savings , 2 ).$cart['currency']."
"; } } ?>
0){ echo get_lang('tax')."(".$settings['tax_amount']."%) + $".number_format( $settings['tax_amount']/100*$subtotal, 2 ).$cart['currency']."
"; } ?>
$".number_format( $total , 2 ). " " .$cart['currency'].""; ?>