Example #1
0
	<div id="listing-split">
	  <div style="float: left;"><?php 
                    echo $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_RECORDS);
                    ?>
</div>
	  <div style="text-align: right"><?php 
                    echo TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_REVIEWS_RESULTS, tep_get_all_get_params(array('boards_id', 'page', 'info', 'x', 'y')));
                    ?>
</div>
	</div>
<?php 
                }
                ?>
	<br /><div class="buttons">
	  <div style="text-align: right;" id="addAdv"><?php 
                if (!tep_check_blacklist()) {
                    echo '<a href="' . tep_href_link(FILENAME_BOARDS, tep_get_all_get_params(array('action', 'edit')) . 'tPath=' . $boards_types_id . '&action=new') . '"' . (!tep_session_is_registered('customer_id') ? ' onclick="document.getElementById(\'addAdv\').innerHTML = \'' . htmlspecialchars(sprintf(BOARDS_ERROR_REGISTER, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'))) . '\'; document.getElementById(\'addAdv\').style.textAlign = \'left\'; return false;"' : '') . '>' . tep_image_button('button_insert.gif', IMAGE_BUTTON_INSERT) . '</a>';
                }
                ?>
</div>
	</div>
<?php 
            } else {
                echo $page['pages_description'];
                $boards_types_query = tep_db_query("select boards_types_id, boards_types_name, boards_types_description from " . TABLE_BOARDS_TYPES . " where boards_types_status = '1' and language_id = '" . (int) $languages_id . "' order by sort_order, boards_types_name");
                while ($boards_types = tep_db_fetch_array($boards_types_query)) {
                    echo '<p><a href="' . tep_href_link(FILENAME_BOARDS, 'tPath=' . $boards_types['boards_types_id'] . '&view=rss') . '">' . tep_image(DIR_WS_TEMPLATES_IMAGES . 'rss.gif', TEXT_BOARDS_RSS, '', '', 'style="margin: 0 4px -4px 0;"') . '</a><a href="' . tep_href_link(FILENAME_BOARDS, 'tPath=' . $boards_types['boards_types_id']) . '"><strong>' . $boards_types['boards_types_name'] . '</strong></a>' . (tep_not_null($boards_types['boards_types_description']) ? '<br />' . "\n" . $boards_types['boards_types_description'] : '') . '</p>' . "\n\n";
                }
            }
        }
        break;
 reset($HTTP_POST_VARS);
 while (list($k, $v) = each($HTTP_POST_VARS)) {
     ${$k} = tep_output_string_protected($v);
 }
 $name = $customer_name;
 $email = $customer_email;
 $email = implode('', array_map('trim', explode("\n", $email)));
 $name = implode('', array_map('trim', explode("\n", $name)));
 reset($search_array);
 while (list(, $search_word) = each($search_array)) {
     $email = preg_replace('/' . preg_quote($search_word, '/') . '/i', '', $email);
     $name = preg_replace('/' . preg_quote($search_word, '/') . '/i', '', $name);
 }
 $email = substr(preg_replace('/[^-@_a-z0-9\\.]/i', '', $email), 0, 64);
 $name = substr(preg_replace('/[^-\\sa-z0-9\\.абвгдеЄжзийклмнопрстуфхцчшщъыьэю¤јЅ¬√ƒ≈®∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёя]/i', '', $name), 0, 32);
 $is_blacklisted = tep_check_blacklist();
 if ($is_blacklisted) {
     $error = true;
     $messageStack->add('header', strip_tags(ENTRY_BLACKLIST_REQUEST_ERROR));
 } elseif (tep_validate_email($email)) {
     $advance_order_date_purchased = date('Y-m-d H:i:s');
     $advance_order_products = array();
     $advance_order_sum = 0;
     $enquiry = $HTTP_GET_VARS['action'] == 'process_foreign_books' || $HTTP_GET_VARS['action'] == 'process_foreign_products' ? ENTRY_REQUEST_FORM_ADDRESS . ' ' . $customer_delivery_address . "\n\n" : '';
     if (tep_not_null($name)) {
         $enquiry .= ENTRY_REQUEST_FORM_NAME . ' ' . $name . "\n\n";
     }
     if (tep_not_null($email)) {
         $enquiry .= ENTRY_REQUEST_FORM_EMAIL . ' ' . $email . "\n\n";
     }
     if (tep_not_null($customer_phone_number)) {
<?php

require 'includes/application_top.php';
require 'includes/classes/http_client.php';
if (tep_session_is_registered('customer_id')) {
    $customer_check_query = tep_db_query("select 1 from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'");
    if (tep_db_num_rows($customer_check_query) < 1) {
        tep_session_unregister('customer_id');
    }
}
if ($HTTP_GET_VARS['registration'] == 'off' && !tep_session_is_registered('customer_id') && ALLOW_CHECKOUT_FOR_UNREGISTERED == 'true') {
    $is_dummy_account = true;
    tep_session_register('is_dummy_account');
    tep_db_query("insert into " . TABLE_CUSTOMERS . " (customers_status, customers_is_dummy_account, shops_id) values ('" . (tep_check_blacklist() ? '0' : '1') . "', '1', '" . (int) SHOP_ID . "')");
    $customer_id = tep_db_insert_id();
    tep_session_register('customer_id');
    tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $customer_id . "', '0', now())");
}
// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
    if (is_object($navigation)) {
        $navigation->set_snapshot();
    }
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
    tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
$content = FILENAME_CHECKOUT_SHIPPING;
$javascript = 'checkout_shipping.js';