-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
441 lines (354 loc) · 14.1 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
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
<?php
// $starttime = microtime(true); // Top of page
if(session_status() == PHP_SESSION_NONE) session_start();
require_once(__DIR__ . '/jdownloader.php');
include('motor.php');
timequery();
// connect();
addinfo();
if (empty($_COOKIE["TMDCookie"])) {
setcookie("TMDCookie", '', time() + 365 * 86400);
}
// echo "<pre><code>", print_r(perdec(@$_COOKIE['TMDCookie']), true), "</pre></code>";
$TMDCookie = // !isset($_COOKIE['TMDCookie']) ? null :
@unserialize(perdec(@$_COOKIE['TMDCookie']));
(int)$id = getmyreferid();
(int)$mylvl = getlvlbyid($id);
(int)$myexp = getexpbyid($id);
(int)$mult = getmultbyid($id);
//IN-RUN SETTINGS
$web_creation = 1392734684;
//Global variables requested from all includes and requires
$row = mysqli_fetch_assoc(mysqli_query($db, "SELECT * FROM users WHERE id='$id'"));
$refernum = mysqli_num_rows(mysqli_query($db, "SELECT * FROM users WHERE refer_id='$id'"));
$nickname = $row['nickname'];
$ip = $row['ip_address'];
$code = $row['password'];
$email = $row['email'];
$gender = $row['gender'];
(int)$points = $row['points'];
(int)$money = $row['money'];
$acc_prior = $row['acc_prior'];
$acc_type = $row['acc_type'];
(int)$remainingvisits = $row['remainingvisits'];
(int)$multiplier = $row['multiplier'];
(int)$visitas = $row['numvsts'];
(int)$discount = $row['discount'];
(int)$lastclaim = $row['lastclaim'];
(int)$reg_days = round((time() - $row['datetime']) / 86400);
$visitstodo = ceil(pow(3 * $mult, 1 / 1.1)) - 2;
$minvisits = ceil(pow($remainingvisits, 1 / 1.1)) - 2;
$dailybonus = 120 * $mult;
if ($acc_type == null) {
$acc_type = "free";
}
$nick = '';
if ($nickname != null) {
$nick = $nickname;
} else {
$nick = '#user' . $id;
}
setcookie("jdownloader", "", time() - 3600);
//$row = mysqli_fetch_assoc(mysqli_query($db, "SELECT visitarray FROM users WHERE id='1'"));
//$visitarray = (array)unserialize($row['visitarray']);
echo '<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Índice</title>
<link rel="stylesheet" type="text/css" href="resources/main.css">
<link rel="stylesheet" type="text/css" href="resources/menu_styles.css">
<link rel="stylesheet" type="text/css" href="resources/dd.css" />
<link rel="stylesheet" type="text/css" href="resources/flags.css" />
<!--- <script>
function innerChange() {
if(document.getElementById(\'inner\')) {
var NavWidth = document.body.offsetWidth;
var OffsetMargin = NavWidth*0.51;
document.getElementById(\'inner\').style.width = 228 * parseInt(OffsetMargin / 228);
}
}
window.setInterval(function(){innerChange();}, 100);
</script> -->
<link rel="shortcut icon" href="ico/favicon1.ico">
<script type="text/javascript">
function show(id) {
document.getElementById(id).style.display = \'block\';
}
function hide(id) {
document.getElementById(id).style.display = \'none\';
}
function switchview(id) {
if(document.getElementById(id).style.display == \'none\') {
show(id);
} else {
hide(id);
}
}
function submitformbyid(id) {
document.getElementById(id).submit();return false;
}
function sended(id)
{
document.getElementById("id").value = id;
document.getElementById("google").submit();return false;
}
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="resources/menu_jquery.js"></script>
<script src="resources/jquery.dd.js"></script>
<script language="javascript">
$(document).ready(function(e) {
try {
$("body select").msDropDown();
} catch(e) {
alert(e.message);
}
});
</script>
</head>';
echo '<body>';
jdcheck();
//<!--- Top/Header -->
$weirdway = 'style="margin-top:30px;"';
//Avisos
//Claim daily points bonus
if (!stilltoday($lastclaim) && $minvisits == 0) {
echo '<div class="success" style="margin-top:10px;"><a href="index.php?action=dbonus"><u>Ya puedes reclamar tus puntos diarios.</u></a></div>';
$weirdway = '';
}
if ((empty($email) || empty($code)) && $points > 10) {
echo '<div class="error" style="margin-top:10px;">Te recomendamos vigorosamente que <a href="index.php?action=account" title="Se requiere que pongas un email y una contraseña."><u>protejas tu cuenta</u></a>, por que en caso de que tu IP se reseteé perderas tus <b title="' . getmypoints() . '">' . getmypoints(true) . '</b>.</div>';
$weirdway = '';
}
$percentage = (calculateexpfromlvl($mylvl) - (calculateexpfromlvl($mylvl, true) - $myexp)) / calculateexpfromlvl($mylvl) * 100;
echo '<div class="contenido" ' . $weirdway . '>
<div class="inside">
<div class="boxinside">
<div style="width:50%;margin:auto;padding-bottom: 5px;" onmouseover="show(\'lvl\')" onmouseout="hide(\'lvl\')">
<!--- <div class="circle" style="position: relative;top: 38px;left: -35px;"></div> -->
<div id="progressbar" style="height: 20px;">
<div style="width:' . $percentage . '%;height:20px;">
<div></div>
<div style="background-image:url(imgs/stripe_background.png)!important;margin-top: -20px;opacity: 0.5;"></div>
</div>
<div style="position: relative; top: -22px;left: -35px;" class="levels">' . specialnumformat($mylvl) . '</div>
<span style="position: relative; top: -44px;display: block;width: 40px;left: 50%;margin-left: -20px;">' . round($percentage, 1) . '%</span>
<div style="position: relative; top: -63px;left: 100%;margin-left: 10px;" class="levels">' . specialnumformat($mylvl + 1) . '</div>
</div>
<div class="bubble" id="lvl" style="position:absolute;width:50%!important;margin-top:15px;z-index:1;display:none;padding:5px;">
<div class="pointer"></div>
<div class="pointerBorder" style="display: none"></div>
<table>
<tr style="color:#BA9700;">
<td style="width:100%;"><b>Experiencia:</b></td>
<td>' . (calculateexpfromlvl($mylvl) - (calculateexpfromlvl($mylvl, true) - $myexp)) . '/' . calculateexpfromlvl($mylvl) . '</td>
</tr>
<tr>
<td style="width:100%;"><b>Requerido hasta el nivel ' . ($mylvl + 1) . ':</b></td>
<td>' . (calculateexpfromlvl($mylvl, true) - $myexp) . '</td>
</tr>
<tr>
<td style="width:100%;"><b>Experiencia acumulada:</b></td>
<td>' . $myexp . '</td>
</tr>
</table>
</div>
</div>
<div class="groupbutton" style="height:40px;float:left;">
<div class="iconbutton">';
if (getmypoints(false, false) >= 10000000) {
echo '<img title="Platino" src="imgs/point-platinum.png" style="margin-top:12px;" />';
} else if (getmypoints(false, false) >= 100000) {
echo '<img title="Oro" src="imgs/point-gold.png" style="margin-top:12px;" />';
} else if (getmypoints(false, false) >= 1000) {
echo '<img title="Plata" src="imgs/point-silver.png" style="margin-top:12px;" />';
} else {
echo '<img title="Cobre" src="imgs/point-bronze.png" style="margin-top:12px;" />';
}
echo '</div>
<div class="button"><a href="#" style="line-height:40px;text-decoration:none;font-size:23px;color:yellowgreen;" title="' . getmypoints() . '">' . getmypoints(true) . '</a></div>
</div>
<div style="float:right;height:40px;">
<input class="referlink" type="text" style="width:50%;height:40px;float:right;min-width:282px;" readonly="readonly" value="https://'.$_SERVER['SERVER_NAME'].'/?ref=' . $id . '" />
<span style="color:#999;font-size:23px;position: relative;left: -5px;top:6.5px;float:right;">Link de referido =></span>
<br class="clear">
</div>
<!--- <center style="clear:both;margin-left: 3px;">
<img src="imgs/chart.png" style="position: relative; top: 2px;left: -3px;">
<a href="#">Más estadísticas</a>
</center> -->
<div style="margin-left: 3px;margin-top: 45px;position: relative;top: 7px;">
<img src="imgs/chart.png" style="position: relative; top: 2px;left: -3px;">
<a href="index.php?action=stats">Más estadísticas</a>
</div>
<div style="position: relative;float: right;left: -3px;margin-top: -20px;margin-bottom: -10px;">';
include('langs.php');
echo '</div>
<br class="clear">
<!--- <div class="bubble" style="clear: both;float:left; margin-top:15px;width: 180px;height: 20px;color:#000;font-size:10px;text-shadow:0 0 0 #000;">
<div class="pointer"></div>
<div class="pointerBorder" style="display: none"></div>
<span style="padding-left:5px;position: relative;top: -3px;">Haz click para mostrar más info. <img src="https://cdn1.iconfinder.com/data/icons/nuove/16x16/actions/fileclose.png" style="position: relative;top: 5px;right: -6px;"></span>
</div> -->
</div>
</div>
</div>';
//<!--- Menús -->
echo "<div id='cssmenu'>
<ul>
<li><a href='index.php'><span>Inicio</span></a></li>
<li><a href='index.php?action=account'><span>Mi cuenta</span></a></li>
<li><a href='index.php?action=feedback'><span>Tablón</span></a></li>
<li class='has-sub'><a href='#'><span>Tienda</span></a>
<ul>
<li><a href='#'><span>Donaciones</span></a></li>
<li><a href='#'><span>Cupones</span></a></li>
<li><a href='#'><span>Premium</span></a></li>
<li><a href='#'><span>Comprar VIP</span></a></li>
<li><a href='#'><span>Comprar puntos</span></a></li>
<li><a href='#'><span>Reclamar puntos diarios</span></a></li>
<li class='last'><a href='#'><span>Intercambiar puntos por dinero</span></a></li>
<!--- <li class='last'><a href='#'><span>Ir a la tienda</span></a></li> -->
</ul></li>
<li><a href='index.php?action=faq'><span>FAQ</span></a></li>
<li class='has-sub last'><a href='#'><span>Soporte</span></a>
<ul>
<li><a href='index.php?action=ticket&go=create'><span>Crear ticket</span></a></li>
<li><a href='index.php?action=ticket'><span>Ver mis tickets</span></a></li>
<li><a href='index.php?action=report'><span>Reportar usuario</span></a></li>
<li><a href='index.php?action=share'><span>Compartir contenido</span></a></li>
<li class='last'><a href='forum/'><span>Ir al foro</span></a></li>
</ul>
</li>";
if ($acc_prior >= getprior("admin")) {
echo "<li class='adminlist'><a href='index.php?action=admin-login'><span>Admin</span></a></li>";
}
if ($acc_prior >= getprior("moderator")) {
echo "<li class='modlist'><a href='index.php?action=admin-login&go=mod'><span>Moderación</span></a></li>";
}
if ($acc_prior <= getprior('free')) {
echo "<li class='loginlist'><a href='index.php?action=login'><span>Login</span></a></li>
<li class='activatelist'><a href='index.php?action=activate'><span>Activar</span></a></li>";
}
echo "</ul>
</div>";
//Charge main body
$action = @$_GET['action'];
if (empty($action)) {
$action = 'index';
}
switch ($action) {
//Index (hecho)
case 'index':
include_once('includes/inicio.php');
break;
//See my account and edit it (hecho)
case 'account':
include_once('includes/profile.php');
break;
//See my current stats (hecho: 70%) [Faltan links y algunos detalles]
case 'stats':
include_once('includes/stats.php');
break;
//Search something (hecho: 50%)
case 'search':
include_once('includes/search.php');
break;
//Do an advanced search (hecho: 20%)
case 'advsearch':
include_once('includes/advanced-search-filter.php');
break;
//Create a ticket or see the current ticket (hecho: 90%) [Falta: Administración]
case 'ticket':
include_once('includes/ticket.php');
break;
//[TICKET] To create a new ticket add a new parameter called 'go=create', to see my tickets add 'go=mytickets'
//See the FAQ (Frequently asked question) (hecho)
case 'faq':
include_once('includes/faq.php');
break;
//See other profile (hecho: 70%) [Amigos, MPs]
case 'profile':
include_once('includes/profile.php');
break;
//Admin part (hecho: 15%) [Falta: Editar items, añadir IP baneada]
case 'admin':
include_once('admin/index.php');
break;
//Log into admin (hecho)
case 'admin-login':
include_once('admin/login.php');
break;
//See the feedback page (hecho)
case 'feedback':
include_once('includes/feedback.php');
break;
//Report user (hecho)
case 'report':
include_once('includes/report.php');
break;
//[REPORT] Parametro 'go=user|bug' (no hace bug, porque ya existen tickets)
//Share content (sin realizar)
case 'share':
include_once('includes/share.php');
break;
//Dialy bonus (hecho)
case 'dbonus':
include_once('includes/dbonus.php');
break;
//User list (sin realizar)
case 'ulist':
include_once('includes/ulist.php');
break;
//Refer list (sin realizar)
case 'rlist':
include_once('includes/rlist.php');
break;
//Friend list (sin realizar)
case 'flist':
include_once('includes/flist.php');
break;
//Sistema de objetivos (sin realizar)
case 'quests':
include_once('includes/quests.php');
break;
//Buy or sell anything (sin realizar)
case 'shop':
include_once('includes/shop.php');
break;
//There you can buy anything by using a new parameter called 'buy=points|money|vip|premium|coupon'
//Activate your account (sin realizar)
case 'activate':
include_once('includes/activate.php');
break;
//Login (algo así como reclamar puntos) (sin realizar)
case 'login':
include_once('includes/login.php');
break;
//Datasheet
case 'itemdata':
include_once('includes/itemdata.php');
break;
//Getting started
case 'getstarted':
include_once('includes/getstarted.php');
break;
//Not found (hecho: 10%)
default:
include_once('404.php');
break;
}
//<!--- Bottom/Footer -->
echo '<div class="contenido" style="margin-bottom:30px;">
<div class="inside">
</div>
</div>';
// $endtime = microtime(true); // Bottom of page
timequery();
/* echo '<br>';
printf("Page loaded in %f seconds", $endtime - $starttime ); */
echo '<form id="google" action="download.php" method="post"><input type="hidden" name="game_id" id="id"></form>';
echo '</body>
</html>';
?>