function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes, $xtPrice; if (MODULE_SHIPPING_TABLE_MODE == 'price') { $order_total = $xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()); } else { $order_total = $shipping_weight; } $table_cost = preg_split("/[:,]/", MODULE_SHIPPING_TABLE_COST); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 $size = sizeof($table_cost); for ($i = 0, $n = $size; $i < $n; $i += 2) { if ($order_total <= $table_cost[$i]) { $shipping = $table_cost[$i + 1]; break; } } if (MODULE_SHIPPING_TABLE_MODE == 'weight') { $shipping = $shipping * $shipping_num_boxes; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_TABLE_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } return $this->quotes; }
function _setCode($code = 'CC', $payment_method = 'ACC') { $this->module = $code; $this->method = $payment_method; $this->code = 'moneybookers_' . strtolower($code); if (defined('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_TEXT_TITLE')) { $this->title = constant('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_TEXT_TITLE'); $this->description = constant('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_TEXT_DESCRIPTION'); $this->info = constant('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_TEXT_INFO'); } if (defined('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_STATUS')) { $this->sort_order = constant('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_SORT_ORDER'); $this->enabled = constant('MODULE_PAYMENT_MONEYBOOKERS_' . strtoupper($code) . '_STATUS') == 'true' ? true : false; $this->tmpStatus = constant('_PAYMENT_MONEYBOOKERS_TMP_STATUS_ID'); } if (defined('_VALID_XTC')) { $icons = explode(',', $this->images); $accepted = ''; foreach ($icons as $key => $val) { $accepted .= xtc_image('../images/icons/moneybookers/' . $val) . ' '; } if ($this->allowed != '') { $this->title .= ' (' . $this->allowed . ')'; } $this->title .= '<br />' . $accepted; } }
function xtc_display_banner($action, $identifier) { if ($action == 'dynamic') { $banners_query = xtc_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'"); $banners = xtc_db_fetch_array($banners_query); if ($banners['count'] > 0) { $banner = xtc_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . xtc_db_input($identifier) . "'"); } else { return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>'; } } elseif ($action == 'static') { if (is_array($identifier)) { $banner = $identifier; } else { $banner_query = xtc_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . xtc_db_input($identifier) . "'"); if (xtc_db_num_rows($banner_query)) { $banner = xtc_db_fetch_array($banner_query); } else { return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>'; } } } else { return '<strong>XTC ERROR! (xtc_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</strong>'; } if (xtc_not_null($banner['banners_html_text'])) { $banner_string = $banner['banners_html_text']; } else { $banner_string = '<a href="' . xtc_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . xtc_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>'; } xtc_update_banner_display_count($banner['banners_id']); return $banner_string; }
function selection() { if (MODULE_PAYMENT_MASTERPAYMENT_CREDIT_CARD_ICON == 'true') { $content = array(); $content = array_merge($content, array(array('title' => ' ', 'field' => xtc_image(DIR_WS_ICONS . 'masterpayment_credit_card.gif')))); } return array('id' => $this->code, 'module' => $this->title_checkout, 'description' => $this->info, 'fields' => $content); }
function selection() { if (MODULE_PAYMENT_MASTERPAYMENT_RECHNUNGSKAUF_ICON == 'true') { $content = array(); $content = array_merge($content, array(array('title' => ' ', 'field' => xtc_image(DIR_WS_ICONS . 'masterpayment_rechnungskauf.gif')))); } return array('id' => $this->code, 'module' => $this->title_checkout, 'description' => $this->info, 'fields' => $content); }
function selection() { if (MODULE_PAYMENT_MASTERPAYMENT_ELV_ICON == 'true') { $content = array(); $content = array_merge($content, array(array('title' => ' ', 'field' => xtc_image(DIR_WS_ICONS . 'masterpayment_elv.gif')))); } return array('id' => $this->code, 'module' => $this->title_checkout, 'description' => MODULE_PAYMENT_MASTERPAYMENT_ELV_TEXT_INFO, 'fields' => $content); }
function selection() { if (MODULE_PAYMENT_MASTERPAYMENT_SOFORTBANKING_ICON == 'true') { $content = array(); $content = array_merge($content, array(array('title' => ' ', 'field' => xtc_image(DIR_WS_ICONS . 'masterpayment_sofortbanking.gif')))); } return array('id' => $this->code, 'module' => $this->title_checkout, 'description' => $this->info, 'fields' => $content); }
function quote($method = '') { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SELFPICKUP_TEXT_TITLE); $this->quotes['methods'] = array(array('id' => $this->code, 'title' => MODULE_SHIPPING_SELFPICKUP_TEXT_WAY, 'cost' => 0)); if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } return $this->quotes; }
function setImageText($image, $text) { $lng = HelperFunctions::getShortCode($_SESSION['language']); $image = 'https://images.sofort.com/' . $lng . '/sl/' . $image; $image = xtc_image($image, MODULE_PAYMENT_SOFORT_SL_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGEALT); $title = MODULE_PAYMENT_SOFORT_SL_TEXT_DESCRIPTION_CHECKOUT_PAYMENT_IMAGE; $title = str_replace('{{image}}', $image, $title); $title = str_replace('{{text}}', $text, $title); return $title; }
function xtc_output_warning($warning) { // BOF - Dokuman - 2009-05-27 - display errors only to admins in DIV-Element // new errorBox(array(array('text' => '<table style="width: 100%;"><tr><td style="vertical-align: center; padding-left: 5px;">' . xtc_image(DIR_WS_ICONS . 'output_warning.gif', ICON_WARNING) . ' </td><td style="vertical-align: center; text-align: center;"> ' . $warning . '</td></tr></table>'))); $result = ''; if (isset($_SESSION['customers_status']['customers_status_id']) && $_SESSION['customers_status']['customers_status_id'] == '0') { $result = '<div class="errormessage alert alert-warning">' . xtc_image(DIR_WS_ICONS . 'output_warning.gif', ICON_WARNING) . $warning . '</div>'; } echo $result; // EOF - Dokuman - 2009-05-27 - display errors only to admins in DIV-Element }
function selection() { $content = array(); $accepted = ''; $icons = explode(',', $this->images); foreach ($icons as $key => $val) { $accepted .= xtc_image(DIR_WS_ICONS . 'moneybookers/' . $val) . ' '; } $content = array_merge($content, array(array('title' => ' ', 'field' => $accepted))); return array('id' => $this->code, 'module' => $this->title, 'fields' => $content, 'description' => $this->info); }
function quote($method = '') { global $order, $total_count; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => MODULE_SHIPPING_ITEM_COST * $total_count + MODULE_SHIPPING_ITEM_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } return $this->quotes; }
function add($class, $message, $type = 'error') { if ($type == 'error') { $this->messages[] = array('params' => 'class="messageStackError alert alert-block alert-error"', 'class' => $class, 'text' => xtc_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . ' ' . $message); } elseif ($type == 'warning') { $this->messages[] = array('params' => 'class="messageStackWarning alert alert-block alert-warning"', 'class' => $class, 'text' => xtc_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $message); } elseif ($type == 'success') { $this->messages[] = array('params' => 'class="messageStackSuccess alert alert-block alert-success"', 'class' => $class, 'text' => xtc_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . ' ' . $message); } else { $this->messages[] = array('params' => 'class="messageStackError alert alert-block alert-error"', 'class' => $class, 'text' => $message); } }
function getReviewRatingStars($pID) { //Bewertungswert auslesen und Schnitt berechnen $rating_query = xtDBquery("SELECT AVG(r.reviews_rating) as avgrating\r\n FROM " . TABLE_REVIEWS . " r\r\n WHERE r.products_id = '" . $pID . "'"); $rating = xtc_db_fetch_array($rating_query, true); //Sterne-Symbol passend w�hlen if ($rating['avgrating'] == "") { $bewertung = xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_0.gif', '0', '', '', 'class="rating"'); } else { $bewertung = xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . round($rating['avgrating']) . '.gif', round($rating['avgrating']), '', '', 'class="rating"'); } //Sternbild zur�ck liefern return $bewertung; }
function quote($method = '') { global $xtPrice; if ($xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT && MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False') { return; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE); if ($xtPrice->xtcRemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) { $this->quotes['error'] = sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $xtPrice->xtcFormat(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true)); } else { $this->quotes['methods'] = array(array('id' => $this->code, 'title' => sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $xtPrice->xtcFormat(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true)), 'cost' => 0)); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } return $this->quotes; }
/** * Constructor class, sets the settings. */ function barzahlen() { $this->code = 'barzahlen'; $this->version = '1.2.3'; $this->title = MODULE_PAYMENT_BARZAHLEN_TEXT_TITLE; $this->description = '<div align="center">' . xtc_image('https://cdn.barzahlen.de/images/barzahlen_logo.png', MODULE_PAYMENT_BARZAHLEN_TEXT_TITLE) . '</div><br>' . MODULE_PAYMENT_BARZAHLEN_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_BARZAHLEN_SORT_ORDER; $this->enabled = MODULE_PAYMENT_BARZAHLEN_STATUS == 'True' ? true : false; $this->defaultCurrency = 'EUR'; $this->tmpOrders = true; $this->tmpStatus = MODULE_PAYMENT_BARZAHLEN_NEW_STATUS; $this->form_action_url = ''; $this->logFile = DIR_FS_CATALOG . 'logfiles/barzahlen.log'; $this->currencies = array('EUR'); $this->countries = array('DE'); if ($this->check() && $this->checkLastAutoCancel()) { $this->autoCancel(); } }
function quote() { global $order, $shipping_weight; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_CHRONOPOST_TEXT_TITLE, 'methods' => array()); if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; for ($i = 1; $i <= $this->num_chronopost; $i++) { $countries_table = constant('MODULE_SHIPPING_CHRONOPOST_COUNTRIES_' . $i); $country = explode(",", $countries_table); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if (in_array($dest_country, $country)) { $dest_zone = $i; break; } } if ($dest_zone == 0) { $this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_INVALID_ZONE; return $this->quotes; } $table = preg_split("/[:,]/", constant('MODULE_SHIPPING_CHRONOPOST_COST_' . $dest_zone)); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 $cost = -1; for ($i = 0, $n = sizeof($table); $i < $n; $i += 2) { if ($shipping_weight <= $table[$i]) { $cost = $table[$i + 1] + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING; break; } } if ($cost == -1) { $this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_UNDEFINED_RATE; return $this->quotes; } $this->quotes['methods'][] = array('id' => $this->code, 'title' => MODULE_SHIPPING_CHRONOPOST_TEXT_WAY . ' ' . $order->delivery['country']['title'], 'cost' => $cost + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING); return $this->quotes; }
function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $gew = 0; foreach ($order->products as $prod) { $gew += (double) $prod['weight'] * $prod['qty']; } if ($order->delivery['country']['iso_code_2'] == 'DE') { $preise = preg_split("/;/", MODULE_SHIPPING_HERMES_NATIONAL); } else { $preise = preg_split("/;/", MODULE_SHIPPING_HERMES_INTERNATIONAL); } // Hetfield - 2009-11-19 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 $gewichte = preg_split("/;/", MODULE_SHIPPING_HERMES_GEWICHT); // Hetfield - 2009-11-19 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 $price_id = 0; foreach ($gewichte as $g) { if ($gew <= $g) { break; } $price_id++; } if ($order->delivery['country']['iso_code_2'] == 'DE') { $stitle = MODULE_SHIPPING_HERMES_TEXT_WAY_DE . $shipping_num_boxes * $shipping_weight . ' ' . MODULE_SHIPPING_HERMES_TEXT_UNITS; } else { $stitle = MODULE_SHIPPING_HERMES_TEXT_WAY_EU . $shipping_num_boxes * $shipping_weight . ' ' . MODULE_SHIPPING_HERMES_TEXT_UNITS; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_HERMES_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $stitle, 'cost' => $preise[$price_id]))); if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } return $this->quotes; }
function xtc_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return xtc_image(DIR_WS_IMAGES . $image, '', $width, $height); }
?> <td class="dataTableContent hidden-xs hidden-sm" align="right"><?php echo $currencies->format($gv_amount); ?> </td> <td class="dataTableContent hidden-xs hidden-sm" align="right"><?php echo xtc_date_short($customers['date_account_created']); ?> </td> <td class="dataTableContent" align="right"> <span class='hidden-sm hidden-xs'> <?php if (isset($cInfo) && is_object($cInfo) && $customers['customers_id'] == $cInfo->customers_id) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </span> <span class='hidden-md hidden-lg'> <?php echo '<a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('cID', 'action', 'edit')) . 'cID=' . $customers['customers_id'] . '&action=edit&edit=' . $addresses['address_book_id']) . '">' . BUTTON_EDIT . '</a>'; ?> </span> </td> </tr> <?php } ?> </table> <div class="col-xs-12">
/** * class methods */ function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($j = 1; $j <= $this->num_dhl; $j++) { $countries_table = constant('MODULE_SHIPPING_DHL_COUNTRIES_' . $j); $country_zones = explode(",", $countries_table); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if (in_array($dest_country, $country_zones)) { $dest_zone = $j; break; } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $dhl_cost_ecx = @constant('MODULE_SHIPPING_DHL_COST_ECX_' . $j); $dhl_cost_dox = @constant('MODULE_SHIPPING_DHL_COST_DOX_' . $j); $dhl_cost_wpx = @constant('MODULE_SHIPPING_DHL_COST_WPX_' . $j); $dhl_cost_mdx = @constant('MODULE_SHIPPING_DHL_COST_MDX_' . $j); $dhl_cost_sdx = @constant('MODULE_SHIPPING_DHL_COST_SDX_' . $j); $methods = array(); $n == 0; if ($dhl_cost_ecx != '') { $dhl_table_ecx = preg_split("/[:,]/", $dhl_cost_ecx); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if ($shipping_weight > 10 and $shipping_weight <= 20) { $shipping_ecx = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_ECX_20_' . $j) + $dhl_table_ecx[count($dhl_table_ecx) - 1]; } elseif ($shipping_weight > 20 and $shipping_weight <= 30) { $shipping_ecx = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_ECX_30_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_ECX_20_' . $j) + $dhl_table_ecx[count($dhl_table_ecx) - 1]; } elseif ($shipping_weight > 30 and $shipping_weight <= 50) { $shipping_ecx = number_format(($shipping_weight - 30) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_ECX_50_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_ECX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_ECX_30_' . $j) + $dhl_table_ecx[count($dhl_table_ecx) - 1]; } elseif ($shipping_weight > 50) { $shipping_ecx = number_format(($shipping_weight - 50) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_ECX_51_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_ECX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_ECX_30_' . $j) + 40 * constant('MODULE_SHIPPING_DHL_STEP_ECX_50_' . $j) + $dhl_table_ecx[count($dhl_table_ecx) - 1]; } else { for ($i = 0; $i < sizeof($dhl_table_ecx); $i += 2) { if ($shipping_weight <= $dhl_table_ecx[$i]) { $shipping_ecx = $dhl_table_ecx[$i + 1]; break; } } } if ($shipping_ecx == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DHL_UNDEFINED_RATE; } else { $shipping_cost_1 = $shipping_ecx + MODULE_SHIPPING_DHL_HANDLING; } $methods[] = array('id' => 'ECX', 'title' => 'EU Express Service', 'cost' => (MODULE_SHIPPING_DHL_HANDLING + $shipping_cost_1) * $shipping_num_boxes); $n++; } if ($dhl_cost_dox != '') { $dhl_table_dox = preg_split("/[:,]/", $dhl_cost_dox); // Hetfield - 2009-11-19 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 if ($shipping_weight > 10 and $shipping_weight <= 20) { $shipping_dox = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_DOX_20_' . $j) + $dhl_table_dox[count($dhl_table_dox) - 1]; } elseif ($shipping_weight > 20 and $shipping_weight <= 30) { $shipping_dox = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_DOX_30_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_DOX_20_' . $j) + $dhl_table_dox[count($dhl_table_dox) - 1]; } elseif ($shipping_weight > 30 and $shipping_weight <= 50) { $shipping_dox = number_format(($shipping_weight - 30) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_DOX_50_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_DOX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_DOX_30_' . $j) + $dhl_table_dox[count($dhl_table_dox) - 1]; } elseif ($shipping_weight > 50) { $shipping_dox = number_format(($shipping_weight - 50) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_DOX_51_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_DOX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_DOX_30_' . $j) + 40 * constant('MODULE_SHIPPING_DHL_STEP_DOX_50_' . $j) + $dhl_table_dox[count($dhl_table_dox) - 1]; } else { for ($i = 0; $i < sizeof($dhl_table_dox); $i += 2) { if ($shipping_weight <= $dhl_table_dox[$i]) { $shipping_dox = $dhl_table_dox[$i + 1]; break; } } } if ($shipping_dox == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DHL_UNDEFINED_RATE; } else { $shipping_cost_2 = $shipping_dox + MODULE_SHIPPING_DHL_HANDLING; } $methods[] = array('id' => 'DOX', 'title' => 'Document Express Service', 'cost' => (MODULE_SHIPPING_DHL_HANDLING + $shipping_cost_2) * $shipping_num_boxes); $n++; } if ($dhl_cost_wpx != '') { $dhl_table_wpx = preg_split("/[:,]/", $dhl_cost_wpx); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 if ($shipping_weight > 10 and $shipping_weight <= 20) { $shipping_wpx = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_WPX_20_' . $j) + $dhl_table_wpx[count($dhl_table_wpx) - 1]; } elseif ($shipping_weight > 20 and $shipping_weight <= 30) { $shipping_wpx = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_WPX_30_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_WPX_20_' . $j) + $dhl_table_wpx[count($dhl_table_wpx) - 1]; } elseif ($shipping_weight > 30 and $shipping_weight <= 50) { $shipping_wpx = number_format(($shipping_weight - 30) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_WPX_50_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_WPX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_WPX_30_' . $j) + $dhl_table_wpx[count($dhl_table_wpx) - 1]; } elseif ($shipping_weight > 50) { $shipping_wpx = number_format(($shipping_weight - 50) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_WPX_51_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_WPX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_WPX_30_' . $j) + 40 * constant('MODULE_SHIPPING_DHL_STEP_WPX_50_' . $j) + $dhl_table_wpx[count($dhl_table_wpx) - 1]; } else { for ($i = 0; $i < sizeof($dhl_table_wpx); $i += 2) { if ($shipping_weight <= $dhl_table_wpx[$i]) { $shipping_wpx = $dhl_table_wpx[$i + 1]; break; } } } if ($shipping_wpx == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DHL_UNDEFINED_RATE; } else { $shipping_cost_3 = $shipping_wpx + MODULE_SHIPPING_DHL_HANDLING; } $methods[] = array('id' => 'WPX', 'title' => 'Waren Express Service', 'cost' => (MODULE_SHIPPING_DHL_HANDLING + $shipping_cost_3) * $shipping_num_boxes); $n++; } if ($dhl_cost_mdx != '') { $dhl_table_mdx = preg_split("/[:,]/", $dhl_cost_mdx); // Hetfield - 2009-11-19 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 if ($shipping_weight > 10 and $shipping_weight <= 20) { $shipping_mdx = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_MDX_20_' . $j) + $dhl_table_mdx[count($dhl_table_mdx) - 1]; } elseif ($shipping_weight > 20 and $shipping_weight <= 30) { $shipping_mdx = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_MDX_30_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_MDX_20_' . $j) + $dhl_table_mdx[count($dhl_table_mdx) - 1]; } elseif ($shipping_weight > 30 and $shipping_weight <= 50) { $shipping_mdx = number_format(($shipping_weight - 30) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_MDX_50_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_MDX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_MDX_30_' . $j) + $dhl_table_mdx[count($dhl_table_mdx) - 1]; } elseif ($shipping_weight > 50) { $shipping_mdx = number_format(($shipping_weight - 50) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_MDX_51_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_MDX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_MDX_30_' . $j) + 40 * constant('MODULE_SHIPPING_DHL_STEP_MDX_50_' . $j) + $dhl_table_mdx[count($dhl_table_mdx) - 1]; } else { for ($i = 0; $i < sizeof($dhl_table_mdx); $i += 2) { if ($shipping_weight <= $dhl_table_mdx[$i]) { $shipping_mdx = $dhl_table_mdx[$i + 1]; break; } } } if ($shipping_mdx == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DHL_UNDEFINED_RATE; } else { $shipping_cost_4 = $shipping_mdx + MODULE_SHIPPING_DHL_HANDLING; } $methods[] = array('id' => 'MDX', 'title' => 'Mid Day Express Service', 'cost' => (MODULE_SHIPPING_DHL_HANDLING + $shipping_cost_4) * $shipping_num_boxes); $n++; } if ($dhl_cost_sdx != '') { $dhl_table_sdx = preg_split("/[:,]/", $dhl_cost_sdx); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if ($shipping_weight > 10 and $shipping_weight <= 20) { $shipping_sdx = number_format(($shipping_weight - 10) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_SDX_20_' . $j) + $dhl_table_sdx[count($dhl_table_sdx) - 1]; } elseif ($shipping_weight > 20 and $shipping_weight <= 30) { $shipping_sdx = number_format(($shipping_weight - 20) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_SDX_30_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_SDX_20_' . $j) + $dhl_table_sdx[count($dhl_table_sdx) - 1]; } elseif ($shipping_weight > 30 and $shipping_weight <= 50) { $shipping_sdx = number_format(($shipping_weight - 30) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_SDX_50_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_SDX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_SDX_30_' . $j) + $dhl_table_sdx[count($dhl_table_sdx) - 1]; } elseif ($shipping_weight > 50) { $shipping_sdx = number_format(($shipping_weight - 50) * 2 + 0.5, 0) * constant('MODULE_SHIPPING_DHL_STEP_SDX_51_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_SDX_20_' . $j) + 20 * constant('MODULE_SHIPPING_DHL_STEP_SDX_30_' . $j) + 40 * constant('MODULE_SHIPPING_DHL_STEP_SDX_50_' . $j) + $dhl_table_sdx[count($dhl_table_sdx) - 1]; } else { for ($i = 0; $i < sizeof($dhl_table_sdx); $i += 2) { if ($shipping_weight <= $dhl_table_sdx[$i]) { $shipping_sdx = $dhl_table_sdx[$i + 1]; break; } } } if ($shipping_sdx == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_DHL_UNDEFINED_RATE; } else { $shipping_cost_5 = $shipping_sdx + MODULE_SHIPPING_DHL_HANDLING; } $methods[] = array('id' => 'SDX', 'title' => 'Start Day Express Service', 'cost' => (MODULE_SHIPPING_DHL_HANDLING + $shipping_cost_5) * $shipping_num_boxes); $n++; } } $this->quotes = array('id' => $this->code, 'module' => $this->title . ' ' . $dest_country . ' : ' . $shipping_num_boxes * $shipping_weight . ' ' . MODULE_SHIPPING_DHL_TEXT_UNITS . ')'); $this->quotes['methods'] = $methods; if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_DHL_INVALID_ZONE; } if (xtc_not_null($method) && isset($this->types[$method])) { for ($i = 0; $i < sizeof($methods); $i++) { if ($method == $methods[$i]['id']) { $methodsc = array(); $methodsc[] = array('id' => $methods[$i]['id'], 'title' => $methods[$i]['title'], 'cost' => $methods[$i]['cost']); break; } } $this->quotes['methods'] = $methodsc; } return $this->quotes; }
$i++; } if (xtc_in_array($product->data['products_id'], $check_data)) { // get content data require_once DIR_FS_INC . 'xtc_filesize.inc.php'; if (GROUP_CHECK == 'true') { $group_check = "group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%' AND"; } //get download $content_query = xtDBquery("SELECT\n\t\t\t\t\tcontent_id,\n\t\t\t\t\tcontent_name,\n\t\t\t\t\tcontent_link,\n\t\t\t\t\tcontent_file,\n\t\t\t\t\tcontent_read,\n\t\t\t\t\tfile_comment\n\t\t\t\t\tFROM " . TABLE_PRODUCTS_CONTENT . "\n\t\t\t\t\tWHERE\n\t\t\t\t\tproducts_id='" . $product->data['products_id'] . "' AND\n\t " . $group_check . "\n\t\t\t\t\tlanguages_id='" . (int) $_SESSION['languages_id'] . "'"); while ($content_data = xtc_db_fetch_array($content_query, true)) { $filename = ''; if ($content_data['content_link'] != '') { $icon = xtc_image(DIR_WS_CATALOG . 'admin/images/icons/icon_link.gif'); } else { $icon = xtc_image(DIR_WS_CATALOG . 'admin/images/icons/icon_' . str_replace('.', '', strstr($content_data['content_file'], '.')) . '.gif'); } if ($content_data['content_link'] != '') { $filename = '<a href="' . $content_data['content_link'] . '" target="new">'; } $filename .= $content_data['content_name']; if ($content_data['content_link'] != '') { $filename .= '</a>'; } $button = ''; if ($content_data['content_link'] == '') { if (preg_match('/.html/i', $content_data['content_file']) or preg_match('/.htm/i', $content_data['content_file']) or preg_match('/.txt/i', $content_data['content_file']) or preg_match('/.bmp/i', $content_data['content_file']) or preg_match('/.jpg/i', $content_data['content_file']) or preg_match('/.gif/i', $content_data['content_file']) or preg_match('/.png/i', $content_data['content_file']) or preg_match('/.tif/i', $content_data['content_file'])) { // Hetfield - 2009-08-19 - replaced deprecated function eregi with preg_match to be ready for PHP >= 5.3 //BOF - Tomcraft - 2010-04-03 - unified popups with scrollbars and make them resizable //$button = '<a style="cursor:pointer" onclick="javascript:window.open(\''.xtc_href_link(FILENAME_MEDIA_CONTENT, 'coID='.$content_data['content_id']).'\', \'popup\', \'toolbar=0, width=640, height=600\')">'.xtc_image_button('button_view.gif', TEXT_VIEW).'</a>'; $button = '<a style="cursor:pointer" onclick="javascript:window.open(\'' . xtc_href_link(FILENAME_MEDIA_CONTENT, 'coID=' . $content_data['content_id']) . '\', \'popup\', \'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600\')">' . xtc_image_button('button_view.gif', TEXT_VIEW) . '</a>';
require 'includes/application_top.php'; require DIR_WS_INCLUDES . 'head.php'; ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require DIR_WS_INCLUDES . 'header.php'; ?> <!-- header_eof //--> <!-- body //--> <div class="row"> <div class='col-xs-12'> <div class="col-xs-3 col-sm-1 text-right"><?php echo xtc_image(DIR_WS_ICONS . 'heading_modules.gif'); ?> </div> <div class="col-xs-9 col-sm-11"><p class="h2">janolaw</p> Modules</div> </div> <div class='col-xs-12'><br></div> <div class='col-sm-3 col-xs-12 dataTableHeadingContent left_mobile'> AGB Hosting-Service </div> <div class='col-sm-9 col-xs-12 dataTableHeadingContent left_mobile'> <a href="<?php echo xtc_href_link('module_export.php', 'set=&module=janolaw'); ?> "><u>Einstellungen</u></a> </div> <!-- body_text //-->
</td> <td class="dataTableContent" nowrap><?php echo $arr['STATUS']; ?> </td> <td class="dataTableContent" nowrap><?php echo $arr['AMT']; ?> </td> <td class="dataTableContent hidden-xs" nowrap><?php echo $arr['FEEAMT']; ?> </td> <td class="dataTableContent hidden-xs" nowrap><?php echo $arr['NETAMT']; ?> </td> <td class="dataTableContent" nowrap><?php echo '<a href="' . xtc_href_link(FILENAME_PAYPAL, 'view=detail&txn_id=' . $arr['TXNID']) . '">' . xtc_image(DIR_WS_ICONS . 'page_find.gif', IMAGE_ICON_INFO) . '</a>'; ?> </td> </tr> <?php } } ?> </table> </div> </td> </tr> </table>
<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> <!-- <td class="dataTableContent" align="right"><?php if (is_object($tcInfo) && $classes['tax_class_id'] == $tcInfo->tax_class_id) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $classes['tax_class_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> --> <td class="dataTableContent" align="right"><?php if (is_object($tcInfo) && $classes['tax_class_id'] == $tcInfo->tax_class_id) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $classes['tax_class_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> <!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> </tr> <?php } ?> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $classes_split->display_count($classes_query_numrows, '20', $_GET['page'], TEXT_DISPLAY_NUMBER_OF_TAX_CLASSES); ?> </td>
/** * class methods */ function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i = 1; $i <= $this->num_ap; $i++) { $countries_table = constant('MODULE_SHIPPING_AP_COUNTRIES_' . $i); $country_zones = explode(",", $countries_table); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $ap_cost = constant('MODULE_SHIPPING_AP_COST_' . $i); $ap_table = preg_split("/[:,]/", $ap_cost); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 for ($i = 0; $i < sizeof($ap_table); $i += 2) { if ($shipping_weight <= $ap_table[$i]) { $shipping = $ap_table[$i + 1]; $shipping_method = MODULE_SHIPPING_AP_TEXT_WAY . ' ' . $dest_country . ' : ' . $shipping_num_boxes * $shipping_weight . ' ' . MODULE_SHIPPING_AP_TEXT_UNITS; break; } } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_AP_UNDEFINED_RATE; } else { $shipping_cost = $shipping + MODULE_SHIPPING_AP_HANDLING; } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_AP_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost * $shipping_num_boxes))); if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_AP_INVALID_ZONE; } return $this->quotes; }
?> </td> <td width="90%"><a href="<?php echo xtc_href_link(FILENAME_PAYPAL, 'view=refund&paypal_ipn_id=' . $ipn_id); ?> "><?php echo TEXT_PAYPAL_ACTION_REFUND; ?> </a></td> </tr> <?php if (PAYPAL_COUNTRY_MODE == 'uk') { ?> <tr> <td width="10%"><?php echo xtc_image(DIR_WS_ICONS . 'icon_capture.gif'); ?> </td> <td width="90%"><a href="<?php echo xtc_href_link(FILENAME_PAYPAL, 'view=capture&paypal_ipn_id=' . $ipn_id); ?> "><?php echo TEXT_PAYPAL_ACTION_CAPTURE; ?> </a></td> </tr> <?php } ?> </table> </div>
<td class="main"><?php echo TEXT_NO_REVIEWS; ?> </td> </tr> <?php } else { for ($i = 0, $n = sizeof($reviews_array); $i < $n; $i++) { ?> <tr> <td valign="top" class="main"><a href="<?php echo xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews_array[$i]['products_id'] . '&reviews_id=' . $reviews_array[$i]['reviews_id']) . '">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $reviews_array[$i]['products_image'], $reviews_array[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?> </a></td> <td valign="top" class="main"><a href="<?php echo xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews_array[$i]['products_id'] . '&reviews_id=' . $reviews_array[$i]['reviews_id']) . '"><strong><u>' . $reviews_array[$i]['products_name'] . '</u></strong></a> (' . sprintf(TEXT_REVIEW_BY, $reviews_array[$i]['authors_name']) . ', ' . sprintf(TEXT_REVIEW_WORD_COUNT, $reviews_array[$i]['word_count']) . ')<br />' . $reviews_array[$i]['review'] . '<br /><br /><i>' . sprintf(TEXT_REVIEW_RATING, xtc_image(DIR_WS_IMAGES . 'stars_' . $reviews_array[$i]['rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews_array[$i]['rating'])), sprintf(TEXT_OF_5_STARS, $reviews_array[$i]['rating'])) . '<br />' . sprintf(TEXT_REVIEW_DATE_ADDED, $reviews_array[$i]['date_added']) . '</i>'; ?> </td> </tr> <?php if ($i + 1 != $n) { ?> <tr> <td colspan="2" class="main"> </td> </tr> <?php } } } ?> </table>
/** * class methods */ function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($j = 1; $j <= $this->num_chp; $j++) { $countries_table = constant('MODULE_SHIPPING_CHP_COUNTRIES_' . $j); $country_zones = explode(",", $countries_table); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 if (in_array($dest_country, $country_zones)) { $dest_zone = $j; break; } } if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $chp_cost_eco = @constant('MODULE_SHIPPING_CHP_COST_ECO_' . $j); $chp_cost_pri = @constant('MODULE_SHIPPING_CHP_COST_PRI_' . $j); $chp_cost_urg = @constant('MODULE_SHIPPING_CHP_COST_URG_' . $j); $methods = array(); if ($chp_cost_eco != '') { $chp_table_eco = preg_split("/[:,]/", $chp_cost_eco); // Hetfield - 2009-08-18 - replaced deprecated function split with explode to be ready for PHP >= 5.3 for ($i = 0; $i < sizeof($chp_table_eco); $i += 2) { if ($shipping_weight <= $chp_table_eco[$i]) { $shipping_eco = $chp_table_eco[$i + 1]; break; } } if ($shipping_eco == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_CHP_UNDEFINED_RATE; } else { $shipping_cost_1 = $shipping_eco + MODULE_SHIPPING_CHP_HANDLING; } if ($shipping_eco != 0) { $methods[] = array('id' => 'ECO', 'title' => 'Economy', 'cost' => (MODULE_SHIPPING_CHP_HANDLING + $shipping_cost_1) * $shipping_num_boxes); } } if ($chp_cost_pri != '') { $chp_table_pri = preg_split("/[:,]/", $chp_cost_pri); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 for ($i = 0; $i < sizeof($chp_table_pri); $i += 2) { if ($shipping_weight <= $chp_table_pri[$i]) { $shipping_pri = $chp_table_pri[$i + 1]; break; } } if ($shipping_pri == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_CHP_UNDEFINED_RATE; } else { $shipping_cost_2 = $shipping_pri + MODULE_SHIPPING_CHP_HANDLING; } if ($shipping_pri != 0) { $methods[] = array('id' => 'PRI', 'title' => 'Priority', 'cost' => (MODULE_SHIPPING_CHP_HANDLING + $shipping_cost_2) * $shipping_num_boxes); } } if ($chp_cost_urg != '') { $chp_table_urg = preg_split("/[:,]/", $chp_cost_urg); // Hetfield - 2009-08-18 - replaced deprecated function split with preg_split to be ready for PHP >= 5.3 for ($i = 0; $i < sizeof($chp_table_urg); $i += 2) { if ($shipping_weight <= $chp_table_urg[$i]) { $shipping_urg = $chp_table_urg[$i + 1]; break; } } if ($shipping_urg == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_CHP_UNDEFINED_RATE; } else { $shipping_cost_3 = $shipping_urg + MODULE_SHIPPING_CHP_HANDLING; } if ($shipping_urg != 0) { $methods[] = array('id' => 'URG', 'title' => 'Urgent', 'cost' => (MODULE_SHIPPING_CHP_HANDLING + $shipping_cost_3) * $shipping_num_boxes); } } } $this->quotes = array('id' => $this->code, 'module' => $this->title . ' ' . $dest_country . ' : ' . $shipping_num_boxes * $shipping_weight . ' ' . MODULE_SHIPPING_CHP_TEXT_UNITS . ')'); $this->quotes['methods'] = $methods; if ($this->tax_class > 0) { $this->quotes['tax'] = xtc_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (xtc_not_null($this->icon)) { $this->quotes['icon'] = xtc_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_CHP_INVALID_ZONE; } if (xtc_not_null($method) && isset($this->types[$method])) { for ($i = 0; $i < sizeof($methods); $i++) { if ($method == $methods[$i]['id']) { $methodsc = array(); $methodsc[] = array('id' => $methods[$i]['id'], 'title' => $methods[$i]['title'], 'cost' => $methods[$i]['cost']); break; } } $this->quotes['methods'] = $methodsc; } return $this->quotes; }
} // if content ?> <a href="<?php echo xtc_href_link(FILENAME_CONTENT_MANAGER, 'action=edit&coID=' . $content_1[$a]['CONTENT_ID']); ?> "> <?php echo xtc_image(DIR_WS_ICONS . 'icon_edit.gif', ICON_EDIT, '', '', 'style="cursor:pointer"') . ' ' . TEXT_EDIT . '</a>'; ?> <a style="cursor:pointer" onclick="javascript:window.open('<?php echo xtc_href_link(FILENAME_CONTENT_PREVIEW, 'coID=' . $content_1[$a]['CONTENT_ID']); ?> ', 'popup', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width=640, height=600')"> <?php echo xtc_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW, '', '', 'style="cursor:pointer"') . ' ' . TEXT_PREVIEW . '</a>'; ?> </td> </tr> <?php } } // for content } // for language ?> </table> </div> <?php } } else {