Classified Advertising
|
// |
?>
$mysql = mysql_connect("localhost","402441_admin","NuvvMJ..");
mysql_select_db( "402441_motorbikenews" );?>
| | | |
$query = "SELECT count(*) as quantity FROM newclass_ads";
$result = mysql_query($query) or die('Error!!!!!!, query failed 1');
while ( $DOC = mysql_fetch_object( $result ) )
{
$iRecordcount = $DOC->quantity;
?>
 |
Motorbikes
if ($iRecordcount > 0) {
echo '(';
echo $iRecordcount;
echo ') '; }?>
|
| |
}
?>
$query = "SELECT * FROM newclass_ads where adtype = 10 order by primkey";
$result = mysql_query($query) or die('Error!!!!!!, query failed 1');
while ( $DOC = mysql_fetch_object( $result ) )
{ ?>
$adclass = "bronze" ;
$adclass2 = "bronzehead" ;
$adclass3 = "bronzebody" ;
$detbut = "viewadb.gif" ;
if ($DOC->adtype == 10 ){
$adclass = "gold" ;$adclass2 = "goldhead" ;$adclass3 = "goldbody" ;$detbut = "viewadg.gif" ;}
if ($DOC->adtype == 5 ){
$adclass = "silver" ; $adclass2 = "silverhead" ;$adclass3 = "bronzebody" ;$detbut = "viewads.gif" ;}
echo '';
?>
echo ' ';
$pricey = $DOC->price;
if ( is_null ($DOC->price) ) { $pricey = "N/A" ; }
echo ' £'.$pricey.' | '.$DOC->make.' ' .$DOC->model.' | ';
echo '';
$texty = substr ($DOC->comments,0,250);
echo $texty;
?>
|
|
echo ' '; ?>
|
$tp = "";
if ( $DOC->tp == "T" ) {$tp = "(T)rader";}
if ( $DOC->tp == "P" ) {$tp = "(P)rivate";}
?>
|
|
if ($DOC->weblink == "" )
{ echo ' | '; }
else {
echo ' | '; }
?>
|
|
}
?>
$query = "SELECT * FROM newclass_ads where adtype < 10 and logoimg <> 'http://motorcyclesupermarket.com/images/dealerLogos/images/' and image<>'' order by price desc limit 10";
$result = mysql_query($query) or die('Error!!!!!!, query failed 1');
while ( $DOC = mysql_fetch_object( $result ) )
{ ?>
$adclass = "bronze" ;
$adclass2 = "bronzehead" ;
$adclass3 = "bronzebody" ;
$detbut = "viewadb.gif" ;
if ($DOC->adtype == 10 ){
$adclass = "gold" ;$adclass2 = "goldhead" ;$adclass3 = "goldbody" ;$detbut = "viewadg.gif" ;}
if ($DOC->adtype == 5 ){
$adclass = "silver" ; $adclass2 = "silverhead" ;$adclass3 = "bronzebody" ;$detbut = "viewads.gif" ;}
echo '';
?>
echo ' ';
$pricey = $DOC->price;
if ( is_null ($DOC->price) ) { $pricey = "N/A" ; }
echo ' £'.$pricey.' | '.$DOC->make.' ' .$DOC->model.' | ';
echo '';
$texty = substr ($DOC->comments,0,250);
echo $texty;
?>
|
|
echo ' '; ?>
|
$tp = "";
if ( $DOC->tp == "T" ) {$tp = "(T)rader";}
if ( $DOC->tp == "P" ) {$tp = "(P)rivate";}
?>
|
|
if ($DOC->weblink == "" )
{ echo ' | '; }
else {
echo ' | '; }
?>
|
|
}
?>
| |