Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ACCOUNT.PHP FILE
- <?php
- //include('./assets/connect.php');
- include('./assets/mealofday.php');
- //include('./assets/listproducts.php');
- ?>
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Hungry | Order Online</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="css/global.css" rel="stylesheet">
- <link href="css/header.css" rel="stylesheet">
- <link href="css/account.css" rel="stylesheet">
- <!----- UNDER DEVELOPMENT ------------>
- <link rel="stylesheet" href="css/panelstyle.css">
- <!-------------------------------------->
- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet">
- <link href='https://fonts.googleapis.com/css?family=Rancho|Gudea' rel='stylesheet' type='text/css'>
- <script src="js/jquery-1.11.3.min.js"></script>
- <script src="js/scroll_stick.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('body').on('click', '.category', function(){
- var category = $(this).data('categories');
- //alert(category);
- $('.category').fadeOut(300);
- $.ajax({
- type: "POST",
- url: "./assets/listproducts.php",
- data: {cat: category},
- cache: false,
- success: function(response){
- //console.log(response);
- $('#nav').html('Back').addClass('back');
- $('.items').html(response).delay(400).fadeIn(300);
- }
- });
- });
- $('#action_bar').on('click', '.back', function(e){
- e.preventDefault();
- //alert('click');
- $('.items').fadeOut(300);
- $('.category').delay(400).fadeIn(300);
- $('#nav').html('CATEGORIES').removeClass();
- });
- });
- </script>
- </head>
- <body>
- <?php include('./includes/header.php'); ?>
- <div id="greetings_container">
- <div id="greeting_line">Hi<br>USER,</div>
- <div id="meal_time"><span><?php echo $message; ?></span></div>
- <div id="down_arrow"><i class="fa fa-angle-double-down fa-lg" aria-hidden="true"></i></div>
- </div>
- <div id="sticky-anchor"></div>
- <div id="action_bar">
- <div id="cart"><i class="fa fa-shopping-cart" aria-hidden="true"></i><div class="total">20</div></div>
- <a id="nav">CATEGORIES</a>
- <div id="filter"><i class="fa fa-filter" aria-hidden="true"></i><div class="total">1</div></div>
- </div>
- <div id="main_container">
- <div id="coupon">
- <div id="left_content">
- <div id="coupon_heading">COUPON ★★★ </div>
- <div id="coupon_text">USE <strong><i>NEW20</i></strong> TO GET AN ADDITIONAL 20% OFF</div>
- </div>
- <div id="right_content">
- <div id="exclamation">OPENING<br>SALE</div>
- </div>
- </div>
- <div id="content">
- <div id="category1" class="category" data-categories="SPL">
- <img src="images/c_w.png"><div class="category_description">Chef's Special</div>
- </div>
- <div id="category2" class="category" data-categories="LCH">
- <img src="images/l_w.png"><div class="category_description">Lunch</div>
- </div>
- <div id="category3" class="category" data-categories="SNK">
- <img src="images/s_w.png"><div class="category_description">Snacks</div>
- </div>
- <div id="category4" class="category" data-categories="DNR">
- <img src="images/d_w.png"><div class="category_description">Dinner</div>
- </div>
- <ul class="items">
- <!-- Menu List -->
- </ul>
- </div>
- </div>
- <!----------------------------------------- UNDER CONSTRUCTION STARTS -------------------------------------------------------->
- <div class="cd-panel from-right">
- <header class="cd-panel-header">
- <h1>Your Cart</h1>
- <a href="#0" class="cd-panel-close">Close</a>
- </header>
- <div class="cd-panel-container">
- <div class="cd-panel-content">
- <p>TEXT HERE</p>
- </div> <!-- cd-panel-content -->
- </div> <!-- cd-panel-container -->
- </div> <!-- cd-panel -->
- <!----------------------------------------- UNDER CONSTRUCTION ENDS -------------------------------------------------------->
- </div>
- <!-- UNDER CONSTRUCTION ---->
- <script src="js/main.js"></script>
- <!-------------------------->
- </body>
- </html>
- //listproducts.php
- <?php
- include('./connect.php');
- $list = '';
- $data = array();
- if($_POST['cat']){
- $filter = $_POST['cat'];
- //echo ($filter);
- //die();
- $sql = "SELECT * FROM menucard WHERE itemcategory='".$filter."'";
- $result = mysqli_query($db, $sql);
- while($row=mysqli_fetch_array($result)){
- $data[] = $row;
- }
- //<?php
- foreach($data as $item_details){
- /*?>*/
- $list.='<li>
- <img src="'.$item_details['itemimage'].'">
- <div class="right_content">
- <h4>'.$item_details['itemname'].'</h4>
- <div class="inner_left">
- <div class="type">'.$item_details['itemtype'].'</div>
- <div class="serves">Serves: '.$item_details['itemserving'].'</div>
- <div class="quantity">Qty: <input class="qty" type="number" min="1" value="1"></div>
- </div>
- <div class="inner_right">
- <div class="price">₹ '.$item_details['itemprice'].'/-</div>
- <button class="add_to_cart" type="button"><i class="fa fa-cart-plus" aria-hidden="true"> YUM</i></button>
- </div>
- </div>
- </li>';
- /*<?php*/
- } /*?>*/
- if($list == ''){
- echo ('We dont have any items under this category!');
- }
- else{
- echo ($list);
- }
- }
- ?>
- //ACCOUNT.CSS
- @charset "utf-8";
- /* CSS Document */
- .stick {
- margin-top: 0 !important;
- position: fixed;
- width:100%;
- top: 0;
- z-index: 200;
- }
- /* Animation for the down arrow */
- @-webkit-keyframes transform-bounch
- {
- 0% { -webkit-transform: rotate(0deg); }
- 20% { -webkit-transform: rotate(0deg); }
- 40% { -webkit-transform: rotate(0deg) translate(0px,-30px); }
- 50% { -webkit-transform: rotate(0deg) translate(0px,0px); }
- 60% { -webkit-transform: rotate(0deg) translate(0px,-15px); }
- 80% { -webkit-transform: rotate(0deg) translate(0px,0px); }
- 100% { -webkit-transform: rotate(0deg) translate(0px,0px); }
- }
- @-moz-keyframes transform-bounch
- {
- 0% { -moz-transform: rotate(0deg); }
- 20% { -moz-transform: rotate(0deg); }
- 40% { -moz-transform: rotate(0deg) translate(0px,-30px); }
- 50% { -moz-transform: rotate(0deg) translate(0px,0px); }
- 60% { -moz-transform: rotate(0deg) translate(0px,-15px); }
- 80% { -moz-transform: rotate(0deg) translate(0px,0px); }
- 100% { -moz-transform: rotate(0deg) translate(0px,0px); }
- }
- @-o-keyframes transform-bounch
- {
- 0% { -o-transform: rotate(0deg); }
- 20% { -o-transform: rotate(0deg); }
- 40% { -o-transform: rotate(0deg) translate(0px,-30px); }
- 50% { -o-transform: rotate(0deg) translate(0px,0px); }
- 60% { -o-transform: rotate(0deg) translate(0px,-15px); }
- 80% { -o-transform: rotate(0deg) translate(0px,0px); }
- 100% { -o-transform: rotate(0deg) translate(0px,0px); }
- }
- @-ms-keyframes transform-bounch
- {
- 0% { -ms-transform: rotate(0deg); }
- 20% { -ms-transform: rotate(0deg); }
- 40% { -ms-transform: rotate(0deg) translate(0px,-30px); }
- 50% { -ms-transform: rotate(0deg) translate(0px,0px); }
- 60% { -ms-transform: rotate(0deg) translate(0px,-15px); }
- 80% { -ms-transform: rotate(0deg) translate(0px,0px); }
- 100% { -ms-transform: rotate(0deg) translate(0px,0px); }
- }
- @keyframes transform-bounch
- {
- 0% { transform: rotate(0deg); }
- 20% { transform: rotate(0deg); }
- 40% { transform: rotate(0deg) translate(0px,-30px); }
- 50% { transform: rotate(0deg) translate(0px,0px); }
- 60% { transform: rotate(0deg) translate(0px,-15px); }
- 80% { transform: rotate(0deg) translate(0px,0px); }
- 100% { transform: rotate(0deg) translate(0px,0px); }
- }
- /*------------------------- END ANIMATION ----------------------------*/
- html, body
- {
- height:100%;
- }
- #greetings_container
- {
- background-color: hsla(0,5%,52%,1.00);
- background-image: url(../images/bg1.jpg);
- background-repeat: no-repeat;
- background-position: center center;
- background-size: cover;
- width:100%;
- height:calc(100% - 65px);
- word-wrap:break-word;
- }
- #greeting_line
- {
- text-align:center;
- color:#FFFFFF;
- font-size:95px;
- font-family: 'Rancho', cursive;
- padding-top:10%;
- padding-left:20px;
- padding-right:20px;
- margin-bottom:25px;
- }
- #meal_time
- {
- background-color: #ED734F;
- text-align:center;
- color:#FFFFFF;
- font-size:35px;
- font-family: 'Gudea', sans-serif;
- border-radius:35px;
- margin-left:30%;
- margin-right:30%;
- word-wrap:break-word;
- padding:3px;
- }
- #down_arrow
- {
- color:#FFFFFF;
- font-size:36px;
- text-align:center;
- position: absolute;
- bottom:20px;
- width:100%;
- -webkit-animation: transform-bounch 2500ms linear 1000ms infinite normal;
- -moz-animation: transform-bounch 2500ms linear 1000ms infinite normal;
- animation: transform-bounch 2500ms linear 1000ms infinite normal;
- }
- #action_bar
- {
- background-color:#FFFFFF;
- color:#20AC76;
- clear:both;
- overflow:hidden;
- width:100%;
- text-align:center;
- font-family:'Rancho', cursive;
- font-size:24px;
- }
- #nav
- {
- color:#20AC76;
- padding: 10px;
- display: inline-block;
- }
- #cart
- {
- right:0;
- width:15%;
- height:10%;
- background-color:#20AC76;
- color:#FFFFFF;
- padding:10px;
- float:right;
- border:#1C9767 1px solid;
- font-size:22px;
- text-align:left;
- }
- .fa fa-shopping-cart
- {
- float:left;
- }
- .total
- {
- float:right;
- text-align:center;
- border-radius:50%;
- -moz-border-radius:50%;
- -webkit-border-radius:50%;
- background-color:#FFFFFF;
- color:#20AC76;
- min-width:20px;
- height:20px;
- font-size:1rem;
- padding:2px;
- font-family:'Source Sans Pro', sans-serif;
- }
- #cart:after
- {
- content:' Cart';
- }
- .category
- {
- width:100%;
- overflow:hidden;
- }
- .category_description
- {
- color:#FFFFFF;
- font-family: 'Rancho', cursive;
- }
- #category1
- {
- background-color:#2A6B0F;
- }
- #category2
- {
- background-color:#A43F12;
- }
- #category3
- {
- background-color: #B49B30;
- }
- #category4
- {
- background-color: #326FAF;
- }
- ul.items
- {
- padding:0;
- margin:0;
- display:none;
- }
- .hide
- {
- display:none;
- }
- .show
- {
- display:block;
- }
- @media only screen and (min-width: 320px) and (max-width: 480px) and (orientation: portrait)
- {
- #greeting_line
- {
- text-align:center;
- color:#FFFFFF;
- font-size:78px;
- font-family: 'Rancho', cursive;
- padding-top:20%;
- padding-left:20px;
- padding-right:20px;
- margin-bottom:25px;
- }
- #meal_time
- {
- background-color: #ED734F;
- text-align:center;
- color:#FFFFFF;
- font-size:35px;
- font-family: 'Gudea', sans-serif;
- border-radius:35px;
- margin-left:15%;
- margin-right:15%;
- word-wrap:break-word;
- padding:3px;
- }
- #filter
- {
- width:20%;
- height:10%;
- background-color:#20AC76;
- color:#FFFFFF;
- padding:10px;
- border:#1C9767 1px solid;
- font-size:22px;
- text-align:center;
- float:left;
- }
- #cart
- {
- right:0;
- width:20%;
- height:10%;
- background-color:#20AC76;
- color:#FFFFFF;
- padding:10px;
- float:right;
- border:#1C9767 1px solid;
- font-size:22px;
- text-align:center;
- }
- #cart:after
- {
- content: normal;
- }
- .total
- {
- min-width: 20px;
- height: 20px;
- font-size: 1rem;
- margin-right: 7%;
- margin-top:2px;
- }
- #main_container
- {
- width:100%;
- }
- #coupon
- {
- margin:2px;
- color:#FFFFFF;
- background-color:#CC787A;
- display:inline-block;
- border: solid 2px #6E393A;
- box-sizing:border-box;
- width:calc(100% - 4px);
- clear:both;
- }
- #left_content
- {
- width:55%;
- border-right: dashed 2px #6E393A;
- float:left;
- word-wrap:break-word;
- padding-top:5%;
- padding-bottom:4%;
- padding-left:10px;
- padding-right:6px;
- }
- #right_content
- {
- width:33%;
- float:left;
- font-size:20px;
- word-wrap:break-word;
- padding-left:6px;
- padding-right:10px;
- padding-top:5%;
- padding-bottom:4%;
- }
- #coupon_heading
- {
- font-family: 'Gudea', sans-serif;
- font-size:22px;
- font-weight:bold;
- }
- #coupon_text
- {
- font-family: 'Gudea', sans-serif;
- font-size: 14px;
- color:#6E393A;
- }
- #exclamation
- {
- font-weight:bold;
- text-align: center;
- }
- #content
- {
- font-size:18px;
- text-align:left;
- }
- ul.items li
- {
- width:100%;
- display:inline-block;
- *display:inline;
- *zoom:1;
- margin-bottom:3px;
- border-bottom:#C4C3C3 1px solid;
- box-shadow:0px 1px 3px #C4C3C3;
- padding-bottom:5px;
- background-color:#FFFFFF;
- }
- .right_content
- {
- float:right;
- color:#000000;
- width:65%;
- }
- ul.items li img
- {
- width:30%;
- height:30%;
- float:left;
- padding:5px;
- }
- .inner_left
- {
- float:left;
- width:45%;
- }
- .inner_right
- {
- float:right;
- width:55%;
- text-align:right;
- }
- .price
- {
- text-align:right;
- font-size:28px;
- padding-right:10px;
- }
- .qty
- {
- width:40%;
- text-align:center;
- }
- .add_to_cart
- {
- width:90%;
- margin-right:5px;
- background-color:#20AC76;
- border:#1C9767 1px solid;
- color:#FFFFFF;
- font-size:20px;
- padding:3px;
- font-family: 'Gudea', sans-serif;
- }
- .category img
- {
- width:17%;
- padding:3%;
- float:left;
- display:inline-block;
- }
- .category_description
- {
- font-size:50px;
- padding:3%;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement