-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
241 lines (227 loc) · 10.9 KB
/
contact.html
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DulichVN - Contact</title>
<link rel="stylesheet" type="text/css" href="styles/css/main_style.css">
<link rel="stylesheet" type="text/css" href="styles/css/Animation.css">
<!-- CSS-->
<!-- <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/npm/[email protected]/slick/slick.css"/>-->
<!-- JS-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link rel='stylesheet' href='https://cdn.rawgit.com/t4t5/sweetalert/v0.2.0/lib/sweet-alert.css'>
<script src='https://cdn.rawgit.com/t4t5/sweetalert/v0.2.0/lib/sweet-alert.min.js'></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<script>
window.onscroll = function () {
scrollFunction()
};
function scrollFunction() {
if (document.body.scrollTop > 35 || document.documentElement.scrollTop > 35) {
$(document).ready(function () {
$(".top_bar").hide();
});
} else {
$(document).ready(function () {
$(".top_bar").show();
});
}
}
</script>
<script language="javascript">
function validateForm() {
var check_email = /^[A-Za-z0-9_.]{6,32}@([a-zA-Z0-9]{2,12})(.[a-zA-Z]{2,12})+$/;
var a = document.getElementById('form_name').value;
var b = document.getElementById('form_email').value;
var c = document.getElementById('form_subject').value;
var d = document.getElementById('form_mess').value;
if (a == '') {
swal('Vui lòng nhập Tên');
} else if (!check_email.test(b)) { //so sanh
swal('Email không đúng, vui lòng nhập lại');
} else if (c == '') {
swal("Vui lòng nhập chủ đề")
} else if (d == '') {
swal("Vui lòng nhập nội dung")
} else {
//Lấy all dữ liệu trong form
var data = $('form#form_contact').serialize();
$.ajax({
type: 'POST', //kiểu post
url: 'test.php', //gửi dữ liệu sang trang test.php
data: data,
success: function (data) {
if (data == 'false') {
swal('gửi thất bại');
} else {
swal("Thành công!", "Nội dung đã được gửi", "success");
$('#contact').html(data);
}
}
});
// return true;
}
return false;
}
</script>
</head>
<body>
<div id="wrapper">
<!-- Header -->
<header class="header">
<!-- Top Bar -->
<div class="top_bar">
<div class="bar__info">
<div class="phone">0123456789</div>
<div class="social">
<ul class="social_list">
<li class="social_list_item"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
<li class="social_list_item"><a href="#"><i class="fab fa-twitter"></i></a></li>
<li class="social_list_item"><a href="#"><i class="fab fa-youtube"></i></a></li>
</ul>
</div>
</div>
<div class="bar__user">
<div class="bar__user-login"><a href="#">login</a></div>
<div class="bar__user-regis"><a href="#">register</a></div>
</div>
</div>
<div class="main_nav">
<div class="main_nav__logo"><a href="#"><img src="styles/images/logo.png" alt="logo"> DulichVN</a></div>
<div class="main_nav__menu">
<ul class="main_nav__list">
<li class="main_nav__item"><a href="index.html">TRANG CHỦ</a></li>
<li class="main_nav__item"><a href="about.html">GIỚI THIỆU</a></li>
<li class="main_nav__item"><a href="offers.html">ƯU ĐÃI</a></li>
<li class="main_nav__item"><a href="blog.html">TIN TỨC</a></li>
<li class="main_nav__item"><a href="contact.html">LIÊN HỆ</a></li>
</ul>
</div>
<div class="main_nav__search"></div>
</div>
</header>
<div class="main">
<div class="main__slide_offers">
<div class="home_slide__item">
<div class="home_slide__background"
style="background-image: url(styles/images/offers_slide.jpg)"></div>
<div class="home__content">
<div class="home__title animated bounceInDown">
Liên hệ
</div>
</div>
</div>
</div>
<!-- contact-->
<div class="contact_form_container">
<div class="box contact_form__box">
<div class="contact_form__title">Form liên hệ</div>
<form action="" id="form_contact" class="contact__form" method="post" name="form_contact"
onsubmit="return validateForm()">
<label>
<input id="form_name" class="contact__form_name input_field" name="name" placeholder="Họ và Tên"
type="text" value="">
</label>
<label>
<input id="form_email" class="contact__form_email input_field" name="email" placeholder="E-mail"
type="text" value="">
</label>
<label>
<input id="form_subject" class="contact__form_subject input_field" name="subject"
placeholder="Chủ đề" type="text">
</label>
<textarea name="mess" id="form_mess" placeholder="Nội dung" rows="4"
class="contact__form_mess input_field"></textarea>
<input type="submit" class="contact__form_button button trans_200" value="gửi đi">
</form>
</div>
</div>
</div>
<footer class="footer">
<div class="box footer__box">
<div class="footer__about">
<div class="footer__logo">
<div class="logo">
<a href="#"><img src="styles/images/logo.png" alt="">DulichVN</a>
</div>
</div>
<p class="footer_about__text">
DulichVN tự hào là một đơn vị tiêu biểu trong lĩnh vực tour du lịch đón nhận giải thưởng uy tín
nhất dành cho cộng đồng doanh nghiệp Việt Nam.
</p>
<ul class="footer_social_list">
<li class="footer_social_item"><a href="#"><i class="fab fa-facebook-f"></i></a></li>
<li class="footer_social_item"><a href="#"><i class="fab fa-twitter"></i></a></li>
<li class="footer_social_item"><a href="#"><i class="fab fa-youtube"></i></a></li>
</ul>
</div>
<div class="footer__blog">
<div class="footer_title">bản tin</div>
<div class="footer_blog__item">
<div class="footer_blog__image"><img src="styles/images/footer_blog_1.jpg" alt=""></div>
<div class="footer_blog__content">
<div class="footer_blog__title"><a href="#">Địa điểm du lịch Hè 2022</a></div>
<div class="footer_blog__date">30/04/2022</div>
</div>
</div>
<div class="footer_blog__item">
<div class="footer_blog__image"><img src="styles/images/footer_blog_1.jpg" alt=""></div>
<div class="footer_blog__content">
<div class="footer_blog__title"><a href="#">Địa điểm du lịch Hè 2022</a></div>
<div class="footer_blog__date">30/04/2022</div>
</div>
</div>
<div class="footer_blog__item">
<div class="footer_blog__image"><img src="styles/images/footer_blog_1.jpg" alt=""></div>
<div class="footer_blog__content">
<div class="footer_blog__title"><a href="#">Địa điểm du lịch Hè 2022</a></div>
<div class="footer_blog__date">30/04/2022</div>
</div>
</div>
</div>
<div class="footer__tags">
<div class="footer_title">Tags</div>
<ul class="tags_list">
<li class="tags_item"><a href="#">Miền Bắc</a></li>
<li class="tags_item"><a href="#">Miền Trung</a></li>
<li class="tags_item"><a href="#">Miền Nam</a></li>
<li class="tags_item"><a href="#">Đà Nẵng</a></li>
<li class="tags_item"><a href="#">Quảng Nam</a></li>
<li class="tags_item"><a href="#">Huế</a></li>
</ul>
</div>
<div class="footer__contact">
<div class="footer_title">Liên hệ</div>
<ul class="contact_list">
<li class="contact_item">
<div class="contact_icon"><i class="fas fa-map-marker-alt"></i></div>
<div class="contact_text">Hà Nội</div>
</li>
<li class="contact_item">
<div class="contact_icon"><i class="fas fa-phone-square"></i></div>
<div class="contact_text">0123456789</div>
</li>
<li class="contact_item">
<div class="contact_icon"><i class="fas fa-envelope"></i></div>
<div class="contact_text">[email protected]</div>
</li>
<li class="contact_item">
<div class="contact_icon"><i class="fas fa-globe-asia"></i></div>
<div class="contact_text">www.DulichVN.tk</div>
</li>
</ul>
</div>
</div>
</footer>
</div>
</body>
<script src="styles/js/main_js.js"></script>
<script>
$(function () {
$("#tabs").tabs();
});
</script>
</html>