0) { while ($row = db_fetch_array($results)) { $category = $row['category']; $subcategory = $row['subcategory']; $rnum = $row['record_num']; $query = "select count(*) from classified_ads " . "where school_num = $school_num " . "and post_until_date >= '$today' " . "and status = 'Approved' " . "and subcategory_num = $rnum"; $num = db_getVal($query); if ($num == 0) continue; if ($prev_cat != $category) { if ($prev_cat != "") { echo(" \n"); $classified_list .= "\n"; } echo(" \n"); $prev_cat = $category; $classified_list .= "

$category

\n\n"; } } ?>
0) { $selected_category = intval($_REQUEST['selected_category']); // Get category title $query = "select concat_ws(' - ',category,subcategory) " . "from classified_categories as cc, classified_subcategories as sc " . "where sc.category_num = cc.record_num " . "and sc.record_num = $selected_category"; $catTitle = db_getVal($query); ?> = '$today' " . "and c.status = 'Approved' " . "order by posted_time,title"; $ads = db_query($query); $count = 0; if (db_num_rows($ads) > 0) { while ($row = db_fetch_array($ads)) { extract($row); $bgclass = "data-odd"; $hclass = "heading"; if (($count % 2) == 0) { $bgclass = "data-even"; $hclass = "success"; } $count++; $description = preg_replace("/\n\n\n\n$/","",$description); $description = preg_replace("/\n\n\n$/","",$description); $description = preg_replace("/\n\n$/","",$description); $description = preg_replace("/\n$/","",$description); $description = formatUrlsInText($description); $contact_info = formatUrlsInText($contact_info); $posted = "Posted By :: $userid"; if ($posted_by == $_SESSION['UserInfo']['record_num']) { $posted = "" . getLanguageText('TEXT-EDIT-AD') . ""; $posted .= " "; $posted .= "" . getLanguageText('TEXT-DELETE-AD') . ""; } $contact = ""; if ($contact_info) $contact .= "Contact :: $contact_info"; if ($contact_email) { if (strlen($contact)) $contact .= "
\n"; $contact .= "Email :: $contact_email"; } ?>
0) { echo($classified_list); } else { ?>

There are no classified ads at this time

0) { ?>