-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
399 lines (391 loc) · 23 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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
<?php
//Khai báo sử dụng session
session_start();
//Khai báo utf-8 để hiển thị được tiếng việt
header('Content-Type: text/html; charset=UTF-8');
$dtz = new DateTimeZone("Asia/Ho_Chi_Minh");
$now = new DateTime(date("Y-m-d H:i:s"), $dtz);
$time =$now->format("Y-m-d H:i:s");
//Xử lý đăng nhập
if (isset($_POST['bt_insert_question']))
{
include('connect.php');
$name = addslashes($_POST['name_question']);
$address = addslashes($_POST['address_question']);
$email = addslashes($_POST['email_question']);
$phone = addslashes($_POST['numphone_question']);
$type = addslashes($_POST['type_question']);
$question = addslashes($_POST['main_question']);
$sql="INSERT INTO tb_question ( name_question, address_question, emai_question, phone_question, type_question, question, time_question) VALUES ('".$name."' ,'".$address."','".$email."','".$phone."','".$type."','".$question."','".$time."')";
if(mysqli_query($connect, $sql)){
echo '<script language="javascript">';
echo 'alert("Câu hỏi của bạn đã được gửi đến tổ tư vấn!")';
echo '</script>';
$url=$_SERVER['REQUEST_URI'];
header("Refresh: 1; URL=$url");
}else{
echo '<script language="javascript">';
echo 'alert("Câu hỏi không gửi được hãy kiểm tra kết nối!")';
echo '</script>';
$url=$_SERVER['REQUEST_URI'];
header("Refresh: 1; URL=$url");
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="lib/jquery.js"></script>
<title>Trang tuyển sinh Đại hoc bách khoa Hà Nội</title>
<link rel="stylesheet" href="lib/bootstrap.css" type="text/css" media="screen">
<link rel="stylesheet" href="lib/style.css" type="text/css" media="screen">
<script type="text/javascript" src="lib/totop.js"></script>
</head>
<body class="tuyensinh">
<div class="totopshow">
<a href="#" class="back-to-top">
<img alt="Lên đầu trang" src="images/gototop0.png">
</a>
</div>
<div id="ttr_page" class="container">
<nav id="ttr_menu" class="navbar-default navbar">
<div id="ttr_menu_inner_in">
<div class="menuforegroud"></div>
<div class="html_content">
<p>
<a href="http://ts.hust.edu.vn">
<img src="images/logo.png" alt="Tuyển sinh ĐHBK Hà Nội">
</a>
</p>
</div>
</div>
<div id="navigationmenu">
<div class="navbar-header">
<button id="nav-expander" data-target=".navbar-collapse" data-toggle="collapse" class="navbar-toggle" type="button">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
</nav>
<div class="ttr_banner_slideshow"></div>
<div class="ttr_slideshow">
<div id="ttr_slideshow_inner">
<ul>
<li id="Slide0" class="ttr_slide" data-slideEffect="Fade">
<a href="#"></a>
<div class="ttr_slideshow_last">
<div class="ttr_slideshowshape01" data-effect="None" data-begintime="0" data-duration="1" data-easing="linear" data-slide="None">
<div class="html_content">
<p style="margin:0.36em 0.36em 1.43em 0.36em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:3.429em; border:2px solid:#F00">Tuyển sinh đại học bách khoa Hà Nội</span>
</p>
<p>
<span style="font-family:'PT Sans','Arial';font-size:2.571em;background-color:transparent;">Chú Thích Bla bla</span>
</p>
</div>
</div>
</div>
</li>
<li id="Slide1" class="ttr_slide" data-slideEffect="Fade">
<a href="#"></a>
<div class="ttr_slideshow_last">
<div class="ttr_slideshowshape11" data-effect="None" data-begintime="0" data-duration="1" data-easing="linear" data-slide="None">
<div class="html_content">
<p style="margin:0.36em 0.36em 1.43em 0.36em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:3.429em;color:rgba(30,214,203,1);">Lượng đăng ký xét tuyển</span>
</p>
<p style="text-align:Center;line-height:2.11267605633803;">
<span style="font-family:'PT Sans','Arial';font-size:1.143em;">Muốn gì phải nói </span>
</p>
</div>
</div>
</div>
</li>
<li id="Slide2" class="ttr_slide" data-slideEffect="Fade">
<a href="#"></a>
<div class="ttr_slideshow_last">
<div class="ttr_slideshowshape21" data-effect="None" data-begintime="0" data-duration="1" data-easing="linear" data-slide="None">
<div class="html_content">
<p style="text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:3.429em;color:rgba(30,214,203,1);">Nắng Bách Khoa</span>
</p>
<p style="text-align:Center;">
<span style="font-family:'PT Sans','PT Sans';font-size:1.143em;">Hôm qua em đến trường, xe của em ngập nước ý a!!</span>
</p>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="ttr_slideshow_in">
<div class="ttr_slideshow_last">
<div id="nav"></div>
</div>
</div>
</div>
<div class="ttr_banner_slideshow"></div>
<div id="ttr_content_and_sidebar_container">
<div id="ttr_content">
<div id="ttr_content_margin"class="container-fluid">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="ttr_Home_html_row0 row">
<div class="post_column col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column00">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p style="margin:0.14em 0em 1.43em 1.43em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:36px;color:#F00;">Top 20 câu hỏi hay nhất</span>
</p>
</div>
<div class="Main_question_answer"style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
</div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div class="ttr_Home_html_row1 row">
<div class="post_column col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column10">
<div class="html_content">
<p style="margin:0.36em 0.36em 1.43em 0.36em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;color:#000;">TƯ VẤN </span>
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;color:#F0F; border:2px solid:#666">- </span>
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;color:#F00;">GIẢI ĐÁP</span>
</p>
</div>
<form method="post">
<input class="check" required placeholder="Họ và tên" type="text" name="name_question">
<input class="check" required placeholder="Địa chỉ" type="text" name="address_question">
<input class="check" required x-autocompletetype="email" placeholder="Địa chỉ Email" type="email" name="email_question">
<input class="check" required x-autocompletetype="phone-full" placeholder="Số điện thoại" type="tel" name="numphone_question">
<textarea class="check" placeholder="Tiêu đề câu hỏi" name="type_question"></textarea>
<textarea class="check" required placeholder="Câu hỏi" name="main_question"></textarea>
<button name="bt_insert_question">Gửi câu hỏi</button>
</form>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div class="ttr_Home_html_row2 row">
<div class="post_column col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column20">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p style="margin:0.36em 0.36em 1.43em 0em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:36px;color:rgba(255,255,255,1);">Câu hỏi </span><span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:36px;color:#F00;">mới</span>
</p>
<p style="margin:0.14em 0em 0em 1.43em;text-align:Center;line-height:1.76056338028169;">
</p>
<?php
try{
include'connect.php';
$sql_select="SELECT * from tb_question ORDER BY id";
$dl=mysqli_query($connect, $sql_select);
}catch (PDOException $e){
die("lỗi" . $e->getMessage());
}
while($row = mysqli_fetch_array($dl)):
if(!empty($row['rep_question'])){
?>
<div class="manaquestion" style="border-width: 3px; border-style: solid; border-color:#676767;border-radius:5%; margin:10px 0 10px;">
<div class="question" style=" margin:5px">
<div class="time-question" style="color:#F00"><?php echo htmlspecialchars($row['time_question']) ?></div>
<div class="main_question">
<strong style="color:#F00">Bạn: </strong>
<span class="name" style="color:#F00"><?php echo htmlspecialchars($row['name_question']) ?></span>
<span class="address" style="color:#F00">(<?php echo htmlspecialchars($row['address_question']) ?>)</span>
<span class="content" style="color:#CCC" ><?php echo htmlspecialchars($row['question']) ?></span>
</div>
</div>
<div class="answer" id="ans" style="margin:10px; display:none">
<div class="main_answer">
<span class="start" style="color:#F00"><strong>Trả lời: </strong></span>
<p><span class="content" style="color:#CCC"><?php echo htmlspecialchars($row['rep_question']) ?></span></p>
<span class="answer-user-name" style="color:#F00">(<?php echo htmlspecialchars($row['name_rep_question']) ?>)</span>
</div>
</div>
<div id="bt" style="color:#fff; text-align:center">Hiện phần trả lời</div>
</div>
<script>
document.getElementById("bt").id="h_an<?php echo $row['id']?>";
document.getElementById("ans").id="b_an<?php echo $row['id']?>";
$('#h_an<?php echo $row['id']?>').click(function(){
$('#b_an<?php echo $row['id']?>').toggle('slow');
$(this).toggleClass('green');
});
</script>
<?php } endwhile; ?>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="lib/show_question.js"></script>
<div class="about"></div>
</div>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div class="ttr_Home_html_row3 row">
<div class="post_column col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column30">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p>
<span>
<img src="images/bk2017.jpg" style="max-width:521px;max-height:420px;" />
</span>
</p>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-sm-block visible-md-block visible-xs-block"></div>
<div class="post_column col-lg-6 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column31">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<br style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-size:1.286em;" />
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<br style="font-family::Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-size:1.286em;" />
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<br style="font-family::Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;" />
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<br style="font-family::Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;" />
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<span style="font-family::Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;color:#F00;">Trường Đại học Bách Khoa Hà Nội - Hanoi University of Science and Technology (HUST)</span>
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.76056338028169;">
<span style="font-family:'PT Sans','Arial';color:rgba(52,52,52,1);">Thành lập năm 1956, Trường Đại học Bách Khoa Hà Nội là trường Đại học kỹ thuật đầu tiên và luôn luôn là trường đại học kỹ thuật hàng đầu của Việt Nam. Với truyền thống gần 60 năm xây dựng và phát triển, Trường Đại học Bách Khoa Hà Nội luôn năng động, sáng tạo trong đào tạo, nghiên cứu khoa học và có những đóng góp đáng kể vào sự nghiệp công nghiệp hóa, hiện đại hóa của đất nước.</span>
</p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;"> </p>
<p style="margin:0.14em 0em 0em 1.43em;line-height:1.47042253521127;">
<span>
<a HREF="#" target="_self" class="btn btn-lg btn-primary">Đọc tiếp ></a>
</span>
</p>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div class="ttr_Home_html_row5 row">
<div class="post_column col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column50">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p style="margin:0.36em 0.36em 1.43em 0.36em;text-align:Center;">
<span style="font-family:Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:1.429em;color:rgba(40,54,61,1);">Danh mục</span>
</p>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div class="ttr_Home_html_row6 row">
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column60">
<div class="html_content">
<img src="images/101.jpg" width="431" height="382" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column61">
<div class="html_content">
<img src="images/102.jpg" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column62">
<div class="html_content">
<img src="images/103.jpg" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column63">
<div class="html_content">
<img src="images/104.jpg" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column64">
<div class="html_content">
<img src="images/105.jpg" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
<div class="post_column col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="ttr_Home_html_column65">
<div class="html_content">
<img src="images/106.jpg" class="ttr_fill" style="max-width:450px;max-height:250px;" />
</div>
</div>
</div>
</div>
<div class="ttr_Home_html_row7 row">
<div class="post_column col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="ttr_Home_html_column70">
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div class="html_content">
<p style="margin:0.36em 0.36em 0.36em 0em;text-align:Center;">
<span style="font-family::Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;font-weight:700;font-size:16px;color:#FFF;">Theo dõi trang fanpage để nhận được thông tin mới nhất</span>
</p>
<p style="text-align:Center;">
<br />
</p>
<p style="text-align:Center;">
<span>
<a HREF="#" target="_self" class="btn btn-md btn-default">Theo dõi</a>
</span>
</p>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
<div style="clear:both;"></div>
</div>
</div>
<div class="clearfix visible-lg-block visible-sm-block visible-md-block visible-xs-block"></div>
</div>
<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>
</div>
</div>
<div style="clear:both"></div>
</div>
<div style="height:0px;width:0px;overflow:hidden;"></div>
<script>
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("ttr_slide");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 3500);
}
</script>
</body
></html>