diff --git a/html/pages/bill/actions.inc.php b/html/pages/bill/actions.inc.php new file mode 100644 index 000000000..d457d6b2b --- /dev/null +++ b/html/pages/bill/actions.inc.php @@ -0,0 +1,40 @@ +Bill Deleted. Redirecting to Bills list."); + + echo(""); + +} + + +if($_POST['action'] == "add_bill_port") { mysql_query("INSERT INTO `bill_ports` (`bill_id`, `port_id`) VALUES ('".mres($_POST['bill_id'])."','".mres($_POST['interface_id'])."')"); } +if($_POST['action'] == "delete_bill_port") { mysql_query("DELETE FROM `bill_ports` WHERE `bill_id` = '".mres($bill_id)."' AND `port_id` = '".mres($_POST['interface_id'])."'"); } +if($_POST['action'] == "update_bill") { + mysql_query("UPDATE `bills` SET `bill_name` = '".mres($_POST['bill_name'])."', + `bill_day` = '".mres($_POST['bill_day'])."', + `bill_gb` = '".mres($_POST['bill_gb'])."', + `bill_cdr` = '".mres($_POST['bill_cdr'])."', + `bill_type` = '".mres($_POST['bill_type'])."' + WHERE `bill_id` = '".mres($bill_id)."'"); + + if(mysql_affected_rows()) + { + echo("
Bill Properties Updated
"); + } + +} + +?> diff --git a/html/pages/bill/delete.inc.php b/html/pages/bill/delete.inc.php new file mode 100644 index 000000000..919d2e975 --- /dev/null +++ b/html/pages/bill/delete.inc.php @@ -0,0 +1,23 @@ +Delete Bill + +

Are you sure you want to delete his bill?

+ +
+ +
+ + Confirm: + +
+ +
+ + + +"); + +?>