add new block dialog to scheduler
This commit is contained in:
parent
13c8b14985
commit
0cd0d860c4
@ -5,7 +5,7 @@
|
|||||||
if (isset($_GET['date']) && $_GET['date'] !== "") {
|
if (isset($_GET['date']) && $_GET['date'] !== "") {
|
||||||
// get info about single day's schedule
|
// get info about single day's schedule
|
||||||
$query = $db->prepare("SELECT * FROM schedules s
|
$query = $db->prepare("SELECT * FROM schedules s
|
||||||
LEFT JOIN schedule_blocks sb ON s.id = sb.schedule_id
|
LEFT JOIN schedule_blocks sb ON s.day = sb.schedule_day
|
||||||
LEFT JOIN blocks b ON sb.block_id = b.id
|
LEFT JOIN blocks b ON sb.block_id = b.id
|
||||||
WHERE s.day = :date");
|
WHERE s.day = :date");
|
||||||
$query->bindValue(":date", intval(strtotime($_GET['date'])));
|
$query->bindValue(":date", intval(strtotime($_GET['date'])));
|
||||||
@ -14,11 +14,9 @@
|
|||||||
$row = $result->fetchArray(SQLITE3_ASSOC);
|
$row = $result->fetchArray(SQLITE3_ASSOC);
|
||||||
echo(json_encode($row));
|
echo(json_encode($row));
|
||||||
}
|
}
|
||||||
} else if (isset($_POST['id']) && intval($_POST['id']) > 0) {
|
|
||||||
// update single schedule
|
|
||||||
|
|
||||||
} else if (isset($_POST['day']) && strtotime($_POST['day'])) {
|
} else if (isset($_POST['day']) && strtotime($_POST['day'])) {
|
||||||
// add new schedule
|
// add or update a single schedule
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
echo("{}");
|
echo("{}");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user