示例#1
0
            echo $template_dir;
            ?>
/jscript/bookmark.js"></script>
			        <!-- AddThis Bookmark Button END -->
			      </li>
			      <?php 
            if (isset($_SESSION['customer_id'])) {
                ?>
			      <li class="fr pad_r_5px"><?php 
                echo BASE_COMMON_TEXT_WELCOME;
                ?>
!&nbsp; <a target="_top" href="<?php 
                echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL');
                ?>
" title="Sign in"><?php 
                echo zen_get_customer_name($_SESSION['customer_id']);
                ?>
</a>&nbsp;<?php 
                echo BASE_COMMON_TEXT_OR;
                ?>
&nbsp; <a target="_top" href="<?php 
                echo zen_href_link(FILENAME_LOGOFF, '', 'SSL');
                ?>
" title="Register"> <?php 
                echo BASE_COMMON_TEXT_LOGOUT;
                ?>
 </a> </li>
			      <?php 
            } else {
                ?>
			      <li class="fr pad_r_5px"><?php 
示例#2
0
 * @version $Id: header_php.php 6963 2007-09-08 02:36:34Z drbyte $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_PRODUCT_INFO');
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
if ($_POST['action']) {
    if (REVIEWS_APPROVAL == '1') {
        $review_status = '0';
    } else {
        $review_status = '1';
    }
    $sql_data_array = array();
    $sql_data_array2 = array();
    $customer_id = isset($_SESSION['customer_id']) ? $_SESSION['customer_id'] : '';
    $reviews_rating = $_POST['product_score'];
    $customer_name = isset($_SESSION['customer_id']) ? zen_get_customer_name($_SESSION['customer_id']) : $_POST['customer_name'];
    $customer_email = isset($_SESSION['customer_id']) ? zen_get_customer_email($_SESSION['customer_id']) : $_POST['customer_email'];
    $review_title = $_POST['review_title'];
    $review_content = $_POST['review_content'];
    $sql = "INSERT INTO " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, customers_email, reviews_rating, date_added, status)\n            VALUES (:productsID, :customersID, :customersName, :customersEmail, :rating, now(), " . $review_status . ")";
    $sql = $db->bindVars($sql, ':productsID', $_GET['products_id'], 'integer');
    $sql = $db->bindVars($sql, ':customersID', $customer_id, 'integer');
    $sql = $db->bindVars($sql, ':customersName', $customer_name, 'string');
    $sql = $db->bindVars($sql, ':customersEmail', $customer_email, 'string');
    $sql = $db->bindVars($sql, ':rating', $reviews_rating, 'string');
    $db->Execute($sql);
    $insert_id = $db->insert_ID();
    $sql = "INSERT INTO " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text, reviews_title)\n            VALUES (:insertID, :languagesID, :reviewText, :reviews_title)";
    $sql = $db->bindVars($sql, ':insertID', $insert_id, 'integer');
    $sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
    $sql = $db->bindVars($sql, ':reviewText', $review_content, 'string');
示例#3
0
 *
 * @package page
 * @copyright Copyright 2003-2006 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: header_php.php 4824 2006-10-23 21:01:28Z drbyte $
 */
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_ACCOUNT');
$customer_has_gv_balance = false;
$customer_gv_balance = false;
if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
if (zen_get_customer_name($_SESSION['customer_id']) == 'New Customer') {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'));
}
$gv_query = "SELECT amount\n             FROM " . TABLE_COUPON_GV_CUSTOMER . "\n             WHERE customer_id = :customersID";
$gv_query = $db->bindVars($gv_query, ':customersID', $_SESSION['customer_id'], 'integer');
$gv_result = $db->Execute($gv_query);
if ($gv_result->RecordCount() && $gv_result->fields['amount'] > 0) {
    $customer_has_gv_balance = true;
    $customer_gv_balance = $currencies->format($gv_result->fields['amount']);
}
require DIR_WS_MODULES . zen_get_module_directory('require_languages.php');
$breadcrumb->add(NAVBAR_TITLE);
$orders_query = "SELECT o.orders_id, o.order_no, o.date_purchased, o.delivery_name,\n                        o.delivery_country, o.billing_name, o.billing_country,\n                        ot.text as order_total, s.orders_status_name\n                 FROM   " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . "  ot, " . TABLE_ORDERS_STATUS . " s\n                 WHERE  o.customers_id = :customersID\n                 AND    o.orders_id = ot.orders_id\n                 AND    ot.class = 'ot_total'\n                 AND    o.orders_status = s.orders_status_id\n                 AND   s.language_id = :languagesID\n                 ORDER BY orders_id ";
$orders_query = $db->bindVars($orders_query, ':customersID', $_SESSION['customer_id'], 'integer');
$orders_query = $db->bindVars($orders_query, ':languagesID', $_SESSION['languages_id'], 'integer');
/*$orders = $db->Execute($orders_query);