33 $this->
id = (int)$a_id;
52 $this->title = $a_title;
70 $this->description = $a_value;
88 $this->pool_id = (int)$a_pool_id;
106 $this->schedule_id = (int)$a_schedule_id;
124 $this->nr_of_items = (int)$a_value;
142 $this->info_file = $a_value;
159 if($this->
id && $this->info_file)
162 return $path.$this->info_file;
182 $original = $a_upload[
"name"];
184 if(@move_uploaded_file($a_upload[
"tmp_name"],
$path.$original))
186 chmod(
$path.$original, 0770);
216 $this->post_text = $a_value;
234 $this->post_file = $a_value;
251 if($this->
id && $this->post_file)
254 return $path.$this->post_file;
274 $original = $a_upload[
"name"];
276 if(@move_uploaded_file($a_upload[
"tmp_name"],
$path.$original))
278 chmod(
$path.$original, 0770);
309 include_once
"Modules/BookingManager/classes/class.ilFSStorageBooking.php";
327 include_once
"Modules/BookingManager/classes/class.ilFSStorageBooking.php";
331 $path = $storage->getAbsolutePath().
"/";
335 $path .= $a_subdir.
"/";
355 $set = $ilDB->query(
'SELECT *'.
356 ' FROM booking_object'.
357 ' WHERE booking_object_id = '.$ilDB->quote($this->id,
'integer'));
358 $row = $ilDB->fetchAssoc($set);
377 'title' => array(
'text', $this->
getTitle()),
381 'info_file' => array(
'text', $this->
getFile()),
382 'post_text' => array(
'text', $this->
getPostText()),
402 $this->
id = $ilDB->nextId(
'booking_object');
405 $fields[
'booking_object_id'] = array(
'integer', $this->
id);
406 $fields[
'pool_id'] = array(
'integer', $this->
getPoolId());
408 return $ilDB->insert(
'booking_object', $fields);
426 return $ilDB->update(
'booking_object', $fields,
427 array(
'booking_object_id'=>array(
'integer', $this->
id)));
439 $set = $ilDB->query(
'SELECT *'.
440 ' FROM booking_object'.
441 ' WHERE pool_id = '.$ilDB->quote($a_pool_id,
'integer').
444 while(
$row = $ilDB->fetchAssoc($set))
463 return $ilDB->manipulate(
'DELETE FROM booking_object'.
464 ' WHERE booking_object_id = '.$ilDB->quote($this->id,
'integer'));
479 $set = $ilDB->query(
"SELECT booking_object_id,nr_items".
480 " FROM booking_object".
481 " WHERE ".$ilDB->in(
"booking_object_id", $a_obj_ids,
"",
"integer"));
482 while(
$row = $ilDB->fetchAssoc($set))
484 $map[
$row[
"booking_object_id"]] = $row[
"nr_items"];
490 public function doClone($a_pool_id, $a_schedule_map = null)
492 $new_obj =
new self();
493 $new_obj->setPoolId($a_pool_id);
494 $new_obj->setTitle($this->
getTitle());
497 $new_obj->setFile($this->
getFile());
514 $target = $new_obj->initStorage($new_obj->getId());