Ejemplo n.º 1
0
<?php

include_once 'main.php';
if (check_login() != true) {
    exit;
}
if (isset($_GET['make_reservation'])) {
    $year = datosAlumno();
    $year = $year[1];
    $week = mysql_real_escape_string($_POST['week']);
    $day = mysql_real_escape_string($_POST['day']);
    $time = mysql_real_escape_string($_POST['time']);
    echo make_reservation($year, $week, $day, $time);
} elseif (isset($_GET['delete_reservation'])) {
    $year = datosAlumno();
    $year = $year[1];
    $week = mysql_real_escape_string($_POST['week']);
    $day = mysql_real_escape_string($_POST['day']);
    $time = mysql_real_escape_string($_POST['time']);
    echo delete_reservation($year, $week, $day, $time);
} elseif (isset($_GET['read_reservation'])) {
    $year = datosAlumno();
    $year = $year[1];
    $week = mysql_real_escape_string($_POST['week']);
    $day = mysql_real_escape_string($_POST['day']);
    $time = mysql_real_escape_string($_POST['time']);
    echo read_reservation($year, $week, $day, $time);
} elseif (isset($_GET['read_reservation_details'])) {
    $year = datosAlumno();
    $year = $year[1];
    $week = mysql_real_escape_string($_POST['week']);
Ejemplo n.º 2
0
	
	
	}

</script>

<?php 
include_once 'main.php';
if (check_login($conn) != true) {
    exit;
}
if (isset($_GET['make_reservation'])) {
    $week = $_POST['week'];
    $day = mysqli_real_escape_string($conn, $_POST['day']);
    $time = mysqli_real_escape_string($conn, $_POST['time']);
    echo make_reservation($week, $day, $time, $conn);
} elseif (isset($_GET['delete_reservation'])) {
    $week = mysqli_real_escape_string($conn, $_POST['week']);
    $day = mysqli_real_escape_string($conn, $_POST['day']);
    $time = mysqli_real_escape_string($conn, $_POST['time']);
    echo delete_reservation($week, $day, $time, $conn);
} elseif (isset($_GET['read_reservation'])) {
    $week = mysqli_real_escape_string($conn, $_POST['week']);
    $day = mysqli_real_escape_string($conn, $_POST['day']);
    $time = mysqli_real_escape_string($conn, $_POST['time']);
    echo read_reservation($week, $day, $time);
} elseif (isset($_GET['read_reservation_details'])) {
    $week = mysqli_real_escape_string($conn, $_POST['week']);
    $day = mysqli_real_escape_string($conn, $_POST['day']);
    $time = mysqli_real_escape_string($conn, $_POST['time']);
    echo read_reservation_details($week, $day, $time);