本文整理汇总了PHP中tep_href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_href_link函数的具体用法?PHP tep_href_link怎么用?PHP tep_href_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_href_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getOutput
function getOutput()
{
$cache_file = DIR_FS_CACHE . 'oscommerce_version_check.cache';
$current_version = tep_get_version();
$new_version = false;
if (file_exists($cache_file)) {
$date_last_checked = tep_datetime_short(date('Y-m-d H:i:s', filemtime($cache_file)));
$releases = unserialize(implode('', file($cache_file)));
foreach ($releases as $version) {
$version_array = explode('|', $version);
if (version_compare($current_version, $version_array[0], '<')) {
$new_version = true;
break;
}
}
} else {
$date_last_checked = MODULE_ADMIN_DASHBOARD_VERSION_CHECK_NEVER;
}
$output = '<table border="0" width="100%" cellspacing="0" cellpadding="4">' . ' <tr class="dataTableHeadingRow">' . ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_TITLE . '</td>' . ' <td class="dataTableHeadingContent" align="right">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_DATE . '</td>' . ' </tr>';
if ($new_version == true) {
$output .= ' <tr>' . ' <td class="messageStackWarning" colspan="2">' . tep_image('images/icons/warning.gif', ICON_WARNING) . ' <strong>' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_UPDATE_AVAILABLE . '</strong></td>' . ' </tr>';
}
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' . ' <td class="dataTableContent"><a href="' . tep_href_link('version_check.php') . '">' . MODULE_ADMIN_DASHBOARD_VERSION_CHECK_CHECK_NOW . '</a></td>' . ' <td class="dataTableContent" align="right">' . $date_last_checked . '</td>' . ' </tr>' . '</table>';
return $output;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:25,代码来源:d_version_check.php
示例2: 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
示例3: tep_session_start
function tep_session_start() {
global $_GET, $_POST, $HTTP_COOKIE_VARS;
$sane_session_id = true;
if (isset($_GET[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $_GET[tep_session_name()]) == false) {
unset($_GET[tep_session_name()]);
$sane_session_id = false;
}
} elseif (isset($_POST[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[tep_session_name()]) == false) {
unset($_POST[tep_session_name()]);
$sane_session_id = false;
}
} elseif (isset($HTTP_COOKIE_VARS[tep_session_name()])) {
if (preg_match('/^[a-zA-Z0-9]+$/', $HTTP_COOKIE_VARS[tep_session_name()]) == false) {
$session_data = session_get_cookie_params();
setcookie(tep_session_name(), '', time()-42000, $session_data['path'], $session_data['domain']);
$sane_session_id = false;
}
}
if ($sane_session_id == false) {
tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}
return session_start();
}
开发者ID:nixonch,项目名称:a2billing,代码行数:33,代码来源:sessions.php
示例4: execute
function execute()
{
global $HTTP_GET_VARS, $current_category_id, $languages_id, $oscTemplate;
if (isset($current_category_id) && $current_category_id > 0) {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int) $current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
} else {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
}
if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {
$bestsellers_list = '<ol style="margin: 0; padding-left: 25px;">';
while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
$bestsellers_list .= '<li><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id']) . '">' . $best_sellers['products_name'] . '</a></li>';
}
$bestsellers_list .= '</ol>';
if ($this->group == 'boxes_footer') {
$data = '<div class="col-sm-3 col-lg-2">' . ' <div class="footerbox best-sellers">' . ' <h2>' . MODULE_BOXES_BEST_SELLERS_BOX_TITLE . '</h2>';
} else {
$data = '<div class="panel panel-default">' . ' <div class="panel-heading">' . MODULE_BOXES_BEST_SELLERS_BOX_TITLE . '</div>';
}
$data .= ' <div class="panel-body">' . $bestsellers_list . '</div>';
$data .= '</div>';
if ($this->group == 'boxes_footer') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:27,代码来源:bm_best_sellers.php
示例5: tep_display_banner
function tep_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = tep_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banners = tep_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = tep_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
} else {
return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . (int) $identifier . "'");
if (tep_db_num_rows($banner_query)) {
$banner = tep_db_fetch_array($banner_query);
} else {
return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>';
}
}
} else {
return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</strong>';
}
if (tep_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
tep_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
开发者ID:vakondweb,项目名称:oscommerce2,代码行数:32,代码来源:banner.php
示例6: get_response_handler_url
function get_response_handler_url()
{
$dummy = 'a';
$admin_folder = tep_href_link($dummy);
$catalog_folder = substr($admin_folder, 0, strlen($admin_folder) - strlen('admin/' . $dummy));
return $catalog_folder . 'googlecheckout/responsehandler.php';
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:7,代码来源:gc_dashboard.php
示例7: get_search_collections
function get_search_collections()
{
extract(tep_load('defs', 'database', 'sessions'));
$cAbstract = new abstract_zones();
$classes_array = $cAbstract->get_classes();
foreach ($classes_array as $key => $value) {
$cObject = new $value();
}
$keywords = isset($_GET['search']) && !empty($_GET['search']) ? $db->prepare_input($_GET['search']) : '';
$text_query_raw = "select gtext_id, gtext_title from " . TABLE_GTEXT . " where (gtext_title like '%" . $db->input($keywords) . "%' or gtext_alt_title like '%" . $db->input($keywords) . "%') order by gtext_title limit 10";
$text_array = $db->query_to_array($text_query_raw);
$j = count($text_array);
if ($j) {
echo '<div><table class="tabledata">' . "\n";
for ($i = 0; $i < $j; $i++) {
echo '<tr>' . "\n";
echo ' <td><a href="' . tep_href_link(FILENAME_GENERIC_TEXT, 'gtID=' . $text_array[$i]['gtext_id'] . '&action=new_generic_text') . '">' . $text_array[$i]['gtext_title'] . '</a></td>' . "\n";
echo ' <td><a href="' . tep_href_link($cDefs->script, 'cID=' . $text_array[$i]['abstract_zone_id'] . '&action=list') . '">' . $text_array[$i]['abstract_zone_name'] . '</a></td>' . "\n";
echo '<tr>' . "\n";
}
echo '</table></div>' . "\n";
} else {
echo 'Nothing Found';
}
$cSessions->close();
return true;
}
开发者ID:enigma1,项目名称:i-metrics-cms,代码行数:27,代码来源:admin_abstract_zones.php
示例8: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate, $language, $request_type, $HTTP_GET_VARS, $current_lang_key;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
reset($lng->catalog_languages);
$languages_array = array();
while (list($key, $value) = each($lng->catalog_languages)) {
$languages_array[] = array('id' => $key, 'text' => $value['name']);
}
foreach ($lng->catalog_languages as $key => $value) {
if ($value['directory'] == $language) {
$current_lang_key = $key;
break;
}
}
reset($HTTP_GET_VARS);
while (list($key, $value) = each($HTTP_GET_VARS)) {
if (is_string($value) && $key != 'language' && $key != tep_session_name() && $key != 'x' && $key != 'y') {
$hidden_get_variables .= tep_draw_hidden_field($key, $value);
}
}
$data = '<div class="headerBox languages">' . ' <span class="headerTitle languages-title">' . MODULE_BOXES_HEADER_LANGUAGES_BOX_TITLE . '</span>' . ' <div class="headerBoxContents">' . ' ' . tep_draw_form('languages', tep_href_link($PHP_SELF, '', $request_type, false), 'get') . ' ' . tep_draw_pull_down_menu('language', $languages_array, $current_lang_key, 'onchange="this.form.submit();"') . $hidden_get_variables . tep_hide_session_id() . '</form>' . ' </div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:31,代码来源:h_languages.php
示例9: execute
function execute()
{
global $oscTemplate, $languages_id;
$page_query = tep_db_query("select p.pages_id, p.sort_order, p.status, s.pages_title, s.pages_html_text, s.intorext, s.externallink, s.link_target from " . TABLE_PAGES . " p LEFT JOIN " . TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id where p.status = 1 and p.page_type != 1 and s.language_id = '" . (int) $languages_id . "' order by p.sort_order, s.pages_title");
$rows = 0;
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_EXTRAINFOPAGE_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents"><table border="0" width="100%" cellspacing="0" cellpadding="1">';
while ($page = tep_db_fetch_array($page_query)) {
$rows++;
$target = "";
if ($page['link_target'] == 1) {
$target = "_blank";
}
if ($page['pages_title'] != 'Contact Us') {
$link = FILENAME_PAGES . '?pages_id=' . $page['pages_id'];
} else {
$link = FILENAME_CONTACT_US;
}
if ($page['intorext'] == 1) {
$data .= '<tr><td class="bg_list2"><a target="' . $target . '" href="' . $page['externallink'] . '">' . $page['pages_title'] . '</a></td></tr>';
} else {
$data .= '<tr><td class="bg_list2"><a target="' . $target . '" href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' . $page['pages_id'], 'NONSSL') . '">' . $page['pages_title'] . '</a></td></tr>';
}
}
$data .= '</table></div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:26,代码来源:bm_extrainfopage.php
示例10: execute
function execute()
{
global $currencies, $oscTemplate;
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}
if ($this->group == 'boxes_footer') {
$data = '<div class="col-sm-3 col-lg-2">' . ' <div class="footerbox best-sellers">' . ' <h2><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></h2>';
} else {
$data = '<div class="panel panel-default">' . ' <div class="panel-heading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>';
}
$data .= ' <div class="panel-body text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, '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><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>';
$data .= '</div>';
if ($this->group == 'boxes_footer') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:25,代码来源:bm_whats_new.php
示例11: pre_confirmation_check
function pre_confirmation_check()
{
global $HTTP_POST_VARS;
include DIR_WS_CLASSES . 'cc_validation.php';
$cc_validation = new cc_validation();
$result = $cc_validation->validate($HTTP_POST_VARS['cc_number'], $HTTP_POST_VARS['cc_expires_month'], $HTTP_POST_VARS['cc_expires_year']);
$error = '';
switch ($result) {
case -1:
$error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));
break;
case -2:
case -3:
case -4:
$error = TEXT_CCVAL_ERROR_INVALID_DATE;
break;
case false:
$error = TEXT_CCVAL_ERROR_INVALID_NUMBER;
break;
}
if ($result == false || $result < 1) {
$payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&cc_owner=' . urlencode($HTTP_POST_VARS['cc_owner']) . '&cc_expires_month=' . $HTTP_POST_VARS['cc_expires_month'] . '&cc_expires_year=' . $HTTP_POST_VARS['cc_expires_year'];
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
}
$this->cc_card_type = $cc_validation->cc_type;
$this->cc_card_number = $cc_validation->cc_number;
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:27,代码来源:usaepay.php
示例12: execute
function execute()
{
global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
if (tep_session_is_registered('customer_id')) {
// retreive the last x products purchased
$orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
if (tep_db_num_rows($orders_query)) {
$product_ids = '';
while ($orders = tep_db_fetch_array($orders_query)) {
$product_ids .= (int) $orders['products_id'] . ',';
}
$product_ids = substr($product_ids, 0, -1);
$customer_orders_string = '<ul class="list-unstyled">';
$products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
$customer_orders_string .= '<li><span class="pull-right"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '"><span class="glyphicon glyphicon-shopping-cart"></span></a></span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></li>';
}
$customer_orders_string .= '</ul>';
if ($this->group == 'boxes_footer') {
$data = '<div class="col-sm-3 col-lg-2">' . ' <div class="footerbox order-history">' . ' <h2>' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</h2>';
} else {
$data = '<div class="panel panel-default">' . ' <div class="panel-heading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</div>';
}
$data .= ' <div class="panel-body">' . $customer_orders_string . '</div>';
$data .= '</div>';
if ($this->group == 'boxes_footer') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:32,代码来源:bm_order_history.php
示例13: 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
示例14: process_button
function process_button()
{
global $order;
$last_order_id = tep_db_query("select orders_id from " . TABLE_ORDERS . " order by orders_id desc limit 1");
$result = tep_db_fetch_array($last_order_id);
$this->orderID = $result['orders_id'] + 1;
$acceptURL = tep_href_link(FILENAME_CHECKOUT_PROCESS, 'referer=mokejimai', 'SSL');
$cancelURL = tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL');
$callbackURL = tep_href_link('mokejimai_validation.php', '', 'SSL', false, false, true);
$acceptURL = str_replace('&', '&', $acceptURL);
$cancelURL = str_replace('&', '&', $cancelURL);
$callbackURL = str_replace('&', '&', $callbackURL);
try {
$request = WebToPay::buildRequest(array('projectid' => $this->projectID, 'sign_password' => $this->projectPass, 'orderid' => $this->orderID, 'amount' => intval(number_format($order->info['total'], 2, '', '')), 'currency' => $order->info['currency'], 'lang' => substr($_SESSION['language'], 0, 2) !== 'lt' ? 'ENG' : 'LTU', 'accepturl' => $acceptURL, 'cancelurl' => $cancelURL, 'callbackurl' => $callbackURL, 'country' => 'LT', 'logo' => '', 'p_firstname' => $order->customer['firstname'], 'p_lastname' => $order->customer['lastname'], 'p_email' => $order->customer['email_address'], 'p_street' => $order->customer['street_address'], 'p_city' => $order->customer['city'], 'p_state' => $order->customer['state'], 'p_zip' => $order->customer['postcode'], 'p_countrycode' => $order->customer['country']['iso_code_2'], 'test' => $this->testMode));
} catch (WebToPayException $e) {
echo get_class($e) . ': ' . $e->getMessage();
}
$html = '';
if ($request) {
foreach ($request as $key => $value) {
$html .= tep_draw_hidden_field($key, $value);
}
}
return $html;
}
开发者ID:digitaldevelopers,项目名称:plugin-cre-loaded,代码行数:25,代码来源:mokejimai.php
示例15: 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
示例16: html_start_sub1
function html_start_sub1()
{
extract(tep_load('http_headers', 'database', 'message_stack'));
if (DEFAULT_WARNING_PASSWORD_PROTECT_REMIND == 'true') {
$cfq_query = $db->query("select configuration_id, configuration_group_id from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_WARNING_PASSWORD_PROTECT_REMIND'");
$cfg_array = $db->fetch_array($cfq_query);
$warning_string = '<a class="headerLink" href="' . tep_href_link(FILENAME_CONFIGURATION, 'action=edit&gID=' . $cfg_array['configuration_group_id'] . '&cID=' . $cfg_array['configuration_id']) . '">' . WARNING_PASSWORD_PROTECT_REMIND . '</a>';
$msg->add($warning_string, 'error', 'header');
}
// check if the 'install' directory exists, and warn of its existence
if (DEFAULT_WARNING_INSTALL_EXISTS == 'true') {
$check_dir = DIR_FS_CATALOG . 'install';
if (file_exists($check_dir)) {
$install_string = sprintf(WARNING_INSTALL_DIRECTORY_EXISTS, $check_dir);
$msg->add($install_string, 'error', 'header');
}
}
if ((bool) ini_get('file_uploads') == false) {
$msg->add(WARNING_FILE_UPLOADS_DISABLED, 'warning', 'header');
}
$images_path = tep_front_physical_path(DIR_WS_CATALOG_IMAGES);
if (!is_writeable($images_path)) {
$msg->add(WARNING_IMAGE_UPLOADS_DISABLED, 'warning', 'header');
}
$images_path = tep_front_physical_path(DIR_WS_CATALOG . FLY_THUMB_FOLDER);
if (!is_writeable($images_path)) {
$msg->add(WARNING_IMAGE_THUMBS_DISABLED, 'warning', 'header');
}
$http->send_cookies();
}
开发者ID:enigma1,项目名称:i-metrics-cms,代码行数:30,代码来源:html_start_sub1.php
示例17: 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
示例18: pass
function pass()
{
$backup_file = null;
if (is_dir(DIR_FS_BACKUP)) {
$dir = dir(DIR_FS_BACKUP);
$contents = array();
while ($file = $dir->read()) {
if (!is_dir(DIR_FS_BACKUP . $file)) {
$ext = substr($file, strrpos($file, '.') + 1);
if (in_array($ext, array('zip', 'sql', 'gz')) && !isset($contents[$ext])) {
$contents[$ext] = $file;
if ($ext != 'sql') {
// zip and gz (binaries) are prioritized over sql (plain text)
break;
}
}
}
}
if (isset($contents['zip'])) {
$backup_file = $contents['zip'];
} elseif (isset($contents['gz'])) {
$backup_file = $contents['gz'];
} elseif (isset($contents['sql'])) {
$backup_file = $contents['sql'];
}
}
$result = true;
if (isset($backup_file)) {
$request = $this->getHttpRequest(tep_href_link('backups/' . $backup_file));
$result = $request['http_code'] != 200;
}
return $result;
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:33,代码来源:admin_backup_file.php
|
请发表评论