diff --git a/include/Event.php b/include/Event.php index 865a5d3..711bb5b 100644 --- a/include/Event.php +++ b/include/Event.php @@ -44,7 +44,7 @@ class Event { $event_id = $insert->insert_id; return new Event($event_id); } - + public function __construct($id) { $search = prepare('select `id` from `event` where `id`=?'); @@ -57,7 +57,7 @@ class Event { $this->id = $result['id']; $this->update_fields(); } - + protected function update_fields() { $get = prepare('select * from `event` where `id`=?'); bind($get, 'i', $this->id); @@ -83,7 +83,7 @@ class Event { public function get_returntime() { return $this->returntime; } - + public function is_active() { if($this->returntime === null) { return true; diff --git a/include/Loan.php b/include/Loan.php index 08311b7..fe8346b 100644 --- a/include/Loan.php +++ b/include/Loan.php @@ -15,7 +15,7 @@ class Loan extends Event { commit_trans(); return new Loan($event_id); } - + public function __construct($id) { parent::__construct($id); $search = prepare('select * from `loan` where `event`=?'); @@ -27,7 +27,7 @@ class Loan extends Event { } $this->update_fields(); } - + protected function update_fields() { parent::update_fields(); $get = prepare('select * from `loan` where `event`=?');