forked from STP5940/nanilucky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
227 lines (190 loc) · 8.39 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
<?php
session_start();
require("connect.php");
if(isset($_SESSION["username"])){
$query = $mysql->query("SELECT * FROM user WHERE username = '".$_SESSION["username"]."'");
$acc = $query->fetch_array(MYSQLI_ASSOC);
}
?>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var uid = '244657';
var wid = '503548';
</script>
<script type="text/javascript" src="//cdn.popcash.net/pop.js"></script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-2179916707516443",
enable_page_level_ads: true
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-language" content="th" />
<meta property="og:title" content="NaniLucky" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://nanilucky.cf/" />
<meta property="og:image" content="https://ih1.redbubble.net/image.728433303.7975/flat,1000x1000,075,f.u1.jpg" />
<meta property="og:description" content="NaniLucky" />
<meta name="description" content="NaniLucky">
<meta name="keywords" content="webshop, Minecraft, มายคราฟ, เว็บช้อปมายคราฟ, netflix, netflix ฟรี">
<meta name="author" content="NaniLucky">
<title>-| NaniLucky |-</title>
<link rel="stylesheet" href="dist/bootstrap.css">
<link rel="stylesheet" href="dist/slick-theme.css">
<link rel="stylesheet" href="dist/helpers.css">
<link rel="stylesheet" href="dist/style.css">
<link rel="stylesheet" href="dist/landing-2.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/8.11.8/sweetalert2.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/8.11.8/sweetalert2.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<script src='https://www.google.com/recaptcha/api.js?hl=th'></script>
<script src="dist/jquery.min.js" type="text/javascript"></script>
</head>
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Kanit&display=swap');
body,td,th {
font-family: "Kanit", sans-serif;
}
body
{
background: url() center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
overflow-x: hidden;
}
.sdo {
-webkit-box-shadow: 0px 5px 30px -5px #000000;
-moz-box-shadow: 0px 5px 30px -5px #000000;
box-shadow: 0px 5px 30px -5px #000000;
}
.container {
font-family: "Kanit", sans-serif !important;
}
.ez {
padding-bottom: 100px!important;
}
</style>
<body data-spy="scroll" data-target="#pb-navbar" data-offset="200" style="overflow: hidden;">
<nav class="navbar navbar-expand-lg navbar-dark pb_navbar pb_scrolled-light" id="pb-navbar">
<div class="container">
<a class="navbar-brand" href="./"><i class="fa fa-cube"></i> NaniLucky</a>
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#probootstrap-navbar" aria-controls="probootstrap-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span><i class="fa fa-list"></i></span>
</button>
<div class="collapse navbar-collapse" id="probootstrap-navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link active" href="?page=home"><i class="fa fa-home"></i> หน้าแรก</a></li>
<?php
if(empty($_SESSION["username"])){
echo '<li class="nav-item"><a class="nav-link" href="?page=login"><i class="fa fa-sign-in-alt"></i> เข้าสู่ระบบ</a></li>
<li class="nav-item cta-btn ml-xl-2 ml-lg-2 ml-md-0 ml-sm-0 ml-0"><a class="nav-link" href="?page=register" target="_blank"><span class="pb_rounded-4 px-4"><i class="fa fa-users"></i> สมัครสมาชิก</span></a></li>';
}else{
$user = $mysql->query("SELECT * FROM user WHERE username = '".$_SESSION["username"]."'");
while ($data = $user->fetch_array(MYSQLI_ASSOC)) {
echo '<li class="nav-item"><a class="nav-link" href="?page=shop"><i class="fa fa-shopping-cart"></i> ร้านค้า</a></li>
<li class="nav-item"><a class="nav-link" href="?page=vip"><i class="far fa-star"></i> เช่า Vip</a></li>
<li class="nav-item cta-btn ml-xl-2 ml-lg-2 ml-md-0 ml-sm-0 ml-0 " id="navbarDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><a class="nav-link" href="#-
"><span class="sr-only">Toggle Dropdown</span><span class="pb_rounded-4 px-4 dropdown-toggle" style="border: 1px solid rgba(222, 65, 60,.5);color: white;background: #f25a55;"><i class="fa fa-user"></i> '.$data["username"].'</span></a></li>
<div class="dropdown-menu dropdown-menu-right pb_rounded-4 px-4 nav-item cta-btn ml-xl-2 ml-lg-2 ml-md-0 ml-sm-0 ml-0" aria-labelledby="navbarDropdown">
<a class="pb_rounded-4 px-4 dropdown-item nav-item cta-btn ml-xl-2 ml-lg-2 ml-md-0 ml-sm-0 ml-0" href="#"><i class="fa fa-coins"></i> ยอดcoin : '.$data["nn"].'</a>
<a class="pb_rounded-4 px-4 dropdown-item nav-item cta-btn ml-xl-2 ml-lg-2 ml-md-0 ml-sm-0 ml-0" href="?page=logout"><i class="fa fa-sign-out-alt"></i> ออกจากระบบ</a>
';
}
}
?>
</ul>
</div>
</div>
</nav>
<?php if(isset($_SESSION["username"]) && $_GET["page"] == "shop" || $_GET["page"] == "vip") {
echo '<style>
.pb_slant-light:after, .pb_slant-white:after {
transform: rotate(0deg) !important;
}
</style>';
}
?>
<section class="pb_cover_v3 overflow-hidden cover-bg-indigo cover-bg-opacity text-left pb_gradient_v1 pb_slant-light" id="section-home" <?php if(isset($_GET["page"]) && $_GET["page"] == "shop" || $_GET["page"] == "vip") {
echo 'style="height: 100%;min-height: 60vh;transform: rotate(0deg);"';
} ?>>
<div class="container">
<?php
if(isset($_GET["page"])){
if(isset($_SESSION["username"])){
if($_GET["page"]=="home"){
echo '<script>location.replace("?page=shop");</script>';
exit();
}elseif($_GET["page"]=="login"){
echo '<script>location.replace("?page=shop");</script>';
exit();
}elseif($_GET["page"]=="register"){
echo '<script>location.replace("?page=shop");</script>';
exit();
}elseif($_GET["page"]=="shop"){
include("page/shop.php");
}elseif($_GET["page"]=="vip"){
include("page/vip.php");
}elseif($_GET["page"]=="logout"){
include("page/logout.php");
}else{
echo '<script>location.replace("?page=shop");</script>';
exit();
}
}else{
if($_GET["page"]=="home"){
include("page/home.php");
}elseif($_GET["page"]=="login"){
include("page/login.php");
}elseif($_GET["page"]=="register"){
include("page/register.php");
}elseif($_GET["page"]=="shop"){
include("page/shop.php");
}elseif($_GET["page"]=="vip"){
include("page/vip.php");
}else{
include("page/home.php");
}
}
}else{
include("page/home.php");
}
?>
</div>
</section>
<?php
if(isset($_SESSION["username"]) && isset($_GET["page"]) && $_GET["page"]=="home"){
echo '<section class="pb_section bg-light pb_slant-white pb_pb-250 ez" id="section-features" style="padding-top: 1px">
<div class="container">';
include("page/shops.php");
echo '</div></section>';
}
?>
<footer class="pb_footer bg-light" role="contentinfo" style="color: #868e96;">
<div class="container">
<div class="row">
<div class="col text-center">
<p class="pb_font-14"></a></p>
<p class="pb_font-14">by LolipopKunGz and porserver</a></p>
<p class="pb_font-14">© 2019 NaniLucky. All Rights Reserved.</p>
<p class="pb_font-14">System By NaniLucky</a></p>
</div>
</div>
</div>
</footer>
<div id="pb_loader" class="fullscreen"><svg class="circular" width="48px" height="48px"><circle class="path-bg" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke="#eeeeee"></circle><circle class="path" cx="24" cy="24" r="22" fill="none" stroke-width="4" stroke-miterlimit="10" stroke="#1d82ff"></circle></svg></div>
<script src="dist/popper.min.js" type="text/javascript"></script>
<script src="dist/bootstrap.min.js" type="text/javascript"></script>
<script src="dist/slick.min.js" type="text/javascript"></script>
<script src="dist/jquery.mb.YTPlayer.min.js" type="text/javascript"></script>
<script src="dist/jquery.waypoints.min.js" type="text/javascript"></script>
<script src="dist/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="dist/main.js" type="text/javascript"></script>
</body></html>