|
|
@ -246,13 +246,17 @@ function user_shifts() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$comment = strip_request_item_nl('comment');
|
|
|
|
$comment = strip_request_item_nl('comment');
|
|
|
|
sql_query("INSERT INTO `ShiftEntry` SET
|
|
|
|
$result = ShiftEntry_create(array(
|
|
|
|
`Comment`='" . sql_escape($comment) . "',
|
|
|
|
'SID' => $shift_id,
|
|
|
|
`freeloaded`=" . sql_escape($freeloaded ? 1 : 0) . ",
|
|
|
|
'TID' => $selected_type_id,
|
|
|
|
`freeload_comment`='" . sql_escape($freeload_comment) . "',
|
|
|
|
'UID' => $user_id,
|
|
|
|
`UID`=" . sql_escape($user_id) . ",
|
|
|
|
'Comment' => $comment,
|
|
|
|
`TID`=" . sql_escape($selected_type_id) . ",
|
|
|
|
'freeloaded' => $freeloaded,
|
|
|
|
`SID`=" . sql_escape($shift_id));
|
|
|
|
'freeload_comment' => $freeload_comment
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
if ($result === false)
|
|
|
|
|
|
|
|
engelsystem_error('Unable to create shift entry.');
|
|
|
|
|
|
|
|
|
|
|
|
if ($type['restricted'] == 0 && sql_num_query("SELECT * FROM `UserAngelTypes` INNER JOIN `AngelTypes` ON `AngelTypes`.`id` = `UserAngelTypes`.`angeltype_id` WHERE `angeltype_id` = '" . sql_escape($selected_type_id) . "' AND `user_id` = '" . sql_escape($user_id) . "' ") == 0)
|
|
|
|
if ($type['restricted'] == 0 && sql_num_query("SELECT * FROM `UserAngelTypes` INNER JOIN `AngelTypes` ON `AngelTypes`.`id` = `UserAngelTypes`.`angeltype_id` WHERE `angeltype_id` = '" . sql_escape($selected_type_id) . "' AND `user_id` = '" . sql_escape($user_id) . "' ") == 0)
|
|
|
|
sql_query("INSERT INTO `UserAngelTypes` (`user_id`, `angeltype_id`) VALUES ('" . sql_escape($user_id) . "', '" . sql_escape($selected_type_id) . "')");
|
|
|
|
sql_query("INSERT INTO `UserAngelTypes` (`user_id`, `angeltype_id`) VALUES ('" . sql_escape($user_id) . "', '" . sql_escape($selected_type_id) . "')");
|
|
|
|
|
|
|
|
|
|
|
|