Skip to content

Instantly share code, notes, and snippets.

View robertox85's full-sized avatar

Roberto Di Marco robertox85

View GitHub Profile
$requete = $database->select(
'embassy_calendario',
[
"embassy_calendario.id_stanza",
"embassy_calendario.id_insegnante"
],
" WHERE
(start >= '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND start < '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR
(end > '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND end <= '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR
(start >= '".date("Y-m-d H:i:s", strtotime($_POST['start']))."' AND end <= '".date("Y-m-d H:i:s", strtotime($_POST['end']))."') OR
function checkAvailability() {
var dataLezione = $("#dateTime").val();
var start = $('#oraInizio').val();
var end = $("#oraFine").val();
$.post("ajax/stanze/availability.php", {
'start': dataLezione + ' ' + start,
'end': dataLezione + ' ' + end
}).done(function(json) {
var result = jQuery.parseJSON(json);
@firasd
firasd / functions.php
Created May 24, 2018 21:52
Remove 'Mark Complete' button from lesson pages in Learndash course
<?php
add_filter('learndash_mark_complete', function($return, $post) {
$course_hide_markcomplete = 0;
if(learndash_get_course_id($post->ID) == $course_hide_markcomplete) {
$return = '';
}
return $return;
}, 10, 2);