Example #1
0
function grr_sql_mutex_cleanup()
{
    global $sql_mutex_shutdown_registered, $grr_sql_mutex_unlock_name;
    if (!empty($grr_sql_mutex_unlock_name))
    {
        grr_sql_mutex_unlock($grr_sql_mutex_unlock_name);
        $grr_sql_mutex_unlock_name = "";
    }
}
Example #2
0
    /**
     * Après la gestion de l'entry, je dispatch l'event pour les plugins
     */
    $dataFromGet = filter_input_array(INPUT_GET);
    $dataFromGet['idLastInsert'] = $idPourEvent;
    $event = new EditEntryHandler($area_id, $dataFromGet, $id);
    $dispatcher->dispatch(EditEntryHandlerEvent::EDITENTRYHANDLER_AFTER_DB, $event);
    $area = mrbsGetRoomArea($room_id);
    $_SESSION['displ_msg'] = 'yes';
    if ($message_error != '') {
        $_SESSION['session_message_error'] = $message_error;
    }
    Header('Location: ' . $page . ".php?year={$year}&month={$month}&day={$day}&area={$area}&room={$room_back}");
    exit;
}
grr_sql_mutex_unlock('' . TABLE_PREFIX . '_entry');
if ($error_booking_in_past == 'yes') {
    $str_date = utf8_strftime('%d %B %Y, %H:%M', $date_now);
    print_header();
    echo '<h2>' . get_vocab('booking_in_past') . '</h2>';
    if ($rep_type != 0 && !empty($reps)) {
        echo '<p>' . get_vocab('booking_in_past_explain_with_periodicity') . $str_date . '</p>';
    } else {
        echo '<p>' . get_vocab('booking_in_past_explain') . $str_date . '</p>';
    }
    echo '<a href="' . $back . '&amp;Err=yes">' . get_vocab('returnprev') . '</a>';
    include 'include/trailer.inc.php';
    die;
}
if ($error_duree_max_resa_area == 'yes') {
    $area_id = grr_sql_query1('SELECT area_id FROM ' . TABLE_PREFIX . "_room WHERE id='" . protect_data_sql($room_id) . "'");
Example #3
0
    }

    grr_sql_mutex_unlock("".TABLE_PREFIX."_entry");

    $area = mrbsGetRoomArea($room_id);

    # Now its all done go back to the day view
    $_SESSION['displ_msg'] = 'yes';
    if ($message_error != "")
        $_SESSION['session_message_error'] = $message_error;
    Header("Location: ".$page.".php?year=$year&month=$month&day=$day&area=$area&room=$room_back");
    exit;
}

# The room was not free.
grr_sql_mutex_unlock("".TABLE_PREFIX."_entry");



// Si il y a tentative de réserver dans le passé
if ($error_booking_in_past == 'yes') {
    $str_date = utf8_strftime("%d %B %Y, %H:%M", $date_now);
    print_header();
    echo "<h2>" . get_vocab("booking_in_past") . "</h2>";
    if ($rep_type != 0 && !empty($reps))  {
        echo "<p>" . get_vocab("booking_in_past_explain_with_periodicity") . $str_date."</p>";
    } else {
        echo "<p>" . get_vocab("booking_in_past_explain") . $str_date."</p>";
    }
    echo "<a href=\"".$back."&amp;Err=yes\">".get_vocab('returnprev')."</a>";
    include "include/trailer.inc.php";