diff options
author | Camil Staps | 2016-07-27 20:54:34 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-27 20:54:34 +0200 |
commit | ee7b6b8cc0cb8619c298f533a2ac791d7aa3b57c (patch) | |
tree | 21cdd4e07585887e72c2de08b8c235b1aa10d3ec /include/discounts.php | |
parent | Assignment: use Model (diff) |
Discount: use Model
Diffstat (limited to 'include/discounts.php')
-rw-r--r-- | include/discounts.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/discounts.php b/include/discounts.php index a4d9df6..5da2dc4 100644 --- a/include/discounts.php +++ b/include/discounts.php @@ -46,7 +46,7 @@ require('./header.php'); $id = (int) $_GET['id']; try { $discount = new Discount($_pdo, $id); - $header = "<a href='".Constants::url_external."discounts'>Discounts</a> / {$discount->getTitle()}"; + $header = "<a href='".Constants::url_external."discounts'>Discounts</a> / {$discount->title}"; $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 discount with id $id</i> could not be found.</div>"; @@ -66,9 +66,9 @@ require('./header.php'); try { $discount = new Discount($_pdo, $id); if ($discount->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 discount with title <i>{$discount->getTitle()}</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 discount with title <i>{$discount->title}</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 discount with title <i>{$discount->getTitle()}</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 discount with title <i>{$discount->title}</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 discount could not be removed due to a PDO error.</div>"; |