本文整理汇总了PHP中zen_image函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_image函数的具体用法?PHP zen_image怎么用?PHP zen_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: quote
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;
}
开发者ID:bislewl,项目名称:zen_preferred_shipping,代码行数:28,代码来源:preferredshipping.php
示例2: send
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
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:30,代码来源:newsletter.php
示例3: zen_check_quantity
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;
}
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:whos_online.php
示例4: quote
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;
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:32,代码来源:hkpostregistered.php
示例5: quote
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;
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:34,代码来源:chinapostregistered.php
示例6: add
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;
}
}
}
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:27,代码来源:message_stack.php
示例7: average_product_reviews_image
/**
* @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;
}
开发者ID:bislewl,项目名称:Average-Product-Rating,代码行数:12,代码来源:average_product_reviews.php
示例8: quote
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;
}
开发者ID:sgkohata,项目名称:zencart-sugu,代码行数:56,代码来源:sagawaex.php
示例9: zen_quickupdates_table_head
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;
}
开发者ID:quangn92,项目名称:visualyou,代码行数:10,代码来源:quick_updates.php
示例10: zen_link_info_image
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;
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:10,代码来源:links_manager.php
示例11: getIcon
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 '';
}
开发者ID:zenmagick,项目名称:zenmagick,代码行数:11,代码来源:AdminMessageStack.php
示例12: quote
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;
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:12,代码来源:freeshipper.php
示例13: quote
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;
}
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:14,代码来源:item.php
示例14: add
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++;
}
开发者ID:ygeneration666,项目名称:ec,代码行数:15,代码来源:message_stack.php
示例15: add
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);
}
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:15,代码来源:message_stack.php
示例16: zen_get_one_review_of_product
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;
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:18,代码来源:functions_products.php
示例17: add
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);
}
}
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:18,代码来源:message_stack.php
示例18: quote
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;
}
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:39,代码来源:ems.php
示例19: date
'"><?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>
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:backup_mysql.php
示例20: zen_href_link
<?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 |
// | [email protected] 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>';
}
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:26,代码来源:tpl_index_category_row.php
注:本文中的zen_image函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论