本文整理汇总了PHP中zen_clean_html函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_clean_html函数的具体用法?PHP zen_clean_html怎么用?PHP zen_clean_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_clean_html函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zen_get_products_actual_price
if (META_TAG_INCLUDE_PRICE == '1') {
if ($review_metatags->fields['product_is_free'] != '1') {
$meta_products_price = zen_get_products_actual_price($review_metatags->fields['products_id']);
$meta_products_price = SECONDARY_SECTION . $currencies->display_price($meta_products_price, zen_get_tax_rate($review_metatags->fields['products_tax_class_id']));
} else {
$meta_products_price = SECONDARY_SECTION . META_TAG_PRODUCTS_PRICE_IS_FREE_TEXT;
}
} else {
$meta_products_price = '';
}
if (zen_not_null($review_metatags->fields['products_model'])) {
$meta_products_name = $review_metatags->fields['products_name'] . ' [' . $review_metatags->fields['products_model'] . ']';
} else {
$meta_products_name = $review_metatags->fields['products_name'];
}
$meta_products_name = zen_clean_html($meta_products_name);
$review_text_metatags = substr(strip_tags(stripslashes($review_metatags->fields['reviews_text'])), 0, 60);
$reviews_rating_metatags = SUB_TITLE_RATING . ' ' . sprintf(TEXT_OF_5_STARS, $review_metatags->fields['reviews_rating']);
define('META_TAG_TITLE', str_replace('"', '', $meta_products_name . $meta_products_price . PRIMARY_SECTION . TITLE . TERTIARY_SECTION . NAVBAR_TITLE));
define('META_TAG_DESCRIPTION', str_replace('"', '', TITLE . PRIMARY_SECTION . NAVBAR_TITLE . SECONDARY_SECTION . $meta_products_name . SECONDARY_SECTION . $review_metatags->fields['customers_name'] . SECONDARY_SECTION . $review_text_metatags . ' ' . SECONDARY_SECTION . $reviews_rating_metatags));
define('META_TAG_KEYWORDS', str_replace('"', '', KEYWORDS . METATAGS_DIVIDER . $meta_products_name . METATAGS_DIVIDER . $review_metatags->fields['customers_name'] . METATAGS_DIVIDER . $reviews_rating_metatags));
}
// EOF
break;
// EZ-Pages:
// EZ-Pages:
case 'page':
$ezpage_id = (int) $_GET['id'];
$chapter_id = (int) $_GET['chapter'];
if (defined('META_TAG_TITLE_EZPAGE_' . $ezpage_id)) {
define('META_TAG_TITLE', constant('META_TAG_TITLE_EZPAGE_' . $ezpage_id));
示例2: zen_trunc_string
//$featured_res = $db->Execute($feature_query);
$pid = $products_res->fields['products_id'];
$sid = $specials_res->fields['products_id'];
$attribute_product = $product_attribute_query_result->fields['products_id'];
if ($fid == $pid) {
$msg_product = "<div class='tag tag-orange' title=''><div class='text'>HOT</div></div>";
} else {
if ($fid == $sid) {
$msg_product = "<div class='tag tag-orange' title=''><div class='text'>SALE</div></div>";
} else {
$msg_product = "<div class='tag tag-blue' title=''><div class='text'>NEW</div></div>";
}
}
//$products_description_hover = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION); //To Display Product Desc on hover
//$products_description_hover = ltrim(substr($products_description_hover, 0, 115) . '...'); //Trims and Limits the desc on hover
$products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);
//To Display Product Desc
$products_description = ltrim(substr($products_description, 0, 350) . '..');
//Trims and Limits the desc
//Productname Trim
//$products_name_hover = $featured_products->fields['products_name'];
//$products_name_hover = ltrim(substr($products_name_hover, 0, 50) . '...');
$products_name = $featured_products->fields['products_name'];
//$products_name = ltrim(substr($products_name, 0, 30) . '');
if (!isset($productsInCategory[$featured_products->fields['products_id']])) {
$productsInCategory[$featured_products->fields['products_id']] = zen_get_generated_category_path_rev($featured_products->fields['master_categories_id']);
}
/*Wishlist/Compare Links*/
if (UN_MODULE_WISHLISTS_ENABLED) {
$wishlist_link = zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . $featured_products->fields['products_id'] . '&action=wishlist_add_product');
} else {
示例3: array
$list_box_contents[$rows] = array('params' => 'class="productListing-odd"');
}
$cur_row = sizeof($list_box_contents) - 1;
for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) {
$lc_align = '';
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
} else {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>';
break;
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;
// more info in place of buy now
$lc_button = '';
if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') {
$lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
示例4: array
$zc_col_count_description = 0;
$lc_align = '';
$list_box_contents = array();
//echo $listing_split->sql_query;
//print_r(explode(' ',zen_products_id_in_category($current_category_id)));
if (zen_count_products_in_category($current_category_id) > 0) {
$listing = $db->Execute($listing_split->sql_query);
$row = 0;
while (!$listing->EOF) {
if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) {
$list_box_contents[$row]['products_image'] = '';
} else {
$list_box_contents[$row]['products_image'] = $listing->fields['products_image'];
}
$list_box_contents[$row]['products_name'] = $listing->fields['products_name'];
$list_box_contents[$row]['products_description'] = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), 100);
$list_box_contents[$row]['products_price'] = zen_get_products_base_price($listing->fields['products_id']);
$list_box_contents[$row]['actual_price'] = $currencies->display_price(zen_get_products_actual_price($listing->fields['products_id']), zen_get_tax_rate($product_check->fields['products_tax_class_id']));
$list_box_contents[$row]['products_status'] = $listing->fields['products_status'];
if ($listing->fields['product_is_always_free_shipping'] == 0) {
$list_box_contents[$row]['product_is_always_free_shipping'] = '';
} else {
$list_box_contents[$row]['product_is_always_free_shipping'] = '<span class="free_shipping"></span>';
}
if ($listing->fields['product_is_free'] == 0) {
$list_box_contents[$row]['product_is_free'] = '';
} else {
$list_box_contents[$row]['product_is_free'] = '<span class="free"></span>';
}
$list_box_contents[$row]['products_quantity_order_min'] = $listing->fields['products_quantity_order_min'];
$list_box_contents[$row]['products_id'] = $listing->fields['products_id'];
示例5: zen_image
function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '')
{
global $template_dir;
// soft clean the alt tag
$alt = zen_clean_html($alt);
// use old method on template images
if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {
return zen_image_OLD($src, $alt, $width, $height, $parameters);
}
//auto replace with defined missing image
if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
$src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
}
if ((empty($src) || $src == DIR_WS_IMAGES) && IMAGE_REQUIRED == 'false') {
return false;
}
// if not in current template switch to template_default
if (!file_exists($src)) {
$src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);
}
// hook for handle_image() function such as Image Handler etc
if (function_exists('handle_image')) {
$newimg = handle_image($src, $alt, $width, $height, $parameters);
list($src, $alt, $width, $height, $parameters) = $newimg;
}
// Convert width/height to int for proper validation.
// intval() used to support compatibility with plugins like image-handler
$width = empty($width) ? $width : intval($width);
$height = empty($height) ? $height : intval($height);
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . zen_output_string($src) . '" alt="' . zen_output_string($alt) . '"';
if (zen_not_null($alt)) {
$image .= ' title=" ' . zen_output_string($alt) . ' "';
}
if (CONFIG_CALCULATE_IMAGE_SIZE == 'true' && (empty($width) || empty($height))) {
if ($image_size = @getimagesize($src)) {
if (empty($width) && zen_not_null($height)) {
$ratio = $height / $image_size[1];
$width = $image_size[0] * $ratio;
} elseif (zen_not_null($width) && empty($height)) {
$ratio = $width / $image_size[0];
$height = $image_size[1] * $ratio;
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
} elseif (IMAGE_REQUIRED == 'false') {
return false;
}
}
if (zen_not_null($width) && zen_not_null($height) and file_exists($src)) {
// $image .= ' width="' . zen_output_string($width) . '" height="' . zen_output_string($height) . '"';
// proportional images
$image_size = @getimagesize($src);
// fix division by zero error
$ratio = $image_size[0] != 0 ? $width / $image_size[0] : 1;
if ($image_size[1] * $ratio > $height) {
$ratio = $height / $image_size[1];
$width = $image_size[0] * $ratio;
} else {
$height = $image_size[1] * $ratio;
}
// only use proportional image when image is larger than proportional size
if ($image_size[0] < $width and $image_size[1] < $height) {
$image .= ' width="' . $image_size[0] . '" height="' . intval($image_size[1]) . '"';
} else {
$image .= ' width="' . round($width) . '" height="' . round($height) . '"';
}
} else {
// override on missing image to allow for proportional and required/not required
if (IMAGE_REQUIRED == 'false') {
return false;
} else {
$image .= ' width="' . intval(SMALL_IMAGE_WIDTH) . '" height="' . intval(SMALL_IMAGE_HEIGHT) . '"';
}
}
// inject rollover class if one is defined. NOTE: This could end up with 2 "class" elements if $parameters contains "class" already.
if (defined('IMAGE_ROLLOVER_CLASS') && IMAGE_ROLLOVER_CLASS != '') {
$parameters .= (zen_not_null($parameters) ? ' ' : '') . 'class="rollover"';
}
// add $parameters to the tag output
if (zen_not_null($parameters)) {
$image .= ' ' . $parameters;
}
$image .= ' />';
return $image;
}
示例6: getLineItemDetails
//.........这里部分代码省略.........
}
// end for loopthru all products
// add line items for any surcharges added by order-total modules
if ($surcharges > 0) {
$numberOfLineItemsProcessed++;
$k = $numberOfLineItemsProcessed;
$optionsLI["L_NAME{$k}"] = MODULES_PAYMENT_PAYPALWPP_LINEITEM_TEXT_SURCHARGES_SHORT;
$optionsLI["L_DESC{$k}"] = MODULES_PAYMENT_PAYPALWPP_LINEITEM_TEXT_SURCHARGES_LONG;
$optionsLI["L_AMT{$k}"] = $surcharges;
$optionsLI["L_QTY{$k}"] = 1;
$subTotalLI += $surcharges;
}
// add line items for discounts such as gift certificates and coupons
if ($creditsApplied > 0) {
$numberOfLineItemsProcessed++;
$k = $numberOfLineItemsProcessed;
$optionsLI["L_NAME{$k}"] = MODULES_PAYMENT_PAYPALWPP_LINEITEM_TEXT_DISCOUNTS_SHORT;
$optionsLI["L_DESC{$k}"] = MODULES_PAYMENT_PAYPALWPP_LINEITEM_TEXT_DISCOUNTS_LONG;
$optionsLI["L_AMT{$k}"] = -1 * $creditsApplied;
$optionsLI["L_QTY{$k}"] = 1;
$subTotalLI -= $creditsApplied;
}
// Reformat properly
for ($k = 0, $n = $numberOfLineItemsProcessed + 1; $k < $n; $k++) {
// Replace & and = and % with * if found.
$optionsLI["L_NAME{$k}"] = str_replace(array('&', '=', '%'), '*', $optionsLI["L_NAME{$k}"]);
if (isset($optionsLI["L_DESC{$k}"])) {
$optionsLI["L_DESC{$k}"] = str_replace(array('&', '=', '%'), '*', $optionsLI["L_DESC{$k}"]);
}
if (isset($optionsLI["L_NUMBER{$k}"])) {
$optionsLI["L_NUMBER{$k}"] = str_replace(array('&', '=', '%'), '*', $optionsLI["L_NUMBER{$k}"]);
}
// Remove HTML markup if found
$optionsLI["L_NAME{$k}"] = zen_clean_html($optionsLI["L_NAME{$k}"], 'strong');
if (isset($optionsLI["L_DESC{$k}"])) {
$optionsLI["L_DESC{$k}"] = zen_clean_html($optionsLI["L_DESC{$k}"], 'strong');
}
// reformat properly according to API specs
$optionsLI["L_NAME{$k}"] = substr($optionsLI["L_NAME{$k}"], 0, 127);
if (isset($optionsLI["L_NUMBER{$k}"])) {
$optionsLI["L_NUMBER{$k}"] = substr($optionsLI["L_NUMBER{$k}"], 0, 127);
}
if (isset($optionsLI["L_DESC{$k}"]) && $optionsLI["L_DESC{$k}"] == '') {
unset($optionsLI["L_DESC{$k}"]);
}
if (isset($optionsLI["L_DESC{$k}"])) {
$optionsLI["L_DESC{$k}"] = substr($optionsLI["L_DESC{$k}"], 0, 127);
}
if (isset($optionsLI["L_TAXAMT{$k}"]) && ($optionsLI["L_TAXAMT{$k}"] != '' || $optionsLI["L_TAXAMT{$k}"] > 0)) {
$optionsLI["L_TAXAMT{$k}"] = round($optionsLI["L_TAXAMT{$k}"], 2);
}
}
/**
* PayPal says their math works like this:
* a) ITEMAMT = L_AMTn * L_QTYn
* b) TAXAMT = L_QTYn * L_TAXAMTn
* c) AMT = ITEMAMT + SHIPPINGAMT + HANDLINGAMT + TAXAMT
*/
// Sanity Check of line-item subtotals
for ($j = 0; $j < $k; $j++) {
$itemAMT = $optionsLI["L_AMT{$j}"];
$itemQTY = $optionsLI["L_QTY{$j}"];
$itemTAX = isset($optionsLI["L_TAXAMT{$j}"]) ? $optionsLI["L_TAXAMT{$j}"] : 0;
$sumOfLineItems += $itemQTY * $itemAMT;
$sumOfLineTax += $itemQTY * $itemTAX;
}
示例7: zen_image
function zen_image($src, $alt = '', $width = '', $height = '', $parameters = '')
{
global $template_dir;
// soft clean the alt tag
$alt = zen_clean_html($alt);
// use old method on template images
if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {
return zen_image_OLD($src, $alt, $width, $height, $parameters);
}
//auto replace with defined missing image
if ($src == DIR_WS_IMAGES and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
$src = DIR_WS_IMAGES . PRODUCTS_IMAGE_NO_IMAGE;
}
if ((empty($src) || $src == DIR_WS_IMAGES) && IMAGE_REQUIRED == 'false') {
return false;
}
// if not in current template switch to template_default
if (!file_exists($src)) {
$src = str_replace(DIR_WS_TEMPLATES . $template_dir, DIR_WS_TEMPLATES . 'template_default', $src);
}
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . zen_output_string($src) . '" alt="' . zen_output_string($alt) . '"';
if (zen_not_null($alt)) {
$image .= ' title=" ' . zen_output_string($alt) . ' "';
}
$srcPath = BIT_ROOT_PATH . $src;
if (CONFIG_CALCULATE_IMAGE_SIZE == 'true' && (empty($width) || empty($height))) {
if ($image_size = @getimagesize($srcPath)) {
if (empty($width) && zen_not_null($height)) {
$ratio = $height / $image_size[1];
$width = $image_size[0] * $ratio;
} elseif (zen_not_null($width) && empty($height)) {
$ratio = $width / $image_size[0];
$height = $image_size[1] * $ratio;
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
} elseif (IMAGE_REQUIRED == 'false') {
return false;
}
}
if (zen_not_null($width) && zen_not_null($height) and file_exists($srcPath)) {
// $image .= ' width="' . zen_output_string($width) . '" height="' . zen_output_string($height) . '"';
// proportional images
$image_size = @getimagesize($srcPath);
// fix division by zero error
$ratio = $image_size[0] != 0 ? $width / $image_size[0] : 1;
if ($image_size[1] * $ratio > $height) {
$ratio = $height / $image_size[1];
$width = $image_size[0] * $ratio;
} else {
$height = $image_size[1] * $ratio;
}
$image .= ' width="' . $width . '" height="' . $height . '"';
} else {
// override on missing image to allow for proportional and required/not required
if (IMAGE_REQUIRED == 'false') {
return false;
} else {
// $image .= ' width="' . SMALL_IMAGE_WIDTH . '" height="' . SMALL_IMAGE_HEIGHT . '"';
}
}
if (zen_not_null($parameters)) {
$image .= ' ' . $parameters;
}
$image .= ' />';
return $image;
}
示例8: zen_get_products_model
</td>
<td class="pageHeading" valign="top">
<input type="hidden" name="products_id" value="<?php
echo $products_filter;
?>
">
<input type="hidden" name="current_category_id" value="<?php
echo $current_category_id;
?>
">
<?php
$show_model = zen_get_products_model($products_filter);
if (!empty($show_model)) {
$show_model = " - (" . $show_model . ")";
}
echo zen_clean_html(zen_get_products_name($products_filter)) . $show_model;
?>
</td>
</tr></table></td></tr>
<tr class="attributeBoxContent"><td><table><tr>
<td class="attributeBoxContent" width="40"> </td>
<td class="attributeBoxContent"> <?php
echo TABLE_HEADING_OPT_NAME . '<br />';
?>
<select name="options_id" id="OptionName" onChange="update_option(this.form)" size="<?php
echo $action != 'delete_attribute' ? "15" : "1";
?>
">
<?php
$options_values = $db->Execute("select * from " . TABLE_PRODUCTS_OPTIONS . "\n where language_id = '" . (int) $_SESSION['languages_id'] . "'\n order by products_options_name");
while (!$options_values->EOF) {
示例9: zen_trunc_string
?>
" target="_blank">
<?php
echo zen_trunc_string($blog_article['title'], 30, true);
?>
</a>
</b>
</p>
<p>
<i>
<a href="<?php
echo $blog_article['blog_link'];
?>
" target="_blank">
"<?php
echo zen_trunc_string(zen_clean_html($blog_article['content']), 50, true);
?>
"
</a>
</i>
</p>
<p class="red">
<?php
echo zen_not_null($blog_article['author']) ? $blog_article['author'] : '';
?>
<?php
echo $blog_article['date'];
?>
</p>
<?php
示例10: array
}
break;
}
$list_box_contents[$rows][$col] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text);
}
// add description and match alternating colors
if (PRODUCT_LIST_DESCRIPTION > 0) {
$rows++;
if ($extra_row == 1) {
$list_box_description = "productListing-data-description-even";
$extra_row = 0;
} else {
$list_box_description = "productListing-data-description-odd";
$extra_row = 1;
}
$list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', 'text' => zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION));
}
$listing->MoveNext();
}
$error_categories == false;
} else {
$list_box_contents = array();
$list_box_contents[0] = array('params' => 'class="productListing-odd"');
$list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS);
$error_categories = true;
}
if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3)) {
$show_top_submit_button = 'true';
}
if ($how_many > 0 and $show_submit == 'true' and $listing_split->number_of_rows > 0 and PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) {
$show_bottom_submit_button = 'true';
示例11: explode
<?php
if (isset($_GET['products_id']) && is_numeric($_GET['products_id']) && isset($products_acc_model) && zen_not_null($products_acc_model)) {
$p_acce_models = explode(',', zen_clean_html($products_acc_model));
$p_acce_models_str = '';
foreach ($p_acce_models as $model) {
$p_acce_models_str .= '"' . $model . '",';
}
$p_acce_models_str = substr($p_acce_models_str, 0, strlen($p_acce_models_str) - 1);
$p_accessories_query = "select distinct p.products_id, \n\t\t\t\t\t\t\t\t\t\t\t\t\t pd.products_name,\n\t\t\t\t\t\t\t\t\t\t\t p.products_image \n\t\t\t\t\t\t\t\t\t from " . TABLE_PRODUCTS . " p, \n\t\t\t\t\t\t\t\t\t " . TABLE_PRODUCTS_DESCRIPTION . " pd, \n\t\t\t\t\t\t\t\t\t\t " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, \n\t\t\t\t\t\t\t\t\t\t " . TABLE_CATEGORIES . " c\n\t\t\t\t\t\t\t\t\t where p.products_status = '1'\n\t\t\t\t\t\t\t\t\t and p.products_id = pd.products_id\n\t\t\t\t\t\t\t\t\t and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t\t\t\t\t\t and p.products_id = p2c.products_id\n\t\t\t\t\t\t\t\t\t and p.products_id!=" . (int) $_GET['products_id'] . " \n\t\t\t\t\t\t\t\t\t and p2c.categories_id = c.categories_id\t\n\t\t\t\t\t\t\t\t\t and c.categories_status='1'\n\t\t\t\t\t\t\t\t\t and p.products_model in(" . $p_acce_models_str . ")\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t order by p.products_ordered,pd.products_name";
$p_accessories = $db->Execute($p_accessories_query);
if ($p_accessories->RecordCount() >= 0) {
$rows = 0;
$show_product_accessories = true;
$products_accessories = array();
while (!$p_accessories->EOF) {
$rows++;
$products_accessories[$rows]['id'] = $p_accessories->fields['products_id'];
$products_accessories[$rows]['image'] = $p_accessories->fields['products_image'];
$products_accessories[$rows]['name'] = $p_accessories->fields['products_name'];
$p_accessories->MoveNext();
}
}
}
示例12: switch
$lc_align = '';
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'manufacturers_id=' . $_GET['manufacturers_id'] . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
} else {
$lc_text = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a>';
}
// add description
if (PRODUCT_LIST_DESCRIPTION > 0) {
$lc_text .= '<div>' . zen_trunc_string(zen_clean_html(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id'])), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;
case 'PRODUCT_LIST_MANUFACTURER':
$lc_align = '';
$lc_text = ' <a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a> ';
break;
case 'PRODUCT_LIST_PRICE':
$lc_price = CommerceProduct::getDisplayPriceFromHash($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = ' ' . $lc_price . ' ';
// more info in place of buy now
$lc_button = '';
if ($listing->fields['products_priced_by_attribute'] || PRODUCT_LIST_PRICE_BUY_NOW == '0' || zen_has_product_attributes($listing->fields['products_id'])) {
$lc_button = '<a href="' . CommerceProduct::getDisplayUrlFromId($listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
} else {
示例13: substr
case $page_query_ez->fields['alt_url'] != '' and $page_query_ez->fields['page_open_new_window'] == '1':
$page_query_list['altURL'] = substr($page_query_ez->fields['alt_url'], 0, 4) == 'http' ? $page_query_ez->fields['alt_url'] : ($page_query_ez->fields['alt_url'] == '' ? '' : zen_href_link($page_query_ez->fields['alt_url'], '', $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL', true, true, true));
break;
// internal link same window
// internal link same window
case $page_query_ez->fields['alt_url'] != '' and $page_query_ez->fields['page_open_new_window'] == '0':
$page_query_list['altURL'] = substr($page_query_ez->fields['alt_url'], 0, 4) == 'http' ? $page_query_ez->fields['alt_url'] : ($page_query_ez->fields['alt_url'] == '' ? '' : zen_href_link($page_query_ez->fields['alt_url'], '', $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL', true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list['link'] = $page_query_list['altURL'] == '' ? zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query_ez->fields['pages_id'] . ($page_query_ez->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query_ez->fields['toc_chapter'] : ''), $page_query_ez->fields['page_is_ssl'] == '0' ? 'NONSSL' : 'SSL') : $page_query_list['altURL'];
$page_query_list['link'] .= $page_query_ez->fields['page_open_new_window'] == '1' ? '" target="_blank' : '';
// En of get EZpage URL
$lc_align = 'left';
$lc_text1 = '<a href="' . $page_query_list['link'] . '">' . $page_query_ez->fields['pages_title'] . '</a>';
$lc_text2 = '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes($page_query_ez->fields['pages_html_text']))) . '</div>';
$list_box_contents[$rows][1] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text1);
$list_box_contents[$rows][2] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text2);
$page_query_ez->MoveNext();
}
}
?>
<?php
if ($listing_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
?>
<div class="clearfix">
<div id="productsListingTopNumber" class="navSplitPagesResult pull-left"><?php
echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_XX_OF_YY);
?>
</div>
开发者ID:Southern-Exposure-Seed-Exchange,项目名称:Zencart-Bootstrap-Theme,代码行数:31,代码来源:tpl_modules_advanced_search_ezpages.php
示例14: zen_clean_html
>
<head>
<title><?php
echo zen_clean_html(META_TAG_TITLE);
?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo CHARSET;
?>
" />
<meta name="keywords" content="<?php
echo zen_clean_html(META_TAG_KEYWORDS);
?>
" />
<meta name="description" content="<?php
echo zen_clean_html(META_TAG_DESCRIPTION);
?>
" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="author" content="The Zen Cart™ Team and others" />
<meta name="generator" content="shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce" />
<?php
if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base, explode(",", constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base == 'down_for_maintenance' || $robotsNoIndex === true) {
?>
<meta name="robots" content="noindex, nofollow" />
<?php
}
if (defined('FAVICON')) {
?>
<link rel="icon" href="<?php
echo FAVICON;
示例15: zen_get_products_name
* @package templateSystem
* @copyright Portions Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: block_hogehoge.php $
*/
$pId = $_GET['products_id'];
if (count($pId)) {
?>
<div id="multi_image_view_thmb" class="centeredContent">
<?php
if (count($multi_images) > 1) {
$img_alt = zen_get_products_name($pId);
$href_title = $img_alt . '(' . zen_get_products_display_price($pId) . ')';
$img_alt = htmlspecialchars(zen_clean_html($img_alt), ENT_QUOTES);
$href_title = htmlspecialchars(zen_clean_html($href_title), ENT_QUOTES);
$thmb_cnt = 1;
$image_cnt = -1;
$str_splt = '';
$pre_url = '';
foreach ($multi_images as $item) {
if ($image_cnt == -1) {
$str_style = 'selected_thmb ';
} else {
$str_style = '';
}
?>
<div class="<?php
echo $str_style;
?>
back<?php