本文整理汇总了PHP中xos_image函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_image函数的具体用法?PHP xos_image怎么用?PHP xos_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xos_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: quote
function quote($method = '')
{
global $order;
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FLAT_TEXT_WAY, 'cost' => MODULE_SHIPPING_FLAT_COST)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = xos_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (xos_not_null($this->icon)) {
$this->quotes['icon'] = xos_image($this->icon, $this->title);
}
return $this->quotes;
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:12,代码来源:flat.php
示例2: add
function add($class, $message, $type = 'error')
{
if ($type == 'error') {
$this->messages[] = array('class' => $class, 'text' => ' <tr class="messageStackError">' . "\n" . ' <td valign="top" class="messageStackError" width="1">' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/error.gif', ICON_TITLE_ERROR) . '</td>' . "\n" . ' <td class="messageStackError">' . $message . '</td>' . "\n" . ' </tr>' . "\n");
} elseif ($type == 'warning') {
$this->messages[] = array('class' => $class, 'text' => ' <tr class="messageStackWarning">' . "\n" . ' <td valign="top" class="messageStackWarning" width="1">' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/warning.gif', ICON_TITLE_WARNING) . '</td>' . "\n" . ' <td class="messageStackWarning">' . $message . '</td>' . "\n" . ' </tr>' . "\n");
} elseif ($type == 'success') {
$this->messages[] = array('class' => $class, 'text' => ' <tr class="messageStackSuccess">' . "\n" . ' <td valign="top" class="messageStackSuccess" width="1">' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/success.gif', ICON_TITLE_SUCCESS) . '</td>' . "\n" . ' <td class="messageStackSuccess">' . $message . '</td>' . "\n" . ' </tr>' . "\n");
} else {
$this->messages[] = array('class' => $class, 'text' => ' <tr class="messageStackError">' . "\n" . ' <td colspan="2" class="messageStackError">' . $message . ' </td>' . "\n" . ' </tr>' . "\n");
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:12,代码来源:message_stack.php
示例3: add
function add($class, $message, $type = 'error')
{
if ($type == 'error') {
$this->messages[] = array('class' => $class, 'type' => $type, 'text' => "\n" . ' <div class="message-stack-error" style="width: 100%;">' . "\n" . ' <div style="float: left; padding: 2px;">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/error.gif', ICON_ERROR) . '</div>' . "\n" . ' <div style="float: left; padding: 2px; max-width: 95%;">' . $message . '</div>' . "\n" . ' <div class="clear"> </div>' . "\n" . ' </div>' . "\n");
} elseif ($type == 'warning') {
$this->messages[] = array('class' => $class, 'type' => $type, 'text' => "\n" . ' <div class="message-stack-warning" style="width: 100%;">' . "\n" . ' <div style="float: left; padding: 2px;">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/warning.gif', ICON_WARNING) . '</div>' . "\n" . ' <div style="float: left; padding: 2px; max-width: 95%;">' . $message . '</div>' . "\n" . ' <div class="clear"> </div>' . "\n" . ' </div>' . "\n");
} elseif ($type == 'success') {
$this->messages[] = array('class' => $class, 'type' => $type, 'text' => "\n" . ' <div class="message-stack-success" style="width: 100%;">' . "\n" . ' <div style="float: left; padding: 2px;">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/success.gif', ICON_SUCCESS) . '</div>' . "\n" . ' <div style="float: left; padding: 2px; max-width: 95%;">' . $message . '</div>' . "\n" . ' <div class="clear"> </div>' . "\n" . ' </div>' . "\n");
} else {
$this->messages[] = array('class' => $class, 'type' => $type, 'text' => "\n" . ' <div class="message-stack-error" style="width: 100%;">' . "\n" . ' <div style="padding: 2px;">' . $message . ' </div>' . "\n" . ' </div>' . "\n");
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:12,代码来源:message_stack.php
示例4: left
require DIR_WS_INCLUDES . 'boxes.php';
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'footer.php';
if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
$smarty->caching = 1;
$cache_id = 'L3|cc_reviews|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
}
if (!$smarty->isCached(SELECTED_TPL . '/reviews.tpl', $cache_id)) {
$reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_or_pages_status = '1' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' and rd.languages_id = '" . (int) $_SESSION['languages_id'] . "' order by r.reviews_id DESC";
$reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS);
if ($reviews_split->number_of_rows > 0) {
$reviews_query = xos_db_query($reviews_split->sql_query);
$reviews_array = array();
while ($reviews = xos_db_fetch_array($reviews_query)) {
$product_image = xos_get_product_images($reviews['products_image']);
$reviews_array[] = array('link_filename_product_reviews_info' => xos_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'p=' . $reviews['products_id'] . '&r=' . $reviews['reviews_id']), 'date_added' => xos_date_long($reviews['date_added']), 'products_image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $reviews['products_name']), 'td_width_img' => SMALL_PRODUCT_IMAGE_MAX_WIDTH + 10, 'reviews_rating' => $reviews['reviews_rating'], 'review_text' => xos_break_string(xos_output_string_protected($reviews['reviews_text']), 60, '-<br />'), 'stars_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'customers_name' => xos_output_string_protected($reviews['customers_name']), 'products_name' => $reviews['products_name']);
}
if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_top', true);
}
if (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_bottom', true);
}
$smarty->assign('reviews', true);
}
$smarty->assign(array('nav_bar_number' => $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS), 'nav_bar_result' => TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'nav_bar_result_in_pull_down_menu' => $reviews_split->display_links_in_pull_down_menu(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'reviews_array' => $reviews_array));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'reviews');
}
$output_reviews = $smarty->fetch(SELECTED_TPL . '/reviews.tpl', $cache_id);
$smarty->assign('central_contents', $output_reviews);
$smarty->caching = 0;
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:reviews.php
示例5: xos_db_query
$options = xos_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by products_options_name");
while ($options_values = xos_db_fetch_array($options)) {
if ($_GET['option_id'] == $options_values['products_options_id']) {
$inputs_options_name .= '<option value="' . $options_values['products_options_id'] . '" selected="selected">' . $options_values['products_options_name'] . '</option>';
} else {
$inputs_options_name .= '<option value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
}
}
$inputs_options_name .= '</select>';
$error_message = '';
$inputs_options_value = '';
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
if (isset($options_value_error_array[$languages[$i]['id']])) {
if (empty($options_value_error_array[$languages[$i]['id']]) && !$set_empty) {
$error_message .= sprintf(TEXT_OPTION_VALUE_NAME_ERROR_EMPTY, TEXT_OPTION_ERROR_EMPTY_MARK) . '<br />';
$set_empty = true;
} elseif ($options_value_error_array[$languages[$i]['id']] && !$set_not_empty) {
$error_message .= sprintf(TEXT_OPTION_VALUE_NAME_ERROR, TEXT_OPTION_ERROR_MARK) . '<br />';
$set_not_empty = true;
}
}
$inputs_options_value .= '<input type="text" name="value_name[' . $languages[$i]['id'] . ']" value="' . $options_value_array[$languages[$i]['id']] . '" class="smallText" size="20" /> ' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . (isset($options_value_error_array[$languages[$i]['id']]) ? empty($options_value_error_array[$languages[$i]['id']]) ? '<font color="red"> ' . TEXT_OPTION_ERROR_EMPTY_MARK . '</font>' : '<font color="red"> ' . TEXT_OPTION_ERROR_MARK . '</font>' : '') . '<br />';
}
$smarty->assign(array('form_begin_option' => '<form name="values" action="' . xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_option_values&options_page=1&' . $parameter_string) . '" method="post">', 'next_id' => $next_id, 'error_message' => $error_message, 'inputs_options_value' => $inputs_options_value, 'inputs_options_name' => $inputs_options_name, 'hidden_value_id' => '<input type="hidden" name="value_id" value="' . $next_id . '" />', 'form_end' => '</form>'));
}
}
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'products_attributes');
$output_attributes_values = $smarty->fetch(ADMIN_TPL . '/includes/modules/attributes_values.tpl');
$smarty->clearAssign(array('delete_option_value', 'products_linked', 'products', 'link_filename_products_attributes', 'link_filename_products_attributes_delete', 'products_options_values_name', 'split_page', 'previous_option_the_same', 'next_option_the_same', 'options', 'form_begin_option', 'next_id', 'error_message', 'inputs_options_value', 'inputs_options_name', 'hidden_value_id', 'form_end'));
$smarty->assign('attributes_values', $output_attributes_values);
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:attributes_values.php
示例6: xos_db_query
$coupon_description_query = xos_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_list['coupon_id'] . "' and language_id = '" . $_SESSION['languages_id'] . "'");
$coupon_desc = xos_db_fetch_array($coupon_description_query);
if ($cc_list['coupon_type'] == 'P') {
// not floating point value, don't display decimal info
$coupon_amount = ($cc_list['coupon_amount'] == round($cc_list['coupon_amount']) ? number_format($cc_list['coupon_amount']) : number_format($cc_list['coupon_amount'], 2)) . '%';
} elseif ($cc_list['coupon_type'] == 'S') {
$coupon_amount = TEXT_FREE_SHIPPING;
} else {
$coupon_amount = $currencies->format($cc_list['coupon_amount']);
}
$redemptions = xos_db_num_rows($redeem_query);
$coupon_status = false;
if ($cc_list['coupon_active'] == 'Y') {
$coupon_status = true;
}
$cc_list_array[] = array('selected' => $selected, 'status' => $coupon_status, 'name' => $coupon_desc['coupon_name'], 'amount' => $coupon_amount, 'code' => $cc_list['coupon_code'], 'redemptions' => $redemptions, 'icon_status_green' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN), 'icon_status_red' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED), 'icon_status_green_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green_light.gif', ICON_TITLE_STATUS_GREEN_LIGHT), 'icon_status_red_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red_light.gif', ICON_TITLE_STATUS_RED_LIGHT), 'link_filename_coupon_admin_action_setflag_N' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=N&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_action_setflag_Y' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=Y&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin' => xos_href_link(FILENAME_COUPON_ADMIN, xos_get_all_get_params(array('cid', 'action')) . 'cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_edit' => $link_filename_coupon_admin_edit);
}
$smarty->assign('cc_list', $cc_list_array);
$status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
$status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
$status_array[] = array('id' => 'R', 'text' => TEXT_COUPON_REDEEMED);
$status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
if ($_GET['status']) {
$status = xos_db_prepare_input($_GET['status']);
} else {
// Changed from "Y" to "*" to see the Red Active and the Green Inactive status
$status = '*';
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:coupon_admin.php
示例7: xos_get_delivery_times_values
case 'PRODUCT_LIST_PRICE':
$popup_content_id = xos_get_delivery_times_values($listing['products_delivery_time_id'], 'popup_content_id');
$table_inner_array[] = array('case' => 'price', 'price_breaks' => $price_breaks, 'products_id' => $listing['products_id'], 'products_delivery_time' => xos_get_delivery_times_values($listing['products_delivery_time_id']), 'link_filename_popup_content_products_delivery_time' => $popup_content_id > 0 ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=' . $popup_content_id . '&p=' . $listing['products_id'], $request_type) : '', 'tax_description' => xos_get_products_tax_description($listing['products_tax_class_id'], $products_tax_rate), 'price' => $product_price, 'price_special' => $product_price_special, 'price_breaks' => $price_breaks_array);
break;
case 'PRODUCT_LIST_QUANTITY':
$table_inner_array[] = array('case' => 'quantity', 'products_quantity' => $listing['products_quantity'] > 0 ? $listing['products_quantity'] : '<span class="red-mark">' . $listing['products_quantity'] . '</span>');
break;
case 'PRODUCT_LIST_WEIGHT':
$table_inner_array[] = array('case' => 'weight', 'products_weight' => $listing['products_weight']);
break;
case 'PRODUCT_LIST_IMAGE':
$products_image_name = xos_get_product_images($listing['products_image']);
if (!empty($_GET['m'])) {
$table_inner_array[] = array('case' => 'image', 'products_image_small' => xos_lazy_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_image_medium' => xos_lazy_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_link_image' => xos_href_link(FILENAME_PRODUCT_INFO, 'm=' . $_GET['m'] . '&p=' . $listing['products_id']));
} else {
$table_inner_array[] = array('case' => 'image', 'products_image_small' => xos_lazy_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_image_medium' => xos_lazy_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_link_image' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . $listing['products_id']));
}
$smarty->assign('product_image', true);
break;
case 'PRODUCT_LIST_BUY_NOW':
$table_inner_array[] = array('case' => 'buy_now', 'products_buy_form_begin' => xos_draw_form('cart_quantity_' . $rows, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=add_product', $request_type)), 'form_name' => 'cart_quantity_' . $rows, 'form_end' => '</form>', 'label_for_products_input_quantity' => 'products_quantity_' . $listing['products_id'], 'products_input_quantity' => xos_draw_input_field('products_quantity', '1', 'id="products_quantity_' . $listing['products_id'] . '" class="form-control input-quantity" maxlength="5"'), 'products_hidden_field' => xos_draw_hidden_field('p', $listing['products_id']));
break;
}
}
$table_outer_array[] = array('table_inner' => $table_inner_array);
unset($price_breaks_array);
unset($table_inner_array);
}
if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_top', true);
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:product_listing.php
示例8: array
break;
default:
if (is_object($bInfo)) {
$heading_title = '<b>' . $bInfo->banners_title . '</b>';
$contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>');
$contents[] = array('text' => '<br />' . TEXT_BANNERS_DATE_ADDED . ' ' . xos_date_short($bInfo->date_added));
if (function_exists('imagecreate') && $dir_ok && $banner_extension) {
$banner_id = $bInfo->banners_id;
$days = '3';
include DIR_WS_INCLUDES . 'graphs/banner_infobox.php';
$contents[] = array('text' => '<br />' . xos_image(DIR_WS_ADMIN . DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension, '', '', '', 'id="banner_infobox"') . "\n" . '<script>' . "\n" . ' document.images.banner_infobox.src="' . DIR_WS_ADMIN . DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension . '?" + new Date().getTime();' . "\n" . '</script>' . "\n");
} else {
include DIR_WS_FUNCTIONS . 'html_graphs.php';
$contents[] = array('text' => '<br />' . xos_banner_graph_infoBox($bInfo->banners_id, '3'));
}
$contents[] = array('text' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '<br />' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS);
if ($bInfo->date_scheduled) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, xos_date_short($bInfo->date_scheduled)));
}
if ($bInfo->expires_date) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, xos_date_short($bInfo->expires_date)));
} elseif ($bInfo->expires_impressions) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));
}
if ($bInfo->date_status_change) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_STATUS_CHANGE, xos_date_short($bInfo->date_status_change)));
}
}
break;
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:infobox_banner_manager.php
示例9: array
$popup_img = DIR_WS_IMAGES . 'products/large/' . $products_img_name['name'];
$pop_size = @GetImageSize("{$popup_img}");
if ($pop_size[0] > $pop_width) {
$pop_width = $pop_size[0];
}
if ($pop_size[1] > $pop_height) {
$pop_height = $pop_size[1];
}
}
if ($small_width_total > $pop_width) {
$pop_width = $small_width_total;
}
$products_images_array = array();
$i = 0;
foreach ($products_image_name as $products_img_name) {
$products_images_array[] = array('link_product_img' => xos_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&img_name=' . rawurlencode($products_img_name['name'])), 'link_product_img_noscript' => xos_href_link(FILENAME_IMAGES_WINDOW, 'pID=' . $product_info['products_id'], 'NONSSL', true, false, false, false, false), 'href_to_product_img_large' => xos_href_link(DIR_WS_IMAGES . 'products/large/' . rawurlencode($products_img_name['name']), '', 'NONSSL', false, false, false, false, false), 'src_product_img_medium' => xos_href_link(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_img_name['name']), '', 'NONSSL', false, false, false, false, false), 'product_img_medium' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_img_name['name']), addslashes($product_info['products_name']), '0', '0'), 'i' => $i);
$i++;
}
$smarty->assign(array('box_width' => (int) ($pop_width + 50), 'box_height' => (int) ($pop_height + $small_height + 55), 'products_images' => $products_images_array));
}
if (xos_has_product_attributes((int) $_GET['p'])) {
xos_not_null($product_info['attributes_combinations']) ? $combinations_string = $product_info['attributes_combinations'] : ($combinations_string = '');
$attributes_quantity = xos_get_attributes_quantity($product_info['attributes_quantity']);
if (xos_not_null($attributes_quantity) && $combinations_string != '' && STOCK_CHECK == 'true' && STOCK_ALLOW_CHECKOUT == 'false') {
$combination_elements = explode('|', $combinations_string);
for ($i = 0, $n = sizeof($combination_elements); $i < $n; $i++) {
if ($attributes_quantity[$combination_elements[$i]] < 1) {
unset($combination_elements[$i]);
}
}
ksort($combination_elements);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:product_info.php
示例10: xos_db_query
$reviews_text_query = xos_db_query("select r.reviews_read, r.customers_name, length(rd.reviews_text) as reviews_text_size from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $reviews['reviews_id'] . "' and r.reviews_id = rd.reviews_id");
$reviews_text = xos_db_fetch_array($reviews_text_query);
$products_image_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'");
$products_image = xos_db_fetch_array($products_image_query);
$products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
$products_name = xos_db_fetch_array($products_name_query);
$reviews_average_query = xos_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int) $reviews['products_id'] . "'");
$reviews_average = xos_db_fetch_array($reviews_average_query);
$review_info = array_merge((array) $reviews_text, (array) $reviews_average, (array) $products_name);
$rInfo_array = array_merge((array) $reviews, (array) $review_info, (array) $products_image);
$rInfo = new objectInfo($rInfo_array);
}
$selected = false;
if (isset($rInfo) && is_object($rInfo) && $reviews['reviews_id'] == $rInfo->reviews_id) {
$selected = true;
$link_filename_reviews = xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=preview');
} else {
$link_filename_reviews = xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id']);
}
$reviews_array[] = array('selected' => $selected, 'link_filename_reviews_review' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=preview'), 'products_name' => xos_get_products_name($reviews['products_id']), 'stars_image' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/stars_' . $reviews['reviews_rating'] . '.gif'), 'date_added' => xos_date_short($reviews['date_added']), 'link_filename_reviews' => $link_filename_reviews);
}
$smarty->assign(array('reviews' => $reviews_array, 'nav_bar_number' => $reviews_split->display_count($reviews_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_REVIEWS), 'nav_bar_result' => $reviews_split->display_links($reviews_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'])));
require DIR_WS_BOXES . 'infobox_reviews.php';
}
$smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'reviews');
$output_reviews = $smarty->fetch(ADMIN_TPL . '/reviews.tpl');
$smarty->assign('central_contents', $output_reviews);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:reviews.php
示例11: xos_db_query
//------------------------------------------------------------------------------
// this file is based on:
// osCommerce, Open Source E-Commerce Solutions
// http://www.oscommerce.com
// Copyright (c) 2003 osCommerce
// filename: product_notifications.php
//
// Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/product_notifications.php') == 'overwrite_all')) {
if (isset($_GET['p'])) {
$allowed_product_query = xos_db_query("select p.products_id total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_OR_PAGES . " c where p.products_id = '" . (int) $_GET['p'] . "' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and c.categories_or_pages_status = '1' and p.products_status = '1'");
if (xos_db_num_rows($allowed_product_query)) {
if (isset($_SESSION['customer_id'])) {
$check_query = xos_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $_GET['p'] . "' and customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$check = xos_db_fetch_array($check_query);
$notification_exists = $check['count'] > 0 ? true : false;
} else {
$notification_exists = false;
}
if ($notification_exists == true) {
$smarty->assign(array('box_product_notifications_notification_exists' => true, 'box_product_notifications_link_notify_notify_remove' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action', 'lnc', 'cur', 'tpl')) . 'action=notify_remove', $request_type), 'box_product_notifications_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS)));
} else {
$smarty->assign(array('box_product_notifications_notification_exists' => false, 'box_product_notifications_link_notify_notify_remove' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action', 'lnc', 'cur', 'tpl')) . 'action=notify', $request_type), 'box_product_notifications_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS)));
}
$smarty->assign(array('box_product_notifications_link_filename_account_notifications' => xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'), 'box_product_notifications_product_name' => xos_get_products_name($_GET['p'])));
$output_product_notifications = $smarty->fetch(SELECTED_TPL . '/includes/boxes/product_notifications.tpl');
$smarty->assign('box_product_notifications', $output_product_notifications);
}
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:product_notifications.php
示例12: xos_db_query
$country_query = xos_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int) $customers['entry_country_id'] . "'");
$country = xos_db_fetch_array($country_query);
$reviews_query = xos_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int) $customers['customers_id'] . "'");
$reviews = xos_db_fetch_array($reviews_query);
$customer_info = array_merge((array) $country, (array) $info, (array) $reviews);
$cInfo_array = array_merge((array) $customers, (array) $customer_info);
$cInfo = new objectInfo($cInfo_array);
}
$selected = false;
if (isset($cInfo) && is_object($cInfo) && $customers['customers_id'] == $cInfo->customers_id) {
$selected = true;
$link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit');
} else {
$link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']);
}
$customers_array[] = array('selected' => $selected, 'link_filename_customers' => $link_filename_customers, 'company' => strlen($customers['entry_company']) > 16 ? "<acronym title=\"" . $customers['entry_company'] . "\">" . substr($customers['entry_company'], 0, 16) . " </acronym>" : $customers['entry_company'], 'lastname' => strlen($customers['customers_lastname']) > 15 ? "<acronym title=\"" . $customers['customers_lastname'] . "\">" . substr($customers['customers_lastname'], 0, 15) . " </acronym>" : $customers['customers_lastname'], 'firstname' => strlen($customers['customers_firstname']) > 15 ? "<acronym title=\"" . $customers['customers_firstname'] . "\">" . substr($customers['customers_firstname'], 0, 15) . " </acronym>" : $customers['customers_firstname'], 'group_name' => strlen($customers['customers_group_name']) > 17 ? "<acronym title=\"" . $customers['customers_group_name'] . "\"> " . substr($customers['customers_group_name'], 0, 17) . " </acronym>" : $customers['customers_group_name'], 'date_account_created' => xos_date_short($info['date_account_created']), 'group_ra_status_image' => $customers['customers_group_ra'] == '1' ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_GREEN) : xos_draw_separator('pixel_trans.gif', '10', '10'));
}
$smarty->assign(array('link_self_company_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company'), 'link_self_lastname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname'), 'link_self_firstname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname'), 'link_self_cg_name_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name'), 'link_self_id_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-asc'), 'link_self_ra_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra'), 'link_self_company_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company-desc'), 'link_self_lastname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname-desc'), 'link_self_firstname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname-desc'), 'link_self_cg_name_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name-desc'), 'link_self_id_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-desc'), 'link_self_ra_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra-desc'), 'text_company_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_lastname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_firstname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_cg_name_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_id_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_ra_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_company_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_lastname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_firstname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_cg_name_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_id_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_ra_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX));
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_CUSTOMERS, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'customers' => $customers_array, 'nav_bar_number' => $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS), 'nav_bar_result' => $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'info', 'x', 'y', 'cID')))));
if (isset($_GET['search']) && xos_not_null($_GET['search'])) {
$smarty->assign('link_filename_customers_reset', xos_href_link(FILENAME_CUSTOMERS));
}
require DIR_WS_BOXES . 'infobox_customers.php';
}
$smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers');
$output_customers = $smarty->fetch(ADMIN_TPL . '/customers.tpl');
$smarty->assign('central_contents', $output_customers);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:customers.php
示例13: array
$options_name = $attributes_values['products_options_name'];
} else {
$options_name = '';
}
$current_attributes_values_array[$attributes_values['products_attributes_id']] = array('value_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']);
$attributes_values_array[] = array('option_name' => $options_name, 'value_name' => $attributes_values['products_options_values_name'], 'input_value_price' => xos_draw_input_field('value_price_' . $attributes_values['products_attributes_id'], $attributes_values['options_values_price'], 'style="background: #fffffe;" size ="11" onkeyup="updateGross(\'value_price_' . $attributes_values['products_attributes_id'] . '\', \'value_price_gross_' . $attributes_values['products_attributes_id'] . '\')"'), 'input_value_price_gross' => xos_draw_input_field('value_price_gross_' . $attributes_values['products_attributes_id'], $attributes_values['options_values_price'], 'style="background: #fffffe;" size ="11" onkeyup="updateNet(\'value_price_gross_' . $attributes_values['products_attributes_id'] . '\', \'value_price_' . $attributes_values['products_attributes_id'] . '\')"'), 'input_price_prefix' => xos_draw_input_field('price_prefix_' . $attributes_values['products_attributes_id'], $attributes_values['price_prefix'], 'style="background: #fffffe; text-align:center;" size ="1"'));
$update_gross_string .= 'updateGross(\'value_price_' . $attributes_values['products_attributes_id'] . '\', \'value_price_gross_' . $attributes_values['products_attributes_id'] . '\');' . "\n";
$update_net_string .= 'updateNet(\'value_price_gross_' . $attributes_values['products_attributes_id'] . '\', \'value_price_' . $attributes_values['products_attributes_id'] . '\');' . "\n";
}
}
///////////////////////////////////////
$javascript .= "\n" . 'function toggle(targetId, iState) {' . "\n" . ' var obj = document.getElementById(targetId).style;' . "\n" . ' if (obj.display == "none" && iState != 0 && iState != 1){' . "\n" . ' obj.display="";' . "\n" . ' } else if (iState != 0 && iState != 1){' . "\n" . ' obj.display="none";' . "\n" . ' }' . "\n" . ' if (iState == 1){' . "\n" . ' obj.display="";' . "\n" . ' } else if (iState == 0){' . "\n" . ' obj.display="none";' . "\n" . ' }' . "\n" . '}' . "\n\n" . 'function updateChecked(cuID) {' . "\n" . ' var selected = document.forms["' . $form_action . '"].elements["option[" + cuID + "]"].checked;' . "\n" . ' if (selected) {' . "\n" . ' toggle("box_" + cuID,1);' . "\n" . ' } else {' . "\n" . ' toggle("box_" + cuID,0);' . "\n" . ' }' . "\n" . '}' . "\n\n" . 'function doRound(x, places) {' . "\n" . ' return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);' . "\n" . '}' . "\n\n" . 'function getTaxRate() {' . "\n" . ' var selected_value = document.forms["' . $form_action . '"].tax_rates_final_id.selectedIndex;' . "\n" . ' var parameterVal = document.forms["' . $form_action . '"].tax_rates_final_id[selected_value].value;' . "\n\n" . ' if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {' . "\n" . ' return tax_rates[parameterVal];' . "\n" . ' } else {' . "\n" . ' return 0;' . "\n" . ' }' . "\n" . '}' . "\n\n" . 'function updateGross(inField, setField) {' . "\n" . ' var taxRate = getTaxRate();' . "\n" . ' var grossValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . ' if (taxRate > 0) {' . "\n" . ' grossValue = grossValue * ((taxRate / 100) + 1);' . "\n" . ' }' . "\n\n" . ' document.forms["' . $form_action . '"].elements[setField].value = doRound(grossValue, 4);' . "\n" . '}' . "\n\n" . 'function updateNet(inField, setField) {' . "\n" . ' var taxRate = getTaxRate();' . "\n" . ' var netValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . ' if (taxRate > 0) {' . "\n" . ' netValue = netValue / ((taxRate / 100) + 1);' . "\n" . ' }' . "\n\n" . ' document.forms["' . $form_action . '"].elements[setField].value = doRound(netValue, 4);' . "\n" . '}' . "\n\n" . 'function updatePrices(net, gross) {' . "\n\n" . ' if (gross) {' . "\n" . ' ' . $update_gross_string . "\n" . ' }' . "\n\n" . ' if (net) {' . "\n" . ' ' . $update_net_string . "\n" . ' }' . "\n\n" . '}' . "\n\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
if ($product['products_status'] == '1') {
$products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN);
} else {
$products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED);
}
if (isset($_GET['pID'])) {
$smarty->assign('update', true);
}
if ($messageStack->size('price_error') > 0) {
$smarty->assign('message_price_error', $messageStack->output('price_er
|
请发表评论