index.php 18.6 KB
Newer Older
1 2 3 4
<?php
session_start();
include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php';
DESKTOP-4R50ASQ\DELL committed
5 6

$id = $_GET['kd'];
7
?> 
8
<!DOCTYPE html>
9 10
<html>

11
    <head>
12
        <meta charset="UTF-8">
13
        <title>Cafe Bunga Toba</title>
14 15 16 17 18
        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css" media="screen" type="text/css">
        <link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="css/bootstrap.css">
DESKTOP-4R50ASQ\DELL committed
19
        <link rel="stylesheet" href="css/animate.css">
20 21 22 23 24 25 26 27
        <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">

        <link rel="stylesheet" href="css/style-portfolio.css">
        <link rel="stylesheet" href="css/picto-foundry-food.css" />
        <link rel="stylesheet" href="css/jquery-ui.css">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link href="css/font-awesome.min.css" rel="stylesheet">
        <link rel="icon" href="favicon-1.ico" type="image/x-icon">
28
    </head>
29 30 31 32 33

    <body>

        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="container">
DESKTOP-4R50ASQ\DELL committed
34
                <ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s"></ul>
35
                <div class="row">
36
                    <!-- Brand and toggle get grouped for better mobile display -->
37 38 39 40 41 42 43
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
44
                        <a class="navbar-brand" href="index.php">Cafe BUNGA TOBA</a>
45
                    </div>
46

47
                    <!-- Collect the nav links, forms, and other content for toggling -->
DESKTOP-4R50ASQ\DELL committed
48
                    <ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s">
49 50
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        <ul class="nav navbar-nav main-nav  clear navbar-right ">
51
                            <li><a class="navactive color_animation" href="index.php">WELCOME</a></li>
52 53
                            <?php
                            if (isset($_SESSION['isLogin']) && (get_session('role') == "member")) {
DESKTOP-4R50ASQ\DELL committed
54 55
                                echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
                                echo('<li><a class="color_animation" href="index.php #menu">MENU</a></li>');
56
                                echo('<li><a class="color_animation" href="pesanan.php">PESANAN</a></li>');
DESKTOP-4R50ASQ\DELL committed
57
                                echo('<li><a class="color_animation" href="upload_bukti.php">PEMBAYARAN</a></li>');
58 59 60
                                echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
                            }
                            if (isset($_SESSION['isLogin']) && (get_session('role') == "karyawan" || get_session('role') == "admin")) {
61
                                echo('<li><a class="color_animation" href="tambah_menu.php">OLAH MENU</a></li>');
DESKTOP-4R50ASQ\DELL committed
62
                                echo('<li><a class="color_animation" href="daftar_pesanan.php">DAFTAR PESANAN</a></li>');
63
                                echo('<li><a class="color_animation" href="list_komentar.php">DAFTAR KOMENTAR</a></li>');
64 65 66
                                echo('<li><a class="color_animation" href="logout.php">LOGOUT (' . get_session('first_name') . ')</a></li>');
                            }
                            if (!isset($_SESSION['isLogin'])) {
DESKTOP-4R50ASQ\DELL committed
67
                                echo('<li><a class="color_animation" href="profil.php">PROFIL</a></li>');
68 69 70
                                echo('<li><a class="color_animation" href="#menu">MENU</a></li>');
                                echo('<li><a class="color_animation" href="login.php">LOGIN</a></li>');
                                echo('<li><a class="color_animation" href="signup.php">SIGN UP</a></li>');
71 72 73 74 75 76
                            }
                            ?> 



                        </ul>
77
                    </div><!-- /.navbar-collapse -->
78
                </div>
79
            </div><!-- /.container-fluid -->
80 81 82 83 84
        </nav>

        <div id="top" class="starter_container bg">
            <div class="follow_container">
                <div class="col-md-6 col-md-offset-3">
85 86
                    <h2 class="top-title">CAFE BUNGA TOBA</h2>
                    <h2 class="white second-title">" Best in BALIGE "</h2>
87 88
                    <hr>
                </div>
89 90
            </div>
        </div>
DESKTOP-4R50ASQ\DELL committed
91
      
92 93
        <!-- ============ Menu  ============= -->

DESKTOP-4R50ASQ\DELL committed
94 95 96 97 98 99 100 101
<?php
$per_hal = 8;
$jumlah_record = mysqli_query($conn, "SELECT * from menu");
$jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal);
$page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1;
$start = ($page - 1) * $per_hal;
?>
102

DESKTOP-4R50ASQ\DELL committed
103
        
104
        <section id ="menu" class="description_content">
105 106 107 108 109
            <div class="pricing background_content">
                <h1>Daftar Menu</h1>
            </div>
            <div class="text-content container"> 
                <div class="container">
DESKTOP-4R50ASQ\DELL committed
110
                <ul class="tp-hd-lft wow fadeInDown animated" data-wow-delay="0.5s"></ul>
111 112
                    <div class="row">
                        <div id="w">
DESKTOP-4R50ASQ\DELL committed
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
        <?php 
                    if(isset($_POST['cari'])) {
                        $cari = $_POST['search'];
                        $sql  = mysqli_query($conn, "SELECT * FROM menu WHERE nama LIKE '%$cari%' ORDER BY kategori");
                    }
        ?>
                    <div class="col-lg-12">
                        <form action="" method="get">
                            <div class="input-group col-md-5 col-md-offset-7">
                                <span class="input-group-addon" id="basic-addon1"><span class="glyphicon glyphicon-search"></span></span>
                                <input type="text" class="form-control" placeholder="Cari menu di sini .." aria-describedby="basic-addon1" name="search">   
                         
                        </form>
                    </div>
 
 <div class="top-brands">
            <div class="container">
                <div class="grid_3 grid_5">
                    <div class="bs-example bs-example-tabs" role="tabpanel" data-example-id="togglable-tabs">
                        <ul id="myTab" class="nav nav-tabs" role="tablist">
                            <li role="presentation" class="active"><a href="#expeditions" id="expeditions-tab" role="tab" data-toggle="tab" aria-controls="expeditions" aria-expanded="true">Makanan</a></li>
                            <li role="presentation"><a href="#tours" role="tab" id="tours-tab" data-toggle="tab" aria-controls="tours">Minuman</a></li>
                        </ul>
                        <div id="myTabContent" class="tab-content">
                            <div role="tabpanel" class="tab-pane fade in active" id="expeditions" aria-labelledby="expeditions-tab">
                                <div class="agile-tp">
139

DESKTOP-4R50ASQ\DELL committed
140 141 142
                                    <h2>Berikut daftar buku makanan pada cafe ini</h2>
                                </div>
                                <div class="agile_top_brands_grids">
143
                                    <?php
DESKTOP-4R50ASQ\DELL committed
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
                                        $query = "SELECT * FROM menu WHERE id_kategori=1 limit $start, $per_hal";
                                        $result_set = $conn->query($query);
                                        while ($row = $result_set->fetch_assoc()) {
                                    ?>
                                    <div class="col-md-3 top_brand_left">   
                                        <div class="hover14 column">
                                            <div class="agile_top_brand_left_grid">
                                                <div class="agile_top_brand_left_grid_pos">
                                                    <img src="images/offer.png" alt=" " class="img-responsive">
                                                </div>
                                                <div class="agile_top_brand_left_grid1">
                                                    <figure>
                                                        <div class="snipcart-item block" >
                                                            <div class="snipcart-thumb">
                                                            <li class="item breakfast">
                                                <?php echo $row['nama']?><br>
                                                <img src="foto/<?php echo $row['gambar'] ?>" class="img-rounded" height="250" width="220" class="col-md-12 img-responsive">
161
                                                <h2 class="white">Rp. <?php echo $row['harga']; ?></h2>
DESKTOP-4R50ASQ\DELL committed
162
                                               <a href="pesan_barang.php?id=<?= $row['id'] ?>">
163
                                                    <button class="text-center btn-block form-btn">Pesan</button>
DESKTOP-4R50ASQ\DELL committed
164 165
                                                </a>   
                                                <?php echo $row['deskripsi']?>
166
                                            </li>
DESKTOP-4R50ASQ\DELL committed
167 168 169 170 171
                                            <br>    
                                                        </div>
                                                    </figure>
                                                </div>
                                            </div>
172
                                        </div>
DESKTOP-4R50ASQ\DELL committed
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
                                        <br>
                                    </div>
                                    <?php   
                                        }
                                    ?>
                                    <div class="clearfix"> </div>   
                                </div>
                            </div>
                            <div role="tabpanel" class="tab-pane fade" id="tours" aria-labelledby="tours-tab">
                                <div class="agile-tp">
                                    <h2>Berikut daftar buku minuman pada cafe ini</h2>
                                </div>
                                <div class="agile_top_brands_grids">
                                    <?php
                                        $query = "SELECT * FROM menu WHERE id_kategori=2 limit $start, $per_hal";
                                        $result_set = $conn->query($query);
                                        while ($row = $result_set->fetch_assoc()) {
                                    ?>
                                    <div class="col-md-3 top_brand_left">   
                                        <div class="hover14 column">
                                            <div class="agile_top_brand_left_grid">
                                                <div class="agile_top_brand_left_grid_pos">
                                                    <img src="images/offer.png" alt=" " class="img-responsive">
                                                </div>
                                                <div class="agile_top_brand_left_grid1">
                                                    <figure>
                                                        <div class="snipcart-item block" >
                                                            <div class="snipcart-thumb">
                                                            <li class="item breakfast">
                                                <?php echo $row['nama']?><br>
                                                <img src="foto/<?php echo $row['gambar'] ?>" class="img-rounded" height="250" width="220" class="col-md-12 img-responsive">
                                                <h2 class="white">Rp. <?php echo $row['harga']; ?></h2>
                                               <a href="pesan_barang.php?id=<?= $row['id'] ?>">
                                                    <button class="text-center btn-block form-btn">Pesan</button>
                                                </a>   
                                                <?php echo $row['deskripsi']?>
                                            </li>
                                            <br>    
                                                        </div>
                                                    </figure>
                                                </div>
                                            </div>
                                        </div>
                                        <br>
                                    </div>
                                    <?php   
                                        }
                                    ?>
                                    <div class="clearfix"> </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <!-- //top-brands -->
                
<div class="col-md-12">
  <ul class="pagination">           
    <?php
    for ($x = 1; $x <= $halaman; $x++) {
        ?>
        <li><a href="?page=<?php echo $x ?>"><?php echo $x ?></a></li>
        <?php
    }
    ?>                      
</ul>
241 242 243 244

                                </div>
                            </ul>

245
                        </div><!-- @end #w -->
246 247 248 249 250 251
                    </div>
                </div>
            </div>  
        </section>
        <br><br><br><br><br><br><br><br><br><br><br><br>

252
        <!-- ============ Komentar  ============= -->
253

254 255
        <section  id="komentar"  class="description_content">
            <div class="bread background_content">
DESKTOP-4R50ASQ\DELL committed
256 257
                <h1>Beri Saran/Pertanyaan</h1>
                <h2 class="white second-title">"Jika anda memiliki saran ataupun pertanyaan,anda dapat mengisi formulir dibawah ini"</h2>
258 259 260 261 262
            </div>
            <div class="text-content container"> 
                <div class="inner contact">
                    <!-- Form Area -->
                    <center>
263 264
                        <div class="contact-form">
                            <!-- Form -->
265
                            <form id="contact-us" method="post" action="komentar_process.php">
266 267 268 269 270
                                <!-- Left Inputs -->
                                <div class="container">
                                    <div class="row">
                                        <div class="col-lg-8 col-md-6 col-xs-12">
                                            <div class="row">
271
                                                <div class="col-lg-12 col-md-6 col-xs-6">
272
                                                    <!-- Name -->
273
                                                    <input type="text" name="name" id="first_name" required="required" class="form" placeholder="Name" />
274
                                                    <input type="email" name="email" id="email" required="required" class="form" placeholder="Email" />
275
                                                    <textarea name="message" id="message" class="form textarea"  placeholder="Message"></textarea>
276 277 278 279 280

                                                </div>

                                                <div class="col-xs-6 ">
                                                    <!-- Send Button -->
281
                                                    <button type="submit" id="submit" name="submit" class="text-center form-btn form-btn">Send</button> 
282 283 284 285 286
                                                </div>

                                            </div>
                                        </div>

287

288 289
                                    </div>
                                </div>
290
                                <!-- Clear -->
291 292 293
                                <div class="clear"></div>
                            </form>
                        </div><!-- End Contact Form Area -->
294 295 296 297
                    </center>
                </div><!-- End Inner -->
            </div>
        </section>
298

DESKTOP-4R50ASQ\DELL committed
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327
        <!-- ============ Tampilan Komentar =========== -->
         <div class="text-content container"> 
                <div class="inner contact">
                    <div class="container">
                    <div class="col-lg-8 col-md-6 col-xs-12">
                    <div class="row">
                        <div class="col-lg-12 col-md-6 col-xs-6">
                        <h2>Komentar:</h2><br>
                        </div>      
                        <br><br><br><br>
                        <div class="col-lg-12">
                            <?php
                            $query = "SELECT * FROM komentar";
                            $result_set = $conn->query($query);

                            while ($row = $result_set->fetch_assoc()) {
                                ?>
                                <div class="alert alert-success" role="alert"> <strong><?= $row['name'] ?></strong>
                                    <p> <?= $row['komentar'] ?></p></div>

                            <?php }
                            ?> 
                        </div>
                        </div>
                    </div>
                </div>
            </div>
        </div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

328 329 330 331 332

        <!-- ============ Footer Section  ============= -->
        <br>
        <footer class="sub_footer">
            <div class="container">
333 334 335
                <div class="col-md-4"><p class="sub-footer-text text-center">&copy; Cafe Bunga Toba, Design by <a href="https://themewagon.com/">PA1-1617-D3TI05</a></p></div>
                <div class="col-md-4"><p class="sub-footer-text text-center">Back to <a href="#top">TOP</a></p>
                </div>
DESKTOP-4R50ASQ\DELL committed
336
                <div class="col-md-4"><p class="sub-footer-text text-center">Built With Care By <a href="#" target="_blank">Us</a></p></div>
337 338 339 340 341 342 343 344 345 346
            </div>
        </footer>


        <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="js/bootstrap.min.js" ></script>
        <script type="text/javascript" src="js/jquery-1.10.2.js"></script>     
        <script type="text/javascript" src="js/jquery.mixitup.min.js" ></script>
        <script type="text/javascript" src="js/main.js" ></script>

347 348
    </body>
</html>