-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
64 lines (52 loc) · 2.08 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
<?php
include 'header.php';
include 'configParameter.php';
$sql = "SELECT COUNT(*)
FROM article_category ac, article a
WHERE a.id = ac.articleid AND a.articleStatusID = ?";
$stmt = $connect -> prepare($sql);
$stmt -> bind_param('s', $articleStatus);
$stmt -> execute();
$stmt -> bind_result($numberOfArticles);
$stmt -> fetch();
$stmt -> close();
if($_SESSION[ 'USER' ])
$greeting = '<p>Hallo '.$_SESSION[ 'USER' ].', du kannst nun deinen Einkaufszettel bearbeiten oder private Einstellungen vornehmen</p>';
else
$greeting = '<div id="welcome"></div>';
$searchField = '
<form action="searchRequest.php" method="GET">
<input id="submit" type="submit" value="" name="go" />
<input id="searchField" class="autocomplete" name="searchStr" type="text" placeholder="Gib ein Produkt ein" onkeyup="doAutocomplete(this.value);" autocomplete="off" />
<div id="autocompleteBox" style="display: none;">
<img src="images/upArrow.png" style="position: relative; top: -12px; left: 30px;" alt="upArrow" />
<div id="autocompleteList"></div>
</div>
</form>';
$content = '
<p id="note">Derzeit kannst du aus über <span style="font-family: QuorumStdBlack">'.$numberOfArticles.'</span> Produkten auswählen.</p>
<ul>
<a href="categoryList.php?type=1" title="Lebensmittel"><li class="typeList buttonSmall"><div id="food"></div><div id="food_text">Essen</div></li></a>
<a href="categoryList.php?type=2" title="Getränke">
<li class="typeList buttonSmall">
<div id="drinks"></div><div id="drinks_text">Trinken</div>
</li>
</a>
<a href="categoryList.php?type=3" title="Kosmetik">
<li class="typeList buttonSmall">
<div id="cosmetics"></div><div id="cosmetics_text">Kosmetik</div>
</li>
</a>
<a href="barcodeScanner.php">
<li class="typeList buttonLarge">
<div id="barcode"></div><div id="barcode_text">Barcode-Scanner</div>
</li>
</a>
<a href="shoppingList.php">
<li class="typeList buttonLarge">
<div id="shoppingcard"></div><div id="shoppingcard_text">Einkaufsliste</div>
</li>
</a>
</ul>';
include 'footer.php';
?>