forked from chriscarrillo/Reciplease
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
80 lines (76 loc) · 2.83 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Reciplease | Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="images/png" href="images/favicon.png" />
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="styles/default.css" />
<link rel="stylesheet" type="text/css" href="styles/medium.css" media="only screen and (max-width: 1100px)" />
<link rel="stylesheet" type="text/css" href="styles/small.css" media="only screen and (max-width: 750px)" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/modal.js"></script>
</head>
<body id="homePage">
<?php include "templates/functions.php" ?>
<div id="home">
<?php
session_start();
include "templates/logo.php";
?>
</div>
<form action="" method="post" id="searchForm" class="form">
<input type="text" id="search" name="search" placeholder="search" /><br />
<input type="submit" id="searchSubmit" name="searchSubmit" />
</form>
<div id="title">
<h1 id="title1">your recipes...</h1>
<h1 id="title2">prepared fresh daily</h1>
</div>
<div id="tabs">
<ul>
<li><h1>home</h1></li>
<li><a href="popular/">popular</a></li>
<?php
if (isLoggedIn()) {
?>
<li><a href="pantry/">pantry</a></li>
<li><a href="profile/">profile</a></li>
<li><a href="logout.php">logout</a></li>
<?php
} else {
?>
<li><a href="login/">login</a></li>
<?php
}
?>
</ul>
</div>
<div class="container clear">
<div class="row">
<div class="results"></div>
</div>
<div class="text-center" id="loading">
<img src="images/ajax-loader.gif" id="ani_img" style="width: 50px" />
</div>
</div>
<?php
$isSearch = false;
if (isset($_POST["searchSubmit"])) {
$isSearch = true;
?>
<script type="text/javascript">search(<?= "\"" . $_POST["search"] . "\"" ?>);</script>
<?php
} else if (isLoggedIn() && $isSearch == false) {
?>
<script type="text/javascript" src="js/scroll.js"></script>
<?php
} else {
?>
<script type="text/javascript" src="js/scrollPop.js"></script>
<?php
}
?>
</body>
</html>