blob: 4725b17c8dec2fae899ae02110fb28e4db890e82 (
plain) (
tree)
|
|
<?php
/**
* Clients index view
*
* @package volse.faktura.web
*/
namespace Faktura;
require_once __DIR__ . '/../faktura.php';
$result = API\call('GET', 'clients');
$clients = json_decode($result);
?>
<!DOCTYPE html>
<head>
<title>faktura: clients</title>
</head>
<body>
<h1>Clients</h1>
<table>
<tr>
<th>#</th>
<th>Name</th>
<th>Contact</th>
<th>Email</th>
<th>Phone</th>
<th>VAT</th>
</tr>
<?php foreach ($clients as $client) { ?>
<tr>
<td><?php echo esc_html($client->id); ?></td>
<td>
<a href="/client/?id=<?php echo esc_attr($client->id); ?>">
<?php echo esc_html($client->name); ?>
</a>
</td>
<td><?php echo esc_html($client->contact); ?></td>
<td><?php echo esc_html($client->email); ?></td>
<td><?php echo esc_html($client->phone); ?></td>
<td><?php echo esc_html($client->vat ? 'X' : ''); ?></td>
</tr>
<?php } ?>
</table>
</body>
|