-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestionContoller.php
138 lines (115 loc) · 4.21 KB
/
questionContoller.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
<?php
include('connectToDb.php');
require ('phpmailer/PHPMailerAutoload.php');
$name = $_POST['name'];
$email = $_POST['email'];
$comment = $_POST['comment'];
$answered = false;
$btn = $_POST['send'];
$mailEmail = htmlspecialchars($_REQUEST['email']);
$mailName = htmlspecialchars($_REQUEST['name']);
$mailComment = htmlspecialchars($_REQUEST['comment']);
$message = "<b>Комментарий: <b>".$mailName.' <br></br> <b>
Его почта: '.$mailEmail.'
<br>Комментарий: '.$mailComment.'<br>
<a href= http://уничтожьменя.рф/answerController.php>Ссылка на контроллер </a>';
if(isset($btn)){
$query = mysql_query("insert into questions(name, email, answered, question) values ('$name', '$email', '$answered', '$comment')");
$mailer = new PHPMailer;
$mailer->isSMTP();
$mailer->Host = 'smtp.mail.ru';
$mailer->SMTPAuth = true;
$mailer->Username = '[email protected]';//Логин
$mailer->Password = 'ltvmzyjd90';//пароль
$mailer->SMTPSecure = 'ssl';
$mailer->Port = '465';
$mailer->CharSet = 'UTF-8';
$mailer->From = '[email protected]';
$mailer->FromName = 'Wreck This Journal';
$mailer->addAddress('[email protected]', 'Уничтожь меня');
$mailer->addAddress('[email protected]', 'Уничтожь меня');
$mailer->addAddress('[email protected]', 'Уничтожь меня');
$mailer->isHtml(true);
$mailer->Subject = 'Комментарий';
$mailer->Body = $message;
if($query && $mailer->send()){
echo("<!DOCTYPE html>
<html>
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8' />
<meta name='viewport' content='width=device-width, initial-scale=0.4'/>
<head>
<title>Wreck This Journal</title>
<link rel='shortcut icon' href='img/ks.jpeg' />
<link rel='stylesheet' href='css/style.css'>
<link rel='stylesheet' href='css/start.css'>
<link rel='stylesheet' href='css/hover.css'>
<link rel='stylesheet' href='css/review.css'>
<link rel='stylesheet' href='css/animations.css'>
<script src='js/jquery-1.11.3.js'></script>
<!--Появление-->
<script>
$(window).scroll(function() {
$('#review').each(function(){
var imagePos = $(this).offset().top;
var topOfWindow = $(window).scrollTop();
if (imagePos < topOfWindow+400) {
$(this).addClass('fadeIn');
}
});
});
</script>
<style>
body{
max-width: 1024px;
min-width: 480px;
background-color: #000000;
}
input:focus{
outline: none;
}
@font-face {
font-family: Moom;
src: url(fonts/Moonchild_Normal.ttf);
}
@font-face {
font-family: RisBold;
src: url(fonts/TkachenkoSketch4F-Bold.otf);
}
@font-face {
font-family: Etude;
src: url(fonts/Etude.ttf);
}
@font-face {
font-family: Firenight;
src: url(fonts/Firenight-Regular.otf);
}
@font-face {
font-family: BeerMoney;
src: url(fonts/beer_money.ttf);
}
a{
color: #000000;
text-decoration: none;
}
</style>
</head>
<body>
<div class='answerCircle' style='margin-top: 150px'>
<p style='font-family: Firenight; font-size: 20pt; color: #DA4040; text-align: center' class='floating'>Отзыв отправлен</p>
<p style='font-family: Firenight; font-size: 13pt; color: #000000 '>Большое спасибо за ваш отзыв,
он будет опубликован на сайте после проверки администратова в ближайшее время:))))</p>
</div>
<div class='exclamationMark'>
<p class='tossing'>!</p>
</div>
<div style='margin-top: -550px; margin-left: 620px'>
<a href='reviews.php'> <p style='font-family: Firenight; font-size: 17pt; color: #000000; '><span style='color: red; font-size: 25pt' class='closeWind'><b>X</b></span>закрыть</p></a>
</div>
</body>
</html>");
}
exit;
}else{
echo("'status':'error'");
exit;
}