コード例 #1
0
ファイル: reservation.php プロジェクト: heglem/reservasTeatro
        echo '<tr><th class="reservation_time_th">' . $time . '</th>';
        $i = 0;
        while ($i < 13) {
            $i++;
            $celda = read_reservation($year, $week, $i, $time);
            if ($celda == '.') {
                echo '<td><div>
				<div id="div:' . $week . ':' . $i . ':' . $time . '"></div></div></td>';
            } else {
                if ($celda != '') {
                    echo '<td bgcolor="#CCECFB">';
                } else {
                    echo '<td>';
                }
                echo '<div class="reservation_time_div">
				<div class="reservation_time_cell_div" id="div:' . $week . ':' . $i . ':' . $time . '" onclick="void(0)">' . read_reservation($year, $week, $i, $time) . '</div></div></td>';
            }
        }
        echo '</tr>';
    }
    echo '</table>';
} else {
    echo '</div>
	<div class="box_div" id="reservation_div">
	<div class="box_top_div" id="reservation_top_div">
	<div id="reservation_top_left_div"><a href="." id="previous_week_a">&lt; Sector anterior</a></div>
	<div id="reservation_top_center_div">Reservacion Sector <span id="week_number_span">' . global_week_number . '</span></div>
	<div id="reservation_top_right_div"><a href="." id="next_week_a">Sector siguiente &gt;</a></div></div>
	<div class="box_body_div"><div id="reservation_table_div"></div>
	</div></div><div id="reservation_details_div">';
}
コード例 #2
0
} 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;
    foreach ($global_times as $time) {
        echo '<tr><th class="reservation_time_th">' . $time . '</th>';
        $i = 0;
        while ($i < 7) {
            $i++;
            echo '<td><div class="reservation_time_div"><div class="reservation_time_cell_div" id="div:' . $week . ':' . $i . ':' . $time . '" onclick="void(0)">' . read_reservation($week, $i, $time, $conn) . '</div></div></td>';
        }
        echo '</tr>';
    }
    echo '</table>';
} else {
    echo '<div class="box_div" id="cp_div"><div class="box_top_div"><a href="#"><input type="button" class="small_button blue_button" value="' . $_SESSION['user_name'] . '"></a></div>';
    $myCalendar = new tc_calendar("date1", true, false);
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
    $myCalendar->setPath("calendar/");
    $myCalendar->setYearInterval(date('Y'), date('Y') + 10);
    $myCalendar->dateAllow(date('Y-m-d'), '2020-12-31');
    $myCalendar->setIcon("calendar/images/iconCalendar.gif");
    $myCalendar->setAlignment("right", "bottom");
    $myCalendar->setOnChange("myChanged()");
    $myCalendar->writeScript();