-
Notifications
You must be signed in to change notification settings - Fork 0
/
myrestaurant1.php
103 lines (82 loc) · 3 KB
/
myrestaurant1.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
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
<?php
include('session_m.php');
if(!isset($login_session)){
header('Location: managerlogin.php');
}
$name = $conn->real_escape_string($_POST['name']);
$email = $conn->real_escape_string($_POST['email']);
$contact = $conn->real_escape_string($_POST['contact']);
$address = $conn->real_escape_string($_POST['address']);
$query = "INSERT INTO RESTAURANTS(name,email,contact,address,M_ID) VALUES('" . $name . "','" . $email . "','" . $contact . "','" . $address ."','" . $_SESSION['login_user1'] ."')";
$success = $conn->query($query);
if (!$success){
?>
<!DOCTYPE html>
<html>
<head>
<title>change</title>
<link rel="stylesheet" type = "text/css" href ="css/add_food_items.css">
<link rel="stylesheet" type = "text/css" href ="css/bootstrap.min.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</head>
<body>
<button onclick="topFunction()" id="myBtn" title="Go to top">
<span class="glyphicon glyphicon-chevron-up"></span>
</button>
<script type="text/javascript">
window.onscroll = function()
{
scrollFunction()
};
function scrollFunction(){
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<nav class="navbar navbar-inverse navbar-fixed-top navigation-clean-search" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">Le Cafe'</a>
</div>
<div class="collapse navbar-collapse " id="myNavbar">
<ul class="nav navbar-nav">
<li class="active" ><a href="index.php">Home</a></li>
<li><a href="aboutus.php">About</a></li>
<li><a href="contactus.php">Contact Us</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up </a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login </a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron" style="text-align: center;">
<h1>Your already have one restaurant.</h1>
<p>Go back to your <a href="view_food_items.php">Restaurant</a></p>
</div>
</div>
</body>
</html>
<?php
}
else {
header('Location: myrestaurant.php');
}
$conn->close();
?>