-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
133 lines (102 loc) · 4.02 KB
/
view.php
File metadata and controls
133 lines (102 loc) · 4.02 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
<?php require_once("./includes/initialize.php"); ?>
<?php
if(empty($_GET['id'])) {
$session->message("No photograph ID was provided.");
redirect_to('index.php');
}
$photo = Photograph::find_by_id($_GET['id']);
if(!$photo) {
$session->message("The photo could not be located.");
redirect_to('index.php');
}
$details=Recipe::find_Recipe_by_id($photo->id);
// $sql="SELECT * from contribution WHERE Id=2";
// global $database;Fa
// $result_set$database->query($sql);
// while ($row = $database->fetch_array($result_set)) {
// print_r($row);
// }
if(!$photo) {
$session->message("The photo could not be located.");
redirect_to('index.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Nunito+Sans:400,600,700" rel="stylesheet">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/contrimain.css">
<!-- Bootstrap core CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<title>easyRecipes</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" >
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="nav_container" style="margin-left:auto;">
<div class="collapse navbar-collapse" id="navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<ul class="nav navbar-nav ">
<li class="nav-item ">
<a class="nav-link hvr-glow" href="index.php"><i class="fas fa-home"></i>HOME</a>
</li>
<li class="nav-item">
<a class="nav-link hvr-glow" href="about.html">ABOUT</a>
</li>
<li class="nav-item">
<a class="nav-link hvr-glow" href="contrilist.php">CONTRIBUTIONS <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<?php if(isset($_SESSION['user_id'])){ ?>
<a class="nav-link hvr-glow" href="logout.php"><i class="fas fa-sign-out-alt"></i>LOGOUT</a>
<?php }else{ ?>
<!-- log in -->
<a class="nav-link hvr-glow" href="login.php"><i class="fas fa-sign-in-alt"></i></i>LOGIN</a>
<?php } ?>
</li>
<li class="nav-item">
<a class="nav-link hvr-glow" href="register.php">REGISTER</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container1">
<div style="margin-left: 20px;">
<img src="<?php echo $photo->image_path(); ?>" style="border-radius: 20px 10px;" />
</div>
<div id=contribution">
<div class="comment" style="margin-bottom":2em;">
<div class="author">
<h1><b>Author:</b><?php echo $details->uName; ?><h1>
</div>
<div class="desc">
<h1><b>Description:</b><?php echo $details->Description; ?><h1>
</div>
<div class="ser">
<h1><b> Servings:</b><?php echo $details->Servings; ?><h1>
</div>
<div class="cooktime">
<h1><b>Cooking Time:</b><?php echo $details->CookingTime; ?><h1>
</div>
<div class="Ingre">
<h1><b>Ingredients:</b><?php echo $details->Ingredients; ?><h1>
</div>
<div class="Directionsr">
<h1><b>Directions:</b><?php echo $details->Direction; ?><h1>
</div>
</div>
</div>
</div>
<script src="./js/index.js" type="text/javascript">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
<script src="https://kit.fontawesome.com/344716cae9.js" crossorigin="anonymous"></script>
</body>
</html>