Notice: session_start(): A session had already been started - ignoring in /hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtech/index.php on line 4

Warning: include_once(/hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtechhttp://impactdigital.work/include/global.php): failed to open stream: No such file or directory in /hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtech/index.php on line 10

Warning: include_once(): Failed opening '/hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtechhttp://impactdigital.work/include/global.php' for inclusion (include_path='.:/opt/alt/php74/usr/share/pear') in /hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtech/index.php on line 10

Notice: Undefined variable: iPath in /hermes/bosnacweb04/bosnacweb04ay/b1607/ipw.webmaria1/public_html/work/icomtech/index.php on line 11
') !== FALSE) || (stristr($decoded_raw_data, '<') !== FALSE && stristr($decoded_raw_data, 'script') !== FALSE && stristr($decoded_raw_data, '>') !== FALSE)) { echo '


The RAW data access method specified by the parameter value is not supported.

'; echo '

'; exit; } if ((stristr($raw_data, '<') !== FALSE && stristr($raw_data, 'style') !== FALSE && stristr($raw_data, '>') !== FALSE) || (stristr($decoded_raw_data, '<') !== FALSE && stristr($decoded_raw_data, 'style') !== FALSE && stristr($decoded_raw_data, '>') !== FALSE)) { echo '


The RAW data access method specified by the parameter value is not supported.

'; echo '

'; exit; } if (isset($_GET) && is_array($_GET)) { reset($_GET); while (list($key, ) = each($_GET)) { if (preg_match("/[^a-zA-Z0-9_\[\]\.;]/", $key) || stristr($key, 'script') !== FALSE || stristr($key, 'style') !== FALSE) { echo '


The GET data access method specified by the parameter value is not supported.

'; echo '

'; exit; } } reset($_GET); } $raw_data = $_SERVER['REQUEST_URI']; $decoded_raw_data = urldecode($_SERVER['REQUEST_URI']); if ((stristr($raw_data, '<') !== FALSE && stristr($raw_data, 'script') !== FALSE && stristr($raw_data, '>') !== FALSE) || (stristr($decoded_raw_data, '<') !== FALSE && stristr($decoded_raw_data, 'script') !== FALSE && stristr($decoded_raw_data, '>') !== FALSE)) { echo '


Invalid URL requested.

'; echo '

'; exit; } /** if (isset($_POST) && is_array($_POST)) { reset($_POST); while (list($key, ) = each($_POST)) { if (preg_match("/[^a-zA-Z0-9_\[\]\.;]/", $key) || stristr($key, 'script') !== FALSE || stristr($key, 'style') !== FALSE || stristr($_POST[$key], 'script>') !== FALSE) { echo '


The POST data access method specified by the parameter value is not supported.

'; echo '

'; exit; } } reset($_POST); } **/ /** * Security Check for _GET - Please do not change this line! */ if ((isset($_GET['q']) && preg_match("/[^0-9a-zA-Z\ \+\-\_\[\]]/", $_GET['q'])) || (isset($_GET['qView']) && preg_match("/[^onON]/", $_GET['qView'])) || (isset($_GET['cPath']) && !preg_match("/^\d{1}[0-9_]*/", $_GET['cPath'])) || (isset($_GET['products_id']) && preg_match("/[^0-9]/", $_GET['products_id'])) || (isset($_GET['deptID']) && preg_match("/[^0-9,]/", $_GET['deptID'])) || (isset($_GET['pID']) && preg_match("/[^0-9,]/", $_GET['pID'])) || (isset($_GET['cID']) && preg_match("/[^0-9,]/", $_GET['cID'])) || (isset($_GET['categories_id']) && preg_match("/[^0-9]/", $_GET['categories_id'])) || (isset($_GET['mID']) && preg_match("/[^0-9]/", $_GET['mID'])) || (isset($_GET['manufacturers_id']) && preg_match("/[^0-9]/", $_GET['manufacturers_id'])) || (isset($_GET['pkey']) && preg_match("/[^uo0-9]/", $_GET['pkey'])) || (isset($_GET['pfrom']) && preg_match("/[^0-9\.]/", $_GET['pfrom'])) || (isset($_GET['pf']) && preg_match("/[^0-9\.]/", $_GET['pf'])) || (isset($_GET['pto']) && preg_match("/[^0-9\.]/", $_GET['pto'])) || (isset($_GET['pt']) && preg_match("/[^0-9\.]/", $_GET['pt'])) || (isset($_GET['page']) && preg_match("/[^0-9]/", $_GET['page'])) || (isset($_GET['sort']) && preg_match("/[^0-9ad]/", $_GET['sort'])) || (isset($_GET['color']) && preg_match("/[^0-9a-zA-Z\ \+\-\_]/", $_GET['color'])) || (isset($_GET['size']) && preg_match("/[^0-9]/", $_GET['size'])) || (isset($_GET['texture']) && preg_match("/[^0-9]/", $_GET['texture'])) || (isset($_GET['hairtype']) && preg_match("/[^0-9]/", $_GET['hairtype'])) || (isset($_GET['length']) && preg_match("/[^0-9]/", $_GET['length'])) || (isset($_GET['capsize']) && preg_match("/[^0-9]/", $_GET['capsize'])) || (isset($_GET['construction']) && preg_match("/[^0-9]/", $_GET['construction'])) || (isset($_GET['extlength']) && preg_match("/[^0-9]/", $_GET['extlength'])) || (isset($_GET['x']) && preg_match("/[^0-9\-]/", $_GET['x'])) || (isset($_GET['y']) && preg_match("/[^0-9\-]/", $_GET['y'])) || (isset($_GET['in']) && preg_match("/[^0-9]/", $_GET['in'])) ) { echo '


The data access method specified by the parameter value is not supported.

'; echo '

'; exit; // The data access method specified by parameter value is not supported } $nsConfig = array(); // Set Path Info for the current script $nsConfig['_pathinfo_'] = pathinfo($_SERVER['PHP_SELF']); $nsConfig['_pathinfo_']['dirname'] = rtrim($nsConfig['_pathinfo_']['dirname'], '/') . '/'; // Options for Templates $nsConfig['Templates'] = array( 'selected' => 'default' ); // Options for products $nsConfig['Products'] = array( 'EnableProductRefer' => TRUE ); // include the global configuration file include_once(dirname(__FILE__) . '/global.php'); // include the security definition include_once($cfg['Path']['rs_includes'] . 'security.php'); // include the optimizer definition include_once($cfg['Path']['rs_includes'] . 'optimizer.php'); // include the runtime magic_quotes handling library include_once($cfg['Path']['rs_functions'] . 'nsCore.php'); // define the filenames used in the project define('FILENAME_ALSO_PURCHASED_PRODUCTS','also_purchased_products.php'); define('FILENAME_ACCOUNT_EDIT', 'setting.php'); define('FILENAME_ACCOUNT_EDIT_PROCESS', 'setting_action.php'); define('FILENAME_ACCOUNT_HISTORY', 'order_list.php'); define('FILENAME_ACCOUNT_HISTORY_INFO', 'order_detail.php'); define('FILENAME_ADDRESS_BOOK', 'address_book.php'); define('FILENAME_ADDRESS_BOOK_PROCESS', 'address_book_process.php'); define('FILENAME_SEARCH', 'search.php'); define('FILENAME_SEARCH_RESULT', 'search_result.php'); define('FILENAME_CHECKOUT_ADDRESS', 'address.php'); define('FILENAME_CHECKOUT_SHIPPING', 'shipping.php'); define('FILENAME_CHECKOUT_INFORMATION', 'inform.php'); define('FILENAME_CHECKOUT_CONFIRMATION','confirm.php'); define('FILENAME_CHECKOUT_PAYMENT', 'payment.php'); define('FILENAME_CHECKOUT_PROCESS', 'process.php'); define('FILENAME_CHECKOUT_SUCCESS', 'success.php'); define('FILENAME_CHECKOUT_GATEWAY', 'gateway.php'); define('FILENAME_CONTACT_US', 'contact_us.php'); define('FILENAME_SIGNUP', 'signup.php'); define('FILENAME_SIGNUP_SUCCESS', 'signup_success.php'); define('FILENAME_DEFAULT', 'index.php'); define('FILENAME_LOGIN', 'login.php'); define('FILENAME_LOGOFF', 'logoff.php'); define('FILENAME_PW_RETRIEVE', 'retrieve.php'); define('FILENAME_PRODUCT_REVIEWS', 'reviews.php'); define('FILENAME_PRODUCT_REVIEWS_INFO', 'reviews_info.php'); define('FILENAME_PRODUCT_REVIEWS_WRITE','reviews_write.php'); define('FILENAME_PRODUCT_REFER', 'product_refer.php'); define('FILENAME_PRODUCT_REFER_SUCCESS', 'product_refer_success.php'); define('FILENAME_REVIEWS', 'reviews.php'); define('FILENAME_POLICY', 'policy.php'); define('FILENAME_SHOPPING_CART', 'cart.php'); define('FILENAME_SPECIALS', 'specials.php'); define('FILENAME_SUBSCRIBE', 'subscribe.php'); define('FILENAME_REFER', 'refer.php'); define('FILENAME_IMAGE_OPEN', 'iopen.php'); define('FILENAME_INFO_OPEN', 'info.php'); define('FILENAME_ADMIN_ORDERS', $cfg['Path']['ws_admin'] . 'orders.php'); define('FILENAME_FEATURED_NEW', 'new_items.php'); define('FILENAME_FEATURED_HOT', 'hot_items.php'); define('FILENAME_FEATURED_BEST', 'best_items.php'); define('FILENAME_FEATURED_SALE', 'sale_items.php'); // include the database definition include_once($cfg['Path']['rs_includes'] . 'database.php'); define('MAX_DISPLAY_SEARCH_RESULTS', 30); // how many products to list define('MAX_DISPLAY_PAGE_LINKS', 10); // how many page numbers to link for page-sets define('MAX_ALLOWED_CART_ITEMS', 5); // max # of cart items for non-member define('CART_DISPLAY', TRUE); // Enable to view the shopping cart after adding a product define('TAX_VALUE', 0); // propducts tax define('TAX_DECIMAL_PLACES', 2); // 16% - If this were 2 it would be 16.00% define('TABLE_WIDTH_INDENT', 0); define('TABLE_WIDTH_LEFT', 300); define('TABLE_WIDTH_CENTER',700); define('TABLE_WIDTH_RIGHT', 0); define('TABLE_WIDTH_TOTAL', TABLE_WIDTH_LEFT+TABLE_WIDTH_CENTER+TABLE_WIDTH_RIGHT); define('BOX_WIDTH', 150); // how wide the boxes should be in pixels (default: 125) define('IMG_WIDTH_TINY', 60); // 125 (small) define('IMG_HEIGHT_TINY', 60); // 94 (small) define('IMG_WIDTH_SMALL', 200); // 450 (large) define('IMG_HEIGHT_SMALL', 200); // 338 (large) define('IMG_WIDTH_MEDIUM', 200); define('IMG_HEIGHT_MEDIUM', 200); define('USE_IMAGE_SIZE', TRUE); define('IMG_THUMBNAIL_SIZE', 45); define('IMG_THUMBNAIL_WIDTH', 45); define('IMG_THUMBNAIL_HEIGHT',90); define('CATEGORIES_DELIMETER_CHAR', '_'); define('ENABLE_MULTIPLE_CATEGORY_PRODUCTS', FALSE); define('ENABLE_SPECIAL_ORDER_OPTION', TRUE); define('OUT_OF_CATEGORY_DISPLAY', FALSE); // Depreciated on 05/04/2009 //XXXXX define('OUT_OF_STOCK_DISPLAY', FALSE); define('PRODUCT_LIST_DEFAULT_COLUMN', 'products_name'); // used in './includes/local/create_products_column_order.php' and './includes/template/ezstyle/search_main.php' define('PRODUCT_LIST_DEFAULT_ORDER_BY', 'precedence, products_date_added desc, products_sku, sku_base'); define('PRODUCT_LIST_DEFAULT_SORT_COLUMN', 8); // p2c.precedence = 6, products_date_added = 5, products_price = 3, products_name = 2 define('PRODUCT_LIST_DEFAULT_SORT_ORDER', 'a'); define('PRODUCT_PRICE_FOR_LOGIN' , FALSE); define('PRODUCT_INFO_MAX_IMAGE_WITH' , 350); // options for detail.php define('PRODUCT_INFO_RETAIL_PRICE_DISPLAY' , FALSE); define('PRODUCT_INFO_SAVE_PRICE_DISPLAY' , FALSE); define('PRODUCT_INFO_SKU_DISPLAY' , true); define('PRODUCT_LIST_SKU_DISPLAY' , true); define('ENABLE_PRODUCT_REFER' , FALSE); define('BOX_HEADING_BACKGROUND_COLOR', '#AABBDD'); define('TOP_BAR_BACKGROUND_COLOR', '#AABBDD'); define('SUB_BAR_BACKGROUND_COLOR', '#F4F7FD'); define('TABLE_ROW_BACKGROUND_COLOR', '#FFFFFF'); define('TABLE_ALT_BACKGROUND_COLOR', '#F4F7FD'); define('SPECIALS_PRICE_COLOR', '#AA0000'); // font color for the new price of products on special // set to "1" if extended email check function should be used // If you're testing locally and your webserver has no possibility to query // a dns server you should set this to "0" ! define('ENTRY_EMAIL_ADDRESS_CHECK', FALSE); // Control what fields of the customer table are used define('EXTERNAL_LOGIN_TYPE', 0); // 0 for nothing, 1 for top, 2 for left define('USE_EXTENTED_ACCOUNT', true); define('ACCOUNT_GENDER', FALSE); define('ACCOUNT_DOB', FALSE); define('ACCOUNT_SUBURB', FALSE); define('ACCOUNT_STATE', TRUE); define('ACCOUNT_COUNTRY', TRUE); define('ACCOUNT_FAXNUMBER', TRUE); // Advanced Search controls define('ADVANCED_SEARCH_DEFAULT_OPERATOR', 'and'); // default boolean search operator: or/and // Min/Max Controls for also_purchased_products.php : 'Customers who bought this product also purchased' module define('USE_DISPLAY_ALSO_PURCHASED', true); define('MIN_DISPLAY_ALSO_PURCHASED', 1); // Min no. of products in purchased list to qualify define('MAX_DISPLAY_ALSO_PURCHASED', 5); // Max no. of products to display // Min/Max Controls for also_purchased_products.php : 'Customers who bought this product also purchased' module define('USE_DISPLAY_RELATED_PRODUCTS', FALSE); define('MIN_DISPLAY_RELATED_PRODUCTS', 1); // Min no. of products in purchased list to qualify define('MAX_DISPLAY_RELATED_PRODUCTS', 10); // Max no. of products to display // Manufacturers box define('DISPLAY_MANUFACTURERS_BOX', FALSE); // Manufacturers Box: 0=disable; 1=enable // include the database functions include_once($cfg['Path']['rs_functions'] . 'nsDB.php'); /* make a connection to the database... now if (!nsDB_Connect()) { echo '


We are currently experiencing a very high volume of web traffic on our website.' . '
It may take longer than usual to load. Please try again a few minutes later.
We thank you for your patience.

'; echo '

'; nsAPI_Exit(); } */ // include timer class include_once($cfg['Path']['rs_classes'] . 'nsTimer.php'); // include bitmask class to control all menus include_once($cfg['Path']['rs_classes'] . 'nsBitmask.php'); /* $hMainMenus = new nsBitmask; $hMainMenus->Set($cfg['MainMenus']['top']); $hMainMenus->Set($cfg['MainMenus']['bottom']); $hMainMenus->Set($cfg['MainMenus']['navigation']); // $hMainMenus->Set($cfg['MainMenus']['banner']); $hLeftMenus = new nsBitmask; // $hLeftMenus->Set($cfg['LeftMenus']['material']); // $hLeftMenus->Set($cfg['LeftMenus']['special']); // $hLeftMenus->Set($cfg['LeftMenus']['category']); // $hLeftMenus->Set($cfg['LeftMenus']['benefits']); // $hLeftMenus->Set($cfg['LeftMenus']['price']); // $hLeftMenus->Set($cfg['LeftMenus']['color']); $hRightMenus = new nsBitmask; */ // include image protector class //include_once($cfg['Path']['rs_classes'] . 'nsImgLoader.php'); //include_once($cfg['Path']['rs_classes'] . 'nsMD5.php'); // include shopping cart class include_once($cfg['Path']['rs_classes'] . 'nsCart.php'); // include page view class include_once($cfg['Path']['rs_classes'] . 'nsHistory.php'); // include coupon classes include_once($cfg['Path']['rs_classes'] . 'nsCoupon.php'); // define how the session functions will be used session_save_path($cfg['Path']['fs_cgibin'] . 'tmp'); session_cache_limiter('nocache'); session_cache_expire(60); ini_set("session.gc_maxlifetime", "3600"); include_once($cfg['Path']['rs_functions'] . 'nsSession.php'); /* lets start our session if (!SID && $_GET[nsSession_Name()]) { nsSession_ID( $_GET[nsSession_Name()] ); } nsSession_Start(); if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, "/"); } if (!isset($_SESSION['_nsCart'])) { $cart = new nsCart; $_SESSION['_nsCart'] = $cart; } $nsCart = &$_SESSION['_nsCart']; // Initialize ajax mode $nsCart->SetAjaxMode(false); // Set Quantity Discount // SetQtyDiscount(num_of_quantity, price_column_name); $nsCart->SetQtyDiscount(); // set the application parameters (can be modified through the administration tool) $dbcfg_query = nsDB_Query('select configuration_key as cfgKey, configuration_value as cfgValue from configuration'); while ($dbcfg_value = nsDB_FetchArray($dbcfg_query)) { if (!defined($dbcfg_value['cfgKey'])) { define($dbcfg_value['cfgKey'], $dbcfg_value['cfgValue']); $cfg['DB'][$dbcfg_value[cfgKey]] = $dbcfg_value[cfgValue]; } } $_hCfgDB = &$cfg['DB']; */ // define our general functions used application-wide include_once($cfg['Path']['rs_functions'] . 'nsGlobal.php'); include_once($cfg['Path']['rs_functions'] . 'nsCommon.php'); /* // language if ( (!$language) || ($_GET['language']) ) { $language = nsAPI_GetLanguagesDir($_GET['language']); if (!$language) $language = nsAPI_GetLanguagesDir($cfg['Global']['default_language']); } $_SESSION['language'] = $language; // $cfg['Path']['rs_languages'] is set in global.php $cfg['Path']['rs_languages'] .= ($_SESSION['language'] . '/'); // currency if ( (!$currency) || ($_GET['currency']) ) { $currency = nsAPI_CurrencyExists($_GET['currency']); if (!$currency) $currency = $cfg['Global']['default_currency']; } if ($currency) { $_SESSION['currency'] = $currency; $currencies_query = nsDB_Query("select symbol_left, symbol_right, decimal_point, thousands_point, decimal_places from currencies where code = '" . $currency . "'"); $currencies = nsDB_FetchArray($currencies_query); if ($currencies['decimal_places']) { $cfg['Global']['decimal_places'] = $currencies['decimal_places']; } } */ // include the currency rates, and the language translations include_once($cfg['Path']['rs_includes'] . 'data/rates.php'); include_once($cfg['Path']['fs_languages'] . $_SESSION['language'] . '.php'); // Include the password crypto functions include_once($cfg['Path']['rs_functions'] . 'nsCrypt.php'); // split-page-results include_once($cfg['Path']['rs_classes'] . 'nsSplitResult.php'); // infobox include_once($cfg['Path']['rs_classes'] . 'boxes.php'); /* // Coupon actions if (!isset($_SESSION['_nsCoupon'])) { $_coupon = new nsCoupon; $_SESSION['_nsCoupon'] = $_coupon; } $nsCoupon = &$_SESSION['_nsCoupon']; //ZZZ $nsCoupon->Init(); */ // Shopping cart actions if ($_GET['action'] || $_GET['action'] == 'cart') { //XXXXX $goto = (CART_DISPLAY) ? FILENAME_SHOPPING_CART : basename($_SERVER['PHP_SELF']); //XXXXX $parameters = (CART_DISPLAY) ? array('action', 'cPath', 'cart_id', 'products_id', 'categories_id', 'registries_id', 'manufacturers_id') : array('action'); $goto = (CART_DISPLAY) ? FILENAME_SHOPPING_CART : $_SERVER['PHP_SELF']; $parameters = array('action', 'cPath', 'cart_id', 'products_id', 'categories_id', 'registries_id', 'manufacturers_id'); if (stripos(basename($_SERVER['PHP_SELF']), 'ajaxCart.php') !== false) { $nsCart->SetAjaxMode(true); } // echo '
'; // // echo '$_BROWSER : ' . "\n"; // print_r($_GET); // print_r($_POST); // // echo '$_SESSION : ' . "\n"; // /// print_r($_SESSION); // echo '
'; // exit; // // // // Check # of cart items for non-member // // // if ( $_POST['action_type'] == 'ajax_cart' || $_POST['action_type'] == 'set_item' || $_GET['action'] == 'add_update_product' ) { // if ( !nsSession_IsRegistered('customer_id') ) { // $cart_query = nsDB_Query("SELECT COUNT( * ) AS cart_items FROM customers_basket WHERE customers_id=0 AND session_id='" . nsSession_ID() . "'"); // $cart_values = nsDB_FetchArray($cart_query); // // if ( intval($cart_values['cart_items']) >= MAX_ALLOWED_CART_ITEMS ) { // $nsCart->SetError('Exceed max allowed cart items for non-members'); // header('Location: ' . nsAPI_GetUrl($goto, nsAPI_GetUrlParams($parameters), 'NONSSL')); // nsAPI_Exit(); // } // } // } if ($_POST['action_type'] == 'ajax_cart') { // customer wants to update the product quantity in their shopping cart $nsCart->AffectedReset(); if (is_array($_POST['products_id']) && is_array($_POST['cart_quantity'])) { for ($i = 0; $i < sizeof($_POST['products_id']); $i++) { if (intval($_POST['cart_quantity'][$i])) { $attributes = $_POST['id'][$_POST['cart_id'][$i]] ? $_POST['id'][$_POST['cart_id'][$i]] : ''; $specials = $_POST['specials'][$_POST['cart_id'][$i]] ? $_POST['specials'][$_POST['cart_id'][$i]] : ''; $nsCart->SetItem($_POST['cart_id'][$i], $_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, $_POST['categories_id'][$i], $_POST['registries_id'][$i], $specials); } } } else { if (preg_match('/^[0-9]+$/', $_POST['products_id'])) { $nsCart->SetItem($_POST['cart_id'], $_POST['products_id'], $_POST['cart_quantity'], $_POST['id'], $_POST['categories_id'], $_POST['registries_id'], $_POST['specials']); } } $nsCart->cleanup(); // nsDB_Query("OPTIMIZE TABLE customers_basket, customers_basket_attributes"); // re-apply coupon if (isset($nsCoupon->_cCode)) { $couponArray = $nsCoupon->GetInfo($nsCoupon->_cCode, $nsCart->GetValidTotalAmount('Coupon', $nsCoupon->_cCode)); $type = ($couponArray['type'] == '0' ? 'A' : 'P'); if ($couponArray !== false && $nsCoupon->Expired() !== true && $nsCoupon->Eligible($_SESSION['customer_id']) === true && $nsCoupon->Redeemed($_SESSION['customer_id']) !== true) { if ($nsCart->SetDiscount('Coupon', $couponArray['type'], $couponArray['code'], $couponArray['amount']) !== false) { // nothing to do } } } } elseif ($_POST['action_type'] == 'set_item' || $_GET['action'] == 'add_update_product') { // customer wants to update the product quantity in their shopping cart $nsCart->AffectedReset(); if (is_array($_POST['products_id']) && is_array($_POST['cart_quantity'])) { /***** original for single for ($i = 0; $i < sizeof($_POST['products_id']); $i++) { $attributes = $_POST['id'][$_POST['cart_id'][$i]] ? $_POST['id'][$_POST['cart_id'][$i]] : ''; $specials = $_POST['specials'][$_POST['cart_id'][$i]] ? $_POST['specials'][$_POST['cart_id'][$i]] : ''; $nsCart->SetItem($_POST['cart_id'][$i], $_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, $_POST['categories_id'][$i], $_POST['registries_id'][$i], $specials); } *****/ /***** for multiple input *****/ for ($i = 0; $i < sizeof($_POST['products_id']); $i++) { $cart_id = $_POST['cart_id'][$i]; if (strlen($_POST['id'][$cart_id]) && strpos($cart_id, '_') !== FALSE) { // clear real key for insertion $_POST['cart_id'][$i] = ''; } $attributes = $_POST['id'][$cart_id]; $specials = $_POST['specials'][$cart_id] ? $_POST['specials'][$cart_id] : ''; $nsCart->SetItem($_POST['cart_id'][$i], $_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, $_POST['categories_id'][$i], $_POST['registries_id'][$i], $specials); } } else { if (preg_match('/^[0-9]+$/', $_POST['products_id'])) { $nsCart->SetItem($_POST['cart_id'], $_POST['products_id'], $_POST['cart_quantity'], $_POST['id'], $_POST['categories_id'], $_POST['registries_id'], $_POST['specials']); } } $nsCart->cleanup(); // nsDB_Query("OPTIMIZE TABLE customers_basket, customers_basket_attributes"); // re-apply coupon if (isset($nsCoupon->_cCode)) { $couponArray = $nsCoupon->GetInfo($nsCoupon->_cCode, $nsCart->GetValidTotalAmount('Coupon', $nsCoupon->_cCode), $_POST['products_id']); $type = ($couponArray['type'] == '0' ? 'A' : 'P'); if ($couponArray === false) { // clear invalid coupon $nsCart->ResetDiscount(); $nsCoupon->Init(); //ZZ $nsCart->SetDiscount('Coupon', $couponArray['type'], $nsCoupon->_cCode); } elseif ($couponArray !== false && $nsCoupon->Expired() !== true && $nsCoupon->Eligible($_SESSION['customer_id']) === true && $nsCoupon->Redeemed($_SESSION['customer_id']) !== true) { if ( $nsCoupon->getValidProductCount() > 0 ) { if ($nsCart->SetDiscountProduct('Coupon', $couponArray['type'], $nsCoupon) !== false) { // nothing to do } } else { if ($nsCart->SetDiscount('Coupon', $couponArray['type'], $couponArray['code'], $couponArray['amount']) !== false) { // nothing to do } } } } if ($_GET['action'] == 'add_update_product') { header('Location: ' . nsAPI_GetUrl($goto, nsAPI_GetUrlParams($parameters), 'NONSSL')); nsAPI_Exit(); } } elseif ($_GET['action'] == 'remove_product') { // customer wants to remove a product from their shopping cart $nsCart->RemoveItem($_GET['cart_id']); $nsCart->SetDiscount('Coupon'); $couponArray = $nsCoupon->GetInfo($nsCoupon->_cCode, $nsCart->GetValidTotalAmount('Coupon', $nsCoupon->_cCode), $nsCart->GetIndexArray()); $type = ($couponArray['type'] == '0' ? 'A' : 'P'); //ZZZ if ($couponArray !== false && $nsCoupon->Expired() !== true && $nsCoupon->Redeemed($_SESSION['customer_id']) !== true) { if ($couponArray !== false && $nsCoupon->Exceed() !== true && $nsCoupon->Eligible($_SESSION['customer_id']) === true && $nsCoupon->Expired() !== true) { if( $nsCoupon->getValidProductCount() > 0 ) { if ($nsCart->SetDiscountProduct('Coupon', $couponArray['type'], $nsCoupon) !== false) { // nothing to do } } else { if ($nsCart->SetDiscount('Coupon', $couponArray['type'], $couponArray['code'], $couponArray['amount']) !== false) { // nothing to do } } } if (strlen($_GET['goto'])) { header('Location: ' . nsAPI_GetUrl($_GET['goto'], nsAPI_GetUrlParams($parameters), 'NONSSL')); nsAPI_Exit(); } } elseif ($_POST['action_type'] == 'remove_all') { // customer wants to remove all products from their shopping cart $nsCart->Init(TRUE); $nsCoupon->Init(); // remove _nsCheckout session unset($_POST['_sessionSET']); unset($_SESSION['_nsCheckout']); unset($_SESSION['_nsCoupon_PCTOFF']); unset($_SESSION['_nsCoupon_TYPE']); //header('Location: ' . nsAPI_GetUrl($goto, '', 'NONSSL')); //nsAPI_Exit(); } elseif ($_POST['action_type'] == 'set_coupon') { // $_couponPCT = new nsCoupon; $nsCoupon->Init(); $nsCoupon->GetInfoByID( 1, $nsCart->GetIndexArray() ); if( $nsCoupon->Expired() !== true && strtoupper( $_POST['coupon_code'] ) == strtoupper($nsCoupon->_cCode) ) { $_SESSION['_nsCoupon_PCTOFF'] = 'YES'; $_SESSION['_nsCoupon_TYPE'] = '1'; } else { $nsCoupon->GetInfoByID( 2, $nsCart->GetIndexArray() ); if( $nsCoupon->Expired() !== true && strtoupper( $_POST['coupon_code'] ) == strtoupper($nsCoupon->_cCode) ) { $_SESSION['_nsCoupon_PCTOFF'] = 'YES'; $_SESSION['_nsCoupon_TYPE'] = '2'; } else { $couponArray = $nsCoupon->GetInfo($_POST['coupon_code'], $nsCart->GetValidTotalAmount('Coupon', $nsCoupon->_cCode), $_POST['products_id']); $type = ($couponArray['type'] == '0' ? 'A' : 'P'); if ($couponArray !== false && $nsCoupon->Expired() !== true && $nsCoupon->Eligible($_SESSION['customer_id']) === true && $nsCoupon->Redeemed($_SESSION['customer_id'], YC_GRADE_MIN_ADMIN_LEVEL) !== true) { if ( $nsCoupon->getValidProductCount() > 0 ) { if ($nsCart->SetDiscountProduct('Coupon', $couponArray['type'], $nsCoupon) !== false) { // nothing to do } } else { if ($nsCart->SetDiscount('Coupon', $couponArray['type'], $couponArray['code'], $couponArray['amount']) !== false) { // nothing to do } } } } } } elseif ($_POST['action_type'] == 'remove_discount') { $nsCart->SetDiscount($_GET['discount']); $nsCoupon->Init(); unset($_SESSION['_nsCoupon_PCTOFF']); unset($_SESSION['_nsCoupon_TYPE']); // From Admin Order page } elseif ($_GET['action'] == 'add_to_order' && $_GET['oID']) { if (isset($_SESSION['customer_grade']) && $_SESSION['customer_grade'] <= YC_GRADE_MANAGER) { $_SESSION['_Admin']['oID'] = $_GET['oID']; } } } // calculate category path $cPath = $_GET['cPath']; if (! $cPath) { if ($_GET['products_id']) { $p_query = nsDB_Query("select categories_id as cid from products where products_id='" . $_GET['products_id'] . "'"); $p_values = nsDB_FetchArray($p_query); $cPath = nsAPI_GetCategoriesPath($p_values['cid']); } } if ($cPath) { $cPath_array = explode('_', $cPath); $current_category_depth = sizeof($cPath_array)-1; $current_category_id = $cPath_array[$current_category_depth]; $cInfo_array = nsAPI_GetCategoriesInfo($cPath, TRUE); $cInfo_cursor = $cInfo_array[$current_category_depth]; if ($cInfo_array[$current_category_depth-1]['cid']) { $cInfo_parent = $cInfo_array[$current_category_depth-1]; } $cInfo_top = $cInfo_array[0]; } else { $current_category_id = 0; $current_category_depth = 0; } // manufacturers action if (defined('SYS_MANUFACTURER_SUPPORT') && SYS_MANUFACTURER_SUPPORT) { if (isset($_GET['manufacturers_id']) && intval($_GET['manufacturers_id'])) { $mInfo_array = nsAPI_GetManufacturersInfo($_GET['manufacturers_id'], TRUE); $mInfo_cursor = $mInfo_array[0]; } if (isset($_GET['categories_id']) && intval($_GET['categories_id'])) { $mInfo_cPath = nsAPI_GetCategoriesPath($_GET['categories_id']); $mInfo_cDepth = preg_match_all("/_/", $mInfo_cPath, $dummy); $mInfo_cInfo_array = nsAPI_GetCategoriesInfo($mInfo_cPath, false); $mInfo_cInfo_cursor = $mInfo_cInfo_array[$mInfo_cDepth]; } } /* // gift registry action if (nsSession_IsRegistered('customer_id')) { $regInfo_array = nsAPI_GetRegistriesInfo($_SESSION['customer_id'], TRUE); } // PageView History actions if (!isset($_SESSION['_nsHistory'])) { $_history = new nsHistory; $_SESSION['_nsHistory'] = $_history; } $nsHistory = &$_SESSION['_nsHistory']; $nsHistory->Set(16); */ // featured categories info $featured_categories = array(); if (defined('USE_DISPLAY_HOTBUYS') && USE_DISPLAY_HOTBUYS) $featured_categories['MONTHLY SPECIALS'] = array(FILENAME_FEATURED_HOT, HOTBUYS_CUTOFF_DAYS); if (defined('USE_DISPLAY_NEWITEMS') && USE_DISPLAY_NEWITEMS) $featured_categories['New Arrival'] = array(FILENAME_FEATURED_NEW, NEWITEMS_CUTOFF_DAYS); if (defined('USE_DISPLAY_BESTSELLERS') && USE_DISPLAY_BESTSELLERS) $featured_categories['Best Seller'] = array(FILENAME_FEATURED_BEST, BESTSELLERS_CUTOFF_DAYS); $keep_spel_array = array(); // refer action if (strlen($_GET['refer_key']) > 0) { // check for the 'refer_key' $refer_info = nsDB_Query("select * from products_refer where refer_key='" . $_GET['refer_key'] . "' and refer_status=0"); if (nsDB_NumRows($refer_info)) { setcookie('refer_key', $_GET['refer_key'], time()+(86400*30), '/'); } } // Affiliates action if (isset($_GET['SSAID']) && $_GET['SSAID']) { setcookie('SSAID', $_GET['SSAID'], time()+(86400*60), '/'); } // Checkout Session Control if (sizeof($_POST['_sessionSET'])) { // Save the form values into session for ($i = 0; $i < sizeof($_POST['_sessionSET']); $i++) { $key = $_POST['_sessionSET'][$i]; $_SESSION['_nsCheckout'][$key] = $_POST[$key]; } } if (sizeof($_POST['_sessionINIT'])) { // Remove values from session for ($i = 0; $i < sizeof($_POST['_sessionINIT']); $i++) { $key = $_POST['_sessionINIT'][$i]; unset($_SESSION[$key]); } } // Product Price Control $gPriceColumn = (isset($_SESSION['price_column']) ? $_SESSION['price_column'] : 'p.products_price'); $gPriceColumnAs = 'price_column'; // override options for DEBUG and DEVELOPMENT if (isset($_SESSION['customer_grade']) && $_SESSION['customer_grade'] == YC_GRADE_ADMIN) { define('__IS_ADMIN__', true); } else { define('__IS_ADMIN__', false); } if ((strpos($_SERVER['REMOTE_ADDR'], "71.246.59.") !== false || strpos($_SERVER['REMOTE_ADDR'], "96.247.2.") !== false || strpos($_SERVER['REMOTE_ADDR'], "104.1.51.") !== false) && (isset($_SESSION['customer_grade']) && $_SESSION['customer_grade'] == YC_GRADE_ADMIN) ) { define('__INLINE_CODE__', true); define('__INLINE_DEBUG__', true); define('ENABLE_GUEST_CHECKOUT', false); @ini_set('display_errors', TRUE); // $hLeftMenus->Remove($cfg['LeftMenus']['material']); // $__gEnable_Paypal_ExpressCheckout = true; // $__gEnable_Google_Checkout = true; } else { define('ENABLE_GUEST_CHECKOUT', false); } /* // // User Agent Dection // include_once($cfg['Path']['rs_functions'] . 'nsAgentDetect.php'); $_BROWSER = nsAPI_BrowserDetect('full_assoc'); // $_BROWSER['OS'] = nsAPI_BrowserDetect('os'); */ // // robot Dection // $_searchengines = array( 'Googlebot', 'Slurp', 'search.msn.com', 'nutch', 'simpy', 'bot', 'ASPSeek', 'crawler', 'msnbot', 'Libwww-perl', 'FAST', 'Baidu' ); $_is_robot = false; foreach ($_searchengines as $searchengine) { if (!empty($_SERVER['HTTP_USER_AGENT']) && strpos(strtolower($_SERVER['HTTP_USER_AGENT']), strtolower($searchengine)) !== false) { $_is_robot = true; break; } } // // Null Action // $_SCRIPT['NullAction'] = 'href="javascript:jsAPI_Void();"'; $_SCRIPT['NullAnchor'] = 'href="javascript:jsAPI_Void();"'; if (stripos($_SERVER['HTTP_USER_AGENT'], "Firefox") !== false && stripos($_SERVER['HTTP_USER_AGENT'], 'Windows') !== false) { $_SCRIPT['NullAction'] = ''; } if (isset($_SESSION['customer_grade']) && $_SESSION['customer_grade'] <= YC_GRADE_STORE_MANAGER) { $gEventControl = ''; $__gEnable_Estimated_Delivery_Date = false; } else { // $gEventControl = ' oncontextmenu="return false;" '; } ?> ICOMTECH

iComTech

iComTech is a professional solution providing distributor of serial & enthernet communications, embedded computing, test & measurement and automation components together with highly customized service, technical support, inventory logistics and quick turn custom configure industrial computers. Our clients range from Intelligent Transportation, Oil and Refinery, Factory Automations, Renewable Energy, Power and Utility, and Internet Infrastructure. Our goal is to enhance the industrial infrastructure efficiency of today while reducing power and energy consumption for tomorrow.