Jums jāizstrādā kāda lielāk projekta prototips. Izstrādājot prototipu, paturiet prātā, ka projektam attīstoties, šo prototipu varētu vajadzēt pilnveidot.
<?php
require("header.php");
$helper = new Helper();
?>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="./">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Applications List</li>
</ol>
</nav>
<?php
$app_manager = new ApplicationManager();
$app_items = $app_manager->getApplicationsList();
if (count($app_items) == 0)
{
?>
<div class="alert alert-warning" role="alert">
No any applications exists.
</div>
<?php
}
else
{
?>
<table class="table table-hover">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Email</th>
<th scope="col">Amount</th>
<th scope="col">Partner</th>
<th scope="col">Status</th>
<th scope="col">Date Created</th>
<th scope="col">Date Modified</th>
<th scope="col"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($app_items as $app)
{
echo "<tr>
<th scope=\"row\">".$app->id."</th>
<td><a href=\"mailto:".$app->email."\">".$app->email."</a></td>
<td>".$app->amount."</td>
<td><a href=\"mailto:".$app->partner."\">".$app->partner."</a></td>
<td>".$helper->applicationStatus($app->status)."</td>
<td>".$app->date_created."</td>
<td>".$app->date_modified."</td>
<td><a href=\"app-view.php?id=".$app->id."\">Manage</a></td>
</tr>
";
}
?>
</tbody>
</table>
<?php
}
require("footer.php");
?>