function cds_build_menu_url($id, $name, $type, $url, $append = 0, $target = '') { if ($type == 'c') { if ($url == '') { $cds_url = tep_href_link(FILENAME_PAGES, 'CDpath=' . cre_get_cds_category_path($id), 'NONSSL'); } else { $cds_url = $url . ($append == 1 ? (strpos($url, '?') ? '&' : '?') . 'CDpath=' . cre_get_cds_page_path($id) : ''); } } else { if ($type == 'p') { $cds_url = tep_href_link(FILENAME_PAGES, 'pID=' . $id . '&CDpath=' . cre_get_cds_page_path($id), 'NONSSL'); } } return '<a href="' . $cds_url . '"' . ($target != '' ? ' target="' . $target . '"' : '') . '>' . $name . '</a>'; }
$row = tep_db_num_rows($result); $rci = ''; if ($row > 0) { $rci .= '<!-- CDS_1showpages_productinfo_bottom //-->' . "\n"; $rci .= ' <table border="0" width="100%" cellspacing="2" cellpadding="2">' . "\n"; $rci .= ' <tr>' . "\n"; $rci .= ' <td class="cds_pInfoContentBoxHeading" colspan="2">' . "\n"; $rci .= CDS_TEXT_PAGES; $rci .= ' </td>' . "\n"; $rci .= ' </tr>' . "\n"; while ($listing = tep_db_fetch_array($result)) { if ($listing['type'] == 'c') { $this_CDpath = cre_get_cds_category_path($listing['ID']); $link = tep_href_link(FILENAME_CDS_INDEX, '&CDpath=' . $this_CDpath); } else { $this_CDpath = cre_get_cds_category_path($listing['parentID']); $link = tep_href_link(FILENAME_CDS_INDEX, 'pID=' . (int) $listing['ID'] . '&CDpath=' . $this_CDpath); } $rci .= ' <tr>' . "\n"; $rci .= ' <td class="cds_pInfoContentBox" valign="top" align="right">' . "\n"; $rci .= ' <a href="' . $link . '">' . "\n"; $rci .= tep_image(DIR_WS_IMAGES . $listing['image'], $listing['title'], CDS_THUMBNAIL_WIDTH, CDS_THUMBNAIL_HEIGHT); $rci .= ' </a>' . "\n"; $rci .= ' </td>' . "\n"; $rci .= ' <td valign="top" class="cds_pInfoContentBox" >' . "\n"; $rci .= ' <a href="' . $link . '"><b>' . $listing['title'] . '</b></a><br>' . "\n"; $rci .= $listing['blurb']; $rci .= ' </td>' . "\n"; $rci .= ' </tr>' . "\n"; } $rci .= ' </table>' . "\n";