} else { $img_url = $images['noimage']; } $template->assign_block_vars('imagerow', array('U_ADS_ITEM' => append_sid("ads_item.{$phpEx}?id=" . $row['id']), 'U_PROFILE' => $profile, 'USERNAME' => $profiledata['username'], 'TITLE' => $row['title'], 'SHORT_DESC' => $premium_ad . nl2br($row['short_desc']), 'DATE_ADDED' => date($lang['DATE_FORMAT'], $row['time']), 'STATUS' => $status, 'PRICE' => $row['price'], 'VIEWS' => $row['views'], 'COMMENTS' => $total_comments, 'IMAGE' => $img_url)); } else { $template->assign_block_vars('noimagerow', array('U_ADS_ITEM' => append_sid("ads_item.{$phpEx}?id=" . $row['id']), 'U_PROFILE' => $profile, 'USERNAME' => $profiledata['username'], 'TITLE' => $premium_ad . $row['title'], 'SHORT_DESC' => nl2br($row['short_desc']), 'DATE_ADDED' => date($lang['DATE_FORMAT'], $row['time']), 'STATUS' => $status, 'PRICE' => $row['price'], 'VIEWS' => $row['views'], 'COMMENTS' => $total_comments)); } } } else { $template->assign_block_vars('switch_no_items_found', array()); } if ($ads_config['images'] == 1) { $template->assign_block_vars('switch_images_enabled', array()); } if ($inp_category) { $pointer = ' -> '; } if ($inp_sub_category) { $pointer2 = ' -> '; } if ($ads_count == 0) { $ads_count = 1; } // Encode the fields $u_category = urlencode(stripslashes(htmlspecialchars_decode_php4(str_replace("''", "\\'", $inp_category)))); $u_sub_category = urlencode(stripslashes(htmlspecialchars_decode_php4(str_replace("''", "\\'", $inp_sub_category)))); $goto_string = generate_pagination("adverts.{$phpEx}?category={$u_category}&sub_category={$u_sub_category}", $ads_count, $ads_config[ads_per_page], $start); $page_string = sprintf($lang['Page_of'], floor($start / $ads_config[ads_per_page]) + 1, ceil($ads_count / $ads_config[ads_per_page])); $template->assign_vars(array('U_ADS_INDEX' => append_sid("adverts.{$phpEx}"), 'U_CREATE_AD' => append_sid("ads_create.{$phpEx}"), 'U_CATEGORY' => append_sid("adverts.php?category={$u_category}"), 'U_SUB_CATEGORY' => append_sid("adverts.php?category={$u_category}&sub_category={$u_sub_category}"), 'U_RSS2' => "ads_rss2.{$phpEx}", 'L_ADS_INDEX' => $lang['ads_index'], 'L_CATEGORIES' => $lang['categories'], 'L_TITLE' => $lang['title'], 'L_SHORT_DESC' => $lang['short_desc'], 'L_DATE_ADDED' => $lang['date_added'], 'L_AD_STATUS' => $lang['ad_status'], 'L_PRICE' => $lang['price'], 'L_USERNAME' => $lang['username'], 'L_IMAGE' => $lang['image'], 'L_STATS' => $lang['stats'], 'L_VIEWS' => $lang['views'], 'L_COMMENTS' => $lang['comments'], 'L_NO_ITEMS_FOUND' => $lang['no_items_found'], 'SITE_NAME' => $board_config['sitename'], 'MSG_NEWAD' => $images['msg_newad'], 'GOTO_STRING' => $goto_string, 'PAGE_STRING' => $page_string, 'POINTER' => $pointer, 'POINTER2' => $pointer2, 'CATEGORY' => stripslashes(str_replace("''", "\\'", $inp_category)), 'SUB_CATEGORY' => stripslashes(str_replace("''", "\\'", $inp_sub_category)))); $template->pparse('adverts_page'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx;
if ($settingInfo['rssContentType'] == "1") { $content = htmlSubString($content, $rssLength); } $content = formatBlogContent($content, 0, $fa['cid']); $content = str_replace("attachments/", $home_url . "attachments/", $content); $content = preg_replace("/src=\"([^http].*?)\"/is", "src=\"{$home_url}\\1\"", $content); $content = str_replace("download.php", $home_url . "download.php", $content); if ($fa['logsediter'] == "ubb") { $content = nl2br($content); } } $author = empty($fa['nickname']) ? $fa['author'] : $fa['nickname']; ?> <entry> <title type="html"><![CDATA[<?php echo htmlspecialchars_decode_php4($fa['logTitle']); echo $fa['saveType'] == 3 ? " [{$strHidLog}]" : ""; ?> ]]></title> <author> <name><?php echo $author; ?> </name> <uri><?php echo $gourl . $fa['cid'] . $settingInfo['stype']; ?> </uri> <email><?php echo $settingInfo['email']; ?>
} // Check to see if an image exists for this ad $sql2 = "SELECT * \n\t\t\t\tFROM " . ADS_IMAGES_TABLE . "\n\t\t\t\tWHERE id = '{$id}' \n\t\t\t\tAND img_deleted_ind = 0\n\t\t\t\tLIMIT 0,1"; $result2 = $db->sql_query($sql2); if ($db->sql_numrows($result2) > 0) { while ($row2 = $db->sql_fetchrow($result2)) { $img_url = ADS_IMAGES_PATH . "ad" . $id . "_img" . $row2["img_seq_no"] . "_thumb.jpg"; } } else { $img_url = $images['noimage']; } if ($row['status'] == 'sold') { $status2 = $lang['sold']; } elseif ($row['status'] == 'expired') { $status2 = $lang['expired']; } elseif ($row['status'] == 'active') { $status2 = ''; } $template->assign_block_vars('advertrow', array('U_ADS_ITEM' => append_sid("ads_item.{$phpEx}?id=" . $row['id']), 'U_PROFILE' => $profile, 'ID' => $row['id'], 'USERNAME' => $profiledata['username'], 'TITLE' => $row['title'], 'SHORT_DESC' => nl2br($row['short_desc']), 'DATE_ADDED' => date($lang['DATE_FORMAT'], $time), 'STATUS' => $status2, 'PRICE' => $row['price'], 'VIEWS' => $row['views'], 'IMAGE' => $img_url)); } if ($ads_count == 0) { $ads_count = 1; } // Encode the fields $u_cat_sub_cat = urlencode(stripslashes(htmlspecialchars_decode_php4($cat_sub_cat))); $goto_string = generate_pagination("ads_search.{$phpEx}?search_term={$search_term}&search_terms={$search_terms}&search_name={$search_name}&cat_sub_cat={$u_cat_sub_cat}&status={$status}&sort_by={$sort_by}&sort_dir={$sort_dir}", $ads_count, $ads_config['ads_per_page'], $start); $page_string = sprintf($lang['Page_of'], floor($start / $ads_config['ads_per_page']) + 1, ceil($ads_count / $ads_config['ads_per_page'])); $template->assign_vars(array('U_ADS_INDEX' => append_sid("adverts.{$phpEx}"), 'L_ADS_INDEX' => $lang['ads_index'], 'L_CATEGORIES' => $lang['categories'], 'L_TITLE' => $lang['title'], 'L_SHORT_DESC' => $lang['short_desc'], 'L_DATE_ADDED' => $lang['date_added'], 'L_PRICE' => $lang['price'], 'L_AD_STATUS' => $lang['ad_status'], 'L_USERNAME' => $lang['username'], 'L_IMAGE' => $lang['image'], 'L_VIEWS' => $lang['views'], 'MATCHES' => $matches, 'SITE_NAME' => $board_config['sitename'], 'GOTO_STRING' => append_sid("{$goto_string}"), 'PAGE_STRING' => $page_string)); $template->pparse('search_results'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx; }