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);
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 Client Service Ticket and Invoice Management System
panel
Users
user | type | status |
".$user["username"]." | ".$user["type"]." | ".$user["status"]."\n";
}
?>
|
Service offerings
name | type | billing |
".$service["name"]." | ".$service["type"]." | ".$service["billing"]."\n";
}
?>
|
Orders
service | instance | client |
".getservicebyid($order["service"])["name"]." | ".$order["name"]." | ".getclientbyid($order["client"])["username"]."\n";
}
?>
|
Tickets
order | client | subject |
".getorderbyid($ticket["order"])["name"]." | ".getclientbyid(getorderbyid($ticket["order"])["client"])["username"]." | ".$ticket["subject"]."\n";
}
?>
|
Invoices