aboutsummaryrefslogtreecommitdiff
path: root/include/clients.php
diff options
context:
space:
mode:
authorCamil Staps2016-07-27 16:18:13 +0200
committerCamil Staps2016-07-27 16:18:13 +0200
commit08e6ca70604aff5169dbcbf5b74215628ae4097e (patch)
tree2fabea3a1bfd1ebf2d3ab3aa02a93aa8a51a779c /include/clients.php
parentInitial Model class (diff)
Reorganise to have client use Model
Diffstat (limited to 'include/clients.php')
-rw-r--r--include/clients.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/clients.php b/include/clients.php
index 88608ab..b07a7c8 100644
--- a/include/clients.php
+++ b/include/clients.php
@@ -46,7 +46,7 @@ require('./header.php');
$id = (int) $_GET['id'];
try {
$client = new client($_pdo, $id);
- $header = "<a href='".constants::url_external."clients'>Clients</a> / {$client->getName()}";
+ $header = "<a href='".constants::url_external."clients'>Clients</a> / {$client->name}";
$show_individual = $id;
} catch (PDOException $e) {
$alert = "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client with id $id</i> could not be found.</div>";
@@ -66,9 +66,9 @@ require('./header.php');
try {
$client = new client($_pdo, $id);
if ($client->delete()) {
- echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client with name <i>{$client->getName()}</i> has been removed.</div>";
+ echo "<div class='alert alert-success alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client with name <i>{$client->name}</i> has been removed.</div>";
} else {
- echo "<div class='alert alert-warning alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client with name <i>{$client->getName()}</i> could not be removed. Perhaps it's already removed?</div>";
+ echo "<div class='alert alert-warning alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client with name <i>{$client->name}</i> could not be removed. Perhaps it's already removed?</div>";
}
} catch (PDOException $e) {
echo "<div class='alert alert-danger alert-dismissable'><button type='button' class='close fa fa-times' data-dismiss='alert' aria-hidden='true'></button>The client could not be removed due to a PDO error.</div>";