$image_name){ $content_image_query = tep_db_query("select content_images_image from " . TABLE_CONTENT_IMAGES . " where content_images_name='" . $image_name . "'"); if(tep_db_num_rows($content_image_query)) { $content_image = tep_db_fetch_array($content_image_query); $result = str_replace("{".$image_name."}", tep_image(DIR_WS_CMS_IMAGES . $content_image['content_images_image']), $result); }else{ $result = str_replace("{".$image_name."}", tep_image(DIR_WS_CMS_IMAGES . NO_CMS_IMAGE), $result); } } return $result; } function tep_get_cms_content($content_name) { global $languages_id; // 20080305 itx freddy modified the where to verify content_status = '1' $content_query = tep_db_query("select content_text as text from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_status = '1' and c.content_id=cd.content_id and content_name='" . $content_name . "' and cd.language_id='" . (int)$languages_id . "'"); if(!tep_db_num_rows($content_query)) return ''; $content = tep_db_fetch_array($content_query); $result = nl2br($content['text']); $result = tep_cms_image_replace($result); return $result; } // 20080305 itx freddy new function to get the title function tep_get_cms_title($content_name) { global $languages_id; $content_query = tep_db_query("select content_title as title from " . TABLE_CONTENT . " c, " . TABLE_CONTENT_DESCRIPTION . " cd where c.content_status = '1' and c.content_id=cd.content_id and content_name='" . $content_name . "' and cd.language_id='" . (int)$languages_id . "'"); if(!tep_db_num_rows($content_query)) return ''; $content = tep_db_fetch_array($content_query); return $content['title']; } ?>