$cars=@mysql_query("select * from 4wds where status='new' order by highlight desc,timeadded desc");
if (@mysql_num_rows($cars)==0){echo "
There are no vehicles listed.
";}
while ($car=@mysql_fetch_array($cars)){
$count++;$divcount++;
if ($count==4){
echo "
\n";
$count=1;
}
echo "
\n";
list($photo)=@mysql_fetch_row(@mysql_query("select photo from 4wdgallery where 4wd='$car[id]' limit 1"));
if (!$photo){$photo="no-photo.gif";}
$photo_small = "/home11/ozwide41/public_html/4wdimages/small/$photo";
if (!file_exists($photo_small)){
$img = imagecreatefromjpeg( "/home11/ozwide41/public_html/4wdimages/$photo" );
$width = imagesx( $img );
$height = imagesy( $img );
$new_width = 360;
$new_height = floor( $height * ( 360 / $width ) );
$tmp_img = imagecreatetruecolor( $new_width, $new_height );
if (!imagecopyresized( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height )){echo "no copy";}
if (!imagejpeg( $tmp_img, $photo_small )){$photo="no-photo.gif";}
}
echo "
\n";
echo "$car[title]
$".number_format($car[price]/100)."\n";
echo "
\n";
}
if ($count>0){
echo "
\n";
}
?>
View Sold Vehicles
include "footer.php";
?>