Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Model;
- class Booking extends \BaseModel
- {
- function check($Resource) {
- $lsQuery = "SELECT
- active
- FROM
- {$this->table[0]}
- WHERE
- {$this->table[0]}.date = '$Resource->date'
- AND
- {$this->table[0]}.year = '$Resource->year'
- AND
- {$this->table[0]}.month = '$Resource->month'
- AND
- {$this->table[0]}.day = '$Resource->day'
- AND
- {$this->table[0]}.time = '$Resource->time'
- ";
- return $this->singleQuery($lsQuery);
- }
- }
- if($this->Cortex->Booking->check() === 1) {
- } else {
- $this->Cortex->Calendar->_message[] = "Din bokning är nu registrerad!";
- $this->Cortex->Log->add("Din bokning är nu registrerad!");
- $this->Cortex->Booking->insert();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement