$min_len) { $new_str[$i] = $string; $i++; } } $t_name = implode(" ", $new_str); unset($new_str); $t_name = preg_replace($pattern, $replace, $t_name); $t_nameL = strtolower($t_name); return $t_nameL; } // PCL Output function pcl_output($id) { if ($id != 0) { $query1 = tep_db_query("SELECT c.parent_id, cd.categories_name FROM " . TABLE_CATEGORIES . " c LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (c.categories_id = cd.categories_id) WHERE c.categories_id = $id"); $pcla = array(); while ($pc_values = tep_db_fetch_array($query1)) { $pc_header = $pc_values[categories_name]; $parent_id = $pc_values[parent_id]; $query2 = tep_db_query("SELECT c.categories_id, c.categories_image, cd.categories_name FROM " . TABLE_CATEGORIES . " c LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON (c.categories_id = cd.categories_id) WHERE c.parent_id = $id LIMIT 6"); if (tep_db_num_rows($query2) > 0) { $type = "c"; while ($q2v = tep_db_fetch_array($query2)) { $q2_id = $q2v[categories_id]; $q2_head = $q2v[categories_name]; $q2_image = $q2v[categories_image]; array_push($pcla, "$q2_id$q2_head$q2_image"); } } else { $type = "p"; $pQuery = tep_db_query("SELECT p.products_id, pd.products_name, p.products_image FROM " . TABLE_PRODUCTS . " p LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c ON (p.products_id = p2c.products_id) WHERE p2c.categories_id = $id LIMIT 6"); while ($q2v = tep_db_fetch_array($pQuery)) { $q2_id = $q2v[products_id]; $q2_head = $q2v[products_name]; $q2_image = $q2v[products_image]; array_push($pcla, "$q2_id$q2_head$q2_image"); } } } $i = 0; $cPath = tep_get_path($id); echo ''."\n".' '."\n".' \n \n "; foreach ($pcla as $key => $data) { $split = explode("", $data); $p_id = $split[0]; $p_head = $split[1]; $p_image = $split[2]; if ($type == 'c') { $cPath = tep_get_path($p_id); $url = tep_href_link(FILENAME_DEFAULT, $cPath); } if ($type == 'p') { $url = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $p_id); } if ($i == 6) { echo "\n".' '."\n".' '; $i = 0; } if ($p_image != '') { $imglink = tep_image(DIR_WS_IMAGES . $p_image, $p_head, '50', '50'); } else { $imglink = ' '; } echo "\n" .''; $i++; $c = 1; } if ($c === 1) echo "\n \n \n \n \n
Shop our Online Catalog: '. $pc_header . "
\n
'. $imglink .'
'. $p_head .'

\n
"; } } // Sub Topic Sister Linking function sub_topic_links($starting_topic_id) { $topics_query = "SELECT t.topics_id, td.topics_name, t.parent_id FROM topics t, topics_description td WHERE t.parent_id='". $starting_topic_id ."' AND t.topics_id = td.topics_id"; $topics_results = tep_db_query($topics_query); if (tep_db_num_rows($topics_results) > 0 ) { echo "

"; echo "
Related Topics:"; while ($subs = tep_db_fetch_array($topics_results)) { $topic_id = $subs['topics_id']; $topic_name = $subs['topics_name']; $tPath_subs = ''; $tPath_subs_array = array(); array_push($tPath_subs_array, (int)$topic_id); tep_get_parent_topics($tPath_subs_array, $topic_id); $tPath_subs_array = array_reverse($tPath_subs_array); $tPath_subs = implode('_', $tPath_subs_array); if ($i == 0) { echo "
    "; } if ($topic_id != $starting_topic_id) { echo "
  • ". $topic_name ."
  • "; $i++; } if ($i == 3) { echo "
"; $i = 0; } } echo "
"; } } // Sister Artile Linking function sister_article_linking($current_id) { $fetch_cat = tep_db_query("SELECT at.topics_id, t.parent_id, td.topics_name FROM articles_to_topics at, topics t, topics_description td WHERE at.articles_id = $current_id AND at.topics_id = t.topics_id AND td.topics_id = t.topics_id"); while ($result = tep_db_fetch_array($fetch_cat)) { $tID = $result['topics_id']; $pID = $result['parent_id']; $tName = $result['topics_name']; } $tPath_subs = ''; $tPath_subs_array = array(); array_push($tPath_subs_array, (int)$tID); tep_get_parent_topics($tPath_subs_array, $tID); $tPath_subs_array = array_reverse($tPath_subs_array); $tPath_subs = implode('_', $tPath_subs_array); sub_topic_links($tID); echo "

"; echo "Back to main topic: $tName
    "; $link_builder_query = tep_db_query("SELECT ad.articles_id, ad.articles_name, at.topics_id, at.articles_id FROM articles_description ad, articles_to_topics at WHERE at.topics_id='$tID' AND at.articles_id = ad.articles_id;"); while ($link_builder = tep_db_fetch_array($link_builder_query)) { $a_id = $link_builder['articles_id']; $a_name = $link_builder['articles_name']; $aPath = "articles_id=". $a_id; if ($current_id == $a_id) { } else { echo "
  • $a_name
  • "; } } print ("
"); } ?> Page Not Found
FWR MEDIA
Page not found
The page you were looking for could not be found. Please click the below link to return to