function quote($method = '') { global $order; if ($this->enabled) { $excluded_array = explode(',', MODULE_SHIPPING_PREFERRED_SHIPPING_EXCLUDED_PRODUCTS); $products_in_cart_array = explode(',', $_SESSION['cart']->get_product_id_list()); echo var_dump($products_in_cart_array); foreach ($products_in_cart_array as $product_in_cart) { $base_product_in_cart = substr($product_in_cart, 0, strpos($product_in_cart, ':')); if (in_array($base_product_in_cart, $excluded_array)) { $this->enabled = false; } } if ($_SESSION['cart']->show_total() < MODULE_SHIPPING_PREFERRED_SHIPPING_MIN_ORDER) { $this->enabled = false; } } if ($this->enabled) { $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PREFERRED_SHIPPING_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PREFERRED_SHIPPING_TEXT_WAY, 'cost' => '0.00'))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } } return $this->quotes; }
function send($newsletter_id) { global $db; $audience_select = get_audience_sql_query($this->query_name, 'newsletters'); $audience = $db->Execute($audience_select['query_string']); $records = $audience->RecordCount(); if ($records == 0) { return 0; } $i = 0; while (!$audience->EOF) { $i++; $html_msg['EMAIL_FIRST_NAME'] = $audience->fields['customers_firstname']; $html_msg['EMAIL_LAST_NAME'] = $audience->fields['customers_lastname']; $html_msg['EMAIL_GREET'] = EMAIL_GREET; $html_msg['EMAIL_MESSAGE_HTML'] = $this->content_html; zen_mail($audience->fields['customers_firstname'] . ' ' . $audience->fields['customers_lastname'], $audience->fields['customers_email_address'], $this->title, $this->content, STORE_NAME, EMAIL_FROM, $html_msg, 'newsletters'); echo zen_image(DIR_WS_ICONS . 'tick.gif', $audience->fields['customers_email_address']); //force output to the screen to show status indicator each time a message is sent... if (function_exists('ob_flush')) { @ob_flush(); } @flush(); $audience->MoveNext(); } $newsletter_id = zen_db_prepare_input($newsletter_id); $db->Execute("update " . TABLE_NEWSLETTERS . "\r\n set date_sent = now(), status = '1'\r\n where newsletters_id = '" . zen_db_input($newsletter_id) . "'"); return $records; //return number of records processed whether successful or not }
function zen_check_quantity($which) { global $db; $which_query = $db->Execute("select sesskey, value\r\n from " . TABLE_SESSIONS . "\r\n where sesskey= '" . $which . "'"); $who_query = $db->Execute("select session_id, time_entry, time_last_click, host_address, user_agent\r\n from " . TABLE_WHOS_ONLINE . "\r\n where session_id='" . $which . "'"); // longer than 2 minutes light color $xx_mins_ago_long = time() - WHOIS_TIMER_INACTIVE; switch (true) { case $which_query->RecordCount() == 0: if ($who_query->fields['time_last_click'] < $xx_mins_ago_long) { return zen_image(DIR_WS_IMAGES . 'icon_status_red_light.gif'); } else { return zen_image(DIR_WS_IMAGES . 'icon_status_red.gif'); } break; case strstr($which_query->fields['value'], '"contents";a:0:'): if ($who_query->fields['time_last_click'] < $xx_mins_ago_long) { return zen_image(DIR_WS_IMAGES . 'icon_status_red_light.gif'); } else { return zen_image(DIR_WS_IMAGES . 'icon_status_red.gif'); } break; case !strstr($which_query->fields['value'], '"contents";a:0:'): if ($who_query->fields['time_last_click'] < $xx_mins_ago_long) { return zen_image(DIR_WS_IMAGES . 'icon_status_yellow.gif'); } else { return zen_image(DIR_WS_IMAGES . 'icon_status_green.gif'); } break; } }
function quote($method = '') { global $order, $shipping_weight; $error = false; $dest_country = $order->delivery['country']['iso_code_2']; if (defined('MODULE_SHIPPING_HKPOSTREGISTERED_COST_UNIT') && MODULE_SHIPPING_HKPOSTREGISTERED_COST_UNIT > 0) { //hkpost weight as gram g. $shipping_cost = MODULE_SHIPPING_HKPOSTREGISTERED_COST_UNIT * $shipping_weight; if (defined('MODULE_SHIPPING_HKPOSTREGISTERED_HANDLE_FEE') && MODULE_SHIPPING_HKPOSTREGISTERED_HANDLE_FEE > 0) { $shipping_cost += MODULE_SHIPPING_HKPOSTREGISTERED_HANDLE_FEE; } //$shipping_method = MODULE_SHIPPING_HKPOSTREGISTERED_TEXT_WAY . ' ' . $dest_country . ' ('.number_format($shipping_weight,2).MODULE_SHIPPING_HKPOSTREGISTERED_TEXT_UNITS.')'; $shipping_method = MODULE_SHIPPING_HKPOSTREGISTERED_TEXT_WAY; //############################for better calculate with currency######################### //modified by john 2010-06-30 2/3 $shipping_cost = $shipping_cost / (defined('MODULE_SHIPPING_HKPOSTREGISTERED_EXCHANGE_RATE') ? MODULE_SHIPPING_HKPOSTREGISTERED_EXCHANGE_RATE : 1); } if ($shipping_weight > MODULE_SHIPPING_HKPOSTREGISTERED_BEYOND_WEIGHTLIMIT) { $error = true; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_HKPOSTREGISTERED_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_HKPOSTREGISTERED_BEYOND_WEIGHTLIMIT_TEXT; } return $this->quotes; }
function quote($method = '') { global $order, $shipping_weight; $calc_weight = $shipping_weight; $error = false; $dest_country = $order->delivery['country']['iso_code_2']; if (defined('MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT_FEE') && defined('MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT') && defined('MODULE_SHIPPING_CHINAPOSTREGISTERED_REST_WEIGHT_UNIT_FEE') && MODULE_SHIPPING_CHINAPOSTREGISTERED_REST_WEIGHT_UNIT_FEE > 0) { if ($calc_weight <= MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT) { $shipping_cost = MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT_FEE + MODULE_SHIPPING_CHINAPOSTREGISTERED_REGISTER_FEE; } else { $calc_weight = $calc_weight - MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT; $shipping_cost = ceil($calc_weight / MODULE_SHIPPING_CHINAPOSTREGISTERED_REST_WEIGHT_UNIT) * MODULE_SHIPPING_CHINAPOSTREGISTERED_REST_WEIGHT_UNIT_FEE; $shipping_cost = MODULE_SHIPPING_CHINAPOSTREGISTERED_BASIS_WEIGHT_FEE + $shipping_cost + MODULE_SHIPPING_CHINAPOSTREGISTERED_REGISTER_FEE; } $shipping_method = MODULE_SHIPPING_CHINAPOSTREGISTERED_TEXT_WAY . ' ' . $dest_country . ' (' . number_format($shipping_weight, 2) . MODULE_SHIPPING_CHINAPOSTREGISTERED_TEXT_UNITS . ') '; //modified by john 2010-06-30 //for better calculate with currency $shipping_cost = $shipping_cost / (defined('MODULE_SHIPPING_CHINAPOSTREGISTERED_EXCHANGE_RATE') ? MODULE_SHIPPING_CHINAPOSTREGISTERED_EXCHANGE_RATE : 1); } if ($shipping_weight > MODULE_SHIPPING_CHINAPOSTREGISTERED_BEYOND_WEIGHTLIMIT) { $error = true; } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_CHINAPOSTREGISTERED_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_CHINAPOSTREGISTERED_BEYOND_WEIGHTLIMIT_TEXT; } return $this->quotes; }
function add($class, $message, $type = 'error') { global $template, $current_page_base; $message = trim($message); $duplicate = false; if (strlen($message) > 0) { if ($type == 'error') { $theAlert = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_ERROR, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_ERROR, ICON_ERROR_ALT) . ' ' . $message); } elseif ($type == 'warning') { $theAlert = array('params' => 'class="messageStackWarning larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . ' ' . $message); } elseif ($type == 'success') { $theAlert = array('params' => 'class="messageStackSuccess larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_SUCCESS, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_SUCCESS, ICON_SUCCESS_ALT) . ' ' . $message); } elseif ($type == 'caution') { $theAlert = array('params' => 'class="messageStackCaution larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . ' ' . $message); } else { $theAlert = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => $message); } for ($i = 0, $n = sizeof($this->messages); $i < $n; $i++) { if ($theAlert['text'] == $this->messages[$i]['text'] && $theAlert['class'] == $this->messages[$i]['class']) { $duplicate = true; } } if (!$duplicate) { $this->messages[] = $theAlert; } } }
/** * @param $average * @return string */ function average_product_reviews_image($average) { $stars_image_suffix = str_replace('.', '_', zen_round($average * 2, 0) / 2); // for stars_0_5.gif, stars_1.gif, stars_1_5.gif etc. $average_rating = zen_round($average, 2); $reviews_string = zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $stars_image_suffix . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $average_rating)); return $reviews_string; }
function quote() { global $shipping_weight, $shipping_num_boxes; global $order; global $a_sagawaex_time; global $cart; global $db; $this->quotes = array('id' => $this->code, 'module' => $this->title); if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } $country_id = $order->delivery['country']['id']; $zone_id = $order->delivery['zone_id']; if (in_array($country_id, $this->sagawaex_countries_nbr)) { $zoneinfo = $db->Execute("SELECT zone_code FROM " . TABLE_ZONES . " WHERE zone_id = '" . $zone_id . "'"); $a_zonevalues = $zoneinfo->fields; $s_zone_code = $a_zonevalues['zone_code']; // 送料が条件によって無料になってしまう(ここではtotalではなくsubtotalを確認すべき) if (MODULE_SHIPPING_SAGAWAEX_FREE_SHIPPING != 'True' || (int) $order->info['subtotal'] < (int) MODULE_SHIPPING_SAGAWAEX_OVER) { include DIR_WS_CLASSES . '_sagawaex.php'; $rate = new _SagawaEx($this->code, MODULE_SHIPPING_SAGAWAEX_TEXT_WAY_NORMAL, zen_get_zone_code(STORE_COUNTRY, STORE_ZONE, 0), STORE_COUNTRY); //STORE_ORIGIN_ZONE, STORE_ORIGIN_COUNTRY); $rate->SetDest($s_zone_code, $this->sagawaex_countries[$country_id]); $rate->SetWeight($shipping_weight); $tmpQuote = $rate->GetQuote(); // id, title, cost | error if (isset($tmpQuote['error'])) { $this->quotes['error'] = $tmpQuote['error']; } else { $this->quotes['module'] = $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'kg)'; $tmpQuote['cost'] *= $shipping_num_boxes; // 送料ディスカウント if (defined('MODULE_SHIPPING_SAGAWAEX_DISCOUNT') && 0 < (int) MODULE_SHIPPING_SAGAWAEX_DISCOUNT) { $tmpQuote['cost'] -= (int) ($tmpQuote['cost'] * MODULE_SHIPPING_SAGAWAEX_DISCOUNT / 100); } // 手数料 $tmpQuote['cost'] += MODULE_SHIPPING_SAGAWAEX_HANDLING; } } else { $tmpQuote = array('id' => $this->code, 'title' => MODULE_SHIPPING_SAGAWAEX_TEXT_WAY_NORMAL, 'cost' => 0); } if (!isset($tmpQuote['error'])) { // 配送時刻指定 $timespec = $this->get_timespec(); $tmpQuote['option'] = TEXT_TIME_SPECIFY . zen_draw_pull_down_menu('sagawaex_timespec', $a_sagawaex_time, $timespec); $tmpQuote['timespec'] = $timespec; } $this->quotes['methods'][] = $tmpQuote; if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $country_id, $zone_id); } } else { $this->quotes['error'] = MODULE_SHIPPING_SAGAWAEX_TEXT_NOTAVAILABLE; } return $this->quotes; }
function zen_quickupdates_table_head($sort_field, $head_text, $cols=1) { $str = ''; $str .= '<td class="dataTableHeadingContent" align="center" valign="middle"' . ($cols > 1 ? ' colspan="' . $cols . '"' : '') . '>'; if($sort_field != '') { $str .= '<a href="' . zen_href_link(FILENAME_QUICK_UPDATES, 'sort_by=' . trim($sort_field) . ' ASC') . '">' . zen_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . $head_text . ' ' . TEXT_ASCENDINGLY) . '</a>'; $str .= '<a href="' . zen_href_link(FILENAME_QUICK_UPDATES, 'sort_by=' . trim($sort_field) . ' DESC') . '">' . zen_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . $head_text . ' ' . TEXT_DESCENDINGLY) . '</a><br />'; } $str .= $head_text . '</td>'; return $str; }
function zen_link_info_image($image, $alt, $width = '', $height = '') { global $db; if (zen_not_null($image)) { $image = zen_image($image, $alt, $width, $height); } else { $image = TEXT_IMAGE_NONEXISTENT; } return $image; }
public function getIcon($type) { if (in_array($type, array('error', 'warn', 'success'))) { if ('warn' == $type) { $type = 'warning'; } $image = $type . '.gif'; return zen_image(DIR_WS_ICONS . $image, $type); } return ''; }
function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREESHIPPER_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FREESHIPPER_TEXT_WAY, 'cost' => MODULE_SHIPPING_FREESHIPPER_COST + MODULE_SHIPPING_FREESHIPPER_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } return $this->quotes; }
function quote($method = '') { global $order, $total_count; // adjusted count for free shipping $item_total_count = $total_count - $_SESSION['cart']->free_shipping_items(); $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 * $item_total_count + MODULE_SHIPPING_ITEM_HANDLING))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } return $this->quotes; }
function add($message, $type = 'error') { if ($type == 'error') { $this->errors[] = array('params' => 'class="messageStackError"', 'text' => zen_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . ' ' . $message); } elseif ($type == 'warning') { $this->errors[] = array('params' => 'class="messageStackWarning"', 'text' => zen_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $message); } elseif ($type == 'success') { $this->errors[] = array('params' => 'class="messageStackSuccess"', 'text' => zen_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . ' ' . $message); } elseif ($type == 'caution') { $this->errors[] = array('params' => 'class="messageStackCaution"', 'text' => zen_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $message); } else { $this->errors[] = array('params' => 'class="messageStackError"', 'text' => $message); } $this->size++; }
function add($class, $message, $type = 'error') { global $template; if ($type == 'error') { $this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => zen_image($template->get_template_dir('error.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'error.gif', ICON_ERROR) . ' ' . $message); } elseif ($type == 'warning') { $this->messages[] = array('params' => 'class="messageStackWarning"', 'class' => $class, 'text' => zen_image($template->get_template_dir('warning.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'warning.gif', ICON_WARNING) . ' ' . $message); } elseif ($type == 'success') { $this->messages[] = array('params' => 'class="messageStackSuccess"', 'class' => $class, 'text' => zen_image($template->get_template_dir('success.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'success.gif', ICON_SUCCESS) . ' ' . $message); } elseif ($type == 'caution') { $this->messages[] = array('params' => 'class="messageStackCaution"', 'class' => $class, 'text' => zen_image($template->get_template_dir('warning.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'warning.gif', ICON_WARNING) . ' ' . $message); } else { $this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => $message); } }
function zen_get_one_review_of_product($review_id) { global $db, $template, $current_page_base; $data_review = array(); $review_db = $db->Execute("select\n\t\t r.reviews_id,\n\t\t\t\t\t\t\t\t\t\t r.value_rating,\n\t\t\t\t\t\t\t\t\t\t r.price_rating,\n\t\t\t\t\t\t\t\t\t\t r.quality_rating,\n\t\t\t\t\t\t\t\t\t\t r.customers_name,\n\t\t\t\t\t\t\t\t\t\t r.date_added,\n\t\t\t\t\t\t\t\t\t\t rd.reviews_text,\n\t\t\t\t\t\t\t\t\t\t r.yes_cnt,\n\t\t\t\t\t\t\t\t\t\t r.no_cnt\n\t\t\t\t\t\t\t\t from " . TABLE_REVIEWS . " r,\n\t\t\t\t\t\t\t\t\t\t" . TABLE_REVIEWS_DESCRIPTION . " rd\n\t\t\t\t\t\t\t\t where r.reviews_id=rd.reviews_id\n\t\t\t\t\t\t\t\t and rd.languages_id = '" . $_SESSION['languages_id'] . "' \n\t\t\t\t\t\t\t\t and r.reviews_id=" . (int) $review_id . " \n\t\t\t\t\t\t\t\t and r.status=1"); if ($review_db->RecordCount() > 0) { //$row = 0; $data_review = array(); while (!$review_db->EOF) { //$row ++; $data_review[] = array('reviews_id' => $reviews_db->fields['reviews_id'], 'author' => $review_db->fields['customers_name'], 'date' => $review_db->fields['date_added'], 'value_rating' => zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $review_db->fields['value_rating'] . '.gif'), 'price_rating' => zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $review_db->fields['price_rating'] . '.gif'), 'quality_rating' => zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $review_db->fields['quality_rating'] . '.gif'), 'text' => $review_db->fields['reviews_text']); /*if ($row == PRODUCT_REVIEWS_VIEW) break;*/ $review_db->MoveNext(); } } return $data_review; }
function add($class, $message, $type = 'error') { global $template, $current_page_base; $message = trim($message); if (strlen($message) > 0) { if ($type == 'error') { $this->messages[] = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_ERROR, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_ERROR, ICON_ERROR_ALT) . ' ' . $message); } elseif ($type == 'warning') { $this->messages[] = array('params' => 'class="messageStackWarning larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . ' ' . $message); } elseif ($type == 'success') { $this->messages[] = array('params' => 'class="messageStackSuccess larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_SUCCESS, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_SUCCESS, ICON_SUCCESS_ALT) . ' ' . $message); } elseif ($type == 'caution') { $this->messages[] = array('params' => 'class="messageStackCaution larger"', 'class' => $class, 'text' => zen_image($template->get_template_dir(ICON_IMAGE_WARNING, DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . ICON_IMAGE_WARNING, ICON_WARNING_ALT) . ' ' . $message); } else { $this->messages[] = array('params' => 'class="messageStackError larger"', 'class' => $class, 'text' => $message); } } }
function quote($method = '') { global $order, $shipping_weight; $calc_weight = $shipping_weight; $error = false; $dest_country = $order->delivery['country']['iso_code_2']; if (defined('MODULE_SHIPPING_EMS_BASIS_WEIGHT_FEE') && defined('MODULE_SHIPPING_EMS_BASIS_WEIGHT') && defined('MODULE_SHIPPING_EMS_REST_WEIGHT_UNIT_FEE') && MODULE_SHIPPING_EMS_REST_WEIGHT_UNIT_FEE > 0) { if ($calc_weight <= MODULE_SHIPPING_EMS_BASIS_WEIGHT) { $shipping_cost = MODULE_SHIPPING_EMS_BASIS_WEIGHT_FEE + MODULE_SHIPPING_EMS_HANDLING_FEE; } else { $calc_weight = $calc_weight - MODULE_SHIPPING_EMS_BASIS_WEIGHT; $shipping_cost = ceil($calc_weight / MODULE_SHIPPING_EMS_REST_WEIGHT_UNIT) * MODULE_SHIPPING_EMS_REST_WEIGHT_UNIT_FEE; $shipping_cost = MODULE_SHIPPING_EMS_BASIS_WEIGHT_FEE + $shipping_cost + MODULE_SHIPPING_EMS_HANDLING_FEE; } /*$shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY . ' ' . $dest_country . ' ('.number_format($shipping_weight,2).MODULE_SHIPPING_EMS_TEXT_UNITS.') ';*/ $shipping_method = MODULE_SHIPPING_EMS_TEXT_WAY; //############################for better calculate with currency######################### //modified by john 2010-06-30 1/3 $shipping_cost = $shipping_cost / (defined('MODULE_SHIPPING_EMS_EXCHANGE_RATE') ? MODULE_SHIPPING_EMS_EXCHANGE_RATE : 1); } if (defined('MODULE_SHIPPING_EMS_ENABLED_COUNTRIES')) { $enable_countries = split('[,]', MODULE_SHIPPING_EMS_ENABLED_COUNTRIES); if (is_array($enable_countries) && !in_array($dest_country, $enable_countries)) { $error = true; } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_EMS_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if ($this->tax_class > 0) { $this->quotes['tax'] = zen_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (zen_not_null($this->icon)) { $this->quotes['icon'] = zen_image($this->icon, $this->title); } if ($error == true) { $this->quotes['error'] = MODULE_SHIPPING_EMS_NOT_DISPATCH_TO_TEXT . ' ' . $dest_country; } return $this->quotes; }
'"><?php echo date(PHP_DATE_TIME_FORMAT, filemtime(DIR_FS_BACKUP . $entry)); ?> </td> <td class="dataTableContent" align="right" onClick="document.location.href='<?php echo zen_href_link(FILENAME_BACKUP_MYSQL, $onclick_link); ?> '"><?php echo number_format(filesize(DIR_FS_BACKUP . $entry)); ?> bytes</td> <td class="dataTableContent" align="right"><?php if (isset($buInfo) && is_object($buInfo) && $entry == $buInfo->file) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_BACKUP_MYSQL, 'file=' . $entry) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $dir->close(); // } // endif safe-mode & dir_ok // now let's display the backup/restore buttons below filelist ?> <tr> <td class="smallText" colspan="3"><?php echo TEXT_BACKUP_DIRECTORY . ' ' . DIR_FS_BACKUP; ?> </td>
<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | license@zen-cart.com so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: tpl_index_category_row.php 290 2004-09-15 19:48:26Z wilt $ // $lcontents = '<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a></td>'; if ($newrow) { $lcontents .= '</tr><tr>'; }
<td class="dataTableContent"><?php echo $groups->fields['group_percentage']; ?> </td> <td class="dataTableContent" align="right"> <?php echo '<a href="' . zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page'] . '&gID=' . $groups->fields['group_id'] . '&action=edit') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>'; ?> <?php echo '<a href="' . zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page'] . '&gID=' . $groups->fields['group_id'] . '&action=delete') . '">' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . '</a>'; ?> <?php if (isset($gInfo) && is_object($gInfo) && $groups->fields['group_id'] == $gInfo->group_id) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_GROUP_PRICING, zen_get_all_get_params(array('gID')) . 'gID=' . $groups->fields['group_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php $groups->MoveNext(); } ?> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $groups_split->display_count($groups_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRICING_GROUPS); ?> </td>
<?php if ($set == 'payment') { $orders_status_name = $db->Execute("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id='" . (int) $module->order_status . "' and language_id='" . (int) $_SESSION['languages_id'] . "'"); ?> <td class="dataTableContent" align="left"> <?php echo is_numeric($module->sort_order) ? $orders_status_name->fields['orders_status_id'] < 1 ? TEXT_DEFAULT : $orders_status_name->fields['orders_status_name'] : ''; ?> </td> <?php } ?> <td class="dataTableContent" align="right"><?php if (isset($mInfo) && is_object($mInfo) && $class == $mInfo->code) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . zen_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } } else { echo ERROR_MODULE_FILE_NOT_FOUND . DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/modules/' . $module_type . '/' . $file . '<br />'; } } ksort($installed_modules); $check = $db->Execute("select configuration_value\r\n from " . TABLE_CONFIGURATION . "\r\n where configuration_key = '" . zen_db_input($module_key) . "'"); if ($check->RecordCount() > 0) { if ($check->fields['configuration_value'] != implode(';', $installed_modules)) { $db->Execute("update " . TABLE_CONFIGURATION . "\r\n set configuration_value = '" . zen_db_input(implode(';', $installed_modules)) . "', last_modified = now()\r\n where configuration_key = '" . zen_db_input($module_key) . "'");
updateGross(); //--></script> <?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) { echo TEXT_PRODUCTS_DESCRIPTION; } ?> </td> <td colspan="2"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main" width="100%"><?php echo zen_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', htmlspecialchars(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)); //,'id="'.'products_description' . $languages[$i]['id'] . '"'); ?> </td> </tr> </table></td> </tr> <?php } ?> <tr> <td colspan="2"><?php
?> </td> <td class="dataTableContent" align="center"><?php echo $salemaker_sales->fields['sale_date_start'] == '0001-01-01' ? TEXT_SALEMAKER_IMMEDIATELY : zen_date_short($salemaker_sales->fields['sale_date_start']); ?> </td> <td class="dataTableContent" align="center"><?php echo $salemaker_sales->fields['sale_date_end'] == '0001-01-01' ? TEXT_SALEMAKER_NEVER : zen_date_short($salemaker_sales->fields['sale_date_end']); ?> </td> <td class="dataTableContent" align="center"> <?php if ($salemaker_sales->fields['sale_status'] == '1') { echo zen_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10); } else { echo zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> </td> </tr> <?php } } $salemaker_sales->MoveNext(); } ?> </table></td> </tr> </table></td>
?> </td> <td class="dataTableContent"><?php echo $template_info[$templates->fields['template_dir']]['name']; ?> </td> <td class="dataTableContent" align="center"><?php echo $templates->fields['template_dir']; ?> </td> <td class="dataTableContent" align="right"> <?php if (isset($tInfo) && is_object($tInfo) && $templates->fields['template_id'] == $tInfo->template_id) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $templates->fields['template_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php $templates->MoveNext(); } ?> <tr> <td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $template_split->display_count($template_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_TEMPLATES); ?> </td>
} //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?> </td> <td class="pageHeading" align="right"><?php echo zen_image(DIR_WS_IMAGES . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT); ?> </td> </tr> </table></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><?php echo zen_draw_separator(); ?> </td> </tr> <?php
* @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_modules_products_new_listing.php 6096 2007-04-01 00:43:21Z ajeh $ */ ?> <?php $group_id = zen_get_configuration_key_value('PRODUCT_NEW_LIST_GROUP_ID'); if ($products_new_split->number_of_rows > 0) { $products_new = $db->Execute($products_new_split->sql_query); while (!$products_new->EOF) { if (PRODUCT_NEW_LIST_IMAGE != '0') { if ($products_new->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $display_products_image = str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_IMAGE, 3, 1)); } else { $display_products_image = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $products_new->fields['products_image'], $products_new->fields['products_name'], 128, 128) . '</a>' . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_IMAGE, 3, 1)); } } else { $display_products_image = ''; } if (PRODUCT_NEW_LIST_NAME != '0') { $display_products_name = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '"><strong>' . $products_new->fields['products_name'] . '</strong></a>' . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_NAME, 3, 1)); } else { $display_products_name = ''; } if (PRODUCT_NEW_LIST_MODEL != '0' and zen_get_show_product_switch($products_new->fields['products_id'], 'model')) { $display_products_model = TEXT_PRODUCTS_MODEL . $products_new->fields['products_model'] . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_LIST_MODEL, 3, 1)); } else { $display_products_model = ''; } if (PRODUCT_NEW_LIST_WEIGHT != '0' and zen_get_show_product_switch($products_new->fields['products_id'], 'weight')) {
function zen_draw_separator($image = 'true', $width = '100%', $height = '1') { // set default to use from template - zen_image will translate if not found in current template if ($image == 'true') { $image = DIR_WS_TEMPLATE_IMAGES . OTHER_IMAGE_BLACK_SEPARATOR; } else { if (!strstr($image, DIR_WS_TEMPLATE_IMAGES)) { $image = DIR_WS_TEMPLATE_IMAGES . $image; } } return zen_image($image, '', $width, $height); }
if (empty($pInfo->products_id)) { $pInfo->products_id = $pID; } $contents = array('form' => zen_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . zen_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_PRODUCT . '<br /><b>' . $pInfo->products_name . ' ID#' . $pInfo->products_id . '</b>'); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . zen_output_generated_category_path($pInfo->products_id, 'product') . '</b>'); $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . zen_draw_pull_down_menu('categories_id', zen_get_category_tree(), $current_category_id)); $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . zen_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . zen_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE); // only ask about attributes if they exist if (zen_has_product_attributes($pInfo->products_id, 'false')) { $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3')); $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES_ONLY); $contents[] = array('text' => '<br />' . TEXT_COPY_ATTRIBUTES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_yes', true) . ' ' . TEXT_COPY_ATTRIBUTES_YES . '<br />' . zen_draw_radio_field('copy_attributes', 'copy_attributes_no') . ' ' . TEXT_COPY_ATTRIBUTES_NO); // future $contents[] = array('align' => 'center', 'text' => '<br />' . ATTRIBUTES_NAMES_HELPER . '<br />' . zen_draw_separator('pixel_trans.gif', '1', '10')); $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3')); } $contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; // attribute features // attribute features case 'attribute_features': $copy_attributes_delete_first = '0'; $copy_attributes_duplicates_skipped = '0'; $copy_attributes_duplicates_overwrite = '0'; $copy_attributes_include_downloads = '1'; $copy_attributes_include_filename = '1'; $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_ATTRIBUTE_FEATURES . $pInfo->products_id . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . TEXT_PRODUCTS_ATTRIBUTES_INFO . '</strong>' . '<br />'); $contents[] = array('align' => 'center', 'text' => '<br />' . '<strong>' . zen_get_products_name($pInfo->products_id, $languages_id) . ' ID# ' . $pInfo->products_id . '</strong><br /><br />' . (zen_has_product_attributes($pInfo->products_id, 'false') ? '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, '&action=attributes_preview' . '&products_filter=' . $pInfo->products_id . '¤t_category_id=' . $current_category_id) . '">' . zen_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a>' . ' ' : '') . '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $pInfo->products_id . '¤t_category_id=' . $current_category_id) . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '</a>' . '<br /><br />'); // only if attributes
echo $filename_is_missing . ' ' . $products_downloads_query->fields['products_attributes_filename']; ?> </td> <td class="smallText"><?php echo $products_downloads_query->fields['products_attributes_maxdays']; ?> </td> <td class="smallText"><?php echo $products_downloads_query->fields['products_attributes_maxcount']; ?> </td> <td class="dataTableContent" align="right"><?php if (isset($padInfo) && is_object($padInfo) && $products_downloads_query->fields['products_attributes_id'] == $padInfo->products_attributes_id) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_DOWNLOADS_MANAGER, zen_get_all_get_params(array('padID')) . 'padID=' . $products_downloads_query->fields['products_attributes_id'] . '&page=' . $_GET['page']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php $products_downloads_query->MoveNext(); } // bof: split page control and search filter ?> <tr> <td colspan="10"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $products_downloads_split->display_count($products_downloads_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_DOWNLOADS_MANAGER, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS_DOWNLOADS_MANAGER); ?>