fetch_all(MYSQLI_ASSOC); // Get services $sql = "SELECT id, name, type, billing FROM services"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $services = $result->fetch_all(MYSQLI_ASSOC); // Get services $sql = "SELECT id, service, name, client FROM orders"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $orders = $result->fetch_all(MYSQLI_ASSOC); // Get tickets $sql = "SELECT id, `order`, subject FROM tickets"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $tickets = $result->fetch_all(MYSQLI_ASSOC); // Get invoices $sql = "SELECT id, client, `desc`, amount, date, status FROM invoices"; $stmt = mysqli_prepare($link, $sql); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); $invoices = $result->fetch_all(MYSQLI_ASSOC); function getservicebyid($id) { global $services; foreach ($services as $service) { if ($service["id"] == $id) { return $service; } } } function getclientbyid($id) { global $users; foreach ($users as $client) { if ($client["id"] == $id) { return $client; } } } function getorderbyid($id) { global $orders; foreach ($orders as $order) { if ($order["id"] == $id) { return $order; } } } ?> ARFNET CSTIMS
ARFNET

ARFNET Client Service Ticket and Invoice Management System

panel

Users

\n"; } ?>
usertypestatus
".$user["username"]."".$user["type"]."".$user["status"]."

Service offerings

\n"; } ?>
nametypebilling
".$service["name"]."".$service["type"]."".$service["billing"]."

Orders

\n"; } ?>
serviceinstanceclient
".getservicebyid($order["service"])["name"]."".$order["name"]."".getclientbyid($order["client"])["username"]."

Tickets

\n"; } ?>
orderclientsubject
".getorderbyid($ticket["order"])["name"]."".getclientbyid(getorderbyid($ticket["order"])["client"])["username"]."".$ticket["subject"]."

Invoices

\n"; } ?>
clientamount
".getclientbyid($invoice["client"])["username"]."".number_format($invoice["amount"], 2, '.', '')."€