| @@ 546-582 (lines=37) @@ | ||
| 543 | $babDB->db_query($req); |
|
| 544 | ||
| 545 | ||
| 546 | } else { |
|
| 547 | ||
| 548 | $babDB->db_query(" |
|
| 549 | INSERT INTO absences_entries |
|
| 550 | ( |
|
| 551 | id_user, |
|
| 552 | date_begin, |
|
| 553 | date_end, |
|
| 554 | comment, |
|
| 555 | `createdOn`, |
|
| 556 | `date`, |
|
| 557 | idfai, |
|
| 558 | status, |
|
| 559 | comment2, |
|
| 560 | id_approver, |
|
| 561 | folder, |
|
| 562 | creation_type |
|
| 563 | ) |
|
| 564 | VALUES |
|
| 565 | ( |
|
| 566 | ".$babDB->quote($this->id_user).", |
|
| 567 | ".$babDB->quote($this->date_begin).", |
|
| 568 | ".$babDB->quote($this->date_end).", |
|
| 569 | ".$babDB->quote($this->comment).", |
|
| 570 | ".$babDB->quote($this->createdOn).", |
|
| 571 | ".$babDB->quote($this->date).", |
|
| 572 | ".$babDB->quote($this->idfai).", |
|
| 573 | ".$babDB->quote($this->status).", |
|
| 574 | ".$babDB->quote($this->comment2).", |
|
| 575 | ".$babDB->quote($this->id_approver).", |
|
| 576 | ".$babDB->quote($this->folder).", |
|
| 577 | ".$babDB->quote($this->creation_type)." |
|
| 578 | ) |
|
| 579 | "); |
|
| 580 | ||
| 581 | $this->id = $babDB->db_insert_id(); |
|
| 582 | } |
|
| 583 | ||
| 584 | ||
| 585 | } |
|
| @@ 313-355 (lines=43) @@ | ||
| 310 | } |
|
| 311 | ||
| 312 | ||
| 313 | if (isset($this->id)) |
|
| 314 | { |
|
| 315 | ||
| 316 | $babDB->db_query(" |
|
| 317 | UPDATE absences_movement |
|
| 318 | SET |
|
| 319 | comment =".$babDB->quote($this->comment)." |
|
| 320 | WHERE |
|
| 321 | id=".$babDB->quote($this->id)." |
|
| 322 | "); |
|
| 323 | ||
| 324 | ||
| 325 | } else { |
|
| 326 | ||
| 327 | $babDB->db_query(" |
|
| 328 | INSERT INTO absences_movement |
|
| 329 | ( |
|
| 330 | id_user, |
|
| 331 | id_right, |
|
| 332 | id_request, |
|
| 333 | request_class, |
|
| 334 | id_author, |
|
| 335 | comment, |
|
| 336 | createdOn, |
|
| 337 | message, |
|
| 338 | status |
|
| 339 | ) |
|
| 340 | VALUES |
|
| 341 | ( |
|
| 342 | ".$babDB->quote($this->id_user).", |
|
| 343 | ".$babDB->quote($this->id_right).", |
|
| 344 | ".$babDB->quote($this->id_request).", |
|
| 345 | ".$babDB->quote($this->request_class).", |
|
| 346 | ".$babDB->quote($this->id_author).", |
|
| 347 | ".$babDB->quote($this->comment).", |
|
| 348 | ".$babDB->quote($this->createdOn).", |
|
| 349 | ".$babDB->quote($this->message).", |
|
| 350 | ".$babDB->quoteOrNull($this->status)." |
|
| 351 | ) |
|
| 352 | "); |
|
| 353 | ||
| 354 | $this->id = $babDB->db_insert_id(); |
|
| 355 | } |
|
| 356 | } |
|
| 357 | } |
|
| 358 | ||