Пример #1
0
function olc_create_sort_heading($sortby, $colnum, $heading)
{
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = HTML_A_START . olc_href_link(CURRENT_SCRIPT, olc_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . HTML_A_END;
    }
    return $sort_prefix . $heading . $sort_suffix;
}
    </table></td>
<!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo olc_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT);
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo HTML_A_START . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('action'))) . '">' . olc_image_button('button_back.gif', IMAGE_BACK) . HTML_A_END;
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php 
echo TEXT_SUMMARY_TITLE;
?>
</td>
              </tr>
if (strlen($pfrom_to_check) > 0 && !(($errorno & 10000) == 10000) && strlen($pto_to_check) > 0 && !(($errorno & 100000) == 100000)) {
    if ($pfrom_to_check > $pto_to_check) {
        $errorno += 1000000;
        $error = 1;
    }
}
if (strlen($keywords) > 0) {
    if (!olc_parse_search_string(stripslashes($keywords), $search_keywords)) {
        $errorno += 10000000;
        $error = 1;
    }
}
$categories_id = (int) $_GET['categories_id'];
$inc_subcat == $_GET['inc_subcat'];
if ($error == 1) {
    olc_redirect(olc_href_link(FILENAME_ADVANCED_SEARCH, 'errorno=' . $errorno . '&' . olc_get_all_get_params(array('x', 'y'))));
} else {
    $breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCH, olc_href_link(FILENAME_ADVANCED_SEARCH));
    $breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, olc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . $keywords . '&search_in_description=' . $_GET['search_in_description'] . '&categories_id=' . $categories_id . '&inc_subcat=' . $inc_subcat . '&manufacturers_id=' . $_GET['manufacturers_id'] . '&pfrom=' . $pfrom_to_check . '&pto=' . $pto_to_check . '&dfrom=' . $dfrom_to_check . '&dto=' . $dto_to_check));
    require DIR_WS_INCLUDES . 'header.php';
    //fsk18 lock
    if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
        $fsk_lock = ' and p.products_fsk18!=1';
    } else {
        $fsk_lock = EMPTY_STRING;
    }
    // create column list
    $select_str = PRODUCTS_FIELDS . COMMA . '
m.manufacturers_name';
    if (DISPLAY_PRICE_WITH_TAX == TRUE_STRING_S && (isset($pfrom_to_check) && olc_not_null($pfrom_to_check) || isset($pto_to_check) && olc_not_null($pto_to_check))) {
        $select_str .= ", SUM(tr.tax_rate) as tax_rate ";
              <td class="pageHeading">
								<?php 
define('AJAX_TITLE', 'Cross-Marketing (X-Sell) Admin');
echo AJAX_TITLE;
?>
              </td>
              <td class="pageHeading" align="right"><?php 
echo olc_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
            </tr>
<?php 
//Medreces insert Filter categories & manufactures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
?>
            <tr class="dataTableHeadingRow"><?php 
echo olc_draw_form('filter_xsell_products', FILENAME_XSELL_PRODUCTS, $first_entrance ? '' : olc_get_all_get_params());
?>
                <td class="dataTableHeadingRow" align="left">Set Filters</td>
                <td class="smallText" align="right">
                  <?php 
echo 'to Categories:&nbsp' . olc_draw_pull_down_menu('categories_id', olc_get_category_tree(), $CATEGORIES_id);
echo '<br/>to Manufacturers:&nbsp' . olc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $MANUFACTURES_id);
?>
                </td>
				<td class="dataTableContent" align="right"><?php 
echo olc_image_submit('button_select.gif', 'GO!!!');
?>
</td>
            </form></tr>
<?php 
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Пример #5
0
 function getBuyNowButton($id, $name)
 {
     global $PHP_SELF;
     return '<a href="' . olc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id=' . $id . '&' . olc_get_all_get_params(array('action')), 'NONSSL') . '">' . olc_image_button('button_buy_now.gif', TEXT_BUY . $name . TEXT_NOW) . '</a>';
 }
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_PAYMENT . HTML_B_END);
            $contents = array('form' => olc_draw_form('payment', FILENAME_AFFILIATE_PAYMENT, olc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . HTML_BR);
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(AFFILIATE_PAYMENT, olc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        default:
            if (is_object($pInfo)) {
                $heading[] = array('text' => '<b>[' . $pInfo->affiliate_payment_id . ']&nbsp;&nbsp;' . olc_datetime_short($pInfo->affiliate_payment_date) . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_AFFILIATE_PAYMENT, olc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE_PAYMENT, olc_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_AFFILIATE_INVOICE, 'pID=' . $pInfo->affiliate_payment_id) . '" TARGET="_blank">' . olc_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> ');
            }
            break;
    }
    if (olc_not_null($heading) && olc_not_null($contents)) {
        echo '            <td  width="25%" valign="top">' . NEW_LINE;
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . NEW_LINE;
    }
    ?>
          </tr>
        </table></td>
      </tr>
<?php 
 -----------------------------------------------------------------------------------------
 based on:
 (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
 (c) 2002-2003 osCommerce(product_reviews_info.php,v 1.47 2003/02/13); www.oscommerce.com
 (c) 2003	    nextcommerce (product_reviews_info.php,v 1.12 2003/08/17); www.nextcommerce.org
 (c) 2004      XT - Commerce; www.xt-commerce.com

  Released under the GNU General Public License
 ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// include needed functions
require_once DIR_FS_INC . 'olc_break_string.inc.php';
require_once DIR_FS_INC . 'olc_date_long.inc.php';
require_once DIR_FS_INC . 'olc_image_button.inc.php';
// lets retrieve all $HTTP_GET_VARS keys and values..
$get_params = olc_get_all_get_params(array('reviews_id'));
$get_params = substr($get_params, 0, -1);
//remove trailing &
$reviews_query = olc_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd left join " . TABLE_PRODUCTS . " p on (r.products_id = p.products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id and pd.language_id = '" . SESSION_LANGUAGE_ID . "') where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and p.products_status = '1'");
if (!olc_db_num_rows($reviews_query)) {
    olc_redirect(olc_href_link(FILENAME_REVIEWS));
}
$reviews = olc_db_fetch_array($reviews_query);
$breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, olc_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
olc_db_query(SQL_UPDATE . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . $reviews['reviews_id'] . APOS);
$reviews_text = olc_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br/>');
require DIR_WS_INCLUDES . 'header.php';
$smarty->assign('PRODUCTS_NAME', $reviews['products_name']);
$smarty->assign('AUTHOR', $reviews['customers_name']);
$smarty->assign('DATE', olc_date_long($reviews['date_added']));
$smarty->assign('REVIEWS_TEXT', nl2br($reviews_text));
Пример #8
0
    define('PRODUCTS_MODEL', 'products_model');
    $cPath = 'cPath';
    $equal = '=';
    // save current session data
    $old_session = $_SESSION;
    $index_php = 'index.php';
    $get_info = $_GET['info'];
    $date_format = 'H:i:s';
    $SQLSelect_Category = SELECT . "categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '#' and language_id='" . SESSION_LANGUAGE_ID . APOS;
    $SQLWhere = " where categories_id = '#' and language_id='" . SESSION_LANGUAGE_ID . APOS;
    $sessions_in_db = STORE_SESSIONS == 'mysql';
    $session_path = olc_session_save_path() . '/sess_';
    $whos_online_row0 = '
														onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'"
														onmouseout="this.className=\'dataTableRow\'"
														onclick="javascript:' . olc_onclick_link(FILENAME_WHOS_ONLINE, olc_get_all_get_params(array('info', 'action')) . 'info=#', NONSSL);
    $whos_online_row1 = '
					              <tr id="#" style="display:inline;" class="dataTableRow"';
    $selected = false;
    $new_visitors = EMPTY_STRING;
    $cart_total = 0;
    while ($whos_online = olc_db_fetch_array($whos_online_query)) {
        $session_id = $whos_online['session_id'];
        $time_online = $current_time - $whos_online['time_entry'];
        if ($is_periodic) {
            $info = $session_id;
        } else {
            if (!$get_info || !$info && $get_info == $session_id) {
                $info = $session_id;
            }
            $selected = $session_id == $info;
Пример #9
0
if (!olc_session_is_registered('customer_id')) {
    olc_redirect(olc_href_link(FILENAME_LOGIN));
}
$breadcrumb->add(NAVBAR_TITLE_ACCOUNT, olc_href_link(FILENAME_ACCOUNT));
require DIR_WS_INCLUDES . 'header.php';
if (is_object($messageStack)) {
    if ($messageStack->size('account') > 0) {
        $smarty->assign('error_message', $messageStack->output('account'));
    }
}
if ($_GET['products_history']) {
    require_once DIR_FS_INC . 'olc_get_product_path.inc.php';
    require_once DIR_FS_INC . 'olc_get_products_name.inc.php';
    require_once DIR_FS_INC . 'olc_get_products_price_specials.inc.php';
    $products_id_par = 'products_id=';
    $params = olc_get_all_get_params(array('action')) . 'action=buy_now&BUY' . $products_id_par;
    $buy_now_link = HTML_A_START . olc_href_link(basename($PHP_SELF), $params . HASH) . '">' . olc_image_button('button_buy_now.gif', TEXT_BUY . ATSIGN . TEXT_NOW) . HTML_A_END;
    $product_link = olc_href_link(FILENAME_PRODUCT_INFO, $products_id_par . HASH);
    $cat_path = olc_href_link(FILENAME_DEFAULT, 'cPath=' . HASH);
    $img = olc_image(DIR_WS_THUMBNAIL_IMAGES . HASH, ATSIGN);
    $tracking_products_history = $_SESSION[TRACKING][PRODUCTS_HISTORY];
    $i = 0;
    $max = count($tracking_products_history);
    while ($i < $max) {
        $products_id = $tracking_products_history[$i];
        $product_history_query = olc_db_query(SELECT_ALL . TABLE_PRODUCTS . "\n\t\twhere\n\t\tproducts_status = 1 and\n\t\tproducts_id = " . $products_id);
        $history_product = olc_db_fetch_array($product_history_query);
        if ($history_product['products_status'] != 0) {
            $products_name = olc_get_products_name($products_id);
            $products_image = $history_product['image'];
            $products_price = olc_get_products_price_specials($products_id, $price_special = 1, $quantity = 1, $price_special_info, $products_price_real);
              </tr>
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'confirm':
            $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_CUSTOMER . HTML_B_END);
            $contents = array('form' => olc_draw_form('affiliate', FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_DELETE_INTRO . '<br/><br/><b>' . $aInfo->affiliate_firstname . BLANK . $aInfo->affiliate_lastname . HTML_B_END);
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        default:
            if (is_object($aInfo)) {
                $heading[] = array('text' => HTML_B_START . $aInfo->affiliate_firstname . BLANK . $aInfo->affiliate_lastname . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE, olc_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=confirm') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . olc_href_link(FILENAME_AFFILIATE_CONTACT, 'selected_box=affiliate&affiliate=' . $aInfo->affiliate_email_address) . '">' . olc_image_button('button_email.gif', IMAGE_EMAIL) . HTML_A_END);
                $affiliate_sales_raw = "select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from " . TABLE_AFFILIATE_SALES . " a left join " . TABLE_ORDERS . " o on (a.affiliate_orders_id=o.orders_id)\n        where o.orders_status >= " . AFFILIATE_PAYMENT_ORDER_MIN_STATUS . " and  affiliate_id = '" . $aInfo->affiliate_id . APOS;
                $affiliate_sales_values = olc_db_query($affiliate_sales_raw);
                $affiliate_sales = olc_db_fetch_array($affiliate_sales_values);
                $contents[] = array('text' => HTML_BR . TEXT_DATE_ACCOUNT_CREATED . BLANK . olc_date_short($aInfo->date_account_created));
                $contents[] = array('text' => EMPTY_STRING . TEXT_DATE_ACCOUNT_LAST_MODIFIED . BLANK . olc_date_short($aInfo->date_account_last_modified));
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_DATE_LAST_LOGON . BLANK . olc_date_short($aInfo->date_last_logon));
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_NUMBER_OF_LOGONS . BLANK . $aInfo->number_of_logons);
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_COMMISSION . BLANK . $aInfo->affiliate_commission_percent . ' %');
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_COUNTRY . BLANK . $aInfo->countries_name);
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_NUMBER_OF_SALES . BLANK . $affiliate_sales['count'], EMPTY_STRING);
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_SALES_TOTAL . BLANK . $currencies->display_price($affiliate_sales['total'], EMPTY_STRING));
                $contents[] = array('text' => EMPTY_STRING . TEXT_INFO_AFFILIATE_TOTAL . BLANK . $currencies->display_price($affiliate_sales['payment'], EMPTY_STRING));
            }
            break;
    }
Пример #11
0
        define('SMARTY_TARGET_AREA', MAIN_CONTENT);
    }
    $smarty->assign(SMARTY_TARGET_AREA, $main_content);
    if ($not_IsCheckout) {
        require BOXES;
        $smarty->display(INDEX_HTML);
    }
} else {
    if ($IsUserMode) {
        $alt1 = IMAGE_BUTTON_CANCEL;
    } else {
        $alt1 = IMAGE_CANCEL;
    }
    echo '
			<tr>
				<td align="right" class="main">' . olc_image_submit($image, $alt) . HTML_A_START . olc_href_link(FILENAME_CUSTOMERS, olc_get_all_get_params(array('action', 'validate'))) . '">' . olc_image_button('button_cancel.gif', $alt1) . '</a>
				</td>
			</tr>
		</form>';
}
function display_category_start($category_desc)
{
    global $IsUserMode;
    if (!$IsUserMode) {
        echo '<tr><td>&nbsp;</td></tr>
			<tr>
				<td class="formAreaTitle">' . $category_desc . '</td>
			</tr>
			<tr>
				<td class="formArea">
					<table border="0" cellspacing="2" cellpadding="2">';
(c) 2002-2003 osCommerce(order_history.php,v 1.4 2003/02/10); www.oscommerce.com
(c) 2003	    nextcommerce (order_history.php,v 1.9 2003/08/17); www.nextcommerce.org
(c) 2004      XT - Commerce; www.xt-commerce.com

Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
olc_smarty_init($box_smarty, $cacheid);
$box_content = '';
// include needed functions
require_once DIR_FS_INC . 'olc_get_all_get_params.inc.php';
if (ISSET_CUSTOMER_ID) {
    // retreive the last x products purchased
    $orders_query = olc_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = " . CUSTOMER_ID . " and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1\n    group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
    if (olc_db_num_rows($orders_query)) {
        $product_ids = EMPTY_STRING;
        while ($orders = olc_db_fetch_array($orders_query)) {
            $product_ids .= $orders['products_id'] . COMMA;
        }
        $product_ids = substr($product_ids, 0, -1);
        $customer_orders_string = '<table border="0" width="100%" cellspacing="0" cellpadding="1">';
        $products_query = olc_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . SESSION_LANGUAGE_ID . "' order by products_name");
        while ($products = olc_db_fetch_array($products_query)) {
            $link = olc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">';
            $customer_orders_string .= '  <tr>' . '    <td class="infoBoxContents"><a href="' . $link . $products['products_name'] . '</a></td>' . '    <td class="infoBoxContents" align="right" valign="top"><a href="' . olc_href_link(CURRENT_SCRIPT, olc_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '">' . olc_image(DIR_WS_ICONS . 'cart.gif', ICON_CART) . '</a></td>' . '  </tr>';
        }
        $customer_orders_string .= '</table>';
    }
}
$box_smarty->assign('BOX_CONTENT', $customer_orders_string);
$box_order_history = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_order_history' . HTML_EXT, $cacheid);
$smarty->assign('box_ORDER_HISTORY', $box_order_history);
    }
    $data_products .= '				</table>';
    $smarty->assign('PRODUCTS_BLOCK', $data_products);
    $smarty->assign('TOTAL_BLOCK', $total_block);
    $smarty->assign('PAYMENT_EDIT', olc_href_link(FILENAME_CHECKOUT_PAYMENT, EMPTY_STRING, SSL));
    $history_block = '<table>';
    $statuses_query = olc_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh\n\twhere\n\tosh.orders_id = '" . $order_id . "'\n\tand osh.orders_status_id = os.orders_status_id\n\tand os.language_id = '" . SESSION_LANGUAGE_ID . "'\n\torder by osh.date_added");
    while ($statuses = olc_db_fetch_array($statuses_query)) {
        $history_block .= '              <tr>' . NEW_LINE . '                <td class="main" valign="top">' . olc_date_short($statuses['date_added']) . '</td>' . NEW_LINE . '                <td class="main" valign="top">' . $statuses['orders_status_name'] . '</td>' . NEW_LINE . '                <td class="main" valign="top">' . (empty($statuses['comments']) ? HTML_NBSP : nl2br(htmlspecialchars($statuses['comments']))) . '</td>' . NEW_LINE . '              </tr>' . NEW_LINE;
    }
    $history_block .= '</table>';
    $smarty->assign('HISTORY_BLOCK', $history_block);
    if (DOWNLOAD_ENABLED == TRUE_STRING_S) {
        include DIR_WS_MODULES . 'downloads.php';
    }
    $button_back = HTML_A_START . olc_href_link(FILENAME_ACCOUNT_HISTORY, olc_get_all_get_params(array('order_id')), SSL) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END;
    /* begin PayPal_Shopping_Cart_IPN */
    if (defined('PAYPAL_IPN_DIR')) {
        require PAYPAL_IPN_DIR . 'catalog/order_send_money.inc.php';
    }
    $button_back .= $paypal_confirm;
    /* end PayPal_Shopping_Cart_IPN */
    $track_code = $order->info['orders_trackcode'];
    if ($track_code) {
        require_once DIR_FS_INC . 'olc_get_track_code.inc.php';
        $TrackURL = olc_get_track_code($order, $track_code);
        if ($TrackURL) {
            $order_tracking = '
<!--W. Kaiser - Erlaube Sendungstracking -->
<b>' . ENTRY_TRACKCODE . ': ' . $track_code . '</b>&nbsp;' . ENTRY_TRACKCODE_EXPLAIN . HTML_NBSP . '
<a href="' . $TrackURL . '" target="_blank">' . ENTRY_TRACK_URL_TEXT . '</a>
Пример #14
0
        $form_action = 'update';
        $product_query = olc_db_query("select\n\t\tp.products_tax_class_id,\n    p.products_id,\n    pd.products_name,\n    p.products_price,\n    s.specials_new_products_price,\n    s.expires_date from\n    " . TABLE_PRODUCTS . " p,\n    " . TABLE_PRODUCTS_DESCRIPTION . " pd,\n    " . TABLE_SPECIALS . "\n    s where p.products_id = pd.products_id\n    and pd.language_id = '" . SESSION_LANGUAGE_ID . "'\n    and p.products_id = s.products_id\n    and s.specials_id = '" . $sID . APOS);
        $product = olc_db_fetch_array($product_query);
        $sInfo = new objectInfo($product);
    } else {
        $form_action = 'insert';
        $sInfo = new objectInfo(array());
        // create an array of products on special, which will be excluded from the pull down menu of products
        // (when creating a new product on special)
        $specials_array = array();
        $specials_query = olc_db_query("select\n    p.products_id from\n    " . TABLE_PRODUCTS . " p,\n    " . TABLE_SPECIALS . " s\n    where s.products_id = p.products_id");
        while ($specials = olc_db_fetch_array($specials_query)) {
            $specials_array[] = $specials['products_id'];
        }
    }
    echo olc_draw_form('specials', FILENAME_SPECIALS, olc_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'post');
    if ($is_update) {
        echo olc_draw_hidden_field('specials_id', $sID);
    }
    ?>
        <td><br/><table border="0" cellspacing="0" cellpadding="2">
        <td class="main"><?php 
    echo TEXT_SPECIALS_PRODUCT;
    ?>
&nbsp;</td>
<?php 
    $price = abs($sInfo->products_price);
    $new_price = $sInfo->specials_new_products_price;
    if ($is_brutto) {
        $price_netto = olc_round($price, PRICE_PRECISION);
        $new_price_netto = olc_round($new_price, PRICE_PRECISION);
Пример #15
0
 if ($force_javascript_check) {
     unset($_SESSION[$force_javascript_check]);
     $_SESSION[$javascript_check_done_text] = false;
     $_SESSION[$javascript_text] = false;
 }
 $have_javascript_support = $_SESSION[$javascript_text] == true;
 if (!$have_javascript_support) {
     if (isset($_POST[$javascript_text]) || isset($_GET[$use_ajax_text]) || isset($_POST[$use_ajax_text])) {
         $have_javascript_support = true;
         $_SESSION[$javascript_text] = true;
         $_SESSION[$use_ajax_text] = true;
     } else {
         if ($_SESSION[$javascript_check_done_text]) {
         } else {
             $_SESSION[$javascript_check_done_text] = true;
             $parameters = olc_get_all_get_params();
             $pos = strpos($parameters, $force_javascript_check_text);
             if ($pos > 0) {
                 $parameters = substr($parameters, 0, $pos - 1);
             }
             //Exclude Zend debugger parameters!!!!
             $pos = strpos($parameters, "start_debug");
             if ($pos === false) {
                 $pos = strpos($parameters, 'DBGSESSION');
             }
             if ($pos !== false) {
                 $parameters = substr($parameters, 0, $pos - 1);
                 $_SESSION["parameters"] = substr($parameters, $pos - 1);
             }
             if (strlen($parameters) > 0) {
                 $parameters = str_replace('force_restart=true', EMPTY_STRING, $parameters);
     //Note: the quantity will no longer be added to the cart-quantity, but is set as the  t o t a l  quatity!
     $true = '=true';
     $parameter .= AMP . 'force_quantity' . $true;
     /*
     if ($is_gallery)
     {
     	$parameter.=AMP.$gallery_text.$true;
     }
     */
 }
 if ($not_isprint_version) {
     if (ACTIVATE_NAVIGATOR == TRUE_STRING_S) {
         include DIR_WS_MODULES . 'product_navigator.php';
     }
     olc_db_query(SQL_UPDATE . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where " . $searchkey0 . " and language_id = " . SESSION_LANGUAGE_ID);
     $form_action = olc_href_link(FILENAME_PRODUCT_INFO, olc_get_all_get_params(array('action')) . $parameter);
 }
 //W. Kaiser - AJAX
 //fsk18 lock
 if ($_SESSION['customers_status']['customers_fsk18_display'] == '0' && $product_info['products_fsk18'] == '1') {
     $error = TEXT_PRODUCT_NOT_FOUND;
     include DIR_WS_MODULES . FILENAME_ERROR_HANDLER;
 } else {
     //W. Kaiser - AJAX
     $products_id = $product_info['products_id'];
     $products_price = olc_get_products_price_specials($products_id, $price_special = 1, $quantity = 1, $price_special_info, $products_price_real);
     $product_available = $products_price_real >= 0;
     //W. Kaiser - AJAX
     if ($products_price_real == 0) {
         $products_price = EMPTY_STRING;
     }
Пример #17
0
        $current_row = str_replace('100%', EMPTY_STRING, $current_row);
        //$main_content= $table_start.$main_content.$table_end;
        $main_content .= $current_row . $table_end;
        if (USE_AJAX) {
            $main_content .= str_replace(HASH, $line, $table_attributes);
        }
        if ($my_products_listing_entries > GALLERY_PICTURES_PER_PAGE) {
            $main_content .= '
		<table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
				<td colspan="2"><hr/></td>
		  </tr>
		  <tr>
				<td class="smallText">' . $products_listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '
				</td>
				<td class="smallText" align="right">' . TEXT_RESULT_PAGE . BLANK . $products_listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, olc_get_all_get_params(array('page', 'info'))) . '
				</td>
		  </tr>
		</table>
';
        }
        if (NO_TAX_RAISED) {
            $price_disclaimer = PRICES_DISCLAIMER_NO_TAX;
        } else {
            if (CUSTOMER_SHOW_PRICE_TAX) {
                $price_disclaimer = PRICES_DISCLAIMER_INCL;
            } else {
                $price_disclaimer = PRICES_DISCLAIMER_EXCL;
            }
        }
        $price_disclaimer = str_replace(HTML_BR, BLANK, $price_disclaimer);
Пример #18
0
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'delete':
            $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_DELETE_ORDER . HTML_B_END);
            $contents = array('form' => olc_draw_form('orders', FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br/><br/><b>' . $cInfo->customers_firstname . BLANK . $cInfo->customers_lastname . HTML_B_END);
            $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('restock') . BLANK . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
            $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_delete.gif', IMAGE_DELETE) . BLANK . HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END);
            break;
        default:
            if (is_object($oInfo)) {
                $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . olc_datetime_short($oInfo->date_purchased) . HTML_B_END);
                $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
                //$contents[] = array('align' => 'center', 'text' => EMPTY_STRING);
                $contents[] = array('text' => HTML_BR . TEXT_DATE_ORDER_CREATED . BLANK . olc_date_short($oInfo->date_purchased));
                if (olc_not_null($oInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . BLANK . olc_date_short($oInfo->last_modified));
                }
                $contents[] = array('text' => HTML_BR . TEXT_INFO_PAYMENT_METHOD . BLANK . $oInfo->payment_method);
                //begin PayPal_Shopping_Cart_IPN
                if (strtolower($oInfo->payment_method) == 'paypal_ipn') {
                    include_once PAYPAL_IPN_DIR . 'Functions/general.func.php';
                    $contents[] = array('text' => TABLE_HEADING_PAYMENT_STATUS . ': ' . paypal_payment_status($oInfo->orders_id));
                }
                //end PayPal_shopping_Cart_IPN
                // elari added to display product list for selected order
                $order = new order($oInfo->orders_id);
                $contents[] = array('text' => '<br/><br/>' . sizeof($order->products) . ' Products ');
if ($HTTP_GET_VARS['digest'] != $paypal->digest()) {
    $messageStack->add_session(ERROR_UNAUTHORIZED_REQUEST);
} elseif ($paypal->info['payment_status'] === 'Completed' && $order->info['orders_status'] === MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID) {
    include PAYPAL_IPN_DIR . 'Functions/addressbook.func.php';
    include PAYPAL_IPN_DIR . 'Classes/osC/Order.class.php';
    $PayPal_osC_Order = new PayPal_osC_Order();
    $PayPal_osC_Order->setOrderID($HTTP_GET_VARS['oID']);
    $PayPal_osC_Order->loadOrdersSessionInfo();
    //$currency = $PayPal_osC_Order->currency;
    $PayPal_osC_Order->setAccountHistoryInfoURL(olc_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $PayPal_osC_Order->orderID, 'SSL', false));
    $PayPal_osC_Order->setCheckoutProcessLanguageFile(DIR_FS_CATALOG_LANGUAGES . $PayPal_osC_Order->language . '/' . 'checkout_process.php');
    $PayPal_osC_Order->updateProducts($order, $currencies);
    $PayPal_osC_Order->notifyCustomer($order);
    $affiliate_ref = $PayPal_osC_Order->affiliate_id;
    $affiliate_clickthroughs_id = $PayPal_osC_Order->affiliate_clickthroughs_id;
    $affiliate_clientdate = $PayPal_osC_Order->affiliate_date;
    $affiliate_clientbrowser = $PayPal_osC_Order->affiliate_browser;
    $affiliate_clientip = $PayPal_osC_Order->affiliate_ipaddress;
    if (olc_not_null($affiliate_ref) && $affiliate_ref != '0') {
        define('MODULE_PAYMENT_PAYPAL_SHOPPING_IPN_AFFILIATE', TRUE_STRING_S);
        $insert_id = $PayPal_osC_Order->orderID;
        include DIR_FS_CATALOG_MODULES . '../affiliate_checkout_process.php';
    }
    $PayPal_osC_Order->updateOrderStatus(MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID);
    $PayPal_osC_Order->removeOrdersSession();
    $messageStack->add_session(SUCCESS_ORDER_ACCEPTED, 'success');
} else {
    $messageStack->add_session(ERROR_ORDER_UNPAID);
}
olc_redirect(olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('action')) . 'action=edit'));
} else {
    if ($IsAdminFunction) {
        if ($key) {
            $document_number = constant($key) + 1;
            olc_db_query("\n\t\t\tupdate " . TABLE_CONFIGURATION . " set configuration_value='" . $document_number . "'\n\t\t\twhere configuration_key='" . $key . APOS);
            $s = "\n\t\t\tupdate " . TABLE_ORDERS . "\n\t\t\tset " . $document_number_data_field . "='" . $document_number . "', " . $document_number_date_field . "='" . time() . "'\n\t\t  where orders_id='" . $oID . APOS;
            olc_db_query($s);
        }
    } else {
        $doc_type = str_replace(HASH, $doc_type, PRINT_INVOICE_NO_DOCUMENT);
        if (IS_AJAX_PROCESSING) {
            include_once DIR_FS_INC . 'ajax_error.inc.php';
            ajax_error($doc_type);
        } else {
            $messageStack->add_session('pdf_invoice', $doc_type, 'error');
            olc_redirect(olc_href_link(CURRENT_SCRIPT, olc_get_all_get_params()));
        }
    }
}
$invoice_items = 0;
//Include configuration
include 'pdf_invoice_config.php';
$invoice_items--;
$info = array();
define('DATE', date('d.m.Y'));
$info[] = $text . $document_number;
$info[] = $date_text . $document_date;
$info_lines = 2;
if (!$print_order) {
    $info[] = PRINT_INVOICE_ORDER_NR . $order->info['order_id'];
    $info[] = PRINT_INVOICE_ORDER_DATE . date('d.m.Y', $order->info[date_purchased]);
$smarty->assign('affiliate_clickthroughs_split_number', $affiliate_clickthroughs_split->number_of_rows);
$affiliate_clickthrough_table = '';
if ($affiliate_clickthroughs_split->number_of_rows > 0) {
    $affiliate_clickthroughs_values = olc_db_query($affiliate_clickthroughs_split->sql_query);
    $number_of_clickthroughs = '0';
    while ($affiliate_clickthroughs = olc_db_fetch_array($affiliate_clickthroughs_values)) {
        $number_of_clickthroughs++;
        if ($number_of_clickthroughs / 2 == floor($number_of_clickthroughs / 2)) {
            $affiliate_clickthrough_table .= '<tr class="productListing-even">';
        } else {
            $affiliate_clickthrough_table .= '<tr class="productListing-odd">';
        }
        $affiliate_clickthrough_table .= '<td class="smallText">' . olc_date_short($affiliate_clickthroughs['affiliate_clientdate']) . '</td>';
        if ($affiliate_clickthroughs['affiliate_products_id'] > 0) {
            $link_to = HTML_A_START . olc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $affiliate_clickthroughs['affiliate_products_id']) . '" target="_blank">' . $affiliate_clickthroughs['products_name'] . HTML_A_END;
        } else {
            $link_to = "Startpage";
        }
        $affiliate_clickthrough_table .= '<td class="smallText">' . $link_to . '</td>';
        $affiliate_clickthrough_table .= '<td class="smallText">' . $affiliate_clickthroughs['affiliate_clientreferer'] . '</td></tr>';
    }
    $smarty->assign('affiliate_clickthrough_table', $affiliate_clickthrough_table);
}
if ($affiliate_clickthroughs_split->number_of_rows > 0) {
    $smarty->assign('affiliate_clickthroughs_split_count', $affiliate_clickthroughs_split->display_count(TEXT_DISPLAY_NUMBER_OF_CLICKS));
    $smarty->assign('affiliate_clickthroughs_split_links', $affiliate_clickthroughs_split->display_links(MAX_DISPLAY_PAGE_LINKS, olc_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'affiliate_clicks' . HTML_EXT, SMARTY_CACHE_ID);
$smarty->assign(MAIN_CONTENT, $main_content);
require BOXES;
$smarty->display(INDEX_HTML);
            <td colspan="7" class="smallText"><?php 
    echo TEXT_NO_SALES;
    ?>
</td>
          </tr>
<?php 
}
if ($affiliate_sales_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
          <tr>
            <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="smallText" valign="top"><?php 
    echo $affiliate_sales_split->display_count($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_SALES);
    ?>
</td>
                <td class="smallText" align="right"><?php 
    echo $affiliate_sales_split->display_links($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], olc_get_all_get_params(array('page', 'info', 'x', 'y')));
    ?>
</td>
              </tr>
            </table></td>
          </tr>
<?php 
}
?>
        </table></td>
      </tr>
    </table></td>
<?php 
require DIR_WS_INCLUDES . 'application_bottom.php';
Пример #23
0
 default:
     $customer_status = olc_get_customer_status($cId);
     $cs_id = $customer_status['customers_status'];
     $cs_member_flag = $customer_status['member_flag'];
     $cs_name = $customer_status['customers_status_name'];
     $cs_image = $customer_status['customers_status_image'];
     $cs_discount = $customer_status['customers_status_discount'];
     $cs_ot_discount_flag = $customer_status['customers_status_ot_discount_flag'];
     $cs_ot_discount = $customer_status['customers_status_ot_discount'];
     $cs_staffelpreise = $customer_status['customers_status_staffelpreise'];
     $cs_payment_unallowed = $customer_status['customers_status_payment_unallowed'];
     //      echo 'customer_status ' . $cID . 'variables = ' . $cs_id . $cs_member_flag . $cs_name .  $cs_discount .  $cs_image . $cs_ot_discount;
     if (is_object($cInfo)) {
         $heading[] = array('text' => HTML_B_START . $cInfo->customers_firstname . BLANK . $cInfo->customers_lastname . HTML_B_END);
         $customers_id = $cInfo->customers_id;
         $params = olc_get_all_get_params(array('cID', 'action')) . 'cID=' . $customers_id . '&action=';
         $is_admin = $customers_id == 1;
         if (!$is_admin || CUSTOMER_ID == 1) {
             $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_CUSTOMERS, $params . 'edit') . '">' . olc_image_button('button_edit.gif', IMAGE_EDIT) . HTML_A_END);
         }
         if (true || $cs_id != 0) {
             $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_CUSTOMERS, $params . 'confirm') . '">' . olc_image_button('button_delete.gif', IMAGE_DELETE) . HTML_A_END);
         }
         if (!$is_admin) {
             $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_CUSTOMERS, $params . 'editstatus') . '">' . olc_image_button('button_status.gif', IMAGE_STATUS) . HTML_A_END);
             // elari cs v3.x changed for added accounting module
             $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ACCOUNTING, $params) . '">' . olc_image_button('button_accounting.gif', IMAGE_ACCOUNTING) . HTML_A_END);
         }
         // elari cs v3.x changed for added iplog module
         $contents[] = array('align' => 'center', 'text' => HTML_A_START . olc_href_link(FILENAME_ORDERS, $params) . '">' . olc_image_button('button_orders.gif', IMAGE_ORDERS) . HTML_A_END . BLANK . HTML_A_START . olc_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '">' . olc_image_button('button_email.gif', IMAGE_EMAIL) . '</a><br/><a href="' . olc_href_link(FILENAME_CUSTOMERS, $params . 'iplog') . '">' . olc_image_button('button_iplog.gif', IMAGE_IPLOG) . HTML_A_END);
         $contents[] = array('text' => HTML_BR . TEXT_DATE_ACCOUNT_CREATED . BLANK . olc_date_short($cInfo->date_account_created));
    ?>
              <tr class="productListing-odd">
                <td colspan="7" class="smallText"><?php 
    echo TEXT_NO_CLICKS;
    ?>
</td>
              </tr>
<?php 
}
?>
              <tr>
                <td class="smallText" colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
echo $affiliate_clickthroughs_split->display_count($affiliate_clickthroughs_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CLICKS);
?>
</td>
                    <td class="smallText" align="right"><?php 
echo $affiliate_clickthroughs_split->display_links($affiliate_clickthroughs_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], olc_get_all_get_params(array('page', 'oID', 'action')));
?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
<?php 
require DIR_WS_INCLUDES . 'application_bottom.php';
            $cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified from " . TABLE_COUPONS . " where coupon_type != 'G'";
        }
        $cc_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_query_raw, $cc_query_numrows);
        $cc_query = olc_db_query($cc_query_raw);
        while ($cc_list = olc_db_fetch_array($cc_query)) {
            $rows++;
            if (strlen($rows) < 2) {
                $rows = '0' . $rows;
            }
            if ((!$_GET['cid'] || @$_GET['cid'] == $cc_list['coupon_id']) && !$cInfo) {
                $cInfo = new objectInfo($cc_list);
            }
            if (is_object($cInfo) && $cc_list['coupon_id'] == $cInfo->coupon_id) {
                echo '          <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="javascript:' . olc_onclick_link('coupon_admin.php', olc_get_all_get_params(array('cid', 'action')) . 'cid=' . $cInfo->coupon_id . '&action=edit') . '">' . NEW_LINE;
            } else {
                echo '          <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="javascript:' . olc_onclick_link('coupon_admin.php', olc_get_all_get_params(array('cid', 'action')) . 'cid=' . $cc_list['coupon_id']) . '">' . NEW_LINE;
            }
            $coupon_description_query = olc_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_list['coupon_id'] . "' and language_id = '" . SESSION_LANGUAGE_ID . APOS);
            $coupon_desc = olc_db_fetch_array($coupon_description_query);
            ?>
                <td class="dataTableContent"><?php 
            echo $coupon_desc['coupon_name'];
            ?>
</td>
                <td class="dataTableContent" align="center">
<?php 
            if ($cc_list['coupon_type'] == 'P') {
                echo $cc_list['coupon_amount'] . '%';
            } elseif ($cc_list['coupon_type'] == 'S') {
                echo TEXT_FREE_SHIPPING;
            } else {
            $phColor = $phCount / 2 == floor($phCount / 2) ? '#FFFFFF' : '#EEEEEE';
            $mc_currency = $paypal_history['mc_currency'] . HTML_NBSP;
            $mc_gross = $paypal_history['mc_gross'];
            $mc_fee = $paypal_history['mc_fee'];
            echo '			          <tr bgcolor="' . $phColor . '">' . NEW_LINE . ' 	           		<td nowrap="nowrap">&nbsp;' . $paypal->date($paypal_history['payment_date']) . '&nbsp;</td>' . NEW_LINE . '   	         		<td nowrap="nowrap">&nbsp;' . $paypal_history['payment_status'] . '&nbsp;</td>' . NEW_LINE . '     	       		<td nowrap="nowrap">&nbsp;' . PayPal_Page::draw_href_link(TABLE_HEADING_DETAILS, 'action=details&info=' . $paypal_history['txn_id']) . '&nbsp;
									</td>' . NEW_LINE . '      	    		 	<td nowrap="nowrap">&nbsp;</td>' . NEW_LINE . '		            	<td nowrap="nowrap" align="right">&nbsp;' . $paypal->format($mc_gross, $mc_currency) . '
									</td>' . NEW_LINE . '		   		        <td nowrap="nowrap" align="right">&nbsp;' . $paypal->format($mc_fee, $mc_currency) . '
									</td>' . NEW_LINE . '       			    <td nowrap="nowrap" align="right">&nbsp;' . $paypal->format($mc_gross - $mc_fee, $mc_currency) . '
 									</td>' . NEW_LINE . '          			</tr>' . NEW_LINE;
            $phCount++;
        }
    }
    //Now determine whether the order is on hold
    if ($order->info['orders_status'] === MODULE_PAYMENT_PAYPAL_ORDER_ONHOLD_STATUS_ID) {
        $ppImgAccept = olc_image(PAYPAL_IPN_DIR . 'images/act_accept.gif', IMAGE_BUTTON_TXN_ACCEPT);
        $ppAction = HTML_A_START . olc_href_link(FILENAME_ORDERS, olc_get_all_get_params(array('action')) . 'action=accept_order&digest=' . $paypal->digest()) . '">' . $ppImgAccept . HTML_A_END;
    } else {
        $ppAction = '';
    }
    $mc_currency = $paypal->txn['mc_currency'];
    $mc_gross = $paypal->txn['mc_gross'];
    $mc_fee = $paypal->txn['mc_fee'];
    ?>
	          		<tr bgcolor="#FFFFFF">
			            <td nowrap="nowrap">&nbsp;<?php 
    echo $paypal->date($paypal->info['payment_date']);
    ?>
&nbsp;</td>
			            <td nowrap="nowrap">&nbsp;<?php 
    echo $paypal->info['payment_status'];
    ?>
                <td class="dataTableHeadingContent"><?php 
echo TABLE_HEADING_LAST_PAGE_URL;
?>
&nbsp;</td>
              </tr>
<?php 
$whos_online_query = olc_db_query("select customer_id, full_name, ip_address, time_entry, time_last_click, last_page_url, session_id from " . TABLE_WHOS_ONLINE);
while ($whos_online = olc_db_fetch_array($whos_online_query)) {
    $time_online = time() - $whos_online['time_entry'];
    if ((!$_GET['info'] || @$_GET['info'] == $whos_online['session_id']) && !$info) {
        $info = $whos_online['session_id'];
    }
    if ($whos_online['session_id'] == $info) {
        echo '              <tr class="dataTableRowSelected">' . NEW_LINE;
    } else {
        echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="javascript:' . olc_onclick_link(FILENAME_WHOS_ONLINE, olc_get_all_get_params(array('info', 'action')) . 'info=' . $whos_online['session_id'], NONSSL) . '">' . NEW_LINE;
    }
    ?>
                <td class="dataTableContent"><?php 
    echo gmdate('H:i:s', $time_online);
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    echo $whos_online['customer_id'];
    ?>
</td>
                <td class="dataTableContent"><?php 
    echo $whos_online['full_name'];
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
            echo '<td nowrap="nowrap">' . HTML_NBSP . olc_image(DIR_WS_IMAGES . "icon_status_green.gif", IMAGE_ICON_STATUS_GREEN, 10, 10) . HTML_NBSP . $row["products_name"] . HTML_NBSP . "</td>\n";
        } else {
            echo '<td nowrap="nowrap">' . HTML_NBSP . olc_image(DIR_WS_IMAGES . "icon_status_red.gif", IMAGE_ICON_STATUS_RED, 10, 10) . HTML_NBSP . $row["products_name"] . HTML_NBSP . "</td>\n";
        }
        echo "<td>&nbsp;" . $row["products_model"] . "</td>\n";
        echo "</tr>\n";
    } while ($row = olc_db_fetch_array($result));
}
echo "</table>\n";
?>
<br/>
      <table width="550" border="0" cellspacing="1" cellpadding="0">
       <tr>
        <td><?php 
echo $products_split->display_count($products_query_numrows, $_GET['max_rows'], $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS);
?>
</td>
        <td align="right"><?php 
echo $products_split->display_links($products_query_numrows, $_GET['max_rows'], MAX_DISPLAY_PAGE_LINKS, $_GET['page'], olc_get_all_get_params(array('page')));
?>
</td>
       </tr>
      </table>
<br/>
<table width="550" border="0" cellspacing="1">
<tr>
<td align=middle><input type="button" value="Close Window" onclick="javascript:window.close()"></td>
</tr></table>
</tr></table>
</body>
</html>
Пример #29
0
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// include needed functions
require_once DIR_FS_INC . 'olc_word_count.inc.php';
require_once DIR_FS_INC . 'olc_date_long.inc.php';
$breadcrumb->add(NAVBAR_TITLE_REVIEWS, olc_href_link(FILENAME_REVIEWS));
require DIR_WS_INCLUDES . 'header.php';
$reviews_query_raw = "\nselect r.reviews_id,\nleft(rd.reviews_text, 250) as reviews_text,\nr.reviews_rating,\nr.date_added,\np.products_id,\npd.products_name,\np.products_image,\nr.customers_name\nfrom " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\nwhere\np.products_status = 1 and\np.products_id = r.products_id and\nr.reviews_id = rd.reviews_id and\np.products_id = pd.products_id and\npd.language_id = " . SESSION_LANGUAGE_ID . " and\nrd.languages_id = " . SESSION_LANGUAGE_ID . "\norder by r.reviews_id DESC";
$reviews_split = new splitPageResults($reviews_query_raw, $_GET['page'], MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) {
    $smarty->assign('NAVBAR', '
	<table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
	    <td class="smallText">' . $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS) . '</td>
	    <td align="right" class="smallText">' . TEXT_RESULT_PAGE . BLANK . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, olc_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</td>
	  </tr>
	</table>
');
}
$module_data = array();
if ($reviews_split->number_of_rows > 0) {
    $reviews_query = olc_db_query($reviews_split->sql_query);
    while ($reviews = olc_db_fetch_array($reviews_query)) {
        $module_data[] = array('PRODUCTS_IMAGE' => DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'], $reviews['products_name'], 'PRODUCTS_LINK' => olc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']), 'PRODUCTS_NAME' => $reviews['products_name'], 'AUTHOR' => $reviews['customers_name'], 'TEXT' => sprintf(TEXT_REVIEW_WORD_COUNT, olc_word_count($reviews['reviews_text'], BLANK)) . ')<br/>' . htmlspecialchars($reviews['reviews_text']) . '..', 'RATING' => olc_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews['reviews_rating'])));
    }
    $smarty->assign(MODULE_CONTENT, $module_data);
}
$main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'reviews' . HTML_EXT, SMARTY_CACHE_ID);
$smarty->assign(MAIN_CONTENT, $main_content);
require BOXES;
    olc_smarty_init($box_smarty, $cacheid);
    // include needed files
    require_once DIR_FS_INC . 'olc_get_products_name.inc.php';
    $products_id = $_GET['products_id'];
    if ($products_id) {
        if (CUSTOMER_ID) {
            $check_query = olc_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $products_id . "' and customers_id = '" . CUSTOMER_ID . APOS);
            $check = olc_db_fetch_array($check_query);
            $notification_exists = $check['count'] > 0;
        } else {
            $notification_exists = false;
        }
        $info_box_contents = array();
        $box_content0 = '
		<td class="infoBoxContents">
			<a href="' . olc_href_link(CURRENT_SCRIPT, olc_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">
			#
			</a>
		</td>
';
        $products_name = olc_get_products_name($products_id);
        $image = DIR_WS_IMAGES . 'box_products_notifications@.gif';
        if ($notification_exists) {
            $image = str_replace(ATSIGN, '_remove', $image);
            $box_content = str_replace(HASH, olc_image($image, IMAGE_BUTTON_REMOVE_NOTIFICATIONS), $box_content0);
            $box_content .= str_replace(HASH, sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, $products_name), $box_content0);
        } else {
            $image = str_replace(ATSIGN, EMPTY_STRING, $image);
            $box_content = str_replace(HASH, olc_image($image, IMAGE_BUTTON_NOTIFICATIONS), $box_content0);
            $box_content .= str_replace(HASH, sprintf(BOX_NOTIFICATIONS_NOTIFY, $products_name), $box_content0);
        }