示例#1
0
if (isset($_SESSION["last_activity"]) && $_SESSION["last_activity"] + $_SESSION["time_out"] * 60 < time()) {
    session_unset();
    session_destroy();
    ?>
    <script>
        window.parent.location.href = window.parent.location.href;
    </script>
<?php 
    exit;
}
$_SESSION["last_activity"] = time();
if (isset($_POST["timeslot_name"])) {
    TimeslotTable::add_timeslot($_POST["timeslot_name"]);
}
if (isset($_POST["tab_name"])) {
    TimeslotTable::delete_timeslot($_POST["tab_name"]);
}
if (isset($_POST["checkbox"])) {
    ItemTable::delete_multiple_items($_POST["checkbox"]);
}
if (isset($_POST["base_sales"])) {
    VariablesTable::update_base_sales($_POST["base_sales"]);
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Time Slots</title>
    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>