summaryrefslogblamecommitdiffstats
path: root/web/client/index.php
blob: c89bde1348e187086ca8ee4f66248be2241343b6 (plain) (tree)










































                                                                                 
<?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>