本文整理汇总了PHP中tep_output_string_protected函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_output_string_protected函数的具体用法?PHP tep_output_string_protected怎么用?PHP tep_output_string_protected使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_output_string_protected函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $languages_id, $HTTP_GET_VARS, $currencies, $oscTemplate;
$random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and r.reviews_status = 1";
if (isset($HTTP_GET_VARS['products_id'])) {
$random_select .= " and p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "'";
}
$random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
$random_product = tep_random_select($random_select);
$reviews_box_contents = '';
if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $random_product['reviews_id'] . "' and languages_id = '" . (int) $languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);
$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br />');
$reviews_box_contents .= '<div class="ui-widget-content infoBoxContents"><div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a><br /><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif', sprintf(MODULE_BOXES_REVIEWS_BOX_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div></div>';
} elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$reviews_box_contents .= '<table border="0" cellspacing="0" cellpadding="2" class="ui-widget-content infoBoxContents"><tr><td><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . MODULE_BOXES_REVIEWS_BOX_WRITE_REVIEW . '</a></td></tr></table>';
} else {
// display 'no reviews' box
$reviews_box_contents .= '<div class="ui-widget-content infoBoxContents">' . MODULE_BOXES_REVIEWS_BOX_NO_REVIEWS . '</div>';
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_REVIEWS) . '">' . MODULE_BOXES_REVIEWS_BOX_TITLE . '</a></div>' . ' ' . $reviews_box_contents . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:26,代码来源:bm_reviews.php
示例2: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $languages_id, $currencies, $currency;
if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_image from products p, products_description pd where p.products_id = '" . (int) $_GET['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('card' => MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TYPE, 'title' => $product_info['products_name']);
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
$data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
}
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
$data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from products_images where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['image'] = tep_href_link('images/' . $products_image, '', 'NONSSL', false, false);
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta name="twitter:' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:34,代码来源:ht_twitter_product_card.php
示例3: execute
function execute()
{
global $languages_id, $HTTP_GET_VARS, $currencies, $oscTemplate;
$random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and r.reviews_status = 1";
if (isset($HTTP_GET_VARS['products_id'])) {
$random_select .= " and p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "'";
}
$random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
$random_product = tep_random_select($random_select);
$reviews_box_contents = '';
if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $random_product['reviews_id'] . "' and languages_id = '" . (int) $languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);
$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br />');
$reviews_box_contents .= ' <ul class="module-content boxproduct">' . ' <li class="clearfix">' . ' <a class="boxproduct-img" href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', '') . '</a>' . ' <div class="boxproduct-info">' . ' <a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a>' . ' <div class="rating-img">' . tep_draw_rating($random_product['reviews_rating']) . '</div>' . ' </div>' . ' </li>' . ' </ul>';
} elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$reviews_box_contents .= ' <div class="module-content">' . ' <a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_draw_icon('fa-pencil') . MODULE_BOXES_REVIEWS_BOX_WRITE_REVIEW . '</a>' . ' </div>';
} else {
// display 'no reviews' box
$reviews_box_contents .= '<div class="module-content">' . MODULE_BOXES_REVIEWS_BOX_NO_REVIEWS . '</div>';
}
$data = '<div class="module reviews-box">' . ' <h3 class="module-heading"><a href="' . tep_href_link(FILENAME_REVIEWS) . '">' . MODULE_BOXES_REVIEWS_BOX_TITLE . '</a></h3>' . ' ' . $reviews_box_contents . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:26,代码来源:bm_reviews.php
示例4: pre_confirmation_check
function pre_confirmation_check()
{
global $oscTemplate, $order;
parent::pre_confirmation_check();
$oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/BrandDetection.js"></script>', 'header_tags');
$oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/cc.js"></script>', 'header_tags');
$months_array = array();
$months_array[1] = array('01', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JANUARY);
$months_array[2] = array('02', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_FEBRUARY);
$months_array[3] = array('03', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_MARCH);
$months_array[4] = array('04', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_APRIL);
$months_array[5] = array('05', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_MAY);
$months_array[6] = array('06', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JUNE);
$months_array[7] = array('07', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JULY);
$months_array[8] = array('08', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_AUGUST);
$months_array[9] = array('09', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_SEPTEMBER);
$months_array[10] = array('10', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_OCTOBER);
$months_array[11] = array('11', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_NOVEMBER);
$months_array[12] = array('12', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_DECEMBER);
$today = getdate();
$years_array = array();
for ($i = $today['year']; $i < $today['year'] + 10; $i++) {
$years_array[$i] = array(tep_output_string(strftime('%Y', mktime(0, 0, 0, 1, 1, $i))), tep_output_string_protected(strftime('%Y', mktime(0, 0, 0, 1, 1, $i))));
}
$this->fastCheckout->setFastCheckoutFlag($this->fastCheckoutFlag);
$payment = $this->getPayment($_SESSION['customer_id']);
$script = '<script type="text/javascript">' . 'var cclogging = "' . MODULE_PAYMENT_PAYMILL_CC_LOGGING . '";' . 'var cc_expiery_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_EXPIRY_INVALID . '";' . 'var cc_owner_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_OWNER_INVALID . '";' . 'var cc_card_number_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_CARDNUMBER_INVALID . '";' . 'var cc_cvc_number_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_CVC_INVALID . '";' . 'var brand = "' . $payment['card_type'] . '";' . 'var paymill_total = ' . json_encode($this->format_raw($order->info['total'])) . ';' . 'var paymill_currency = ' . json_encode(strtoupper($order->info['currency'])) . ';' . 'var paymill_cc_months = ' . json_encode($months_array) . ';' . 'var paymill_cc_years = ' . json_encode($years_array) . ';' . 'var paymill_cc_number_val = "' . $payment['last4'] . '";' . 'var paymill_cc_cvc_val = "' . $payment['cvc'] . '";' . 'var paymill_cc_card_type = "' . utf8_decode($payment['card_type']) . '";' . 'var paymill_cc_holder_val = "' . $payment['card_holder'] . '";' . 'var paymill_cc_expiry_month_val = "' . $payment['expire_month'] . '";' . 'var paymill_cc_expiry_year_val = "' . $payment['expire_year'] . '";' . 'var paymill_cc_fastcheckout = ' . ($this->fastCheckout->canCustomerFastCheckoutCc($_SESSION['customer_id']) ? 'true' : 'false') . ';' . 'var checkout_payment_link = "' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'step=step2', 'SSL', true, false) . '&payment_error=' . $this->code . '&error=";' . 'var logos = new Array();' . "logos['amex'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_AMEX) . ";" . "logos['carta-si'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_CARTASI) . ";" . "logos['dankort'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DANKORT) . ";" . "logos['carte-bleue'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_CARTEBLEUE) . ";" . "logos['discover'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DISCOVER) . ";" . "logos['diners-club'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DINERSCLUB) . ";" . "logos['china-unionpay'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_UNIONPAY) . ";" . "logos['maestro'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_MAESTRO) . ";" . "logos['jcb'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_JCB) . ";" . "logos['mastercard'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_MASTERCARD) . ";" . "logos['visa'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_VISA) . ";" . "var allBrandsDisabled = !logos['amex'] && !logos['carta-si'] && !logos['dankort'] && !logos['carte-bleue'] && !logos['discover'] && !logos['diners-club'] && !logos['china-unionpay'] && !logos['maestro'] && !logos['jcb'] && !logos['mastercard'] && !logos['visa'];" . '</script>';
$oscTemplate->addBlock($script, 'header_tags');
$oscTemplate->addBlock('<form id="paymill_form" action="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . '" method="post"></form>', 'footer_scripts');
}
开发者ID:SiWe0401,项目名称:paymill-oscommerce,代码行数:30,代码来源:paymill_cc.php
示例5: getOutput
function getOutput()
{
global $lng;
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
foreach ($lng->catalog_languages as $lkey => $lvalue) {
if ($lvalue['id'] == $_SESSION['languages_id']) {
$language_code = $lkey;
break;
}
}
$output = '<div class="g-plusone" data-href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id'], 'NONSSL', false) . '" data-size="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_SIZE) . '" data-annotation="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION) . '"';
if (MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ANNOTATION == 'Inline') {
$output .= ' data-width="' . (int) MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_WIDTH . '" data-align="' . strtolower(MODULE_SOCIAL_BOOKMARKS_GOOGLE_PLUS_ONE_ALIGN) . '"';
}
$output .= '></div>';
$output .= '<script type="text/javascript">
if ( typeof window.___gcfg == "undefined" ) {
window.___gcfg = { };
}
if ( typeof window.___gcfg.lang == "undefined" ) {
window.___gcfg.lang = "' . tep_output_string_protected($language_code) . '";
}
(function() {
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
po.src = \'https://apis.google.com/js/plusone.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
})();
</script>';
return $output;
}
开发者ID:atmediacom,项目名称:oscommerce2,代码行数:35,代码来源:sb_google_plus_one.php
示例6: execute
function execute()
{
global $languages_id, $HTTP_GET_VARS, $currencies, $oscTemplate;
$random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and r.reviews_status = 1";
if (isset($HTTP_GET_VARS['products_id'])) {
$random_select .= " and p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "'";
}
$random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
$random_product = tep_random_select($random_select);
$reviews_box_contents = '';
if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $random_product['reviews_id'] . "' and languages_id = '" . (int) $languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);
$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br />');
$reviews_box_contents .= '<div class="text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, 'products_id=' . $random_product['products_id']) . '">' . $rand_review_text . '</a>...</div><div class="text-center" title="' . sprintf(MODULE_BOXES_REVIEWS_BOX_TEXT_OF_5_STARS, $random_product['reviews_rating']) . '">' . tep_draw_stars($random_product['reviews_rating']) . '</div>';
} elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$reviews_box_contents .= '<span class="fa fa-thumbs-up"></span> <a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . MODULE_BOXES_REVIEWS_BOX_WRITE_REVIEW . '</a>';
} else {
// display 'no reviews' box
$reviews_box_contents .= '<p>' . MODULE_BOXES_REVIEWS_BOX_NO_REVIEWS . '</p>';
}
ob_start();
include DIR_WS_MODULES . 'boxes/templates/reviews.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:28,代码来源:bm_reviews.php
示例7: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $product_check, $languages_id, $currency;
if ($product_check['total'] > 0) {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from products p, products_description pd where p.products_id = '" . (int) $_GET['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('og:type' => 'product', 'og:title' => $product_info['products_name'], 'og:site_name' => STORE_NAME);
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197) . '...';
$data['og:description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from products_images where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['og:image'] = tep_href_link('images/' . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = $this->format_raw($new_price);
} else {
$products_price = $this->format_raw($product_info['products_price']);
}
$data['product:price:amount'] = $products_price;
$data['product:price:currency'] = $currency;
$data['og:url'] = tep_href_link('product_info.php', 'products_id=' . $product_info['products_id'], 'NONSSL', false);
$data['product:availability'] = $product_info['products_quantity'] > 0 ? MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_IN_STOCK : MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_OUT_OF_STOCK;
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta property="' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . PHP_EOL;
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:34,代码来源:ht_product_opengraph.php
示例8: getOutput
function getOutput()
{
$output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . ' <tr class="dataTableHeadingRow">' . ' <td class="dataTableHeadingContent" width="20"> </td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_TITLE . '</td>' . ' <td class="dataTableHeadingContent" align="right">' . MODULE_ADMIN_DASHBOARD_ADMIN_LOGINS_DATE . '</td>' . ' </tr>';
$logins_query = tep_db_query("select id, user_name, success, date_added from " . TABLE_ACTION_RECORDER . " where module = 'ar_admin_login' order by date_added desc limit 6");
while ($logins = tep_db_fetch_array($logins_query)) {
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td class="dataTableContent" align="center">' . tep_image(DIR_WS_IMAGES . 'icons/' . ($logins['success'] == '1' ? 'tick.gif' : 'cross.gif')) . '</td>' . ' <td class="dataTableContent"><a href="' . tep_href_link(FILENAME_ACTION_RECORDER, 'module=ar_admin_login&aID=' . (int) $logins['id']) . '">' . tep_output_string_protected($logins['user_name']) . '</a></td>' . ' <td class="dataTableContent" align="right">' . tep_date_short($logins['date_added']) . '</td>' . ' </tr>';
}
$output .= '</table>';
return $output;
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:10,代码来源:d_admin_logins.php
示例9: getOutput
function getOutput()
{
$output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . ' <tr class="dataTableHeadingRow">' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_CUSTOMERS_TITLE . '</td>' . ' <td class="dataTableHeadingContent" align="right">' . MODULE_ADMIN_DASHBOARD_CUSTOMERS_DATE . '</td>' . ' </tr>';
$customers_query = tep_db_query("select c.customers_id, c.customers_lastname, c.customers_firstname, ci.customers_info_date_account_created from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id order by ci.customers_info_date_account_created desc limit 6");
while ($customers = tep_db_fetch_array($customers_query)) {
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td class="dataTableContent"><a href="' . tep_href_link('customers.php', 'cID=' . (int) $customers['customers_id'] . '&action=edit') . '">' . tep_output_string_protected($customers['customers_firstname'] . ' ' . $customers['customers_lastname']) . '</a></td>' . ' <td class="dataTableContent" align="right">' . tep_date_short($customers['customers_info_date_account_created']) . '</td>' . ' </tr>';
}
$output .= '</table>';
return $output;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:10,代码来源:d_customers.php
示例10: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $customer_id;
if (tep_not_null(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID)) {
if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_JS_PLACEMENT != 'Header') {
$this->group = 'footer_scripts';
}
$header = '<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'' . tep_output_string(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID) . '\']);
_gaq.push([\'_trackPageview\']);' . "\n";
if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True' && basename($PHP_SELF) == FILENAME_CHECKOUT_SUCCESS && tep_session_is_registered('customer_id')) {
$order_query = tep_db_query("select orders_id, billing_city, billing_state, billing_country from " . TABLE_ORDERS . " where customers_id = '" . (int) $customer_id . "' order by date_purchased desc limit 1");
if (tep_db_num_rows($order_query) == 1) {
$order = tep_db_fetch_array($order_query);
$totals = array();
$order_totals_query = tep_db_query("select value, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order['orders_id'] . "'");
while ($order_totals = tep_db_fetch_array($order_totals_query)) {
$totals[$order_totals['class']] = $order_totals['value'];
}
$header .= ' _gaq.push([\'_addTrans\',
\'' . (int) $order['orders_id'] . '\', // order ID - required
\'' . tep_output_string(STORE_NAME) . '\', // store name
\'' . (isset($totals['ot_total']) ? $this->format_raw($totals['ot_total'], DEFAULT_CURRENCY) : 0) . '\', // total - required
\'' . (isset($totals['ot_tax']) ? $this->format_raw($totals['ot_tax'], DEFAULT_CURRENCY) : 0) . '\', // tax
\'' . (isset($totals['ot_shipping']) ? $this->format_raw($totals['ot_shipping'], DEFAULT_CURRENCY) : 0) . '\', // shipping
\'' . tep_output_string_protected($order['billing_city']) . '\', // city
\'' . tep_output_string_protected($order['billing_state']) . '\', // state or province
\'' . tep_output_string_protected($order['billing_country']) . '\' // country
]);' . "\n";
$order_products_query = tep_db_query("select op.products_id, pd.products_name, op.final_price, op.products_quantity from " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where op.orders_id = '" . (int) $order['orders_id'] . "' and op.products_id = pd.products_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = pd.language_id");
while ($order_products = tep_db_fetch_array($order_products_query)) {
$category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_LANGUAGES . " l where p2c.products_id = '" . (int) $order_products['products_id'] . "' and p2c.categories_id = cd.categories_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = cd.language_id limit 1");
$category = tep_db_fetch_array($category_query);
$header .= ' _gaq.push([\'_addItem\',
\'' . (int) $order['orders_id'] . '\', // order ID - required
\'' . (int) $order_products['products_id'] . '\', // SKU/code - required
\'' . tep_output_string($order_products['products_name']) . '\', // product name
\'' . tep_output_string($category['categories_name']) . '\', // category
\'' . $this->format_raw($order_products['final_price']) . '\', // unit price - required
\'' . (int) $order_products['products_quantity'] . '\' // quantity - required
]);' . "\n";
}
$header .= ' _gaq.push([\'_trackTrans\']); //submits transaction to the Analytics servers' . "\n";
}
}
$header .= ' (function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>' . "\n";
$oscTemplate->addBlock($header, $this->group);
}
}
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:55,代码来源:ht_google_analytics.php
示例11: getOutput
function getOutput()
{
global $languages_id;
$output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . ' <tr class="dataTableHeadingRow">' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_ORDERS_TITLE . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_ORDERS_TOTAL . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_ORDERS_DATE . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_ORDERS_ORDER_STATUS . '</td>' . ' </tr>';
$orders_query = tep_db_query("select o.orders_id, o.customers_name, greatest(o.date_purchased, ifnull(o.last_modified, 0)) as date_last_modified, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int) $languages_id . "' order by date_last_modified desc limit 6");
while ($orders = tep_db_fetch_array($orders_query)) {
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td class="dataTableContent"><a href="' . tep_href_link(FILENAME_ORDERS, 'oID=' . (int) $orders['orders_id'] . '&action=edit') . '">' . tep_output_string_protected($orders['customers_name']) . '</td>' . ' <td class="dataTableContent">' . strip_tags($orders['order_total']) . '</td>' . ' <td class="dataTableContent">' . tep_date_short($orders['date_last_modified']) . '</td>' . ' <td class="dataTableContent">' . $orders['orders_status_name'] . '</td>' . ' </tr>';
}
$output .= '</table>';
return $output;
}
开发者ID:wrtcoder,项目名称:mini_isp,代码行数:11,代码来源:d_orders.php
示例12: checkout_initialization_method
function checkout_initialization_method()
{
global $language;
if (file_exists(DIR_FS_CATALOG . 'ext/modules/payment/paypal/images/btn_express_' . basename($language) . '.gif')) {
$image = 'ext/modules/payment/paypal/images/btn_express_' . basename($language) . '.gif';
} else {
$image = 'ext/modules/payment/paypal/images/btn_express.gif';
}
$string = '<a href="' . tep_href_link('ext/modules/payment/paypal/express_uk.php', '', 'SSL') . '"><img src="' . $image . '" border="0" alt="" title="' . tep_output_string_protected(MODULE_PAYMENT_PAYPAL_UK_EXPRESS_TEXT_BUTTON) . '" /></a>';
return $string;
}
开发者ID:laiello,项目名称:myopensources,代码行数:11,代码来源:paypal_uk_express.php
示例13: getOutput
function getOutput()
{
global $languages_id;
$output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . ' <tr class="dataTableHeadingRow">' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_TITLE . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_DATE . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEWER . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_RATING . '</td>' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEW_STATUS . '</td>' . ' </tr>';
$reviews_query = tep_db_query("select r.reviews_id, r.date_added, pd.products_name, r.customers_name, r.reviews_rating, r.reviews_status from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = r.products_id and pd.language_id = '" . (int) $languages_id . "' order by r.date_added desc limit 6");
while ($reviews = tep_db_fetch_array($reviews_query)) {
$status_icon = $reviews['reviews_status'] == '1' ? tep_image('images/icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) : tep_image('images/icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td class="dataTableContent"><a href="' . tep_href_link('reviews.php', 'rID=' . (int) $reviews['reviews_id'] . '&action=edit') . '">' . $reviews['products_name'] . '</a></td>' . ' <td class="dataTableContent">' . tep_date_short($reviews['date_added']) . '</td>' . ' <td class="dataTableContent">' . tep_output_string_protected($reviews['customers_name']) . '</td>' . ' <td class="dataTableContent">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif') . '</td>' . ' <td class="dataTableContent">' . $status_icon . '</td>' . ' </tr>';
}
$output .= '</table>';
return $output;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:12,代码来源:d_reviews.php
示例14: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $currencies;
$OSCOM_Db = Registry::get('Db');
if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) {
$Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from :table_products p, :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id');
$Qproduct->bindInt(':products_id', $_GET['products_id']);
$Qproduct->bindInt(':language_id', $_SESSION['languages_id']);
$Qproduct->execute();
if ($Qproduct->fetch() !== false) {
$data = array('card' => 'product', 'title' => $Qproduct->value('products_name'));
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
$data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
}
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
$data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['description'] = $product_description;
$products_image = $Qproduct->value('products_image');
$Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1);
if ($Qimage->fetch() !== false) {
$products_image = $Qimage->value('image');
}
$data['image:src'] = OSCOM::link(DIR_WS_IMAGES . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($Qproduct->valueInt('products_id'))) {
$products_price = $currencies->display_price($new_price, tep_get_tax_rate($Qproduct->valueInt('products_tax_class_id')));
} else {
$products_price = $currencies->display_price($Qproduct->value('products_price'), tep_get_tax_rate($Qproduct->valueInt('products_tax_class_id')));
}
$data['data1'] = $products_price;
$data['label1'] = $_SESSION['currency'];
if ($Qproduct->value('products_date_available') > date('Y-m-d H:i:s')) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_PRE_ORDER;
$data['label2'] = tep_date_short($Qproduct->value('products_date_available'));
} elseif ($Qproduct->valueInt('products_quantity') > 0) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_IN_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_BUY_NOW;
} else {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_OUT_OF_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_CONTACT_US;
}
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta name="twitter:' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:53,代码来源:ht_twitter_product_card.php
示例15: execute
function execute()
{
global $PHP_SELF, $HTTP_GET_VARS, $oscTemplate, $languages_id, $currencies, $currency, $product_check;
if ($PHP_SELF == FILENAME_PRODUCT_INFO && isset($HTTP_GET_VARS['products_id'])) {
if ($product_check['total'] > 0) {
$product_info_query = tep_db_query("select p.products_id, COALESCE(NULLIF(pd.products_seo_title, ''), pd.products_name) as products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('card' => 'product', 'title' => $product_info['products_name']);
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
$data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
}
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
$data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['image:src'] = tep_href_link(DIR_WS_IMAGES . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}
$data['data1'] = $products_price;
$data['label1'] = $currency;
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_PRE_ORDER;
$data['label2'] = tep_date_short($product_info['products_date_available']);
} elseif ($product_info['products_quantity'] > 0) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_IN_STOCK;
$data['la
|
请发表评论