-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrestaurant.php
More file actions
171 lines (147 loc) · 7.46 KB
/
restaurant.php
File metadata and controls
171 lines (147 loc) · 7.46 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
session_start();
if(empty($_SESSION)){
header('Location:index.php');
}
if(!empty($_GET)){
$error=1;
//echo $error;
}else{
$error=0;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Zomato Home</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<!--Bootstrap CDNs-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
<script type="text/javascript">
$(document).ready(function () {
var error='<?php echo $error ?>';
if(error==1){
var errorCode='<?php echo $_GET['msg'] ?>';
if(errorCode==11){
$('#regResError').html('<p style="color: red">** Restaurant name exist.**</p>');
}
if(errorCode==12){
$('#regResError').html('<p style="color: red">Some error occured. Try again</p>');
}
if(errorCode==13){
alert("Restaurant details uploaded successfully");
}
}
})
</script>
<script>
$(document).ready(function(){
$('#RestaurantCard').hide();
$('#MenuCard').show();
$('#Menu').removeClass('btn-outline-primary');
$('#Menu').addClass('btn-primary');
$('#Restaurant').click(function(){
$(this).removeClass('btn-outline-danger');
$(this).addClass('btn-danger');
$('#Menu').addClass('btn-outline-primary');
$('#Menu').removeClass('btn-primary');
$('#RestaurantCard').show(255);
$('#MenuCard').hide(255);
});
$('#Menu').click(function (){
$(this).removeClass('btn-outline-primary');
$(this).addClass('btn-primary');
$('#Restaurant').addClass('btn-outline-danger');
$('#Restaurant').removeClass('btn-danger');
$('#RestaurantCard').hide(255);
$('#MenuCard').show(255);
});
});
</script>
<body class="bg-nav" onload="myLoading()">
<div id="loadingScreen"></div>
<?php include "includes/admin_header.php"; ?>
<!-- Customize nav bar -->
<div class="container mt-20">
<div class="row">
<div class="col-10 offset-1">
<div class="row">
<div class="col-12">
<div class="row">
<div class="col-4">
<div class="card">
<div class="card-body">
<img src="<?php echo $_SESSION['r_photo'] ?>" alt="" class="card-img-top">
<h3 class="card-title"><?php echo $_SESSION['r_name']; ?></h3>
<h4><?php echo $_SESSION['r_Qui']; ?></h4>
</div>
</div>
</div>
<div class="col-7">
<div class="card">
<div id="SubmitToggle" class="card-title">
<ul style="list-style-type: none" class="container p-3 mb-5 rounded">
<li><a id="Menu" style="float:left; width: 49%" class="col-6 btn btn-outline-primary rounded" href="#">Menu</a></li>
<li><a id="Restaurant" style="float:left; width: 49%" class="col-6 btn btn-outline-danger rounded" href="#">Restaurant</a></li>
</ul>
</div>
<div id="RestaurantCard" class="card-body"><hr>
<form class="form" enctype="multipart/form-data" action="change_store.php" method="post">
<h4 class="text-center">Change Restaurant Details</h4><br>
<div id="regResError"></div>
<label>Restaurant Name</label><br>
<input type="text" class="form-control" name="restaurant_ka_name" required><br>
<label>Restaurant Rating</label><br>
<input type="text" class="form-control" name="restaurant_ka_rating" required><br>
<label>Restaurant Cuisine</label><br>
<input type="text" class="form-control" name="restaurant_ka_cuisine" required><br>
<label>Restaurant Photo</label><br>
<input class="form-control-file" type="file" name="restaurant_ka_photo" required><br><br>
<input type="submit" id="submitStore" value="Register here" class="btn btn-primary btn-block">
</form>
</div>
</div>
<div class="card">
<div id="MenuCard" class="card-body">
<form class="form" action="reg_menu.php" method="post">
<h4 class="text-center">Create New menu</h4>
<label>Menu</label><br>
<input type="text" class="form-control" name="menu_ka_name" required><br>
<label>Price</label><br>
<input type="text" class="form-control" name="menu_ka_price" required><br>
<label style="margin-bottom: 7px">Menu Type <label></label><br>
<div style="margin-left: 60px" class="form-check">
<input class="form-check-input" type="radio" name="mType" id="exampleRadios1" value="Non-Veg">
<label class="form-check-label" for="exampleRadios1">Non-Veg</label>
</div>
<div style="margin-left: 60px" class="form-check">
<input class="form-check-input" type="radio" name="mType" id="exampleRadios2" value="Veg" required>
<label class="form-check-label" for="exampleRadios2">Veg</label>
</div><br>
<input type="submit" value="Create menu" class="btn btn-primary btn-lg">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Pre-Loader Script -->
<script>
var preloader = document.getElementById('loadingScreen');
function myLoading(){
preloader.style.display = 'none';
}
</script>
</body>
</html>