Seach menu website
Het gaat om de volgende website
www.deltaboatcenter.nl
Boten, Boats , boten Pagina (ligt er aan welke taal je selecteerd)
Na een tijdje aan het worstelen zijn geweest met wat script krijg ik de zoek funcitie niet aan de praat.
Altans, doet deze het wel dan maar dan geeft ie de boten weer in een blauwe tekst en de euro tekense worden dollar tekens, ik weet niet waar dit dan vandaan komt.
Ik wil berijken met de zoek functie dat klanten op boot merk kunnen zoeken, dit kan nu niet maar de boten worden wel netjes weer gegeven zoals ik dit wil.
Als ik het script aanpas dan kan ik op boot merk zoeken maar worden de boten niet naar wens aan gegeven.
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
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
<?php
include('dbclass/db.php');
include('define.php');
//////////include('pagination.class.php');
include('include/ps_pagination.php');
include_once('classes/easyphpthumbnail.class.php');
$thumb = new easyphpthumbnail;
$thumb -> Thumbheight = 140;
$thumb -> Thumbwidth = 200;
$thumb -> Thumblocation = 'thumb/';
$thumb -> Thumbprefix = 'thumb_';
$thumb -> Thumbsaveas = 'png';
if($lang == 'eng')
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
elseif($lang == 'dutch')
{
$header = "header_dutch.php";
$footer = "footer_dutch.php";
$where = 'language_id=2';
$language =2;
}
elseif($lang == 'german')
{
$header = "header_german.php";
$footer = "footer_german.php";
$where = 'language_id=3';
$language =3;
}
else
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
//select query
$obj = new Database;
$obj ->select('english_boats','',$where);
$query= "select * from english_boats where language_id=$language";
$pager = new PS_Pagination($obj->getConnection(),$query,5,3);
$rs = $pager->paginate();
/////////var_dump($rs);
///////exit;
$sel= "select * from english_boats";
/// $q=mysql_query($sel) or die mysql_error();
//generate thumbnail
// include('boat_function.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type='text/javascript' src='jspop/jquery.js'></script>
<script type='text/javascript' src='jspop/jquery.simplemodal.js'></script>
<script type='text/javascript' src='jspop/osx.js'></script>
<script src="prototype.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Delta Boat company boat listing</title>
<link href="boatstyle/boatstyle.css" rel="stylesheet" type="text/css" />
</head>
<body class="background">
<script>
function dosubmit( ) {
new Ajax.Updater( 'result', 'search_boat.php', { method: 'post',
parameters: $('myform').serialize() } );
$('myform').reset();
}
//get_call
function get_call( ) {
if(document.calform.name.value=="")
{
//inlineMsg('name','please enter the name',20);
alert('Please enter the name');
document.calform.name.focus();
return false;
}
var phone = /-\d{7}/ ;
if(!phone.test(document.calform.tel_number.value))
{
alert('Please enter the telephone number');
document.calform.tel_number.focus();
return false;
}
var aemail= /^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$/;
if(!aemail.test(document.calform.email.value))
{
alert('Please enter the valid email address');
document.calform.email.focus();
return false;
}
new Ajax.Updater( 'get_result', 'make_home_appointment.php', { method: 'post',
parameters: $('calform').serialize() } );
$('calform').reset();
}
</script>
<div class="container">
<?php include($header);
?>
<div class="clear"></div>
<div class="line"></div>
<div class="searchPanel">
<div class="searchTop"></div>
<div class="clear"></div>
<div class="searchMid">
<div class="searchTitle">Search</div>
<div class="searchForm">
<!--javascript:get(document.getElementById('myform'));-->
<form id="myform">
<input type="hidden" name="language" value="<?php echo $language;?>" />
<table class ="textboxAlign" width="100%" border="0">
<tr>
<td width="38%" class="searchItem">Brand:</td>
<td width="62%" class="searchItem"><div class="textboxAlign">
<select name="brand" id="brand" style="width:140px">
<option value="any">any</option>
<?php while($r_b =mysql_fetch_array($q)){ ?>
<option value="<?php echo $r_b['boat_brand'];?>"><?php echo $r_b['boat_brand'];?></option>
<?php }?>
<!-- <option value="brand B">Company B</option>
<option value="brand C">Company C</option>
<option value="brand D">Company D</option>-->
</select>
</div></td>
</tr>
<tr>
<td nowrap="nowrap" class="searchItem">Year From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="year_from" id="year_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
To:
<input type="text" name="year_to" id="year_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
</div> </td>
</tr>
<tr>
<td class="searchItem">Price From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="price_from" id="price_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
To:
<input type="text" name="price_to" id="price_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
</div></td></tr>
<tr>
<td class="searchItem" valign="top">Features:</td>
<td nowrap="nowrap" class="searchItem"><input type="checkbox" name="heating" id="heating" value="588" /> Heating System</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="generator" id="generator" value="661" />
Generator</td>
</tr>
<tr>
<td> </td>
<td class="searchItem" align="left">
<input type="checkbox" name="bow" id="bow_thruster" value="297" />
Bow Thruster</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="stern" id="stern_thruster" value="964" />
Stern Thruster</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" onclick="dosubmit()" value="Search">
<!-- <input type="button" name="button" class="button" value="Search" onclick="javascript:get(this.parentNode);" />--> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="searchBase"></div>
<div class="clear"></div>
</div>
<div id="result">
<div class="thumbnailsDisplayArea">
<?php if(!isset($_GET['page']) || ($_GET['page']==1)) { $i=1; }
else { $i=(($_GET['page']-1)*10)+1 ; }
if(mysql_num_rows($rs)>0)
{
while($row_fetch=mysql_fetch_assoc($rs))
{?>
<?PHP $i++; ?>
<div class="listPanel">
<div class="listTop"></div>
<div class="listMid">
<a href="boat_detail.php?id=<?php echo $row_fetch ['boat_id'];?> & common_id=<?php echo $row_fetch['common_id']; ?>"><div class="itemName" align="left"><?php echo $row_fetch['boat_title'];?> </div></a>
<div class="itemPrice"><?php echo $row_fetch['price_currency'];?> <?php echo $row_fetch['boat_price'];?></div>
<div class="clear"></div>
<div class="itemDescription" align="left">
<a href="boat_detail.php?id=<?php echo $row_fetch['boat_id'];?>&common_id=<?php echo $row_fetch['common_id']; ?>"><?php echo $row_fetch['boat_summary'];?></a>
<div class="moreLink"><!--<a href="boat_detail.php?id=<?php //echo $value['boat_id'];?> & common_id=<?php //echo $com_id?>">more...</a>--></div>
<div class="clear"></div>
</div>
<div class="ItemThumbnail">
<a href="boat_detail.php?id=<?php echo $row_fetch ['boat_id'];?>&common_id=<?php echo $row_fetch['common_id'];?>">
<?php
///////exit;
$where=sprintf("common_id=%d",$row_fetch['common_id']);
$obj ->select('boat_images','',$where);
$array = $obj ->get('');
if(count($array)>0){
$imagename=$array[0]["boat_image"];
$thumb_name="thumb/thumb_$imagename";
$thumb_name=str_replace("jpg","png",$thumb_name);
if(!file_exists($thumb_name))
{
$thumb -> Createthumb("admin/uploads/$imagename","file");
}
?><?php
}
?>
<img src="<?php echo $thumb_name; ?>" border=0 />
</a><br />
</div>
</div>
<div class="listBase"></div>
</div>
<div class="clear"></div>
<?php }}else {
echo 'NO image found';}?>
<div class="paging2">
<?php
if(mysql_num_rows($rs)>0){
echo $pager->renderFullNav(); }?>
<div class="clear"></div>
</div></div>
<div class="verticalSpacer"></div>
<div class="clear"></div>
<div class="line"></div>
<div class="footer">
<?php include($footer);?></div>
<?php include('language.php');?>
<div class="clear"></div>
</div>
</div>
</body>
</html>
include('dbclass/db.php');
include('define.php');
//////////include('pagination.class.php');
include('include/ps_pagination.php');
include_once('classes/easyphpthumbnail.class.php');
$thumb = new easyphpthumbnail;
$thumb -> Thumbheight = 140;
$thumb -> Thumbwidth = 200;
$thumb -> Thumblocation = 'thumb/';
$thumb -> Thumbprefix = 'thumb_';
$thumb -> Thumbsaveas = 'png';
if($lang == 'eng')
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
elseif($lang == 'dutch')
{
$header = "header_dutch.php";
$footer = "footer_dutch.php";
$where = 'language_id=2';
$language =2;
}
elseif($lang == 'german')
{
$header = "header_german.php";
$footer = "footer_german.php";
$where = 'language_id=3';
$language =3;
}
else
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
//select query
$obj = new Database;
$obj ->select('english_boats','',$where);
$query= "select * from english_boats where language_id=$language";
$pager = new PS_Pagination($obj->getConnection(),$query,5,3);
$rs = $pager->paginate();
/////////var_dump($rs);
///////exit;
$sel= "select * from english_boats";
/// $q=mysql_query($sel) or die mysql_error();
//generate thumbnail
// include('boat_function.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type='text/javascript' src='jspop/jquery.js'></script>
<script type='text/javascript' src='jspop/jquery.simplemodal.js'></script>
<script type='text/javascript' src='jspop/osx.js'></script>
<script src="prototype.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Delta Boat company boat listing</title>
<link href="boatstyle/boatstyle.css" rel="stylesheet" type="text/css" />
</head>
<body class="background">
<script>
function dosubmit( ) {
new Ajax.Updater( 'result', 'search_boat.php', { method: 'post',
parameters: $('myform').serialize() } );
$('myform').reset();
}
//get_call
function get_call( ) {
if(document.calform.name.value=="")
{
//inlineMsg('name','please enter the name',20);
alert('Please enter the name');
document.calform.name.focus();
return false;
}
var phone = /-\d{7}/ ;
if(!phone.test(document.calform.tel_number.value))
{
alert('Please enter the telephone number');
document.calform.tel_number.focus();
return false;
}
var aemail= /^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$/;
if(!aemail.test(document.calform.email.value))
{
alert('Please enter the valid email address');
document.calform.email.focus();
return false;
}
new Ajax.Updater( 'get_result', 'make_home_appointment.php', { method: 'post',
parameters: $('calform').serialize() } );
$('calform').reset();
}
</script>
<div class="container">
<?php include($header);
?>
<div class="clear"></div>
<div class="line"></div>
<div class="searchPanel">
<div class="searchTop"></div>
<div class="clear"></div>
<div class="searchMid">
<div class="searchTitle">Search</div>
<div class="searchForm">
<!--javascript:get(document.getElementById('myform'));-->
<form id="myform">
<input type="hidden" name="language" value="<?php echo $language;?>" />
<table class ="textboxAlign" width="100%" border="0">
<tr>
<td width="38%" class="searchItem">Brand:</td>
<td width="62%" class="searchItem"><div class="textboxAlign">
<select name="brand" id="brand" style="width:140px">
<option value="any">any</option>
<?php while($r_b =mysql_fetch_array($q)){ ?>
<option value="<?php echo $r_b['boat_brand'];?>"><?php echo $r_b['boat_brand'];?></option>
<?php }?>
<!-- <option value="brand B">Company B</option>
<option value="brand C">Company C</option>
<option value="brand D">Company D</option>-->
</select>
</div></td>
</tr>
<tr>
<td nowrap="nowrap" class="searchItem">Year From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="year_from" id="year_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
To:
<input type="text" name="year_to" id="year_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
</div> </td>
</tr>
<tr>
<td class="searchItem">Price From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="price_from" id="price_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
To:
<input type="text" name="price_to" id="price_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"/>
</div></td></tr>
<tr>
<td class="searchItem" valign="top">Features:</td>
<td nowrap="nowrap" class="searchItem"><input type="checkbox" name="heating" id="heating" value="588" /> Heating System</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="generator" id="generator" value="661" />
Generator</td>
</tr>
<tr>
<td> </td>
<td class="searchItem" align="left">
<input type="checkbox" name="bow" id="bow_thruster" value="297" />
Bow Thruster</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="stern" id="stern_thruster" value="964" />
Stern Thruster</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" onclick="dosubmit()" value="Search">
<!-- <input type="button" name="button" class="button" value="Search" onclick="javascript:get(this.parentNode);" />--> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="searchBase"></div>
<div class="clear"></div>
</div>
<div id="result">
<div class="thumbnailsDisplayArea">
<?php if(!isset($_GET['page']) || ($_GET['page']==1)) { $i=1; }
else { $i=(($_GET['page']-1)*10)+1 ; }
if(mysql_num_rows($rs)>0)
{
while($row_fetch=mysql_fetch_assoc($rs))
{?>
<?PHP $i++; ?>
<div class="listPanel">
<div class="listTop"></div>
<div class="listMid">
<a href="boat_detail.php?id=<?php echo $row_fetch ['boat_id'];?> & common_id=<?php echo $row_fetch['common_id']; ?>"><div class="itemName" align="left"><?php echo $row_fetch['boat_title'];?> </div></a>
<div class="itemPrice"><?php echo $row_fetch['price_currency'];?> <?php echo $row_fetch['boat_price'];?></div>
<div class="clear"></div>
<div class="itemDescription" align="left">
<a href="boat_detail.php?id=<?php echo $row_fetch['boat_id'];?>&common_id=<?php echo $row_fetch['common_id']; ?>"><?php echo $row_fetch['boat_summary'];?></a>
<div class="moreLink"><!--<a href="boat_detail.php?id=<?php //echo $value['boat_id'];?> & common_id=<?php //echo $com_id?>">more...</a>--></div>
<div class="clear"></div>
</div>
<div class="ItemThumbnail">
<a href="boat_detail.php?id=<?php echo $row_fetch ['boat_id'];?>&common_id=<?php echo $row_fetch['common_id'];?>">
<?php
///////exit;
$where=sprintf("common_id=%d",$row_fetch['common_id']);
$obj ->select('boat_images','',$where);
$array = $obj ->get('');
if(count($array)>0){
$imagename=$array[0]["boat_image"];
$thumb_name="thumb/thumb_$imagename";
$thumb_name=str_replace("jpg","png",$thumb_name);
if(!file_exists($thumb_name))
{
$thumb -> Createthumb("admin/uploads/$imagename","file");
}
?><?php
}
?>
<img src="<?php echo $thumb_name; ?>" border=0 />
</a><br />
</div>
</div>
<div class="listBase"></div>
</div>
<div class="clear"></div>
<?php }}else {
echo 'NO image found';}?>
<div class="paging2">
<?php
if(mysql_num_rows($rs)>0){
echo $pager->renderFullNav(); }?>
<div class="clear"></div>
</div></div>
<div class="verticalSpacer"></div>
<div class="clear"></div>
<div class="line"></div>
<div class="footer">
<?php include($footer);?></div>
<?php include('language.php');?>
<div class="clear"></div>
</div>
</div>
</body>
</html>
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
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
<?php
include('dbclass/db.php');
include('define.php');
if($lang == 'eng')
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
elseif($lang == 'dutch')
{
$header = "header_dutch.php";
$footer = "footer_dutch.php";
$where = 'language_id=2';
$language =2;
}
elseif($lang == 'german')
{
$header = "header_german.php";
$footer = "footer_german.php";
$where = 'language_id=3';
$language =3;
}
else
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
//select query
$obj = new Database;
$obj ->select('english_boats','',$where);
$array = $obj ->get('');
//get brands
$s = "select distinct boat_brand from english_boats";
$q = mysql_query($s) or die(mysql_error());
//generate thumbnail
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" language="javascript">
var http_request = false;
function makeRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// set type accordingly to anticipated content type
//http_request.overrideMimeType('text/xml');
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url + parameters, true);
http_request.send(null);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//alert(http_request.responseText);
result = http_request.responseText;
document.getElementById('myspan').innerHTML = result;
} else {
alert('There was a problem with the request.');
}
}
}
function get(obj) {
var getstr = "?";
for (i=0; i<obj.childNodes.length; i++) {
if (obj.childNodes[i].tagName == "INPUT") {
if (obj.childNodes[i].type == "text") {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
if (obj.childNodes[i].type == "hidden") {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
if (obj.childNodes[i].type == "checkbox") {
if (obj.childNodes[i].checked) {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
} else {
getstr += obj.childNodes[i].name + "=&";
}
}
if (obj.childNodes[i].type == "radio") {
if (obj.childNodes[i].checked) {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
}
}
if (obj.childNodes[i].tagName == "SELECT") {
var sel = obj.childNodes[i];
getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
}
}
document.getElementById('myspan').innerHTML = '<img src="images/wait30trans.gif" alt="loading" />' + 'Loading';
//setTimeout('alert(\'Surprise!\')', 5000);
makeRequest('search_boat.php', getstr);
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Delta Boat company about us</title>
<link href="boatstyle/boatstyle.css" rel="stylesheet" type="text/css" />
</head>
<body class="background">
<div class="container">
<?php include($header);
?>
<div class="clear"></div>
<div class="line"></div>
<div class="searchPanel">
<div class="searchTop"></div>
<div class="clear"></div>
<div class="searchMid">
<div class="searchTitle">Search</div>
<div class="searchForm">
<!--javascript:get(document.getElementById('myform'));-->
<form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform">
<!--<form action="" name="form">-->
<table class ="textboxAlign" width="100%" border="0">
<tr>
<td width="38%" class="searchItem">Brand:</td>
<td width="62%" class="searchItem"><div class="textboxAlign">
<select name="brand" id="brand" style="width:140px">
<option value="any">any</option>
<?php while($r_b =mysql_fetch_array($q)){ ?>
<option value="<?php echo $r_b['boat_brand'];?>"><?php echo $r_b['boat_brand'];?></option>
<?php }?>
<!-- <option value="brand B">Company B</option>
<option value="brand C">Company C</option>
<option value="brand D">Company D</option>-->
</select>
</div></td>
</tr>
<tr>
<td nowrap="nowrap" class="searchItem">Year From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="year_from" id="year_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
To:
<input type="text" name="year_to" id="year_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
</div> </td>
</tr>
<tr>
<td class="searchItem">Price From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="price_from" id="price_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
To:
<input type="text" name="price_to" id="price_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
</div></td></tr>
<tr>
<td class="searchItem" valign="top">Features:</td>
<td nowrap="nowrap" class="searchItem"><input type="checkbox" name="heating" id="heating" value="588" /> Heating Sysytem</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="generator" id="generator" value="661" />
Generator</td>
</tr>
<tr>
<td> </td>
<td class="searchItem" align="left">
<input type="checkbox" name="bow" id="bow_thruster" value="297" />
Bow Thruster</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="stern" id="stern_thruster" value="964" />
Stern Thruster</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" name="button" class="button" value="Submit" onclick="javascript:get(this.parentNode);" /> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="searchBase"></div>
<div class="clear"></div>
</div>
<div id="myspan">
<div class="thumbnailsDisplayArea">
<?php
if(count($array))
{
while(list($k,$value) = each($array))
{
$com_id = $value['common_id'];
$im_where = 'common_id='.$com_id;
$obj ->select('boat_images','',$im_where);
$im_array = $obj ->get('');
$filename = $im_array[0]['boat_image'];
?>
<div class="listPanel">
<div class="listTop"></div>
<div class="listMid">
<a href="boat_detail.php?id=<?php echo $value['boat_id'];?> & common_id=<?php echo $com_id?>"><div class="itemName" align="left"><?php echo $value['boat_title'];?> </div></a>
<div class="itemPrice"><?php echo $value['price_currency'];?> <?php echo $value['boat_price'];?></div>
<div class="clear"></div>
<div class="itemDescription" align="left">
<a href="boat_detail.php?id=<?php echo $value['boat_id'];?>&common_id=<?php echo $com_id?>"><?php echo $value['boat_summary'];?></a>
<div class="moreLink"><!--<a href="boat_detail.php?id=<?php //echo $value['boat_id'];?> & common_id=<?php //echo $com_id?>">more...</a>--></div>
<div class="clear"></div>
</div>
<div class="ItemThumbnail"><a href="boat_detail.php?id=<?php echo $value['boat_id'];?>&common_id=<?php echo $com_id?>"><?php //createThumbnail($filename);?><img src="admin/uploads/<?php echo $im_array[0]['boat_image'];?>" width="200px" height="140px" border="0" /></a></div>
</div>
<div class="listBase"></div>
</div>
<?php }}?>
<div class="clear"></div>
</div>
</div>
<div class="verticalSpacer"></div>
<div class="clear"></div>
<div class="line"></div>
<div class="footer">
<?php include($footer);?></div>
<?php include('language.php');?>
<div class="clear"></div>
</div>
</body>
</html>
include('dbclass/db.php');
include('define.php');
if($lang == 'eng')
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
elseif($lang == 'dutch')
{
$header = "header_dutch.php";
$footer = "footer_dutch.php";
$where = 'language_id=2';
$language =2;
}
elseif($lang == 'german')
{
$header = "header_german.php";
$footer = "footer_german.php";
$where = 'language_id=3';
$language =3;
}
else
{
$header = "header_eng.php";
$footer = "footer_eng.php";
$where = 'language_id=1';
$language =1;
}
//select query
$obj = new Database;
$obj ->select('english_boats','',$where);
$array = $obj ->get('');
//get brands
$s = "select distinct boat_brand from english_boats";
$q = mysql_query($s) or die(mysql_error());
//generate thumbnail
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" language="javascript">
var http_request = false;
function makeRequest(url, parameters) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
// set type accordingly to anticipated content type
//http_request.overrideMimeType('text/xml');
http_request.overrideMimeType('text/html');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Cannot create XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url + parameters, true);
http_request.send(null);
}
function alertContents() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//alert(http_request.responseText);
result = http_request.responseText;
document.getElementById('myspan').innerHTML = result;
} else {
alert('There was a problem with the request.');
}
}
}
function get(obj) {
var getstr = "?";
for (i=0; i<obj.childNodes.length; i++) {
if (obj.childNodes[i].tagName == "INPUT") {
if (obj.childNodes[i].type == "text") {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
if (obj.childNodes[i].type == "hidden") {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
if (obj.childNodes[i].type == "checkbox") {
if (obj.childNodes[i].checked) {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
} else {
getstr += obj.childNodes[i].name + "=&";
}
}
if (obj.childNodes[i].type == "radio") {
if (obj.childNodes[i].checked) {
getstr += obj.childNodes[i].name + "=" + obj.childNodes[i].value + "&";
}
}
}
if (obj.childNodes[i].tagName == "SELECT") {
var sel = obj.childNodes[i];
getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
}
}
document.getElementById('myspan').innerHTML = '<img src="images/wait30trans.gif" alt="loading" />' + 'Loading';
//setTimeout('alert(\'Surprise!\')', 5000);
makeRequest('search_boat.php', getstr);
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Delta Boat company about us</title>
<link href="boatstyle/boatstyle.css" rel="stylesheet" type="text/css" />
</head>
<body class="background">
<div class="container">
<?php include($header);
?>
<div class="clear"></div>
<div class="line"></div>
<div class="searchPanel">
<div class="searchTop"></div>
<div class="clear"></div>
<div class="searchMid">
<div class="searchTitle">Search</div>
<div class="searchForm">
<!--javascript:get(document.getElementById('myform'));-->
<form action="javascript:get(document.getElementById('myform'));" name="myform" id="myform">
<!--<form action="" name="form">-->
<table class ="textboxAlign" width="100%" border="0">
<tr>
<td width="38%" class="searchItem">Brand:</td>
<td width="62%" class="searchItem"><div class="textboxAlign">
<select name="brand" id="brand" style="width:140px">
<option value="any">any</option>
<?php while($r_b =mysql_fetch_array($q)){ ?>
<option value="<?php echo $r_b['boat_brand'];?>"><?php echo $r_b['boat_brand'];?></option>
<?php }?>
<!-- <option value="brand B">Company B</option>
<option value="brand C">Company C</option>
<option value="brand D">Company D</option>-->
</select>
</div></td>
</tr>
<tr>
<td nowrap="nowrap" class="searchItem">Year From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="year_from" id="year_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
To:
<input type="text" name="year_to" id="year_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
</div> </td>
</tr>
<tr>
<td class="searchItem">Price From:</td>
<td class="searchItem"><div class="textboxAlign">
<input type="text" name="price_from" id="price_from" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
To:
<input type="text" name="price_to" id="price_to" value="any" size="5" onfocus="if(this.value == this.defaultValue) this.value = ''"
/>
</div></td></tr>
<tr>
<td class="searchItem" valign="top">Features:</td>
<td nowrap="nowrap" class="searchItem"><input type="checkbox" name="heating" id="heating" value="588" /> Heating Sysytem</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="generator" id="generator" value="661" />
Generator</td>
</tr>
<tr>
<td> </td>
<td class="searchItem" align="left">
<input type="checkbox" name="bow" id="bow_thruster" value="297" />
Bow Thruster</td>
</tr>
<tr>
<td> </td>
<td class="searchItem">
<input type="checkbox" name="stern" id="stern_thruster" value="964" />
Stern Thruster</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" name="button" class="button" value="Submit" onclick="javascript:get(this.parentNode);" /> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="searchBase"></div>
<div class="clear"></div>
</div>
<div id="myspan">
<div class="thumbnailsDisplayArea">
<?php
if(count($array))
{
while(list($k,$value) = each($array))
{
$com_id = $value['common_id'];
$im_where = 'common_id='.$com_id;
$obj ->select('boat_images','',$im_where);
$im_array = $obj ->get('');
$filename = $im_array[0]['boat_image'];
?>
<div class="listPanel">
<div class="listTop"></div>
<div class="listMid">
<a href="boat_detail.php?id=<?php echo $value['boat_id'];?> & common_id=<?php echo $com_id?>"><div class="itemName" align="left"><?php echo $value['boat_title'];?> </div></a>
<div class="itemPrice"><?php echo $value['price_currency'];?> <?php echo $value['boat_price'];?></div>
<div class="clear"></div>
<div class="itemDescription" align="left">
<a href="boat_detail.php?id=<?php echo $value['boat_id'];?>&common_id=<?php echo $com_id?>"><?php echo $value['boat_summary'];?></a>
<div class="moreLink"><!--<a href="boat_detail.php?id=<?php //echo $value['boat_id'];?> & common_id=<?php //echo $com_id?>">more...</a>--></div>
<div class="clear"></div>
</div>
<div class="ItemThumbnail"><a href="boat_detail.php?id=<?php echo $value['boat_id'];?>&common_id=<?php echo $com_id?>"><?php //createThumbnail($filename);?><img src="admin/uploads/<?php echo $im_array[0]['boat_image'];?>" width="200px" height="140px" border="0" /></a></div>
</div>
<div class="listBase"></div>
</div>
<?php }}?>
<div class="clear"></div>
</div>
</div>
<div class="verticalSpacer"></div>
<div class="clear"></div>
<div class="line"></div>
<div class="footer">
<?php include($footer);?></div>
<?php include('language.php');?>
<div class="clear"></div>
</div>
</body>
</html>
mochten er vragen zijn, ik weet dat ze komen. let me know, groetjes
Toevoeging op 07/12/2010 15:25:24:
Het bovenste script, daar worden de boten netjes in weer gegeven maar werkt de zoek funtie niet.
Het onderste script, daar werkt de zoek functie wel maar worden de boten niet netjes weergegeven.
Groetjes
Toevoeging op 07/12/2010 15:49:55:
op de website heb ik het bovenste script staan nu zodat de boten er netjes bijstaan.
Groetjes
Toevoeging op 08/12/2010 09:13:17:
Zou er anders iets bestaan om een script op fouten te testen?
Groetjes
Gewijzigd op 07/12/2010 15:48:48 door Nick cortez
Ivm het dollarteken, zoek ik nog even verder.