Bunch Error
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/zxq.net/g/a/m/gamoking/htdocs/includes/functions.php on line 28
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /www/zxq.net/g/a/m/gamoking/htdocs/includes/functions.php on line 53
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/zxq.net/g/a/m/gamoking/htdocs/includes/functions.php on line 76
als iemand mij nu eens kon helpen leren scrripten om wat errors op te lossen ben ik echt dankbaar
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
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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<?php
session_start();
echo "<link REL=stylesheet TYPE=text/css HREF=main.css>";
$query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1");
$info = mysql_fetch_object($query);
$date = gmdate('Y-m-d h:i:s');
function logincheck(){
if (empty($_SESSION['real_name'])){
echo "
<SCRIPT LANGUAGE='JavaScript'>
window.location='index.php';
</script>
";
exit();
}}
///FINSH UPDATING ONLINE
$select = mysql_query("SELECT * FROM travel WHERE username='$username'");
$num = mysql_num_rows($select);
if ($num ==1){
$sql2="SELECT * from travel WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$destination= $rows2['destination'];
}
$last = $time - time();
if ($last <=0){
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Traveled to $destination!', '$date')");
mysql_query("UPDATE users SET country='$destination' WHERE username='$username'");
mysql_query("DELETE FROM travel WHERE username='$username'");
}}
$select = mysql_query("SELECT * FROM BFtimes WHERE username='$username'");
$num = mysql_num_rows($select);
if ($num ==1){
$sql2="SELECT * from BFtimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['time'];
}
$last = $time - time();
if ($last <=0){
mysql_query("DELETE FROM BFtimes WHERE username='$username'");
}}
$sql2="SELECT * from BF";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$owner= $rows2['owner'];
$id= $rows2['id'];
$timeleft = $time - time() ;
$timeadd = time() + 3600 ;
if ($timeleft <0){
mysql_query("UPDATE BF SET `bullets`=`bullets`+'150', timeleft='$timeadd' WHERE status='Producing' AND id='$id' AND bullets='0'");
if(mysql_affected_rows() >= "1"){
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$owner' LIMIT 1"));
mysql_query("UPDATE crews SET `bullets`=`bullets`+'250' WHERE name='$fetch->crew' LIMIT 1");
}
mysql_query("UPDATE BF SET timeleft='$timeadd' WHERE id='$id'");
}}
$sql2="SELECT * from users WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['trainwait'];
$name= $rows2['username'];
$timeleft = $time - time() ;
if ($timeleft <0){
mysql_query("UPDATE users SET trainwait='0' WHERE username='$name'");
}}
$sql2="SELECT * from jail ORDER by id ASC LIMIT 10";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$name= $rows2['username'];
$timeleft = $time - time() ;
if ($timeleft <0 || $name ==""){
mysql_query("DELETE FROM jail WHERE username='$name'");
}}
$sql="SELECT * FROM users WHERE username='$username' LIMIT 1";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
$date = gmdate('Y-m-d h:i:s');
if (($rows['rank'] == "Minor") && ($rows['rankpoints'] >= "400")){ $newrank="Wasteman"; $done="1"; }
elseif (($rows['rank']== "Wasteman") && ($rows['rankpoints'] >= "1230")){ $newrank="Thug"; $done="1"; }
elseif (($rows['rank']== "Thug") && ($rows['rankpoints'] >= "2000")){ $newrank="Badman"; $done="1"; }
elseif (($rows['rank']== "Badman") && ($rows['rankpoints'] >= "4320")){ $newrank="Respectable Badman"; $done="1"; }
elseif (($rows['rank']== "Respectable Badman") && ($rows['rankpoints'] >= "8600")){ $newrank="Assassin"; $done="1"; }
elseif (($rows['rank']== "Assassin") && ($rows['rankpoints'] >= "15506")){ $newrank="Respectable Assassin"; $done="1"; }
elseif (($rows['rank']== "Respectable Assassin") && ($rows['rankpoints'] >= "22361")){ $newrank="Boss"; $done="1"; }
elseif (($rows['rank']== "Boss") && ($rows['rankpoints'] >= "36000")){ $newrank="Respectable Boss"; $done="1"; }
elseif (($rows['rank']== "Respectable Boss") && ($rows['rankpoints'] >= "65333")){ $newrank="Godfather"; $done="1"; }
elseif (($rows['rank']== "Godfather") && ($rows['rankpoints'] >= "83216")){ $newrank="Legendary Godfather"; $done="1"; }
elseif (($rows['rank']== "Legendary Godfather") && ($rows['rankpoints'] >= "99633")){ $newrank="Don"; $done="1"; }
elseif (($rows['rank']== "Don") && ($rows['rankpoints'] >= "120000")){ $newrank="Respectable Don"; $done="1"; }
elseif (($rows['rank']== "Respectable Don") && ($rows['rankpoints'] >= "163000")){ $newrank="Global Threat"; $done="1"; }
elseif (($rows['rank']== "Global Threat") && ($rows['rankpoints'] >= "230000")){ $newrank="Ultimate Assassinator"; $done="1"; }
else{ $done =="0"; }
if ($done == "1"){
mysql_query("UPDATE users SET rank='$newrank', mail='1', bullets=bullets+'1500' WHERE username='$username'");
mysql_query("INSERT INTO `messages` ( `id` , `t` , `f` , `message` , `date` , `r` , `saved` )
VALUES (
'', '$username', '$username', 'You have been promoted to $newrank you are doing well, You received 1,500 bullets!', '$date', '0', '0')");
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Ranked up to <b>$newrank</b>!', '$date')");
}
///////HOUSTON WE HAVE JAIL CHECK!
?>
[Code]
[size=xsmall][i]Toevoeging op 08/02/2011 13:26:14:[/i][/size]
ik kreeg de error met naar deze pagina te gaan
[Code]
<?
session_start();
if (!(isset($_SESSION["real_name"])))
{
//echo "I'm not logged in";
header('Location: login.php');
}
else
{
echo "";
}
?>
<html>
<head>
<title>Crimes</title></head>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top">
<?php include("leftmenu.php");?>
</TD>
<td width="100%" valign="top"> <br>
<?
if ($needcode >=99999999999999999999999999999) {
if ($_POST['chkcode2']) {
$code=$_POST['chkcode'];
$chkcode=$_SESSION['vcode'];
if ($code == $chkcode){
mysql_query("UPDATE users SET verify='0' WHERE username='$username'");
echo "You have successfully entered the verification code!";
echo "<meta http-equiv=\"refresh\" content=\"0;URL=Crimes.php\">";
}else{
echo "You have entered the wrong verification code!";
}
}
?>
<form action="" method="post">
<table align="center" width=70% bgcolor="#34291f" cellspacing=0 cellpadding=2 border=1 bordercolor=black class=sub2>
<tr>
<td class="header" colspan="2" align="center">Verification Code</td>
</tr>
<tr>
<td align="center" colspan="2">Enter verification code:<br /><img src="verifycode.php" width="55" height="15" border="0" /><input style="border:1px solid black;" type="text" name="chkcode" size="10" maxlength="6" /><br><input type=submit name="chkcode2" value=Submit></td></tr>
</table>
</form>
<?
//end of verify
}else{
include_once "includes/jail_check.php";
include "includes/db_connect.php";
include_once "includes/hospital_check.php";
include "includes/functions.php";
$username=$_SESSION["real_name"];
$date = gmdate('Y-m-d h:i:s');
$time=time();
$select2 = mysql_query("SELECT * FROM jail WHERE username='$username'");
$num2 = mysql_num_rows($select2);
if ($num2 <=0){
$select2 = mysql_query("SELECT * FROM hospital WHERE username='$username'");
$num2 = mysql_num_rows($select2);
if ($num2 <=0){
if ($_POST['submit']){
if ($needcode>=99999999999999999999999999999) {
if ($_POST['chkcode']) {
$usercode=secureint($_POST['chkcode']);
$chkcode=$_SESSION['vcode'];
$usercode=md5($usercode);
if ($usercode==$chkcode) {$checkverify=1;} else {$checkverify=0;}
if ($checkverify=1){
mysql_query("UPDATE users SET verify='0' WHERE username='$username'");
}
}
}
if($checkverify==0 && $needcode>=99999999999999999999999999999){
echo "You have entered the wrong verification code!";
}elseif ($checkverify==1 || $needcode < 99999999999999999999999999999){
$radiobutton=$_POST['radiobutton'];
if ($radiobutton == "1"){
$ha1 = 1200;
$ranking = rand(10,30);
$timewait1=time()+ $ha1;
///Deal Some Weed!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft1= $rows2['crime2'];
$available1= $rows2['crime2a'];
$last1 = $timeleft1 - time();
}
if ($available1 == 1) {
echo "You can not deal some weed yet!";
}else{
mysql_query("UPDATE crimetimes SET crime2a='1', crime2='$timewait1' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(2500,5000);
$cashadd2 = number_format($cashadd);
echo "You were successful in dealing some weed! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from Dealing Weed!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'0' , verify=verify+'0' WHERE `username`='$username'");
}else{
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 180;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in dealing some weed!<br>You are now in jail!";
}else{
echo "Sorry you failed in dealing some weed!";
}}}}
if ($radiobutton == "0"){
///Hijack an Airplane!//////
$ha2 = 1800;
$timewait2=time()+ $ha2;
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft2= $rows2['crime1'];
$available2= $rows2['crime1a'];
$last2 = $timeleft2 - time();
}
if ($available2 == 1)
{
echo "You can not hijack a airplane yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime1a='1', crime1='$timewait2' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(10000,15000);
$cashadd2 = number_format($cashadd);
echo "You were successful in hijacking an airplane! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 240;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in hijacking an airplane!<br>You are now in jail!";
}else{
echo "Sorry you failed in hijacking an airplane!";
}}}}
if ($radiobutton == "2"){
$ha3 = 600;
$timewait3=time()+ $ha3;
///Rob a bank!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft3= $rows2['crime3'];
$available3= $rows2['crime3a'];
$last3 = $timeleft3 - time();
}
if ($available3 == 1)
{
echo "You can not rob the bank yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime3a='1', crime3='$timewait3' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(1000,2000);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing the bank! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 120;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing the bank!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing the bank!";
}}}}
if ($radiobutton == "3"){
$ha4 = 300;
$timewait4=time()+ $ha4;
///Rob Navigation!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft4= $rows2['crime4'];
$available4= $rows2['crime4a'];
$last4 = $timeleft4 - time();
}
if ($available4 == 1)
{
echo "You can not rob a navigation yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime4a='1', crime4='$timewait4' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(250,500);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing a navigation system! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 100;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing a navigation system!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing a navigation system!";
}}}}
if ($radiobutton == "4"){
$ha5 = 150;
$timewait5=time()+ $ha5;
///Rob Phone!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft5= $rows2['crime5'];
$available5= $rows2['crime5a'];
$last5 = $timeleft5 - time();
}
if ($available5 == 1)
{
echo "You can not rob someone's phone!";
}
else
{
mysql_query("UPDATE crimetimes SET crime5a='1', crime5='$timewait5' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(50,299);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing someone's phone! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'0' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 60;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing someone's phone!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing someone's phone!";
}}}}
///VERIFICATION
}
}
?>
<?
include "includes/db_connect.php";
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft1= $rows2['crime1'];
$timeleft2= $rows2['crime2'];
$timeleft3= $rows2['crime3'];
$timeleft4= $rows2['crime4'];
$timeleft5= $rows2['crime5'];
$last1 = $timeleft1 - time();
$last2 = $timeleft2 - time();
$last3 = $timeleft3 - time();
$last4 = $timeleft4 - time();
$last5 = $timeleft5 - time();
}
if($last1 <= 0){
mysql_query("UPDATE crimetimes SET crime1a='0', crime1='' WHERE username='$username'");
}
if($last2 <= 0){
mysql_query("UPDATE crimetimes SET crime2a='0', crime2='' WHERE username='$username'");
}
if($last3 <= 0){
mysql_query("UPDATE crimetimes SET crime3a='0', crime3='' WHERE username='$username'");
}
if($last4 <= 0){
mysql_query("UPDATE crimetimes SET crime4a='0', crime4='' WHERE username='$username'");
}
if($last5 <= 0){
mysql_query("UPDATE crimetimes SET crime5a='0', crime5='' WHERE username='$username'");
}
?>
<form name="form1" method="post" action="">
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="75%" class="sub2">
<tr>
<td class="header" colspan="2" align="center">Crimes</td>
</tr>
<td class="header" colspan="1" width="50%" align="center">Crime</td>
<td class="header" colspan="1" width="50%" align="center">Availability</td>
<tr>
<td><input type="radio" name="radiobutton" value="0"><label id=labelcrime1 for=radiocrime1> Hijack an airplane</label></td>
<td><?php if ($last1 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft1) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="1"><label id=labelcrime2 for=radiocrime2> Deal some weed</label></td>
<td><?php if ($last2 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft2) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="2"><label id=labelcrime3 for=radiocrime3> Rob a bank</label></td>
<td><?php if ($last3 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft3) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="3"><label id=labelcrime4 for=radiocrime4> Rob a navigation system</label></td>
<td><?php if ($last4 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft4) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="4">
<label id=labelcrime5 for=radiocrime5> Rob Someone's Phone</label></td>
<td><?php if ($last5 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft5) ; } ?></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" id="submit" value="Commit"></td>
</tr>
</table>
</form>
<? }}
///END OF VERIFY
}
?>
</td>
<TD width="150" valign="top">
<?php include("rightmenu.php");?>
</TD>
</TR>
</table>
</center>
</body>
</html>
session_start();
echo "<link REL=stylesheet TYPE=text/css HREF=main.css>";
$query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1");
$info = mysql_fetch_object($query);
$date = gmdate('Y-m-d h:i:s');
function logincheck(){
if (empty($_SESSION['real_name'])){
echo "
<SCRIPT LANGUAGE='JavaScript'>
window.location='index.php';
</script>
";
exit();
}}
///FINSH UPDATING ONLINE
$select = mysql_query("SELECT * FROM travel WHERE username='$username'");
$num = mysql_num_rows($select);
if ($num ==1){
$sql2="SELECT * from travel WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$destination= $rows2['destination'];
}
$last = $time - time();
if ($last <=0){
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Traveled to $destination!', '$date')");
mysql_query("UPDATE users SET country='$destination' WHERE username='$username'");
mysql_query("DELETE FROM travel WHERE username='$username'");
}}
$select = mysql_query("SELECT * FROM BFtimes WHERE username='$username'");
$num = mysql_num_rows($select);
if ($num ==1){
$sql2="SELECT * from BFtimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['time'];
}
$last = $time - time();
if ($last <=0){
mysql_query("DELETE FROM BFtimes WHERE username='$username'");
}}
$sql2="SELECT * from BF";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$owner= $rows2['owner'];
$id= $rows2['id'];
$timeleft = $time - time() ;
$timeadd = time() + 3600 ;
if ($timeleft <0){
mysql_query("UPDATE BF SET `bullets`=`bullets`+'150', timeleft='$timeadd' WHERE status='Producing' AND id='$id' AND bullets='0'");
if(mysql_affected_rows() >= "1"){
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE username='$owner' LIMIT 1"));
mysql_query("UPDATE crews SET `bullets`=`bullets`+'250' WHERE name='$fetch->crew' LIMIT 1");
}
mysql_query("UPDATE BF SET timeleft='$timeadd' WHERE id='$id'");
}}
$sql2="SELECT * from users WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['trainwait'];
$name= $rows2['username'];
$timeleft = $time - time() ;
if ($timeleft <0){
mysql_query("UPDATE users SET trainwait='0' WHERE username='$name'");
}}
$sql2="SELECT * from jail ORDER by id ASC LIMIT 10";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$time= $rows2['timeleft'];
$name= $rows2['username'];
$timeleft = $time - time() ;
if ($timeleft <0 || $name ==""){
mysql_query("DELETE FROM jail WHERE username='$name'");
}}
$sql="SELECT * FROM users WHERE username='$username' LIMIT 1";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
$date = gmdate('Y-m-d h:i:s');
if (($rows['rank'] == "Minor") && ($rows['rankpoints'] >= "400")){ $newrank="Wasteman"; $done="1"; }
elseif (($rows['rank']== "Wasteman") && ($rows['rankpoints'] >= "1230")){ $newrank="Thug"; $done="1"; }
elseif (($rows['rank']== "Thug") && ($rows['rankpoints'] >= "2000")){ $newrank="Badman"; $done="1"; }
elseif (($rows['rank']== "Badman") && ($rows['rankpoints'] >= "4320")){ $newrank="Respectable Badman"; $done="1"; }
elseif (($rows['rank']== "Respectable Badman") && ($rows['rankpoints'] >= "8600")){ $newrank="Assassin"; $done="1"; }
elseif (($rows['rank']== "Assassin") && ($rows['rankpoints'] >= "15506")){ $newrank="Respectable Assassin"; $done="1"; }
elseif (($rows['rank']== "Respectable Assassin") && ($rows['rankpoints'] >= "22361")){ $newrank="Boss"; $done="1"; }
elseif (($rows['rank']== "Boss") && ($rows['rankpoints'] >= "36000")){ $newrank="Respectable Boss"; $done="1"; }
elseif (($rows['rank']== "Respectable Boss") && ($rows['rankpoints'] >= "65333")){ $newrank="Godfather"; $done="1"; }
elseif (($rows['rank']== "Godfather") && ($rows['rankpoints'] >= "83216")){ $newrank="Legendary Godfather"; $done="1"; }
elseif (($rows['rank']== "Legendary Godfather") && ($rows['rankpoints'] >= "99633")){ $newrank="Don"; $done="1"; }
elseif (($rows['rank']== "Don") && ($rows['rankpoints'] >= "120000")){ $newrank="Respectable Don"; $done="1"; }
elseif (($rows['rank']== "Respectable Don") && ($rows['rankpoints'] >= "163000")){ $newrank="Global Threat"; $done="1"; }
elseif (($rows['rank']== "Global Threat") && ($rows['rankpoints'] >= "230000")){ $newrank="Ultimate Assassinator"; $done="1"; }
else{ $done =="0"; }
if ($done == "1"){
mysql_query("UPDATE users SET rank='$newrank', mail='1', bullets=bullets+'1500' WHERE username='$username'");
mysql_query("INSERT INTO `messages` ( `id` , `t` , `f` , `message` , `date` , `r` , `saved` )
VALUES (
'', '$username', '$username', 'You have been promoted to $newrank you are doing well, You received 1,500 bullets!', '$date', '0', '0')");
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` ) VALUES ('', '$username', 'Ranked up to <b>$newrank</b>!', '$date')");
}
///////HOUSTON WE HAVE JAIL CHECK!
?>
[Code]
[size=xsmall][i]Toevoeging op 08/02/2011 13:26:14:[/i][/size]
ik kreeg de error met naar deze pagina te gaan
[Code]
<?
session_start();
if (!(isset($_SESSION["real_name"])))
{
//echo "I'm not logged in";
header('Location: login.php');
}
else
{
echo "";
}
?>
<html>
<head>
<title>Crimes</title></head>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top">
<?php include("leftmenu.php");?>
</TD>
<td width="100%" valign="top"> <br>
<?
if ($needcode >=99999999999999999999999999999) {
if ($_POST['chkcode2']) {
$code=$_POST['chkcode'];
$chkcode=$_SESSION['vcode'];
if ($code == $chkcode){
mysql_query("UPDATE users SET verify='0' WHERE username='$username'");
echo "You have successfully entered the verification code!";
echo "<meta http-equiv=\"refresh\" content=\"0;URL=Crimes.php\">";
}else{
echo "You have entered the wrong verification code!";
}
}
?>
<form action="" method="post">
<table align="center" width=70% bgcolor="#34291f" cellspacing=0 cellpadding=2 border=1 bordercolor=black class=sub2>
<tr>
<td class="header" colspan="2" align="center">Verification Code</td>
</tr>
<tr>
<td align="center" colspan="2">Enter verification code:<br /><img src="verifycode.php" width="55" height="15" border="0" /><input style="border:1px solid black;" type="text" name="chkcode" size="10" maxlength="6" /><br><input type=submit name="chkcode2" value=Submit></td></tr>
</table>
</form>
<?
//end of verify
}else{
include_once "includes/jail_check.php";
include "includes/db_connect.php";
include_once "includes/hospital_check.php";
include "includes/functions.php";
$username=$_SESSION["real_name"];
$date = gmdate('Y-m-d h:i:s');
$time=time();
$select2 = mysql_query("SELECT * FROM jail WHERE username='$username'");
$num2 = mysql_num_rows($select2);
if ($num2 <=0){
$select2 = mysql_query("SELECT * FROM hospital WHERE username='$username'");
$num2 = mysql_num_rows($select2);
if ($num2 <=0){
if ($_POST['submit']){
if ($needcode>=99999999999999999999999999999) {
if ($_POST['chkcode']) {
$usercode=secureint($_POST['chkcode']);
$chkcode=$_SESSION['vcode'];
$usercode=md5($usercode);
if ($usercode==$chkcode) {$checkverify=1;} else {$checkverify=0;}
if ($checkverify=1){
mysql_query("UPDATE users SET verify='0' WHERE username='$username'");
}
}
}
if($checkverify==0 && $needcode>=99999999999999999999999999999){
echo "You have entered the wrong verification code!";
}elseif ($checkverify==1 || $needcode < 99999999999999999999999999999){
$radiobutton=$_POST['radiobutton'];
if ($radiobutton == "1"){
$ha1 = 1200;
$ranking = rand(10,30);
$timewait1=time()+ $ha1;
///Deal Some Weed!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft1= $rows2['crime2'];
$available1= $rows2['crime2a'];
$last1 = $timeleft1 - time();
}
if ($available1 == 1) {
echo "You can not deal some weed yet!";
}else{
mysql_query("UPDATE crimetimes SET crime2a='1', crime2='$timewait1' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(2500,5000);
$cashadd2 = number_format($cashadd);
echo "You were successful in dealing some weed! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from Dealing Weed!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'0' , verify=verify+'0' WHERE `username`='$username'");
}else{
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 180;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in dealing some weed!<br>You are now in jail!";
}else{
echo "Sorry you failed in dealing some weed!";
}}}}
if ($radiobutton == "0"){
///Hijack an Airplane!//////
$ha2 = 1800;
$timewait2=time()+ $ha2;
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft2= $rows2['crime1'];
$available2= $rows2['crime1a'];
$last2 = $timeleft2 - time();
}
if ($available2 == 1)
{
echo "You can not hijack a airplane yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime1a='1', crime1='$timewait2' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(10000,15000);
$cashadd2 = number_format($cashadd);
echo "You were successful in hijacking an airplane! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 240;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in hijacking an airplane!<br>You are now in jail!";
}else{
echo "Sorry you failed in hijacking an airplane!";
}}}}
if ($radiobutton == "2"){
$ha3 = 600;
$timewait3=time()+ $ha3;
///Rob a bank!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft3= $rows2['crime3'];
$available3= $rows2['crime3a'];
$last3 = $timeleft3 - time();
}
if ($available3 == 1)
{
echo "You can not rob the bank yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime3a='1', crime3='$timewait3' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(1000,2000);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing the bank! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 120;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing the bank!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing the bank!";
}}}}
if ($radiobutton == "3"){
$ha4 = 300;
$timewait4=time()+ $ha4;
///Rob Navigation!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft4= $rows2['crime4'];
$available4= $rows2['crime4a'];
$last4 = $timeleft4 - time();
}
if ($available4 == 1)
{
echo "You can not rob a navigation yet!";
}
else
{
mysql_query("UPDATE crimetimes SET crime4a='1', crime4='$timewait4' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(250,500);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing a navigation system! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'1' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 100;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing a navigation system!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing a navigation system!";
}}}}
if ($radiobutton == "4"){
$ha5 = 150;
$timewait5=time()+ $ha5;
///Rob Phone!//////
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft5= $rows2['crime5'];
$available5= $rows2['crime5a'];
$last5 = $timeleft5 - time();
}
if ($available5 == 1)
{
echo "You can not rob someone's phone!";
}
else
{
mysql_query("UPDATE crimetimes SET crime5a='1', crime5='$timewait5' WHERE username='$username'");
$ran = rand(1,100);
if ($ran <=80){
$cashadd = rand(50,299);
$cashadd2 = number_format($cashadd);
echo "You were successful in robbing someone's phone! You recieved $$cashadd2!";
mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Recieved $$cashadd2 from crimes!', '$date', '$realip')");
mysql_query("UPDATE `users` SET `cash`=`cash`+'$cashadd', `rankpoints`=`rankpoints`+'$ranking', `totalcrimes`=`totalcrimes`+'1', verify=verify+'0' WHERE `username`='$username'");
}
else {
$jail = rand(0,5);
if ($jail<=2){
$jailtime=time()+ 60;
mysql_query("INSERT INTO `jail` ( `id` , `username` , `timeleft` , `reward` ) VALUES ('', '$username', '$jailtime', '$jailreward')");
echo "Sorry you failed in robbing someone's phone!<br>You are now in jail!";
}else{
echo "Sorry you failed in robbing someone's phone!";
}}}}
///VERIFICATION
}
}
?>
<?
include "includes/db_connect.php";
$sql2="SELECT * from crimetimes WHERE username='$username'";
$result2=mysql_query($sql2);
while($rows2=mysql_fetch_array($result2)){ // Start looping table row
$timeleft1= $rows2['crime1'];
$timeleft2= $rows2['crime2'];
$timeleft3= $rows2['crime3'];
$timeleft4= $rows2['crime4'];
$timeleft5= $rows2['crime5'];
$last1 = $timeleft1 - time();
$last2 = $timeleft2 - time();
$last3 = $timeleft3 - time();
$last4 = $timeleft4 - time();
$last5 = $timeleft5 - time();
}
if($last1 <= 0){
mysql_query("UPDATE crimetimes SET crime1a='0', crime1='' WHERE username='$username'");
}
if($last2 <= 0){
mysql_query("UPDATE crimetimes SET crime2a='0', crime2='' WHERE username='$username'");
}
if($last3 <= 0){
mysql_query("UPDATE crimetimes SET crime3a='0', crime3='' WHERE username='$username'");
}
if($last4 <= 0){
mysql_query("UPDATE crimetimes SET crime4a='0', crime4='' WHERE username='$username'");
}
if($last5 <= 0){
mysql_query("UPDATE crimetimes SET crime5a='0', crime5='' WHERE username='$username'");
}
?>
<form name="form1" method="post" action="">
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="75%" class="sub2">
<tr>
<td class="header" colspan="2" align="center">Crimes</td>
</tr>
<td class="header" colspan="1" width="50%" align="center">Crime</td>
<td class="header" colspan="1" width="50%" align="center">Availability</td>
<tr>
<td><input type="radio" name="radiobutton" value="0"><label id=labelcrime1 for=radiocrime1> Hijack an airplane</label></td>
<td><?php if ($last1 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft1) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="1"><label id=labelcrime2 for=radiocrime2> Deal some weed</label></td>
<td><?php if ($last2 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft2) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="2"><label id=labelcrime3 for=radiocrime3> Rob a bank</label></td>
<td><?php if ($last3 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft3) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="3"><label id=labelcrime4 for=radiocrime4> Rob a navigation system</label></td>
<td><?php if ($last4 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft4) ; } ?></td>
</tr>
<tr>
<td><input type="radio" name="radiobutton" value="4">
<label id=labelcrime5 for=radiocrime5> Rob Someone's Phone</label></td>
<td><?php if ($last5 <= 0){ echo "Available"; }else{ echo crimemaketime($timeleft5) ; } ?></td>
</tr>
<tr>
<td colspan="2" align="center"><input name="submit" type="submit" id="submit" value="Commit"></td>
</tr>
</table>
</form>
<? }}
///END OF VERIFY
}
?>
</td>
<TD width="150" valign="top">
<?php include("rightmenu.php");?>
</TD>
</TR>
</table>
</center>
</body>
</html>
Gewijzigd op 08/02/2011 13:27:18 door Yannick decock
$vars buiten de quotes.
Foutafhandeling inbouwen.
Toevoeging op 08/02/2011 13:42:27:
het enige dat ik kan zien is dit ik zal niet weten hoe ik het kan veranderen
$select = mysql_query("SELECT * FROM travel WHERE username='$username'");
$num = mysql_num_rows($select);
Toevoeging op 08/02/2011 13:43:42:
mysql_query("SELECT * FROM travel WHERE username='$username'") OR DIE ( mysql_error() );
Toevoeging op 08/02/2011 13:45:32:
then i get this
Table 'gamoking_zxq_project.travel' doesn't exist
Juiste database geselecteerd? Tabel wel ingevoerd?
Yannick decock op 08/02/2011 13:36:08:
er staat geen $vars in die scripts
De eerste kom ik tegen op regel 5
$query=mysql_query("SELECT * FROM users WHERE username='$username' LIMIT 1");
of is $username geen variabele? Dan gaat er ook iets fout
Yannick decock op 08/02/2011 13:36:08:
Table 'gamoking_zxq_project.travel' doesn't exist
Lijkt me een duidelijke melding.
Lees ook eens dit: http://www.phphulp.nl/php/tutorial/php-algemeen/hoe-zet-je-iets-correct-op-phphulp/731/ (Vooral belangrijk: relevante code)
En deze http://www.phphulp.nl/php/tutorial/data-verwerking/foutafhandeling-in-php-error-handling/571/ , http://www.phphulp.nl/php/tutorial/overig/php-beginners-handleiding/575/ en http://www.phphulp.nl/php/tutorial/overig/sql-beginners-handleiding/576/
- Open niet voor elk probleem een nieuw topic
- Kijk naar je error-information, het is vrij compleet
- Schrijf wat correcter Nederlands als nu het geval is
- Pas je topic titel aan naar iets wat past bij het onderwerp..
Gewijzigd op 08/02/2011 14:30:11 door Justin S
Zulke brakke code die zo makkelijk te hacken valt.
Roel van de Water op 08/02/2011 14:34:40:
Waarom worden criminals toch altijd op een kutmanier geschreven?
Zulke brakke code die zo makkelijk te hacken valt.
Zulke brakke code die zo makkelijk te hacken valt.
Deze code is al erg oud en door weinig mensen verbeterd/geoptimaliseerd. Verder kan je der wel redelijk wat van leren. Dan wel niet op de goede manier maar die slechte maniertjes gooi je later wel weg.
Mebus vg op 08/02/2011 14:38:17:
Deze code is al erg oud en door weinig mensen verbeterd/geoptimaliseerd. Verder kan je der wel redelijk wat van leren. Dan wel niet op de goede manier maar die slechte maniertjes gooi je later wel weg.
Roel van de Water op 08/02/2011 14:34:40:
Waarom worden criminals toch altijd op een kutmanier geschreven?
Zulke brakke code die zo makkelijk te hacken valt.
Zulke brakke code die zo makkelijk te hacken valt.
Deze code is al erg oud en door weinig mensen verbeterd/geoptimaliseerd. Verder kan je der wel redelijk wat van leren. Dan wel niet op de goede manier maar die slechte maniertjes gooi je later wel weg.
Criminals worden kut geschreven doordat ze door mensen worden geschreven die op een criminal zitten en dan zelf eentje willen maken. Maar jammer genoeg zijn deze mensen over het algemeen erg lui en leren dus ook niet voldoende om een net gescript script te schrijven.
Of je van dit script kan leren betwijfel ik, volgens mij is dit meer een voorbeeld van hoe het niet moet.
Zo'n scripts geven vaak een mooie bloemlezing van dingen waarop je moet letten