-
Notifications
You must be signed in to change notification settings - Fork 0
/
follow.php
129 lines (119 loc) · 6.8 KB
/
follow.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MatchaShop.vn tuyển dụng - MatchaShop.vn</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/main.css" rel="stylesheet">
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php#">MatchaShop.vn</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="index.php#apply"><i class="fa fa-upload"></i> Nộp đơn</a></li>
<li><a href="index.php#about"><i class="fa fa-shopping-cart"></i> Về chúng tôi</a></li>
<li><a href="index.php#contact"><i class="fa fa-comment"></i> Liên hệ</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="starter-template">
<section id="result">
<h3><i class="fa fa-exclamation-triangle"></i> Thông báo</h3>
<div class="form-default">
<?php
$data_post = array();
$data_post = $_POST;
if (empty($data_post)) {
echo '<p class="note">';
echo '<strong>Trang này không tồn tại</strong>';
echo '</p>';
echo '<div class="btn-group-vertical" role="group" aria-label="">';
echo '<a class="btn btn-danger" href="index.php">Quay trở về trang đăng ký!</a>';
echo '</div>';
} else {
if (empty($data_post["email"])) {
echo '<p class="note">';
echo 'Bạn cần phải nhập địa chỉ email để nhận thông báo của chúng tôi';
echo '</p>';
echo '<div class="btn-group-vertical" role="group" aria-label="">';
echo '<a class="btn btn-danger" href="index.php#follow">Quay trở về trang đăng ký!</a>';
echo '</div>';
} else {
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$file = fopen("data/follow.txt", 'a+');
$string = $ip . "," . $data_post["email"] . "," . date('Y-m-d H:i:s') . "\n";
fwrite($file, $string);
fclose($file);
echo '<p class="note">';
echo 'Bạn đã đăng ký nhận thông báo của chúng tôi thành công!';
echo '</p>';
echo '<div class="btn-group-vertical" role="group" aria-label="">';
echo '<a class="btn btn-danger" href="index.php">Quay trở về trang đăng ký!</a>';
echo '</div>';
echo '<br>';
echo '<br>';
echo '<div class="btn-group-vertical" role="group" aria-label="">';
echo '<a class="btn btn-success" href="http://matchashop.vn" target="_blank">Tìm hiểu thêm về MatchaShop.vn</a>';
echo '</div>';
echo '<br>';
echo '<br>';
echo '<div class="btn-group-vertical" role="group" aria-label="">';
echo '<a class="btn btn-info" href="https://www.facebook.com/matchashop.vn" target="_blank">Vào Facebook theo dõi thông tin</a>';
echo '</div>';
}
}
?>
</div>
</section>
</div>
</div><!-- /.container -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
</body>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-52301871-4', 'auto');
ga('send', 'pageview');
</script>
</html>