/var/www/hkosl.com/demo_google/application/views/main/booking_list.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!doctype html>
<html lang="en">
<head>
    <? include('head.php'?>
</head>

<body>

<div class="container">
    <? include('menu.php'?>

    <h3 class="cover-heading">Booking</h3>

    <? if (isset($_GET['count'])) { ?>
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <strong>Total sync booking: <?= intval($_GET['count']) ?></strong>
        </div>
    <? ?>

    <? if ($this->input->get('success') == 1) { ?>
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <strong>Success!</strong>
        </div>
    <? ?>
    <? if ($this->input->get('deleted') == 1) { ?>
        <div class="alert alert-success alert-dismissible fade show" role="alert">
            <strong>Deleted!</strong>
        </div>
    <? ?>

    <? foreach ($_SESSION['sync_error'] as $mess) { ?>
        <div class="alert alert-danger alert-dismissible fade show" role="alert">
            <strong>ERROR!</strong><br>
            <?= $mess ?>
        </div>
    <? }
    unset(
$_SESSION['sync_error']); ?>

    <?= form_open(front_url(current_controller('/booking_update'))) ?>
    <table class="table table-hover table-striped table-bordered">
        <thead>
        <tr>
            <th>Title</th>
            <th>Location</th>
            <th>Timestamp</th>
            <th width="200"></th>
        </tr>
        </thead>
        <tbody>
        <? foreach ($rows as $row) {
            echo 
'<tr>';
            echo 
"<td>{$row->title}</td>";
            echo 
"<td>{$row->location}</td>";
            echo 
"<td>{$row->datefm} to<br> {$row->dateto}</td>";
            echo 
"<td><a href='" front_url(current_controller('/booking_form/' $row->id)) . "' class='btn btn-primary'>Modify</a> ";
            echo 
"<a href='" front_url(current_controller('/booking_delete/' $row->id)) . "' class='btn btn-danger'>Delete</a></td>";
            echo 
'</tr>';
        } 
?>
        </tbody>
    </table>

    <?= form_close() ?>

    <a href="<?= front_url(current_controller('/booking_form')) ?>" class="btn btn-primary">Create</a>
    <a href="<?= front_url(current_controller('/booking_conflict')) ?>" class="btn btn-warning">Conflict List</a>
    <a href="<?= front_url(current_controller('/booking_sync')) ?>" class="btn btn-dark">Sync</a>

    <hr>

    <iframe src="https://calendar.google.com/calendar/b/1/embed?height=600&amp;wkst=1&amp;bgcolor=%23ffffff&amp;ctz=Asia%2FHong_Kong&amp;src=YnJ1bmtrZ2hrYWNlZDRoMHNiamJscGVmMGNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&amp;color=%23E4C441&amp;mode=WEEK" style="border:solid 1px #777" width="100%" height="600" frameborder="0" scrolling="no"></iframe>

</div>


<? include('script.php'?>

</body>
</html>