header("location: url.php");
gebruik gaat hij er niet heen..?
Dit is het volledige script
Code (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
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
<?php
include('config.php');
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`pc`) AS `pc`,UNIX_TIMESTAMP(`transport`) AS `transport`,UNIX_TIMESTAMP(`safe`) AS `safe`,UNIX_TIMESTAMP(`bc`) AS `bc`,UNIX_TIMESTAMP(`slaap`) AS `slaap`,UNIX_TIMESTAMP(`kc`) AS `kc`,UNIX_TIMESTAMP(`start`) AS `start`,UNIX_TIMESTAMP(`crime`) AS `crime`,UNIX_TIMESTAMP(`ac`) AS `ac` FROM `users` WHERE `login`='{$_SESSION['login']}'");
$data = mysql_fetch_object($dbres);
if(! check_login()) {
header('Location: login.php');
exit;
}
if($_POST['verzend']){
if($_POST['keuze'] == "1"){
header("location: keuze.php?a=respect");
}elseif($_POST['keuze'] == "2"){
header("location: keuze.php?a=schiet");
}elseif($_POST['keuze'] == "3"){
mysql_query("UPDATE `users` SET `bank`=`bank`+500000 WHERE `login`='{$data->login}'");
header("location: keuze.php?a=geld");
}
?>
<?php
}else{
header("location: keuze.php?a=geld");
?>
<html>
<head>
<title>Mafficana.nl - Betaald</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="keywords" content="StreefMaffia,Crimegame,crimegame,StreefMaffia">
<meta name="language" content="english">
<META name="description" lang="nl" content="StreefMaffia crimegame met pit.">
</head>
<table width=100% align=center>
<tr>
<td class="subTitle"><b>Donatie voltooid</b></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="mainTxt">Bedankt voor je donatie!<br>
Om je te bedanken voor je donatie, mag je een keuze maken uit de lijst hieronder.<br>
Maak een keuze en druk op verzend, je keuze word dan gelijk toegevoegd aan je account!<br>
<form action="<?php $PHP_SELF ?>" method="post">
<select name="keuze">
<option value="1">Respect 10%</option>
<option value="2">Schiet ervaring 3%</option>
<option value="3">Geld bedrag van 500,000</option>
</select>
<br>
<input type="submit" value="Maak keuze" name="verzend">
</form></td>
</tr>
</table>
<?php
}
?>
include('config.php');
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`pc`) AS `pc`,UNIX_TIMESTAMP(`transport`) AS `transport`,UNIX_TIMESTAMP(`safe`) AS `safe`,UNIX_TIMESTAMP(`bc`) AS `bc`,UNIX_TIMESTAMP(`slaap`) AS `slaap`,UNIX_TIMESTAMP(`kc`) AS `kc`,UNIX_TIMESTAMP(`start`) AS `start`,UNIX_TIMESTAMP(`crime`) AS `crime`,UNIX_TIMESTAMP(`ac`) AS `ac` FROM `users` WHERE `login`='{$_SESSION['login']}'");
$data = mysql_fetch_object($dbres);
if(! check_login()) {
header('Location: login.php');
exit;
}
if($_POST['verzend']){
if($_POST['keuze'] == "1"){
header("location: keuze.php?a=respect");
}elseif($_POST['keuze'] == "2"){
header("location: keuze.php?a=schiet");
}elseif($_POST['keuze'] == "3"){
mysql_query("UPDATE `users` SET `bank`=`bank`+500000 WHERE `login`='{$data->login}'");
header("location: keuze.php?a=geld");
}
?>
<?php
}else{
header("location: keuze.php?a=geld");
?>
<html>
<head>
<title>Mafficana.nl - Betaald</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="keywords" content="StreefMaffia,Crimegame,crimegame,StreefMaffia">
<meta name="language" content="english">
<META name="description" lang="nl" content="StreefMaffia crimegame met pit.">
</head>
<table width=100% align=center>
<tr>
<td class="subTitle"><b>Donatie voltooid</b></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="mainTxt">Bedankt voor je donatie!<br>
Om je te bedanken voor je donatie, mag je een keuze maken uit de lijst hieronder.<br>
Maak een keuze en druk op verzend, je keuze word dan gelijk toegevoegd aan je account!<br>
<form action="<?php $PHP_SELF ?>" method="post">
<select name="keuze">
<option value="1">Respect 10%</option>
<option value="2">Schiet ervaring 3%</option>
<option value="3">Geld bedrag van 500,000</option>
</select>
<br>
<input type="submit" value="Maak keuze" name="verzend">
</form></td>
</tr>
</table>
<?php
}
?>
Dus geen 'location' maar 'Location'.
Werkt helaas niet.. de pagina blijft wit
Wat staat er in config.php?
Dit is al 5 jaar niet meer toegestaan: . Dat moet zijn $_SERVER['PHP_SELF']
en in de config staat:
Code (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
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
<?php /* ------------------------- */
$mysql_host = "localhost";
$mysql_pass = "****";
$mysql_user = "****";
$mysql_database = "****";
$admin_email = "";
$img_root_url = "images/";
error_reporting(0);
if(!(@mysql_pconnect($mysql_host,$mysql_user,$mysql_pass) && @mysql_select_db($mysql_database))) {
print <<<ENDHTML
<html>
<head>
<title>..</title>
<link rel="stylesheet" type="text/css" href="style.css">
<META HTTP-EQUIV='refresh' CONTENT='60'; URL='$PHP_SELF'>
</head>
<table width=100%>
<tr>
<td class="subTitle"><b>MYSQL ERROR</b></td>
</tr>
<tr><td> </td></tr>
<tr>
<td class="mainTxt">
Er is een fout opgetreden tijdens het verbinding maken met de database. Onze excuses voor het ongemak.</td></tr>
</table>
</body>
</html>
ENDHTML;
exit;
}
session_start();
if(isset($_SESSION['login'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`pc`) AS `pc`,UNIX_TIMESTAMP(`transport`) AS `transport`,UNIX_TIMESTAMP(`bc`) AS `bc`,UNIX_TIMESTAMP(`slaap`) AS `slaap`,UNIX_TIMESTAMP(`kc`) AS `kc`,UNIX_TIMESTAMP(`start`) AS `start`,UNIX_TIMESTAMP(`crime`) AS `crime`,UNIX_TIMESTAMP(`ac`) AS `ac` FROM `users` WHERE `login`='{$_SESSION['login']}'");
$data = mysql_fetch_object($dbres);
$blata = mysql_num_rows($dbres);
include("rangen.php");
include("tijden.php");
include("rangmsg.php");
include("pageviewlimit.php");
//include("ban.php");
/* if ($data->bank > 60000000) { $pi = $_SERVER['REMOTE_ADDR']; mysql_query("INSERT INTO `bans`(`ip`,`reden`,`door`) values('$pi','Bug exploiting','Auto')"); } */
mysql_query("UPDATE `users` SET `health`='100' WHERE (`health` > 100)");
mysql_query("UPDATE `users` SET `se`='100' WHERE (`se` > 100)");
mysql_query("UPDATE `users` SET `stad`='PWG' WHERE `stad`=''");
mysql_query("UPDATE `users` SET `paid`='0' WHERE (`paid` < 0)");
mysql_query("UPDATE `casino` SET `status`='0' WHERE `owner`=''");
$time = time();
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime1`='0' WHERE (`paidtime1`-$time < 0) AND `paidtime1`!='0'");
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime2`='0' WHERE (`paidtime2`-$time < 0) AND `paidtime2`!='0'");
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime3`='0' WHERE (`paidtime3`-$time < 0) AND `paidtime3`!='0'");
mysql_query("UPDATE `famillie` SET `crusher`='0',`aantal`='0' WHERE `crusher`-$time < 0");
if ($blata == 0) { header('Location login.php'); }
if ($data->status != dood) { mysql_query("UPDATE `users` SET `online`=NOW() WHERE `login`='{$data->login}'"); }
$huis = $data->stad;
$ctime = time();
}
$dbre = mysql_query("SELECT *, UNIX_TIMESTAMP(`time`) AS `getime` FROM `jail` WHERE `login`='{$data->login}'");
$jisin = mysql_num_rows($dbre);
$jail = mysql_fetch_object($dbre);
$tim = ($jail->getime - time());
if ($jisin == 1) {
if ($tim == 1) { $time = gmdate('s', $tim); $word = seconde; $boete = $jail->boete; }
elseif ($tim < 61) { $time = gmdate('s', $tim); $word = seconden; $boete = $jail->boete; }
else { $time = gmdate('i:s', $tim); $word = minuten; $boete = $jail->boete; }
}
mysql_query("DELETE FROM `jail` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
$dete = mysql_query("SELECT * FROM `detectives` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
while($det = mysql_fetch_object($dete)) {
$suspect = mysql_query("SELECT * FROM `users` WHERE `login`='{$det->van}'");
$sus = mysql_fetch_object($suspect);
$victim = mysql_query("SELECT * FROM `users` WHERE `login`='{$det->naar}'");
$vic = mysql_fetch_object($victim);
$randomdetective = rand(1,5);
if ($det->stad == $vic->stad && $randomdetective == 1) {
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$sus->login}','Gevonden','Je detective heeft {$vic->login} gevonden in {$det->stad}.')"); mysql_query("DELETE FROM `detectives` WHERE `naar`='{$vic->login}' AND `stad`='{$det->stad}'");
}
else{
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$sus->login}','Niet gevonden','Je detective heeft {$vic->login} niet gevonden.')"); mysql_query("DELETE FROM `detectives` WHERE `naar`='{$vic->login}' AND `stad`='{$det->stad}'");
}
mysql_query("DELETE FROM `detectives` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
}
$ip = $_SERVER['REMOTE_ADDR'];
$iban = mysql_fetch_object(mysql_query("SELECT * FROM `bans` WHERE `IP`='$ip'"));
$lban = mysql_fetch_object(mysql_query("SELECT * FROM `bans` WHERE `IP`='$ip' OR `login`='{$data->login}'"));
$ban = ($data->login) ? $lban : $iban;
if ($ban) {
print <<<ENDHTML
<html>
<head>
<title>....</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<table width=100%>
<tr>
<td class="subTitle"><b>Verbannen</b></td>
</tr>
<tr><td> </td></tr>
<tr>
<td class="mainTxt">
Je bent verbannen van de site<br><br>Reden: $ban->reden<br>
Ben je het hier niet mee eens, mail dan $admin_email.
</td></tr>
</table>
</body>
</html>
ENDHTML;
unset($_SESSION['login']);
exit;
}
function check_login() {
$res = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `login`='{$_SESSION['login']}'"));
if($res == 0) {
unset($_SESSION['login']);
return FALSE;
}
else { return TRUE; }
}
if ($data->xp < 10) { $jailtime = (TIME() + 50); $boete = 1000; }
elseif ($data->xp < 20) { $jailtime = (TIME() + 100); $boete = 2500; }
elseif ($data->xp < 50) { $jailtime = (TIME() + 150); $boete = 5000; }
elseif ($data->xp < 150) { $jailtime = (TIME() + 200); $boete = 8000; }
elseif ($data->xp < 500) { $jailtime = (TIME() + 250); $boete = 10000; }
elseif ($data->xp < 1000) { $jailtime = (TIME() + 300); $boete = 15000; }
elseif ($data->xp < 2000) { $jailtime = (TIME() + 350); $boete = 20000; }
elseif ($data->xp < 3000) { $jailtime = (TIME() + 400); $boete = 30000; }
elseif ($data->xp < 4500) { $jailtime = (TIME() + 450); $boete = 42000; }
elseif ($data->xp < 6000) { $jailtime = (TIME() + 500); $boete = 50000; }
elseif ($data->xp < 8000) { $jailtime = (TIME() + 550); $boete = 75000; }
elseif ($data->xp < 11000) { $jailtime = (TIME() + 600); $boete = 85000; }
elseif ($data->xp < 15000) { $jailtime = (TIME() + 650); $boete = 100000; }
elseif ($data->xp < 20000) { $jailtime = (TIME() + 700); $boete = 125000; }
elseif ($data->xp >= 20000) { $jailtime = (TIME() + 750); $boete = 150000; }
if (!$data->famillie) { $famillie = "Geen"; }
else { $famillie = $data->famillie; }
$dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `cron`");
while($x = mysql_fetch_object($dbres))
$update[$x->name] = $x->time;
$rand = rand(500,2000);
if(floor($update['kogels']/ 130) != floor(time()/ 130)) {
$dbres = mysql_query("SELECT GET_LOCK('kogels_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='kogels'");
mysql_query("DELETE FROM `messages` WHERE `to`=''");
mysql_query("DELETE FROM `iplog` WHERE `login`=''");
mysql_query("UPDATE `stad` SET `kogels`='100',`prijs`='$rand'");
mysql_query("SELECT RELEASE_LOCK('kogels_update')");
}
}
if(floor($update['uur']/ 3600) != floor(time()/ 3600)) {
$dbres = mysql_query("SELECT GET_LOCK('uur_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='uur'");
mysql_query("UPDATE `casino` SET `winst`=`winst`+100 WHERE `spel`='kogelfabriek'");
mysql_query("SELECT RELEASE_LOCK('uur_update')");
}
}
if(floor($update['day']/ 86400) != floor(time()/ 86400)) {
$dbres = mysql_query("SELECT GET_LOCK('day_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='day'");
mysql_query("DELETE FROM `kras`");
$aPWG = rand(1000,6000);
$aVLD = rand(1000,6000);
$aTSL = rand(1000,6000);
$aSlinge = rand(1000,6000);
$aOBS = rand(1000,6000);
mysql_query("UPDATE `stad` SET `drugsp`='$aPWG',`drankp`='$aPWG' WHERE `stad`='PWG'");
mysql_query("UPDATE `stad` SET `drugsp`='$aVLD',`drankp`='$aVLD' WHERE `stad`='VLD'");
mysql_query("UPDATE `stad` SET `drugsp`='$aTSL',`drankp`='$aTSL' WHERE `stad`='TSL'");
mysql_query("UPDATE `stad` SET `drugsp`='$aSlinge',`drankp`='$aSlinge' WHERE `stad`='Slinge'");
mysql_query("UPDATE `stad` SET `drugsp`='$aOBS',`drankp`='$aOBS' WHERE `OBS`='Antwerpen'");
mysql_query("SELECT RELEASE_LOCK('day_update')");
}
}
if(floor($update['week']/ 604800) != floor(time()/ 604800)) {
$dbres = mysql_query("SELECT GET_LOCK('week_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='week'");
$blah = mysql_query("SELECT * FROM `users` WHERE `activated`='1' AND `status`='levend'");
while($blahh = mysql_fetch_object($blah)) {
$rp = round($blahh->xp / 50);
if ($rp > 0) { mysql_query("UPDATE `users` SET `rp`='$rp' WHERE `login`='{$blahh->login}'"); }
}
mysql_query("SELECT RELEASE_LOCK('week_update')");
}
}
if(floor($update['loterij']/ 259200) != floor(time()/ 259200)) {
$dbres = mysql_query("SELECT GET_LOCK('loterij_update',0)");
if(mysql_result($dbres,0) == 1) {
$sql = mysql_query("SELECT * FROM `loterij`");
$nroflot = mysql_num_rows($sql);
if($nroflot < 1){$nroflot = 1;}
$a = rand(1,$nroflot);
$b = rand(1,$nroflot);
$c = rand(1,$nroflot);
$d = rand(1,$nroflot);
$e = rand(1,$nroflot);
$f = rand(1,$nroflot);
$g = rand(1,$nroflot);
$h = rand(1,$nroflot);
$i = rand(1,$nroflot);
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$a}'");
$a = mysql_num_rows($sql);
$jackpot = $nroflot*10000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$jackpot WHERE `login`='{$a->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$a->login}','Loterij','Je hebt € $jackpot gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$b}'");
$b = mysql_num_rows($sql);
$prijs = 1000000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$b->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$b->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$c}'");
$c = mysql_num_rows($sql);
$prijs = 500000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$c->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$c->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$d}'");
$d = mysql_num_rows($sql);
$prijs = 250000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$d->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$d->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$e}'");
$e = mysql_num_rows($sql);
$prijs = 400000;
$steden = Array("PWG","VLD","TLS","OBS","Slinge");
$rstad = rand(0,7);
$stad = "$steden[$rstad]";
mysql_query("INSERT INTO `garage`(`login`,`naam`,`waarde`,`damage`,`stad`) values('{$e->login}','$prijs','$prijs','0','$stad')");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$e->login}','Loterij','Je hebt een Mercedes W124 Avus Streamling met 0% schade gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$f}'");
$f = mysql_num_rows($sql);
$prijs = 3000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$f->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$f->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$g}'");
$g = mysql_num_rows($sql);
$prijs = 2000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$g->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$g->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$h}'");
$h = mysql_num_rows($sql);
$prijs = 1000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$h->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$h->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$i}'");
$i = mysql_num_rows($sql);
$prijs = 500;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$i->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$i->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='loterij'");
mysql_query("TRUNCATE TABLE `loterij`");
mysql_query("SELECT RELEASE_LOCK('loterij_update')");
}
}
/* ------------------------- */
?>
$mysql_host = "localhost";
$mysql_pass = "****";
$mysql_user = "****";
$mysql_database = "****";
$admin_email = "";
$img_root_url = "images/";
error_reporting(0);
if(!(@mysql_pconnect($mysql_host,$mysql_user,$mysql_pass) && @mysql_select_db($mysql_database))) {
print <<<ENDHTML
<html>
<head>
<title>..</title>
<link rel="stylesheet" type="text/css" href="style.css">
<META HTTP-EQUIV='refresh' CONTENT='60'; URL='$PHP_SELF'>
</head>
<table width=100%>
<tr>
<td class="subTitle"><b>MYSQL ERROR</b></td>
</tr>
<tr><td> </td></tr>
<tr>
<td class="mainTxt">
Er is een fout opgetreden tijdens het verbinding maken met de database. Onze excuses voor het ongemak.</td></tr>
</table>
</body>
</html>
ENDHTML;
exit;
}
session_start();
if(isset($_SESSION['login'])) {
$dbres = mysql_query("SELECT *,UNIX_TIMESTAMP(`pc`) AS `pc`,UNIX_TIMESTAMP(`transport`) AS `transport`,UNIX_TIMESTAMP(`bc`) AS `bc`,UNIX_TIMESTAMP(`slaap`) AS `slaap`,UNIX_TIMESTAMP(`kc`) AS `kc`,UNIX_TIMESTAMP(`start`) AS `start`,UNIX_TIMESTAMP(`crime`) AS `crime`,UNIX_TIMESTAMP(`ac`) AS `ac` FROM `users` WHERE `login`='{$_SESSION['login']}'");
$data = mysql_fetch_object($dbres);
$blata = mysql_num_rows($dbres);
include("rangen.php");
include("tijden.php");
include("rangmsg.php");
include("pageviewlimit.php");
//include("ban.php");
/* if ($data->bank > 60000000) { $pi = $_SERVER['REMOTE_ADDR']; mysql_query("INSERT INTO `bans`(`ip`,`reden`,`door`) values('$pi','Bug exploiting','Auto')"); } */
mysql_query("UPDATE `users` SET `health`='100' WHERE (`health` > 100)");
mysql_query("UPDATE `users` SET `se`='100' WHERE (`se` > 100)");
mysql_query("UPDATE `users` SET `stad`='PWG' WHERE `stad`=''");
mysql_query("UPDATE `users` SET `paid`='0' WHERE (`paid` < 0)");
mysql_query("UPDATE `casino` SET `status`='0' WHERE `owner`=''");
$time = time();
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime1`='0' WHERE (`paidtime1`-$time < 0) AND `paidtime1`!='0'");
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime2`='0' WHERE (`paidtime2`-$time < 0) AND `paidtime2`!='0'");
mysql_query("UPDATE `users` SET `paid`=`paid`-1,`paidtime3`='0' WHERE (`paidtime3`-$time < 0) AND `paidtime3`!='0'");
mysql_query("UPDATE `famillie` SET `crusher`='0',`aantal`='0' WHERE `crusher`-$time < 0");
if ($blata == 0) { header('Location login.php'); }
if ($data->status != dood) { mysql_query("UPDATE `users` SET `online`=NOW() WHERE `login`='{$data->login}'"); }
$huis = $data->stad;
$ctime = time();
}
$dbre = mysql_query("SELECT *, UNIX_TIMESTAMP(`time`) AS `getime` FROM `jail` WHERE `login`='{$data->login}'");
$jisin = mysql_num_rows($dbre);
$jail = mysql_fetch_object($dbre);
$tim = ($jail->getime - time());
if ($jisin == 1) {
if ($tim == 1) { $time = gmdate('s', $tim); $word = seconde; $boete = $jail->boete; }
elseif ($tim < 61) { $time = gmdate('s', $tim); $word = seconden; $boete = $jail->boete; }
else { $time = gmdate('i:s', $tim); $word = minuten; $boete = $jail->boete; }
}
mysql_query("DELETE FROM `jail` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
$dete = mysql_query("SELECT * FROM `detectives` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
while($det = mysql_fetch_object($dete)) {
$suspect = mysql_query("SELECT * FROM `users` WHERE `login`='{$det->van}'");
$sus = mysql_fetch_object($suspect);
$victim = mysql_query("SELECT * FROM `users` WHERE `login`='{$det->naar}'");
$vic = mysql_fetch_object($victim);
$randomdetective = rand(1,5);
if ($det->stad == $vic->stad && $randomdetective == 1) {
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$sus->login}','Gevonden','Je detective heeft {$vic->login} gevonden in {$det->stad}.')"); mysql_query("DELETE FROM `detectives` WHERE `naar`='{$vic->login}' AND `stad`='{$det->stad}'");
}
else{
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$sus->login}','Niet gevonden','Je detective heeft {$vic->login} niet gevonden.')"); mysql_query("DELETE FROM `detectives` WHERE `naar`='{$vic->login}' AND `stad`='{$det->stad}'");
}
mysql_query("DELETE FROM `detectives` WHERE UNIX_TIMESTAMP(`time`)-UNIX_TIMESTAMP(NOW()) < 0");
}
$ip = $_SERVER['REMOTE_ADDR'];
$iban = mysql_fetch_object(mysql_query("SELECT * FROM `bans` WHERE `IP`='$ip'"));
$lban = mysql_fetch_object(mysql_query("SELECT * FROM `bans` WHERE `IP`='$ip' OR `login`='{$data->login}'"));
$ban = ($data->login) ? $lban : $iban;
if ($ban) {
print <<<ENDHTML
<html>
<head>
<title>....</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<table width=100%>
<tr>
<td class="subTitle"><b>Verbannen</b></td>
</tr>
<tr><td> </td></tr>
<tr>
<td class="mainTxt">
Je bent verbannen van de site<br><br>Reden: $ban->reden<br>
Ben je het hier niet mee eens, mail dan $admin_email.
</td></tr>
</table>
</body>
</html>
ENDHTML;
unset($_SESSION['login']);
exit;
}
function check_login() {
$res = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `login`='{$_SESSION['login']}'"));
if($res == 0) {
unset($_SESSION['login']);
return FALSE;
}
else { return TRUE; }
}
if ($data->xp < 10) { $jailtime = (TIME() + 50); $boete = 1000; }
elseif ($data->xp < 20) { $jailtime = (TIME() + 100); $boete = 2500; }
elseif ($data->xp < 50) { $jailtime = (TIME() + 150); $boete = 5000; }
elseif ($data->xp < 150) { $jailtime = (TIME() + 200); $boete = 8000; }
elseif ($data->xp < 500) { $jailtime = (TIME() + 250); $boete = 10000; }
elseif ($data->xp < 1000) { $jailtime = (TIME() + 300); $boete = 15000; }
elseif ($data->xp < 2000) { $jailtime = (TIME() + 350); $boete = 20000; }
elseif ($data->xp < 3000) { $jailtime = (TIME() + 400); $boete = 30000; }
elseif ($data->xp < 4500) { $jailtime = (TIME() + 450); $boete = 42000; }
elseif ($data->xp < 6000) { $jailtime = (TIME() + 500); $boete = 50000; }
elseif ($data->xp < 8000) { $jailtime = (TIME() + 550); $boete = 75000; }
elseif ($data->xp < 11000) { $jailtime = (TIME() + 600); $boete = 85000; }
elseif ($data->xp < 15000) { $jailtime = (TIME() + 650); $boete = 100000; }
elseif ($data->xp < 20000) { $jailtime = (TIME() + 700); $boete = 125000; }
elseif ($data->xp >= 20000) { $jailtime = (TIME() + 750); $boete = 150000; }
if (!$data->famillie) { $famillie = "Geen"; }
else { $famillie = $data->famillie; }
$dbres = mysql_query("SELECT UNIX_TIMESTAMP(`time`) AS `time`,`name` FROM `cron`");
while($x = mysql_fetch_object($dbres))
$update[$x->name] = $x->time;
$rand = rand(500,2000);
if(floor($update['kogels']/ 130) != floor(time()/ 130)) {
$dbres = mysql_query("SELECT GET_LOCK('kogels_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='kogels'");
mysql_query("DELETE FROM `messages` WHERE `to`=''");
mysql_query("DELETE FROM `iplog` WHERE `login`=''");
mysql_query("UPDATE `stad` SET `kogels`='100',`prijs`='$rand'");
mysql_query("SELECT RELEASE_LOCK('kogels_update')");
}
}
if(floor($update['uur']/ 3600) != floor(time()/ 3600)) {
$dbres = mysql_query("SELECT GET_LOCK('uur_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='uur'");
mysql_query("UPDATE `casino` SET `winst`=`winst`+100 WHERE `spel`='kogelfabriek'");
mysql_query("SELECT RELEASE_LOCK('uur_update')");
}
}
if(floor($update['day']/ 86400) != floor(time()/ 86400)) {
$dbres = mysql_query("SELECT GET_LOCK('day_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='day'");
mysql_query("DELETE FROM `kras`");
$aPWG = rand(1000,6000);
$aVLD = rand(1000,6000);
$aTSL = rand(1000,6000);
$aSlinge = rand(1000,6000);
$aOBS = rand(1000,6000);
mysql_query("UPDATE `stad` SET `drugsp`='$aPWG',`drankp`='$aPWG' WHERE `stad`='PWG'");
mysql_query("UPDATE `stad` SET `drugsp`='$aVLD',`drankp`='$aVLD' WHERE `stad`='VLD'");
mysql_query("UPDATE `stad` SET `drugsp`='$aTSL',`drankp`='$aTSL' WHERE `stad`='TSL'");
mysql_query("UPDATE `stad` SET `drugsp`='$aSlinge',`drankp`='$aSlinge' WHERE `stad`='Slinge'");
mysql_query("UPDATE `stad` SET `drugsp`='$aOBS',`drankp`='$aOBS' WHERE `OBS`='Antwerpen'");
mysql_query("SELECT RELEASE_LOCK('day_update')");
}
}
if(floor($update['week']/ 604800) != floor(time()/ 604800)) {
$dbres = mysql_query("SELECT GET_LOCK('week_update',0)");
if(mysql_result($dbres,0) == 1) {
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='week'");
$blah = mysql_query("SELECT * FROM `users` WHERE `activated`='1' AND `status`='levend'");
while($blahh = mysql_fetch_object($blah)) {
$rp = round($blahh->xp / 50);
if ($rp > 0) { mysql_query("UPDATE `users` SET `rp`='$rp' WHERE `login`='{$blahh->login}'"); }
}
mysql_query("SELECT RELEASE_LOCK('week_update')");
}
}
if(floor($update['loterij']/ 259200) != floor(time()/ 259200)) {
$dbres = mysql_query("SELECT GET_LOCK('loterij_update',0)");
if(mysql_result($dbres,0) == 1) {
$sql = mysql_query("SELECT * FROM `loterij`");
$nroflot = mysql_num_rows($sql);
if($nroflot < 1){$nroflot = 1;}
$a = rand(1,$nroflot);
$b = rand(1,$nroflot);
$c = rand(1,$nroflot);
$d = rand(1,$nroflot);
$e = rand(1,$nroflot);
$f = rand(1,$nroflot);
$g = rand(1,$nroflot);
$h = rand(1,$nroflot);
$i = rand(1,$nroflot);
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$a}'");
$a = mysql_num_rows($sql);
$jackpot = $nroflot*10000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$jackpot WHERE `login`='{$a->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$a->login}','Loterij','Je hebt € $jackpot gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$b}'");
$b = mysql_num_rows($sql);
$prijs = 1000000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$b->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$b->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$c}'");
$c = mysql_num_rows($sql);
$prijs = 500000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$c->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$c->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$d}'");
$d = mysql_num_rows($sql);
$prijs = 250000;
mysql_query("UPDATE `user` SET `zak`=`zak`+$prijs WHERE `login`='{$d->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$d->login}','Loterij','Je hebt € $prijs gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$e}'");
$e = mysql_num_rows($sql);
$prijs = 400000;
$steden = Array("PWG","VLD","TLS","OBS","Slinge");
$rstad = rand(0,7);
$stad = "$steden[$rstad]";
mysql_query("INSERT INTO `garage`(`login`,`naam`,`waarde`,`damage`,`stad`) values('{$e->login}','$prijs','$prijs','0','$stad')");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$e->login}','Loterij','Je hebt een Mercedes W124 Avus Streamling met 0% schade gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$f}'");
$f = mysql_num_rows($sql);
$prijs = 3000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$f->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$f->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$g}'");
$g = mysql_num_rows($sql);
$prijs = 2000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$g->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$g->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$h}'");
$h = mysql_num_rows($sql);
$prijs = 1000;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$h->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$h->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
$sql = mysql_query("SELECT `login` FROM `loterij` WHERE `id`='{$i}'");
$i = mysql_num_rows($sql);
$prijs = 500;
mysql_query("UPDATE `user` SET `kogels`=`kogels`+$prijs WHERE `login`='{$i->login}'");
mysql_query("INSERT INTO `messages`(`time`,`from`,`to`,`subject`,`message`) values(NOW(),'Notificatie','{$i->login}','Loterij','Je hebt $prijs kogels gewonnen met de loterij.')");
mysql_query("UPDATE `cron` SET `time`=NOW() WHERE `name`='loterij'");
mysql_query("TRUNCATE TABLE `loterij`");
mysql_query("SELECT RELEASE_LOCK('loterij_update')");
}
}
/* ------------------------- */
?>
header("location: keuze.php?a=geld");
voor
die('Hier zou ik moeten redirecten');
Dan weet je of het uberhaupt wordt uitgevoerd?
Ik denk: headers already sent. Verhoog je error_reporting.
Mischien even op de site kijken waar je dit script gedownload hebt?
<html>
<head>
...
staat in het zelfde blok, en wordt dus gezamelijk ge-output. terwijl je met die redirect juist wil voorkomen dat er html wordt ge-output.
Ik vermoed dat de code moet zijn:
Code (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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if($_POST['verzend'])
{
if($_POST['keuze'] == "1")
{
header("location: keuze.php?a=respect");
}
elseif($_POST['keuze'] == "2")
{
header("location: keuze.php?a=schiet");
}
elseif($_POST['keuze'] == "3")
{
mysql_query("UPDATE `users` SET `bank`=`bank`+500000 WHERE `login`='{$data->login}'");
header("location: keuze.php?a=geld");
}
else
{
// Geen keuze gemaakt, de html code onderaan wordt dus gewoon geladen
}
}
else
{
header("location: keuze.php?a=geld");
} // hier sluiten, i.p.v. onderaan de pagina
?>
{
if($_POST['keuze'] == "1")
{
header("location: keuze.php?a=respect");
}
elseif($_POST['keuze'] == "2")
{
header("location: keuze.php?a=schiet");
}
elseif($_POST['keuze'] == "3")
{
mysql_query("UPDATE `users` SET `bank`=`bank`+500000 WHERE `login`='{$data->login}'");
header("location: keuze.php?a=geld");
}
else
{
// Geen keuze gemaakt, de html code onderaan wordt dus gewoon geladen
}
}
else
{
header("location: keuze.php?a=geld");
} // hier sluiten, i.p.v. onderaan de pagina
?>
.. je hTML ..
Gewijzigd op 01/01/1970 01:00:00 door Martijn Wieringa
PHPerik: hoe doe ik dat?
Uhm,, ik denk dat het ergens aan de config ligt want als ik dat weg laat gaat ie wel naar de pagina('s)