-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
186 lines (150 loc) · 6.68 KB
/
contact.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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
if (!isset($_SESSION)) {
session_start();
}
include("partials/connect.php");
//Kui kasutaja on sisse logitud, määra sessioonimuutuja
if (isset($_SESSION['email'])) {
$userLoggedIn = $_SESSION['email']; //Email of user
//Get user details from db
$user_details_query = mysqli_query($connect, "SELECT * FROM customers WHERE username='$userLoggedIn'");
$admin_query = mysqli_query($connect, "SELECT * FROM admins WHERE username='$userLoggedIn'");
//Kontrolli kas sisselogitud kasutaja on admin
if (mysqli_num_rows($admin_query) == 0) {
$user = mysqli_fetch_array($user_details_query); //return array from db (info about the logged in user)
} else {
$user = mysqli_fetch_array($admin_query); //return array from db (info about the logged in user)
}
}
// print_r($user);
// print_r($_SESSION);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Kontakt</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link rel="icon" type="image/png" href="images/icons/favicon.png" />
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/bootstrap/css/bootstrap.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="fonts/linearicons-v1.0.0/icon-font.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/animate/animate.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/css-hamburgers/hamburgers.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/animsition/css/animsition.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/select2/select2.min.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/daterangepicker/daterangepicker.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/slick/slick.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/MagnificPopup/magnific-popup.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="assets/perfect-scrollbar/perfect-scrollbar.css">
<!--===============================================================================================-->
<link rel="stylesheet" type="text/css" href="css/util.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
</head>
<body class="animsition">
<header class="header-v4">
<?php
//Header template
include("partials/header.php");
?>
</header>
<?php include("partials/cartmodal.php"); ?>
<!-- Title page -->
<section class="bg-img1 txt-center p-lr-15 p-tb-92" style="background-image: url('images/bg-02.jpg');">
<h2 class="ltext-105 cl0 txt-center">
Kontakt
</h2>
</section>
<!-- Content page -->
<section class="bg0 p-t-50 p-b-116">
<div class="container">
<div class="flex-w flex-tr">
<div class="size-210 bor10 p-lr-70 p-t-55 p-b-70 p-lr-15-lg w-full-md">
<form action="handler/contact.php" method="POST">
<h4 class="mtext-105 cl2 txt-center p-b-30">
Kirjuta meile
</h4>
<div class="bor8 m-b-20 how-pos4-parent">
<input class="stext-111 cl2 plh3 size-116 p-l-62 p-r-30" type="email" name="email" placeholder="Sinu E-posti aadress">
<img class="how-pos4 pointer-none" src="images/icons/icon-email.png" alt="ICON" required>
</div>
<div class="bor8 m-b-30">
<textarea class="stext-111 cl2 plh3 size-120 p-lr-28 p-tb-25" name="msg" placeholder="Kuidas saame aidata?" required></textarea>
</div>
<button class="flex-c-m stext-101 cl0 size-121 bg3 bor1 hov-btn3 p-lr-15 trans-04 pointer">
Saada
</button>
</form>
</div>
<div class="size-210 bor10 flex-w flex-col-m p-lr-93 p-tb-30 p-lr-15-lg w-full-md">
<div class="flex-w w-full p-b-42">
<span class="fs-18 cl5 txt-center size-211">
<span class="lnr lnr-map-marker"></span>
</span>
<div class="size-212 p-t-2">
<span class="mtext-110 cl2">
Aadress
</span>
<p class="stext-115 cl6 size-213 p-t-18">
<?php echo $andmed['aadress']; ?><br>
<?php echo $andmed['firmanimi']; ?><br>
<?php echo $andmed['regnr']; ?>
</p>
</div>
</div>
<div class="flex-w w-full p-b-42">
<span class="fs-18 cl5 txt-center size-211">
<span class="lnr lnr-phone-handset"></span>
</span>
<div class="size-212 p-t-2">
<span class="mtext-110 cl2">
Telefon
</span>
<p class="stext-115 cl1 size-213 p-t-18">
<?php echo $andmed['telefon']; ?>
</p>
</div>
</div>
<div class="flex-w w-full">
<span class="fs-18 cl5 txt-center size-211">
<span class="lnr lnr-envelope"></span>
</span>
<div class="size-212 p-t-2">
<span class="mtext-110 cl2">
Klienditugi
</span>
<p class="stext-115 cl1 size-213 p-t-18">
<?php echo $andmed['email']; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Map -->
<!-- <div class="map">
<div class="size-303" id="google_map" data-map-x="40.691446" data-map-y="-73.886787" data-pin="images/icons/pin.png" data-scrollwhell="0" data-draggable="1" data-zoom="11"></div>
</div> -->
<!-- Footer -->
<?php
//Footer template
include("partials/footer.php");
?>
</body>
</html>