-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.php
151 lines (111 loc) · 4.62 KB
/
report.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="Voting System | Report/Contact" />
<meta name="description" content="Voting System | Report/Contact" />
<meta name="author" content="Florian Kodra" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="theme-color" content="#4169E1">
<title>Voting System | Report/Contact</title>
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" href="favicon.ico" type="image/x-icon">
<!-- font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:300,300i,400,500,500i,600,700,800,900|Poppins:200,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900">
<!-- Plugins -->
<link rel="stylesheet" type="text/css" href="css/plugins-css.css" />
<!-- Typography -->
<link rel="stylesheet" type="text/css" href="css/typography.css" />
<!-- Shortcodes -->
<link rel="stylesheet" type="text/css" href="css/shortcodes/shortcodes.css" />
<!-- Style -->
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!-- Responsive -->
<link rel="stylesheet" type="text/css" href="css/responsive.css" />
</head>
<body>
<div class="wrapper">
<!--=================================
preloader -->
<div id="pre-loader">
<img src="images/pre-loader/loader-03.svg" alt="">
</div>
<!--=================================
preloader -->
<!--=================================
login -->
<section class="login white-bg o-hidden scrollbar">
<div class="container-fluid p-0">
<div class="row row-eq-height no-gutter height-100vh">
<div class="col-md-6 parallax" style="background-image: url(images/Contactus.jpg);">
</div>
<div class="col-lg-5 col-md-6">
<div class="vertical-align full-width">
<div class="login-14">
<h1>Contact / Report</h1>
<form method="POST" >
<div class="pb-50 clearfix white-bg">
<div class="section-field mb-20">
<label class="mb-10" for="name">Email* </label>
<input id="name" class="web form-control" type="email" placeholder="[email protected]" name="email">
<label class="mb-10" for="name">Name* </label>
<input id="name" class="web form-control" type="text" placeholder="Firstname Lastname" name="name">
</div>
<div class="section-field mb-20">
<label class="mb-10" for="name">Choose Subject* </label>
<select id="name" class="web form-control" type="text" name="subject">
<option></option>
<option>Contact for information.</option>
<option>Report for a problem.</option>
</select>
</div>
<div class="section-field mb-20">
<label class="mb-10" for="Password">Description </label>
<textarea id="text" class="web form-control" type="text" name="description"></textarea>
</div>
<button type="submit" class="button" name="report" ><span>Send </span> <i class="fa fa-envelope"></i></button>
<p class="mt-20 mb-0">Go to <a href="index.php">MAIN PAGE</a></p>
</div>
</form>
<?php
include('conn.php');
if (isset($_POST['report']))
{
$email = $_POST['email'];
$name = $_POST['name'];
$subject = $_POST['subject'];
$description = $_POST['description'];
$to = "[email protected]";
$body='Email: '.$email .' <br> Description: '.$description .'';
mysqli_query($conn,"insert into report (email, name, subject, message) values ('$email', '$name', '$subject', '$description')");
$headers = 'From: Sistemi i Votimit Elektronik <'.$email .'>' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
mail($to, $subject, $body, $headers);
header('location: report.php');
exit;
}
?>
</div>
</div>
</div>
</div>
</div>
</section>
<!--=================================
login -->
</div>
<div id="back-to-top"><a class="top arrow" href="#top"><i class="fa fa-angle-up"></i> <span>TOP</span></a></div>
<!--=================================
jquery -->
<!-- jquery -->
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<!-- plugins-jquery -->
<script type="text/javascript" src="js/plugins-jquery.js"></script>
<!-- plugin_path -->
<script type="text/javascript">var plugin_path = 'js/';</script>
<!-- custom -->
<script type="text/javascript" src="js/custom.js"></script>
</body>
</html>