summaryrefslogtreecommitdiffstats
path: root/web/client/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/client/index.php')
-rw-r--r--web/client/index.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/web/client/index.php b/web/client/index.php
new file mode 100644
index 0000000..c89bde1
--- /dev/null
+++ b/web/client/index.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * View to display information about a single client.
+ *
+ * @package volse.faktura.web
+ */
+
+namespace Faktura;
+
+require_once __DIR__ . '/../faktura.php';
+
+$result = API\call('GET', 'clients?id=eq.' . intval($_GET['id']));
+$client = json_decode($result)[0];
+?>
+<!DOCTYPE html>
+<head>
+ <title>faktura: client</title>
+</head>
+<body>
+<h1><?php echo esc_html($client->name); ?></h1>
+<table>
+ <tr class="field">
+ <th class="row-label">Contact:</th>
+ <td class="value"><?php echo esc_html($client->contact); ?></td>
+ </tr>
+ <tr class="field">
+ <th class="row-label">Email:</th>
+ <td class="value"><?php echo esc_html($client->email); ?></td>
+ </tr>
+ <tr class="field">
+ <th class="row-label">phone:</td>
+ <td class="value"><?php echo esc_html($client->phone); ?></td>
+ </tr>
+ <tr class="field">
+ <th class="row-label">Address:</th>
+ <td class="value"><?php echo esc_html($client->address); ?></td>
+ </tr>
+ <tr class="field">
+ <th class="row-label">VAT:</th>
+ <td class="value"><?php echo $client->vat ? 'Yes' : 'No'; ?></td>
+ </tr>
+</body>
+