Fout in pagina waar bij php file wordt getoond
http://www.kempenbed.nl/veiling/item.php?id=5
daarbij moet je gaan naar bieden en zie daar...
wie kan dit oplossen ?
dank je wel
Misschien handig om wat, relevante!, code te tonen.
Heb je error-reporting aan staan?
De webserver doet alleen .php pagina's parsen. Ook code die dynamisch wordt ingeladen zoals uit een database wordt niet automatisch ge-parsed.
de broncode :
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
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
<?php
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
{
include_once "cron.php";
}
include_once $include_path . "veiling_type.inc.php";
include_once $include_path . "dates.inc.php";
$TIME = mktime(date("H") + $SETTINGS['timecorrection'], date("i"), date("s"), date("m"), date("d"), date("Y"));
$NOW = date("YmdHis", $TIME);
if(!isset($_SESSION['VEILINGMEESTER_LOGGED_IN']))
{
$REDIRECT_AFTER_LOGIN = "index.php";
$_SESSION['REDIRECT_AFTER_LOGIN'] = $REDIRECT_AFTER_LOGIN;
Header("Location: gebruikers_login.php");
exit();
}
if(!$id) $id = $_REQUEST[id];
if(!$bid) $bid = $_REQUEST[bid];
$auction_type = $_POST['auction_type'];
$type = $_POST['form_type'];
$TPL_id = $id;
$result = mysql_query("SELECT a.*, b.bid FROM VEILINGMEESTER_auctions a LEFT JOIN VEILINGMEESTER_bids b ON (a.id = b.auction) WHERE a.id=" . intval($id));
if(!$result)
{
MySQLError($query);
exit();
}
$Data = mysql_fetch_array($result);
$n = mysql_num_rows($result);
$TPL_title = htmlspecialchars($Data['title']);
$TPL_id_value = $id;
$TPL_auctions_list_value = "";
$query = "select bid,id from VEILINGMEESTER_bids where auction=\"" . intval($id) . "\" ORDER BY id DESC";
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
}else
{
unset($TPL_BIDS_value);
}
if($n == 0)
{
include_once ("header.php");
$TPL_errmsg = $ERR_606;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
if ((isset($bid) && ((strlen(utf8_decode($bid)) > 8) || !preg_match('/^[0-9]*\.?[0-9]+$/', $bid))) || (isset($bid) && !is_null($Data['bid']) && $bid <= $Data['bid'])) {
include_once ("header.php");
$TPL_errmsg = $ERR_621;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
$bid_sum = 0;
if(ereg("^(\+?((([0-9]+(\.)?)|([0-9]*\.[0-9]+))([eE][+-]?[0-9]+)?))$", $Data['bid_value']))
{
$bid_value = $Data['bid_value'];
}else
$bid_value = 2;
if($_POST['bid_type'] == 'simple')
{
$bid_sum = $bid_value;
}
$user_id_ = $_SESSION['VEILINGMEESTER_LOGGED_IN'];
$auctiondate = $Data['starts'];
$auctionends = $Data['ends'];
$item_title = $Data["title"];
$item_description = $Data["description"];
$AuctionIsClosed = false;
$closed = intval($Data["closed"]);
$c = $Data["ends"];
if(mktime(substr($c, 8, 2), substr($c, 10, 2), substr($c, 12, 2), substr($c, 4, 2), substr($c, 6, 2), substr($c, 0, 4)) <= $TIME) $AuctionIsClosed = true;
if(($closed == 1) || ($AuctionIsClosed) || ($Data['suspended'] == 1))
{
include_once ("header.php");
$TPL_errmsg = $ERR_614;
$auction_id = $id;
include_once ("bied_lijst_1.php");
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
$EXTSETTINGS = @mysql_fetch_array(@mysql_query("SELECT * FROM VEILINGMEESTER_auctionextension"));
if($EXTSETTINGS['status'] == 'enabled')
{
$__END = mktime(substr($auctionends, 8, 2), substr($auctionends, 10, 2), substr($auctionends, 12, 2), substr($auctionends, 4, 2), substr($auctionends, 6, 2), substr($auctionends, 0, 4));
if(($__END - $TIME) <= $EXTSETTINGS['timebefore'])
{
$auctionends = date("YmdHis", mktime(substr($auctionends, 8, 2), substr($auctionends, 10, 2), substr($auctionends, 12, 2) + $EXTSETTINGS['extend'], substr($auctionends, 4, 2), substr($auctionends, 6, 2), substr($auctionends, 0, 4)));
}
$query = "UPDATE VEILINGMEESTER_auctions set ends='$auctionends' WHERE id=" . intval($id);
if(!mysql_query($query))
{
MySQLError($query);
exit();
}
}
$f5_num = getRandomInt(20);
$winner_bid = 0;
$winner_id = 0;
$check = "SELECT
max(bid) AS maxbid
FROM
VEILINGMEESTER_bids
WHERE
auction=$id";
$check_result = mysql_query($check);
if(mysql_num_rows($check_result)) {
$check_row = mysql_fetch_array($check_result);
$winner_bid = $check_row['maxbid'];
}
$is_winner_query = "SELECT * FROM VEILINGMEESTER_bids b WHERE b.auction=$id AND b.bid = $winner_bid";
$is_winner_result = mysql_query($is_winner_query);
if(mysql_num_rows($is_winner_result)) {
$is_winner_row = mysql_fetch_array($is_winner_result);
$winner_id = $is_winner_row['bidder'];
}
$MSG_WINNER = "";
$is_winner = false;
if($winner_id == $_SESSION['VEILINGMEESTER_LOGGED_IN'])
{
$is_winner = true;
}
$minimum_bid=$Data['minimum_bid'];
if($max_bid == 0)
{
$MAX_BID = $minimum_bid;
$max_bid = $minimum_bid;
}else
{
$MAX_BID = $max_bid;
}
$query = "SELECT increment FROM VEILINGMEESTER_increments WHERE " . "((low <= $MAX_BID AND high >= $MAX_BID) OR " . "(low < $MAX_BID AND high < $MAX_BID)) ORDER BY increment DESC";
$result_incr = mysql_query($query);
if(mysql_num_rows($result_incr) != 0)
{
$increment = mysql_result($result_incr, 0, "increment");
}
if($customincrement > 0)
{
$increment = $customincrement;
}
if($max_bid == 0 || $atype == 2)
{
$next_bid = $minimum_bid;
}else
{
$next_bid = $max_bid + $increment;
}
if ($next_bid>$_POST['bid'])
{
include_once ("header.php");
$TPL_errmsg = $ERR_621;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
if($Data['increment'] > 0) {
$new_bid = $_POST['bid_next'];
} else {
$new_bid = $_POST['bid'];
}
if($_POST['f5_num'] != $_SESSION['f5_num1'])
{
if(!$is_winner)
{
do_bid($id,$user_id_,$new_bid);
$_SESSION['f5_num1'] = $_POST['f5_num'];
}
}
switch($_POST['bid_type'])
{
case "simple":
$result3 = mysql_query($check);
$is_unique = false;
while($row3 = mysql_fetch_array($result3))
{
if($row3['bid_count'] == 1 && $row3['bid'] == $_POST['bid'])
{
$is_unique = true;
break;
}
}
if($_POST['bid'] == $winner_bid && $is_winner)
{
//This bid is winner
$MSG_WINNER = $MSG_31_0053;
}else
{
if($is_unique == true)
{
$MSG_WINNER = $MSG_31_0054;
if($is_winner == true)
{
$MSG_WINNER .= str_replace("<winner_bid>", $winner_bid, $MSG_31_0057);
}
}else
{
$MSG_WINNER = $MSG_31_0055;
if($is_winner == true)
{
$MSG_WINNER .= str_replace("<winner_bid>", $winner_bid, $MSG_31_0057);
}
}
}
break;
default:
break;
}
$TPL_next_bid_value = get_next_bid($id);
$auction_type = $_POST['auction_type'];
$type = $_POST['form_type'];
$TPL_id = $id;
$auction_id = $id;
header("Location: item.php?id=".$id."&history=view#history");
function get_HOW_MANY($auction_id)
{
$how_many = " ";
if(isset($_SESSION["VEILINGMEESTER_LOGGED_IN"]))
{
$sql = "SELECT
asi.offers
FROM
VEILINGMEESTER_auctions_signed asi
INNER JOIN VEILINGMEESTER_auctions a ON asi.auction_id=a.id
WHERE
asi.user_id=" . $_SESSION["VEILINGMEESTER_LOGGED_IN"] . "
AND asi.auction_id=" . $auction_id . "
AND a.auction_type>1";
$res = mysql_query($sql);
if($res)
{
if(mysql_num_rows($res) > 0)
{
$row1 = mysql_fetch_array($res);
$how_many = "Your number of offers available for this auction are: " . $row1['offers'];
}
}
}
return $how_many;
}
function getRandomInt($length = 20)
{
$template = "1234567890abcdefghijklmnopqrstuvwxyz";
settype($template, "string");
settype($length, "integer");
settype($rndstring, "string");
settype($a, "integer");
settype($b, "integer");
for($a = 0; $a <= $length; $a++)
{
$b = rand(0, strlen($template) - 1);
$rndstring .= $template[$b];
}
return $rndstring;
}
function get_next_bid($auction_id)
{
if (intval($auction_id)>0)
{
$result = mysql_query("SELECT * FROM VEILINGMEESTER_auctions WHERE id=" . intval($auction_id));
$result_bids = mysql_query("select max(bid) AS maxbid, bidder FROM VEILINGMEESTER_bids WHERE auction=" . intval($auction_id) . " GROUP BY auction, bidder ORDER BY maxbid DESC");
$customincrement = mysql_result($result, 0, "increment");
$max_bid = mysql_result($result_bids, 0, "maxbid");
$minimum_bid = mysql_result($result, 0, "minimum_bid");
if($max_bid == 0)
{
$MAX_BID = $minimum_bid;
$max_bid = $minimum_bid;
}else
{
$MAX_BID = $max_bid;
}
$query = "SELECT increment FROM VEILINGMEESTER_increments WHERE " . "((low <= $MAX_BID AND high >= $MAX_BID) OR " . "(low < $MAX_BID AND high < $MAX_BID)) ORDER BY increment DESC";
$result_incr = mysql_query($query);
if(mysql_num_rows($result_incr) != 0)
{
$increment = mysql_result($result_incr, 0, "increment");
}
if($customincrement > 0)
{
$increment = $customincrement;
}
if($max_bid == 0 || $atype == 2)
{
$next_bid = $minimum_bid;
}else
{
$next_bid = $max_bid + $increment;
}
return $next_bid;
} else {
return 0;
}
}
function autobidProcessing($auction_id=0)
{
if (intval($auction_id)>0) {
//do {
$sql="SELECT
VEILINGMEESTER_autobids.id,
VEILINGMEESTER_autobids.bidder_id,
VEILINGMEESTER_autobids.remained_bids,
VEILINGMEESTER_autobids.max_amount
FROM
VEILINGMEESTER_autobids
INNER JOIN VEILINGMEESTER_users ON VEILINGMEESTER_autobids.bidder_id=VEILINGMEESTER_users.id
WHERE
VEILINGMEESTER_autobids.auction_id='".$auction_id."'";
$result=mysql_query($sql);
//$return_flag=false;
$bid_flag=false;
while($row=mysql_fetch_array($result)) {
if ($row['remained_bids']>0 && $row['max_amount']>get_next_bid($auction_id)) {
if ($row['bidder_id']!=get_current_bidder_id($auction_id)) {
if (do_bid($auction_id,$row['bidder_id'],get_next_bid($auction_id))) {
mysql_query("UPDATE VEILINGMEESTER_autobids SET remained_bids=remained_bids-1 WHERE id='".$row['id']."'");
$bid_flag=true;
}
}
}
}
}
}
function do_bid($auction_id,$user_id,$bid_value)
{
global $NOW;
if (intval($auction_id)>0 && intval($user_id)>0 && $bid_value>0)
{
$sql="SELECT ends,bid_value,closed,w_seat FROM VEILINGMEESTER_auctions WHERE id='".$auction_id."'";
$result1=mysql_query($sql);
$ends = mysql_result($result1, 0, "ends");
$closed = mysql_result($result1, 0, "closed");
$w_seat=mysql_result($result1, 0, "w_seat");
if ($closed==0)
{
if (($w_seat==1)||($w_seat==2))
{
if ((strtotime($ends)-strtotime($NOW)>=0) && (strtotime($ends)-strtotime($NOW)<=$GLOBALS['SETTINGS']['extension_time'])) {
$new_ends=date("YmdHis",strtotime($ends)+$GLOBALS['SETTINGS']['extension_time']-(strtotime($ends)-strtotime($NOW))+1);
mysql_query("UPDATE VEILINGMEESTER_auctions SET ends='".$new_ends."', jump30=0 WHERE id='".$auction_id."'");
}
if (strtotime($ends)-strtotime($NOW)>=0) {
$insert = "INSERT INTO VEILINGMEESTER_bids(auction, bidder, bid, bidwhen)
VALUES('" .$auction_id. "','" .$user_id. "','" .converttonum($bid_value). "','" .$NOW. "')";
mysql_query($insert);
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
function converttonum($convertnum)
{
$bits = explode(",",$convertnum);
$first = strlen($bits[0]);
$last = strlen($bits[1]);
if ($last <3)
{
$convertnum = str_replace(",",".",$convertnum);
}else
{
$convertnum = str_replace(",","",$convertnum);
}
return $convertnum;
}
function get_current_bidder_id($auction_id)
{
$sql = "SELECT
bid, bidder, COUNT(bid) AS bid_count
FROM
VEILINGMEESTER_bids
WHERE
auction=".$auction_id."
GROUP BY
bid
ORDER BY
bid DESC ";
$result = mysql_query($sql);
if ($row1=mysql_fetch_array($result))
{
return $row1['bidder'];
} else {
return 0;
}
}
?>
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
{
include_once "cron.php";
}
include_once $include_path . "veiling_type.inc.php";
include_once $include_path . "dates.inc.php";
$TIME = mktime(date("H") + $SETTINGS['timecorrection'], date("i"), date("s"), date("m"), date("d"), date("Y"));
$NOW = date("YmdHis", $TIME);
if(!isset($_SESSION['VEILINGMEESTER_LOGGED_IN']))
{
$REDIRECT_AFTER_LOGIN = "index.php";
$_SESSION['REDIRECT_AFTER_LOGIN'] = $REDIRECT_AFTER_LOGIN;
Header("Location: gebruikers_login.php");
exit();
}
if(!$id) $id = $_REQUEST[id];
if(!$bid) $bid = $_REQUEST[bid];
$auction_type = $_POST['auction_type'];
$type = $_POST['form_type'];
$TPL_id = $id;
$result = mysql_query("SELECT a.*, b.bid FROM VEILINGMEESTER_auctions a LEFT JOIN VEILINGMEESTER_bids b ON (a.id = b.auction) WHERE a.id=" . intval($id));
if(!$result)
{
MySQLError($query);
exit();
}
$Data = mysql_fetch_array($result);
$n = mysql_num_rows($result);
$TPL_title = htmlspecialchars($Data['title']);
$TPL_id_value = $id;
$TPL_auctions_list_value = "";
$query = "select bid,id from VEILINGMEESTER_bids where auction=\"" . intval($id) . "\" ORDER BY id DESC";
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
}else
{
unset($TPL_BIDS_value);
}
if($n == 0)
{
include_once ("header.php");
$TPL_errmsg = $ERR_606;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
if ((isset($bid) && ((strlen(utf8_decode($bid)) > 8) || !preg_match('/^[0-9]*\.?[0-9]+$/', $bid))) || (isset($bid) && !is_null($Data['bid']) && $bid <= $Data['bid'])) {
include_once ("header.php");
$TPL_errmsg = $ERR_621;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
$bid_sum = 0;
if(ereg("^(\+?((([0-9]+(\.)?)|([0-9]*\.[0-9]+))([eE][+-]?[0-9]+)?))$", $Data['bid_value']))
{
$bid_value = $Data['bid_value'];
}else
$bid_value = 2;
if($_POST['bid_type'] == 'simple')
{
$bid_sum = $bid_value;
}
$user_id_ = $_SESSION['VEILINGMEESTER_LOGGED_IN'];
$auctiondate = $Data['starts'];
$auctionends = $Data['ends'];
$item_title = $Data["title"];
$item_description = $Data["description"];
$AuctionIsClosed = false;
$closed = intval($Data["closed"]);
$c = $Data["ends"];
if(mktime(substr($c, 8, 2), substr($c, 10, 2), substr($c, 12, 2), substr($c, 4, 2), substr($c, 6, 2), substr($c, 0, 4)) <= $TIME) $AuctionIsClosed = true;
if(($closed == 1) || ($AuctionIsClosed) || ($Data['suspended'] == 1))
{
include_once ("header.php");
$TPL_errmsg = $ERR_614;
$auction_id = $id;
include_once ("bied_lijst_1.php");
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
$EXTSETTINGS = @mysql_fetch_array(@mysql_query("SELECT * FROM VEILINGMEESTER_auctionextension"));
if($EXTSETTINGS['status'] == 'enabled')
{
$__END = mktime(substr($auctionends, 8, 2), substr($auctionends, 10, 2), substr($auctionends, 12, 2), substr($auctionends, 4, 2), substr($auctionends, 6, 2), substr($auctionends, 0, 4));
if(($__END - $TIME) <= $EXTSETTINGS['timebefore'])
{
$auctionends = date("YmdHis", mktime(substr($auctionends, 8, 2), substr($auctionends, 10, 2), substr($auctionends, 12, 2) + $EXTSETTINGS['extend'], substr($auctionends, 4, 2), substr($auctionends, 6, 2), substr($auctionends, 0, 4)));
}
$query = "UPDATE VEILINGMEESTER_auctions set ends='$auctionends' WHERE id=" . intval($id);
if(!mysql_query($query))
{
MySQLError($query);
exit();
}
}
$f5_num = getRandomInt(20);
$winner_bid = 0;
$winner_id = 0;
$check = "SELECT
max(bid) AS maxbid
FROM
VEILINGMEESTER_bids
WHERE
auction=$id";
$check_result = mysql_query($check);
if(mysql_num_rows($check_result)) {
$check_row = mysql_fetch_array($check_result);
$winner_bid = $check_row['maxbid'];
}
$is_winner_query = "SELECT * FROM VEILINGMEESTER_bids b WHERE b.auction=$id AND b.bid = $winner_bid";
$is_winner_result = mysql_query($is_winner_query);
if(mysql_num_rows($is_winner_result)) {
$is_winner_row = mysql_fetch_array($is_winner_result);
$winner_id = $is_winner_row['bidder'];
}
$MSG_WINNER = "";
$is_winner = false;
if($winner_id == $_SESSION['VEILINGMEESTER_LOGGED_IN'])
{
$is_winner = true;
}
$minimum_bid=$Data['minimum_bid'];
if($max_bid == 0)
{
$MAX_BID = $minimum_bid;
$max_bid = $minimum_bid;
}else
{
$MAX_BID = $max_bid;
}
$query = "SELECT increment FROM VEILINGMEESTER_increments WHERE " . "((low <= $MAX_BID AND high >= $MAX_BID) OR " . "(low < $MAX_BID AND high < $MAX_BID)) ORDER BY increment DESC";
$result_incr = mysql_query($query);
if(mysql_num_rows($result_incr) != 0)
{
$increment = mysql_result($result_incr, 0, "increment");
}
if($customincrement > 0)
{
$increment = $customincrement;
}
if($max_bid == 0 || $atype == 2)
{
$next_bid = $minimum_bid;
}else
{
$next_bid = $max_bid + $increment;
}
if ($next_bid>$_POST['bid'])
{
include_once ("header.php");
$TPL_errmsg = $ERR_621;
include_once (phpa_include("nu_bieden.html"));
include_once ("footer.php");
exit();
}
if($Data['increment'] > 0) {
$new_bid = $_POST['bid_next'];
} else {
$new_bid = $_POST['bid'];
}
if($_POST['f5_num'] != $_SESSION['f5_num1'])
{
if(!$is_winner)
{
do_bid($id,$user_id_,$new_bid);
$_SESSION['f5_num1'] = $_POST['f5_num'];
}
}
switch($_POST['bid_type'])
{
case "simple":
$result3 = mysql_query($check);
$is_unique = false;
while($row3 = mysql_fetch_array($result3))
{
if($row3['bid_count'] == 1 && $row3['bid'] == $_POST['bid'])
{
$is_unique = true;
break;
}
}
if($_POST['bid'] == $winner_bid && $is_winner)
{
//This bid is winner
$MSG_WINNER = $MSG_31_0053;
}else
{
if($is_unique == true)
{
$MSG_WINNER = $MSG_31_0054;
if($is_winner == true)
{
$MSG_WINNER .= str_replace("<winner_bid>", $winner_bid, $MSG_31_0057);
}
}else
{
$MSG_WINNER = $MSG_31_0055;
if($is_winner == true)
{
$MSG_WINNER .= str_replace("<winner_bid>", $winner_bid, $MSG_31_0057);
}
}
}
break;
default:
break;
}
$TPL_next_bid_value = get_next_bid($id);
$auction_type = $_POST['auction_type'];
$type = $_POST['form_type'];
$TPL_id = $id;
$auction_id = $id;
header("Location: item.php?id=".$id."&history=view#history");
function get_HOW_MANY($auction_id)
{
$how_many = " ";
if(isset($_SESSION["VEILINGMEESTER_LOGGED_IN"]))
{
$sql = "SELECT
asi.offers
FROM
VEILINGMEESTER_auctions_signed asi
INNER JOIN VEILINGMEESTER_auctions a ON asi.auction_id=a.id
WHERE
asi.user_id=" . $_SESSION["VEILINGMEESTER_LOGGED_IN"] . "
AND asi.auction_id=" . $auction_id . "
AND a.auction_type>1";
$res = mysql_query($sql);
if($res)
{
if(mysql_num_rows($res) > 0)
{
$row1 = mysql_fetch_array($res);
$how_many = "Your number of offers available for this auction are: " . $row1['offers'];
}
}
}
return $how_many;
}
function getRandomInt($length = 20)
{
$template = "1234567890abcdefghijklmnopqrstuvwxyz";
settype($template, "string");
settype($length, "integer");
settype($rndstring, "string");
settype($a, "integer");
settype($b, "integer");
for($a = 0; $a <= $length; $a++)
{
$b = rand(0, strlen($template) - 1);
$rndstring .= $template[$b];
}
return $rndstring;
}
function get_next_bid($auction_id)
{
if (intval($auction_id)>0)
{
$result = mysql_query("SELECT * FROM VEILINGMEESTER_auctions WHERE id=" . intval($auction_id));
$result_bids = mysql_query("select max(bid) AS maxbid, bidder FROM VEILINGMEESTER_bids WHERE auction=" . intval($auction_id) . " GROUP BY auction, bidder ORDER BY maxbid DESC");
$customincrement = mysql_result($result, 0, "increment");
$max_bid = mysql_result($result_bids, 0, "maxbid");
$minimum_bid = mysql_result($result, 0, "minimum_bid");
if($max_bid == 0)
{
$MAX_BID = $minimum_bid;
$max_bid = $minimum_bid;
}else
{
$MAX_BID = $max_bid;
}
$query = "SELECT increment FROM VEILINGMEESTER_increments WHERE " . "((low <= $MAX_BID AND high >= $MAX_BID) OR " . "(low < $MAX_BID AND high < $MAX_BID)) ORDER BY increment DESC";
$result_incr = mysql_query($query);
if(mysql_num_rows($result_incr) != 0)
{
$increment = mysql_result($result_incr, 0, "increment");
}
if($customincrement > 0)
{
$increment = $customincrement;
}
if($max_bid == 0 || $atype == 2)
{
$next_bid = $minimum_bid;
}else
{
$next_bid = $max_bid + $increment;
}
return $next_bid;
} else {
return 0;
}
}
function autobidProcessing($auction_id=0)
{
if (intval($auction_id)>0) {
//do {
$sql="SELECT
VEILINGMEESTER_autobids.id,
VEILINGMEESTER_autobids.bidder_id,
VEILINGMEESTER_autobids.remained_bids,
VEILINGMEESTER_autobids.max_amount
FROM
VEILINGMEESTER_autobids
INNER JOIN VEILINGMEESTER_users ON VEILINGMEESTER_autobids.bidder_id=VEILINGMEESTER_users.id
WHERE
VEILINGMEESTER_autobids.auction_id='".$auction_id."'";
$result=mysql_query($sql);
//$return_flag=false;
$bid_flag=false;
while($row=mysql_fetch_array($result)) {
if ($row['remained_bids']>0 && $row['max_amount']>get_next_bid($auction_id)) {
if ($row['bidder_id']!=get_current_bidder_id($auction_id)) {
if (do_bid($auction_id,$row['bidder_id'],get_next_bid($auction_id))) {
mysql_query("UPDATE VEILINGMEESTER_autobids SET remained_bids=remained_bids-1 WHERE id='".$row['id']."'");
$bid_flag=true;
}
}
}
}
}
}
function do_bid($auction_id,$user_id,$bid_value)
{
global $NOW;
if (intval($auction_id)>0 && intval($user_id)>0 && $bid_value>0)
{
$sql="SELECT ends,bid_value,closed,w_seat FROM VEILINGMEESTER_auctions WHERE id='".$auction_id."'";
$result1=mysql_query($sql);
$ends = mysql_result($result1, 0, "ends");
$closed = mysql_result($result1, 0, "closed");
$w_seat=mysql_result($result1, 0, "w_seat");
if ($closed==0)
{
if (($w_seat==1)||($w_seat==2))
{
if ((strtotime($ends)-strtotime($NOW)>=0) && (strtotime($ends)-strtotime($NOW)<=$GLOBALS['SETTINGS']['extension_time'])) {
$new_ends=date("YmdHis",strtotime($ends)+$GLOBALS['SETTINGS']['extension_time']-(strtotime($ends)-strtotime($NOW))+1);
mysql_query("UPDATE VEILINGMEESTER_auctions SET ends='".$new_ends."', jump30=0 WHERE id='".$auction_id."'");
}
if (strtotime($ends)-strtotime($NOW)>=0) {
$insert = "INSERT INTO VEILINGMEESTER_bids(auction, bidder, bid, bidwhen)
VALUES('" .$auction_id. "','" .$user_id. "','" .converttonum($bid_value). "','" .$NOW. "')";
mysql_query($insert);
return true;
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
} else {
return false;
}
}
function converttonum($convertnum)
{
$bits = explode(",",$convertnum);
$first = strlen($bits[0]);
$last = strlen($bits[1]);
if ($last <3)
{
$convertnum = str_replace(",",".",$convertnum);
}else
{
$convertnum = str_replace(",","",$convertnum);
}
return $convertnum;
}
function get_current_bidder_id($auction_id)
{
$sql = "SELECT
bid, bidder, COUNT(bid) AS bid_count
FROM
VEILINGMEESTER_bids
WHERE
auction=".$auction_id."
GROUP BY
bid
ORDER BY
bid DESC ";
$result = mysql_query($sql);
if ($row1=mysql_fetch_array($result))
{
return $row1['bidder'];
} else {
return 0;
}
}
?>
Gewijzigd op 29/06/2014 14:36:39 door Ruud gool
Ik neem aan dat andere PHP pagina's wel werken?
Gewijzigd op 29/06/2014 13:09:32 door Frank Nietbelangrijk
Lijkt me niet actueel: zie in de 'output' staan: ereg
Dat is gedateerd.
Gaat het om de software die gekocht is (zoals beschreven in http://www.phphulp.nl/php/forum/topic/witte-pagina-omdat-server-schijnbaar-vind-dat-de-software-te-oud-is/94824/1/)? In dat geval is er oude/overjarige code gekocht.
Bestand is nu_bieden.php
Gewijzigd op 29/06/2014 13:24:33 door Obelix Idefix
dat klopt .. een forumlid zou dit maken voor mij maar haak af na betaling en laat niks meer .. ik heb alles maar weer verhuist en alles doet behalve dit stukje niet
Ben ik benieuwd wie dat is, zodat dit anderen bespaart kan blijven.
In het bestand nu_bieden.php zit, vermoedelijk, de oorzaak.
Zonder code kunnen we niet zo veel.
Overigens zou ik persoonlijk allang dat bestand weggehaald hebben, of in elk geval de code even tijdelijk vervangen hebben door iets nietszeggends. Nu kan elke gek er een hoop info uithalen die later tegen je gebruikt kan worden (database indeling bijvoorbeeld).
p.s ik noem geen naam.. alleen jammer dat er misbruik gemaakt door onkunde van jezelf ..
ik heb gelullig een x bedrag betaald en niet ons afgsproken bedrag .. ik baal stevig
Toevoeging op 29/06/2014 14:13:24:
Ruud gool op 29/06/2014 14:09:51:
ik zal de orginele bron ff plaatsen zo ..
p.s ik noem geen naam.. alleen jammer dat er misbruik gemaakt door onkunde van jezelf ..
ik heb gelukkig een x bedrag betaald en niet ons afgsproken bedrag .. ik baal stevig
p.s ik noem geen naam.. alleen jammer dat er misbruik gemaakt door onkunde van jezelf ..
ik heb gelukkig een x bedrag betaald en niet ons afgsproken bedrag .. ik baal stevig
Gewijzigd op 29/06/2014 14:37:36 door Ruud gool
Wanneer er PHP-code getoond wordt is de kns heel erg groot dat er ergens een quote of dubbelquote te veel of te weinig staat. Zou ook nog op de verkeerde plaats kunnen staan.
Kijkend naar wat er op het scherm verschijnt op je website, is dat vanaf regel 46 (na > )van de code die hierboven staat.
Gewijzigd op 29/06/2014 21:58:52 door Obelix Idefix
een blauwe regel is nu te zien...... "$MSG_105";
2x php tags.
Verwijder 1x: < ? php
en vlak voor de include: ? > weghalen
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
{
// alle andere data
}
?>
error_reporting(-1);
ini_set('display_errors', 'On');
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
{
// alle andere data
}
?>
Gewijzigd op 30/06/2014 16:12:18 door E vH
Code (php)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
zo goed ? er gebeurd niet echt iets ?
error_reporting(-1);
ini_set('display_errors', 'On');
include_once "./includes/config.inc.php";
#// Run cron according to SETTINGS
if($SETTINGS['cron'] == 2)
zo goed ? er gebeurd niet echt iets ?
dit stukje: ( regel 47 ongeveer )
Verander $result___ is naar $phphulp ( op alle 3 de regels aanpassen ).
niet dat het veel uitmaakt hoe de variabele heet..
Je html breekt daar namelijk af.
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
?>
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
?>
Gewijzigd op 30/06/2014 16:27:27 door E vH
Daar lijkt mij inderdaad iets niet goed te gaan met quotes.
Zie garantiebepalingen: http://www.webhouse.be/pdf/veilingmeester.pdf
Kun je niet met een "schone" start, zoals je de bestanden hebt ontvangen, opnieuw beginnen?
ps: mysql gaat er uit! Dit script is zwaar verouderd.
Elmar vH op 30/06/2014 16:25:54:
enige wat ik heel vreemd vind, en zover ik kan zien:
dit stukje: ( regel 47 ongeveer )
Verander $result___ is naar $phphulp ( op alle 3 de regels aanpassen ).
niet dat het veel uitmaakt hoe de variabele heet..
Je html breekt daar namelijk af.
dit stukje: ( regel 47 ongeveer )
Verander $result___ is naar $phphulp ( op alle 3 de regels aanpassen ).
niet dat het veel uitmaakt hoe de variabele heet..
Je html breekt daar namelijk af.
Code (php)
1
2
3
4
5
6
7
2
3
4
5
6
7
<?php
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
?>
$result___ = mysql_query($query);
if(mysql_num_rows($result___) > 0)
{
$ARETHEREBIDS = "<A HREF=\"" . $SETTINGS['siteurl'] . "item.php?id=$id&history=view#history\">$MSG_105</A>";
$CURRENTBID_ID = mysql_result($result___, 0, "id");
?>
maakt helaas niet uit..
Ben benieuwd of die de echo ook overslaat...
ps: heb je een pb gestuurd.
goed werk !! bedankt !!