Classified ads for antique radios,
televisions, phonographs,
radio-related stuff, tubes, parts, memorabilia, and OTR.
\n\r\n";
echo " \n";
echo " | \n";
echo " \n";
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
foreach($row as $adModel_first_char):
echo " $adModel_first_char \n";
endforeach;
}
mysqli_free_result($result);
echo " \n";
echo " Back to Categories\n";
echo " | \n";
echo "
\n";
echo "
\n";
echo "\n\r";
$today = date("Y-m-d");
$todayPlusSixty = date("Y-m-d", strtotime($today . " +60 days"));
$openEndDate = date("n/d/Y", strtotime("$todayPlusSixty"));
$firstChar = "";
switch ($search) {
case 'all':
$query = "SELECT * FROM adsdetail WHERE ad_status = 'P' ORDER BY ad_model";
break;
case 'Z01':
$query = "SELECT * FROM adsdetail WHERE ad_status = 'P' and ad_class LIKE 'Z%' ORDER BY ad_model";
break;
case 'sold':
$query = "SELECT * FROM adsdetail WHERE ad_status = 'P' and ad_isit_sold = 'Y' ORDER BY ad_model";
break;
default:
$query = "SELECT * FROM adsdetail WHERE ad_status = 'P' and ad_class = '$classCode' ORDER BY ad_model";
}
$result = mysqli_query($link,$query) or die("Query failed : " . mysqli_error($link));
$numRows = mysqli_num_rows($result);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$adId = $row["ad_id"];
$adName = $row["ad_name"];
$adNameShow = $row["ad_name_show"];
$adEmail = $row["ad_email"];
$adEmailShow = $row["ad_email_show"];
$adPhone = $row["ad_phone"];
$adPhoneShow = $row["ad_phone_show"];
$adModel = $row["ad_model"];
$adText = $row["ad_text"];
$adStatus = $row["ad_status"];
$adIsitNew = $row["ad_isit_new"];
$adIsitSold = $row["ad_isit_sold"];
$adPrice = $row["ad_price"];
$oboShow = $row["obo_show"];
$adEndDate = $row["ad_end_date"];
// $adText = strip_tags($adText);
$price = "$".number_format($adPrice,2);
//
if ($adEndDate == '0000-00-00') {
$endDate = $openEndDate;
} else {
$endDate = date("n/d/Y", strtotime("$adEndDate"));
}
$formatedAdId = substr("0000000".$adId, -7);
$image = "images/small/".$formatedAdId.".jpg";
$blah = getimagesize($image);
$type = $blah['mime'];
$width = $blah[0];
$height = $blah[1];
$saleText = "";
$newText = "";
if ($firstChar == substr($adModel,0,1)) {
echo "\n
\n";
echo "\n";
} else {
if ($firstChar !== substr($adModel,0,1)) {
$firstChar = substr($adModel,0,1);
echo "
\r\n";
echo "
$firstChar \n";
echo "\n
\n";
echo "\n";
}
}
echo " \n";
echo " \n";
echo " ";
echo " \n";
echo " | \n";
echo " \n";
include "includes/print_ad_text.php";
echo "\n";
echo " | \n";
echo "
\n";
}
echo "
\n";
echo "\n";
echo "
\r\n";
echo "
";
?>