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']); $day = mysql_real_escape_string($_POST['day']); $time = mysql_real_escape_string($_POST['time']); echo read_reservation_details($year, $week, $day, $time); } elseif (isset($_GET['week'])) {
<?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); } elseif (isset($_GET['week'])) { $week = $_GET['week']; echo '<table id="reservation_table"><colgroup span="1" id="reservation_time_colgroup"></colgroup><colgroup span="7" id="reservation_day_colgroup"></colgroup>'; $days_row = '<tr ><td id="reservation_corner_td">Dvorana Vrijeme <br><input type="button" class="blue_button small_button" id="reservation_today_button" value="Danas"></td><th class="reservation_day_th">1</th><th class="reservation_day_th">2</th><th class="reservation_day_th">3</th><th class="reservation_day_th">4</th><th class="reservation_day_th">5</th><th class="reservation_day_th">6</th><th class="reservation_day_th" >7</th></tr>'; echo $days_row;