-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.php
More file actions
394 lines (333 loc) · 18.4 KB
/
main.php
File metadata and controls
394 lines (333 loc) · 18.4 KB
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
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
require 'serverlogin.php';
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" CONTENT="Llama trade network for DeviantART. Our goal to create easy and practical way to exchange llamas.">
<title>GetLlamas - Llama Exchange</title>
<link rel="shortcut icon" href="favicon.ico" />
<meta name="robots" content="noindex,nofollow">
<meta name="language" content="English" />
<meta http-equiv="Content-language" content="EN" />
<meta http-equiv="Author" content="Cem Onur Erbay" />
<meta http-equiv="Copyright" content="© 2015 LrdStudios" />
<meta name="keywords" content="DeviantART, Llama, llamas, GetLlamas, internet, art, trade" />
<link rel="stylesheet" href="css/font-awesome.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
<link rel="stylesheet" href="css/animate.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="js/notify.min.js"></script>
<!--<script src="js/jquery.xdomainajax.js"></script>-->
<script>
// Counter Animation //
function counterIncrease() {
$("#current_llama_count").toggleClass("flipOutX").delay(400).queue(function (next) {
var llincrease = parseInt($("#current_llama_count").text(), 10) + 1;
$(this).text(llincrease).toggleClass("flipOutX");
//$("#current_llama_count").text(llincrease);
next();
});
}
function counterDecrease() {
$("#current_llama_count").toggleClass("flipOutX").delay(400).queue(function (next) {
var llincrease = parseInt($("#current_llama_count").text(), 10) - 1;
$(this).text(llincrease).toggleClass("flipOutX");
//$("#current_llama_count").text(llincrease);
next();
});
}
</script>
</head>
<body>
<?php include_once("analyticstracking.php") ?>
<div class="hiddenmessage"></div>
<?php
// We are in a Session, proceeding
if(!empty($_SESSION['TheUser']) || isset($_COOKIE['llama_cookie']))
{
if(empty($_SESSION['TheUser'])) {
$username = $_COOKIE['llama_cookie'];
$_SESSION['TheUser'] = $username;
}
if(!isset($_COOKIE['llama_cookie'])) {$username = $_SESSION['TheUser'];}
$username = $_SESSION['TheUser'];
$sql = "SELECT * FROM userbase WHERE username='$username'";
$results = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($results);
?>
<section>
<div class="leftpanel">
<div class="leftpanelinner">
<!-- ################## LEFT PANEL PROFILE ################## -->
<div class="leftpanel-userinfo" id="loguserinfo">
<!--
<h5 class="sidebar-title">Address</h5>
<address>
4975 Cambridge Road
Miami Gardens, FL 33056
</address>
-->
<!-- <h5 class="sidebar-title">Contact</h5>-->
<ul class="list-group">
<li class="list-group-item">
<label class="pull-left">Llamas you will receive:
<!--Llamas on the way:-->
</label>
<span id="current_llama_count" class="pull-right flipInX animated"><?php echo $row["current_credits"] ?></span>
</li>
</ul>
</div>
<!-- leftpanel-userinfo -->
<div class="media leftpanel-profile">
<div class="media-left">
<a href="#">
<img src="<?php echo $row["icon_link"] ?>" alt="" class="media-object img-circle">
</a>
</div>
<div class="media-body">
<h4 class="media-heading"><?php echo $row["username"] ?></h4>
<!-- <span>Software Engineer</span>-->
</div>
</div>
<!-- leftpanel-profile -->
<ul class="nav nav-tabs nav-justified nav-sidebar">
<li data-original-title="Main Menu" class="tooltips active" data-toggle="tooltip" title="">
<a data-toggle="tab" data-target="#mainmenu">
<i title="" data-original-title="" class="tooltips fa fa-ellipsis-h"></i></a>
</li>
<li data-original-title="Received Llamas" class="tooltips" data-toggle="tooltip" title="">
<a data-toggle="tab" data-target="#emailmenu">
<i title="" data-original-title="" class="tooltips fa fa-arrow-circle-down"></i></a>
</li>
<li data-original-title="Sent Llamas" class="tooltips sentllama" data-toggle="tooltip" title="">
<a data-toggle="tab" data-target="#contactmenu">
<i class="fa fa-arrow-circle-up"></i></a>
</li>
<li data-original-title="Settings" class="tooltips" data-toggle="tooltip" title="">
<a data-toggle="tab" data-target="#settings">
<i class="fa fa-cog"></i></a>
</li>
<li data-original-title="Log Out" class="tooltips last" data-toggle="tooltip" title="">
<a href="logout.php">
<i class="fa fa-sign-out"></i></a>
</li>
</ul>
<div class="tab-content">
<!-- ######################## MAIN MENU ######################## -->
<div class="tab-pane active" id="mainmenu">
<?php //include('menu_main.php'); ?>
<!--
<h5 class="sidebar-title">Favorites</h5>
<ul class="nav nav-pills nav-stacked nav-quirk">
<li class="active"><a href="index.html"><i class="fa fa-home"></i> <span>Dashboard</span></a></li>
<li><a href="widgets.html"><span class="badge pull-right">10+</span><i class="fa fa-cube"></i> <span>Widgets</span></a></li>
<li><a href="maps.html"><i class="fa fa-map-marker"></i> <span>Maps</span></a></li>
</ul>
-->
<h5 class="sidebar-title">Main Menu</h5>
<ul class="nav nav-pills nav-stacked nav-quirk">
<li class="nav-parent"><a href=""><i class="fa fa-line-chart"></i> <span>My Stats</span></a>
<ul style="" class="children">
<li><a>Llamas sent so far:<span class="pull-right numeric"> <?php echo $row["spent_credits"]+$row["current_credits"]-$row["gift_credits"]-$row["purchased_credits"] ?></span></a></li>
<li><a>Llamas received:<span class="pull-right numeric"> <?php echo $row["spent_credits"] ?></span></a></li>
<li><a>Gift llamas:<span class="pull-right numeric"> <?php echo $row["gift_credits"] ?></span></a></li>
<li><a>Earned by referrals:<span class="pull-right numeric"> <?php echo $row["ref_credits"] ?></span></a></li>
<!-- <li><a>Llamas bought:<span class="pull-right numeric"> <?php echo $row["purchased_credits"] ?></span></a></li>-->
</ul>
</li>
<li><a target="External" href="global_stats.php"><i class="fa fa-bar-chart"></i> <span>Global Stats</span></a></li>
<li class="nav-parent"><a href=""><i class="fa fa-group"></i> <span>My Referrals</span></a>
<ul style="" class="children">
<?php
echo "<script>console.log('Cookie: " . $_COOKIE['llama_cookie'] . "')</script>";
$searchy = "SELECT * FROM userbase WHERE refferal='$username'";
$resulty = mysqli_query($conn, $searchy);
if (mysqli_num_rows($resulty) > 0) {
echo "<li style=\"margin-top: 10px; padding-left: 18px; margin-bottom: 5px;\">Your referrals earned following amounts of llamas for you:</li>";
while($rowy = mysqli_fetch_assoc($resulty)) {
$numbero = $rowy["spent_credits"]+$rowy["current_credits"]-$rowy["gift_credits"]-$rowy["purchased_credits"]-$rowy["ref_credits"];
$refllamalari = (int)($numbero/10);
echo "<li><a>" . $rowy["username"] . ":<span class=\"pull-right numeric\">" . $refllamalari . " Llamas</span></a></li>";
}
} else {
echo "<div style=\"padding:10px; text-transform: none;\">You can invite people with this link and earn a llama for each 10 they send: <code><input name=\"cody\" class=\"cody\" type=\"text\" value=\"www.getllamas.com/?invitation=" . $_SESSION['TheUser'] . "\"></input></code></div>";
}
?>
</ul>
</li>
<li><a target="External" href="faq.php"><i class="fa fa-question-circle"></i> <span>FAQ</span></a></li>
<div style="height:185px;">
<p>
<a id="NextLLamaPls" class="a-btn" href="javascript:void(0);">
<span class="no1"></span>
<span class="no2">GET <span class="another">another</span> LLAMA!</span>
<span class="no3"></span></a>
</p>
</div>
<!--
<div class="small reklam-container">
small
</div>
<div class="medium reklam-container">
medium
</div>
<div class="large reklam-container">
large
</div>
-->
<div class="reklam-container">
<div id="adblock-placeholder">
<span class="first-word">So</span> <span style="font-size: 15.5px;">normally</span> <span style="line-height:19px;">there would</span> be an ad in this spot. But you’re using an ad-blocker like a boss. <span style="font-size: 23px; line-height: 24px;">That's cool,</span> except that GetLLamas is supported only with <span style="font-size: 20px; line-height: 17px;">ads & we need</span> money to run our servers. Would you like to donate us $5 instead so we can keep the site running?<span style="text-align:center;">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBQP6gUUu4ir+o/i/TY+n9bC5DQCRSMGxOZ8ESmSo+yrRo2xfGLPJjARJDEpuQhbcixslPXe5YBZ6OyCdobCWzIa3wimQaCpVL7qr/V/M3dKYlOQ/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ects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</span></div>
<div id="reklam">
<?php include('reklam_adaptive.php'); ?>
</div>
</div>
<div class="hiddenll" style="display:none; height:50px; width:100px; overflow: scroll; background-color:#CEE"></div>
<!-- <div class="hiddennextll" style="height:50px; width:100px; overflow: scroll; background-color:#ECE"></div>-->
</ul>
</div>
<!-- ######################## LLAMAS RECEIVED MENU ############# -->
<div class="tab-pane" id="emailmenu">
<?php //include('menu_llamas_received.php'); ?>
</div>
<!-- ######################## LLAMAS SENT MENU ################# -->
<div class="tab-pane" id="contactmenu">
<?php //include('menu_llamas_sent.php'); ?>
</div>
<!-- ######################## SETTINGS ######################### -->
<div class="tab-pane" id="settings">
<?php //include('menu_settings.php'); ?>
</div>
</div>
<!-- tab-content -->
</div>
<!-- leftpanelinner -->
</div>
<div id="main" class="mainpanel">
<iframe id="External" name="External" frameBorder="0" seamless="seamless" src="welcome.php"></iframe>
<!-- ########### Click function here ########### -->
<script>
$(document).ready(function () {
var buttstate;
buttstate = 1;
console.log("buttstate = ready;")
$(".another").hide();
$(".cody").click(function () {
$(".cody").select();
});
$("#NextLLamaPls").click(function () {
if (buttstate == 1) {
buttstate = 0;
console.log("buttstate = processing;")
counterIncrease();
$('#External').attr('src', 'loading.html');
$(".another").show();
$('#reklam').load('reklam_adaptive.php')
////////// Llama Check //////////
var previousll = $("#Curll").text();
if (previousll != "") {
console.log("Previous Llama Check for: " + previousll);
$.ajax({
method: "POST",
url: "nexttarget.php",
cache: false,
data: {
llama_given_to: previousll
}
})
.done(function (result) {
$(".hiddenll").html(result);
var currentll = $("#BadgeAdress").text();
$('#External').attr('src', 'http://' + currentll);
buttstate = 1;
});
} else {
////////// Getting First Next Target //////////
console.log("Getting First Next Target");
$.ajax({
method: "POST",
url: "nexttarget.php",
cache: false
// data: { llama_given_to: previousll }
})
.done(function (result) {
$(".hiddenll").html(result);
var currentll = $("#BadgeAdress").text();
$('#External').attr('src', 'http://' + currentll);
buttstate = 1;
});
}
return false; //true??
} else {
$.notify("Page is loading, please wait.", {
position: "left top",
className: "info"
});
}
});
// $('.fa-ellipsis-h').parent().click(function(){
// $('#mainmenu').load('menu_main.php');
// });
$('.fa-arrow-circle-down').parent().click(function () {
$("#emailmenu").addClass("loading");
$('#emailmenu').load('menu_llamas_received.php', function () {
$("#emailmenu").removeClass("loading");
});
});
$('.fa-arrow-circle-up').parent().click(function () {
$("#contactmenu").addClass("loading");
$('#contactmenu').load('menu_llamas_sent.php', function () {
$("#contactmenu").removeClass("loading");
});
});
$('.fa-cog').parent().click(function () {
$("#settings").addClass("loading");
$('#settings').load('menu_settings.php', function () {
$("#settings").removeClass("loading");
});
});
});
</script>
</div>
</section>
<script src="js/bootstrap.js"></script>
<script src="js/toggles.js"></script>
<script src="js/quirk.js"></script>
<!--<script src="http://themepixels.com/demo/webpage/quirk/lib/jquery-ui/jquery-ui.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/morrisjs/morris.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/raphael/raphael.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/flot/jquery.flot.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/flot/jquery.flot.resize.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/flot-spline/jquery.flot.spline.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/lib/jquery-knob/jquery.knob.js"></script>
<script src="http://themepixels.com/demo/webpage/quirk/js/dashboard.js"></script>-->
<?php
}
// User logging in - redirect
elseif(!empty($_POST['username']))
{
echo "<p>We got only username variable, so session expired. - We are now redirecting you to the member area.</p>";
echo "<meta http-equiv='refresh' content='=0;URL=http://www.getllamas.com' />"; //redirect
echo "<script>top.window.location = 'http://www.getllamas.com';</script>"; //redirect-ie
}
// Entry page without no session - redirect
else
{
echo "<p>We got no variables, session expired. - We are now redirecting you to the member area.</p>";
echo "<meta http-equiv='refresh' content='=0;URL=http://www.getllamas.com' />"; //redirect
echo "<script>top.window.location = 'http://www.getllamas.com';</script>"; //redirect-ie
}
?>
</body>
</html>