当前位置: 首页>>代码示例>>PHP>>正文


PHP xos_draw_form函数代码示例

本文整理汇总了PHP中xos_draw_form函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_draw_form函数的具体用法?PHP xos_draw_form怎么用?PHP xos_draw_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xos_draw_form函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display_links

 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     if (xos_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = xos_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, xos_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onchange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= xos_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SESSID) {
             $display_links .= xos_draw_hidden_field(xos_session_name(), xos_session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:43,代码来源:split_page_results.php

示例2: reset

//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/currencies.php') == 'overwrite_all')) {
    if (isset($currencies) && is_object($currencies)) {
        $currencies_content = '';
        $currencies_content_string = '';
        $currencies_content_noscript = '';
        reset($currencies->currencies);
        if (sizeof($currencies->currencies) > 1) {
            $currencies_array = array();
            while (list($key, $value) = each($currencies->currencies)) {
                $currencies_array[] = array('id' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false), 'text' => $value['title']);
                if ($_SESSION['currency'] == $key) {
                    $currencies_content_string .= '<span><b>' . $value['title'] . '</b></span>';
                    $currencies_content_noscript .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . '&nbsp; <b>' . $value['title'] . '</b></a><br />';
                } else {
                    $currencies_content_string .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . $value['title'] . '</a>';
                    $currencies_content_noscript .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . '&nbsp; ' . $value['title'] . '</a><br />';
                }
            }
            $currencies_content_noscript = substr($currencies_content_noscript, 0, -6);
            $currencies_content = xos_draw_form('currencies', xos_href_link(basename($_SERVER['PHP_SELF']), '', $request_type, false, true, false, false, false), 'get');
            $currencies_content .= xos_draw_pull_down_menu('cur', $currencies_array, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $_SESSION['currency'], $request_type, true, true, false, false, false), 'class="form-control input-sm" onchange="location = form.cur.options[form.cur.selectedIndex].value;"');
            $currencies_content .= '</form>';
            $smarty->assign(array('box_currencies_currencies' => $currencies_content, 'box_currencies_currencies_string' => $currencies_content_string, 'box_currencies_currencies_noscript' => $currencies_content_noscript));
            $output_currencies = $smarty->fetch(SELECTED_TPL . '/includes/boxes/currencies.tpl');
            $smarty->assign('box_currencies', $output_currencies);
        }
    }
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:currencies.php

示例3: array

         $contents[] = array('text' => '<br />&nbsp;<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']));
         $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . '<br /><div class="form-group">' . xos_draw_input_field('title[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_left[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_right[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br /><div class="form-group">' . xos_draw_input_field('decimal_point[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br /><div class="form-group">' . xos_draw_input_field('thousands_point[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>');
     }
     $contents[] = array('text' => '<br />&nbsp;<br />&nbsp;<br />' . TEXT_INFO_CURRENCY_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br /><div class="form-group">' . xos_draw_input_field('decimal_places', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br /><div class="form-group">' . xos_draw_input_field('value', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT . '</label></div>');
     $contents[] = array('text' => '<br /><a href="" onclick="currencies.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_INSERT . ' ">' . BUTTON_TEXT_INSERT . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $_GET['cID']) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 case 'edit':
     $heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_CURRENCY . '</b>';
     $form_tag = xos_draw_form('currencies', FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $languages = xos_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $currency_query = xos_db_query("select title, symbol_left, symbol_right, decimal_point, thousands_point from " . TABLE_CURRENCIES . " where currencies_id = '" . $cInfo->currencies_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
         $currency = xos_db_fetch_array($currency_query);
         $contents[] = array('text' => '<br />&nbsp;<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']));
         $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . '<br /><div class="form-group">' . xos_draw_input_field('title[' . $languages[$i]['id'] . ']', $currency['title'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_left[' . $languages[$i]['id'] . ']', $currency['symbol_left'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_right[' . $languages[$i]['id'] . ']', $currency['symbol_right'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br /><div class="form-group">' . xos_draw_input_field('decimal_point[' . $languages[$i]['id'] . ']', $currency['decimal_point'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br /><div class="form-group">' . xos_draw_input_field('thousands_point[' . $languages[$i]['id'] . ']', $currency['thousands_point'], 'class="form-control"') . '</div>');
     }
     $contents[] = array('text' => '<br />&nbsp;<br />&nbsp;<br />' . TEXT_INFO_CURRENCY_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', $cInfo->code, 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br /><div class="form-group">' . xos_draw_input_field('decimal_places', $cInfo->decimal_places, 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br /><div class="form-group">' . xos_draw_input_field('value', $cInfo->value, 'class="form-control"') . '</div>');
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:infobox_currencies.php

示例4: array_shift

            }
            $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;
        }
        $product_image = array_shift($products_image_name);
        $smarty->assign(array('box_width' => (int) ($pop_width + 50), 'box_height' => (int) ($pop_height + $small_height + 55), 'link_product_img' => xos_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&img_name=' . rawurlencode($product_image['name']), $request_type), 'link_product_img_noscript' => xos_href_link(FILENAME_IMAGES_WINDOW, 'pID=' . $product_info['products_id'], 'NONSSL', true, false, false, false, false), 'product_img' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($product_image['name']), addslashes($product_info['products_name']), '', '', 'style="margin: 5px;"')));
    }
    $back = sizeof($_SESSION['navigation']->path) - 2;
    if (!empty($_SESSION['navigation']->path[$back])) {
        $get_params_array = $_SESSION['navigation']->path[$back]['get'];
        $get_params_array['rmp'] = '0';
        $back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
    } else {
        $back_link = 'javascript:history.go(-1)';
    }
    $smarty->assign(array('form_begin' => xos_draw_form('product_reviews_write', xos_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'action')) . 'action=process', 'SSL'), 'post', 'onsubmit="return checkForm();"', true), 'form_end' => '</form>', 'radio_fields' => xos_draw_radio_field('rating', '1') . ' ' . xos_draw_radio_field('rating', '2') . ' ' . xos_draw_radio_field('rating', '3') . ' ' . xos_draw_radio_field('rating', '4') . ' ' . xos_draw_radio_field('rating', '5'), 'textarea_field' => xos_draw_textarea_field('review', '60', '15'), 'customers_name' => xos_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']), 'products_name' => $product_info['products_name'], 'products_p_unit' => $product_info['products_p_unit'], 'products_model' => $product_info['products_model'], 'products_price' => $product_price, 'products_price_special' => $product_price_special, 'products_price_breaks' => $price_breaks_array, 'products_tax_description' => xos_get_products_tax_description($product_info['products_tax_class_id'], $products_tax_rate), 'td_width_img' => MEDIUM_PRODUCT_IMAGE_MAX_WIDTH + 10, 'link_back' => $back_link, 'link_buy_now' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=buy_now')));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_reviews_write');
    $output_product_reviews_write = $smarty->fetch(SELECTED_TPL . '/product_reviews_write.tpl');
    $smarty->assign('central_contents', $output_product_reviews_write);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:product_reviews_write.php

示例5: array

<?php

$contents = array();
switch ($action) {
    case 'edit':
        $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>';
        if ($cInfo->set_function) {
            eval('$value_field = ' . $cInfo->set_function . '"' . $cInfo->configuration_value . '");');
        } else {
            $value_field = xos_draw_input_field('configuration_value', $cInfo->configuration_value);
        }
        $form_tag = xos_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save');
        $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
        $contents[] = array('text' => '<br /><b>' . constant($cInfo->lang_key . '_TITLE') . '</b><br />' . constant($cInfo->lang_key . '_DESCRIPTION') . '<br />' . $value_field);
        $contents[] = array('text' => '<br /><a href="" onclick="configuration.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPDATE . ' "><span>' . BUTTON_TEXT_UPDATE . '</span></a><a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    default:
        if (isset($cInfo) && is_object($cInfo)) {
            $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>';
            $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a>');
            $contents[] = array('text' => '<br />' . constant($cInfo->lang_key . '_DESCRIPTION'));
            $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added));
            if (xos_not_null($cInfo->last_modified)) {
                $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($cInfo->last_modified));
            }
        }
        break;
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
$output_infobox_configuration = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_configuration.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:infobox_configuration.php

示例6: unset

    }
    if ($error == true) {
        unset($_SESSION['access_allowed']);
        $messageStack->add('offline', TEXT_OFFLINE_ERROR);
    }
    $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_OFFLINE, '', 'SSL'));
    require DIR_WS_INCLUDES . 'html_header.php';
    //  require(DIR_WS_INCLUDES . 'boxes.php');
    //  require(DIR_WS_INCLUDES . 'header.php');
    //  require(DIR_WS_INCLUDES . 'footer.php');
    if ($messageStack->size('offline') > 0) {
        $smarty->assign('message_stack', $messageStack->output('offline'));
        $smarty->assign('message_stack_error', $messageStack->output('offline', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('offline', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('offline', 'success'));
    }
    $language_string = '';
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        while (list($key, $value) = each($lng->catalog_languages)) {
            $language_str .= ' <a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'dfrom', 'dto')) . 'lnc=' . $key, $request_type) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
        }
        $smarty->assign('language_str', $language_str);
    }
    $smarty->assign(array('form_begin' => xos_draw_form('offline', xos_href_link(FILENAME_OFFLINE, 'action=process', 'SSL')), 'input_field_email_address' => xos_draw_input_field('email_address', '', 'id="email_address"'), 'input_field_password' => xos_draw_password_field('password', '', 'id="password"'), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'offline');
    $output_offline = $smarty->fetch(SELECTED_TPL . '/offline.tpl');
    $smarty->assign('central_contents', $output_offline);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:offline.php

示例7: xos_draw_radio_field

            $male = $account['customers_gender'] == 'm' ? true : false;
        }
        $female = !$male;
        $smarty->assign(array('account_gender' => true, 'input_gender' => xos_draw_radio_field('gender', 'm', $male, 'id="gender_m"') . '<label class="control-label" for="gender_m">&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;</label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f">&nbsp;&nbsp;' . FEMALE . '&nbsp;</label>' . (xos_not_null(ENTRY_GENDER_TEXT) ? '<span class="input-requirement">' . ENTRY_GENDER_TEXT . '</span>' : '')));
    }
    if (ACCOUNT_DOB == 'true') {
        $smarty->assign(array('account_dob' => true, 'input_dob' => xos_draw_input_field('dob', xos_date_short($account['customers_dob']), 'class="form-control" id="dob"') . '&nbsp;' . (xos_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="input-requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : '')));
    }
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        $lang_array = array();
        $languages_selected = '';
        while (list($key, $value) = each($lng->catalog_languages)) {
            $lang_array[] = array('id' => $value['id'], 'text' => $value['name']);
            if (!empty($language_id)) {
                $languages_selected = $language_id;
            } elseif ($value['id'] == $account['customers_language_id']) {
                $languages_selected = $account['customers_language_id'];
            }
        }
        $smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"')));
    } else {
        $smarty->assign('hidden_field_languages', xos_draw_hidden_field('languages', $account['customers_language_id']));
    }
    $smarty->assign(array('form_begin' => xos_draw_form('account_edit', xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'c_id' => $account['customers_c_id'], 'input_firstname' => xos_draw_input_field('firstname', $account['customers_firstname'], 'class="form-control" id="firstname"') . '&nbsp;' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', $account['customers_lastname'], 'class="form-control" id="lastname"') . '&nbsp;' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_email_address' => xos_draw_input_field('email_address', $account['customers_email_address'], 'class="form-control" id="email_address"') . '&nbsp;' . (xos_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''), 'input_telephone' => xos_draw_input_field('telephone', $account['customers_telephone'], 'class="form-control" id="telephone"') . '&nbsp;' . (xos_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''), 'input_fax' => xos_draw_input_field('fax', $account['customers_fax'], 'class="form-control" id="fax"') . '&nbsp;' . (xos_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_edit');
    $output_account_edit = $smarty->fetch(SELECTED_TPL . '/account_edit.tpl');
    $smarty->assign('central_contents', $output_account_edit);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:account_edit.php

示例8: xos_db_fetch_array

        $reviews = xos_db_fetch_array($reviews_query);
        if ($reviews['count'] > 0) {
            $smarty->assign('reviews_count', $reviews['count']);
        }
        if (xos_not_null($product_info['products_url'])) {
            $smarty->assign('link_products_url', xos_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false));
        }
        if ($product_info['products_date_available'] > 0) {
            $smarty->assign('products_date_available', xos_date_long($product_info['products_date_available']));
        } else {
            $smarty->assign('products_date_added', xos_date_long($product_info['products_date_added']));
        }
        if (PRODUCT_REVIEWS_ENABLED == 'true') {
            $smarty->assign('link_filename_product_reviews', xos_href_link(FILENAME_PRODUCT_REVIEWS, xos_get_all_get_params(array('lnc', 'cur', 'tpl'))));
        }
        $smarty->assign(array('input_products_quantity' => xos_draw_input_field('products_quantity', '1', 'id="products_quantity" size="3"'), 'hidden_field_products_id' => xos_draw_hidden_field('p', $product_info['products_id']), 'javascript' => $jscript_op, 'form_begin' => xos_draw_form('cart_quantity', xos_href_link(FILENAME_PRODUCT_INFO, xos_get_all_get_params(array('action')) . 'action=add_product')), 'form_end' => '</form>'));
        $smarty->caching = 0;
        include DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS;
        include DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS;
        if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true') && !isset($_GET['noscript'])) {
            $smarty->caching = 1;
        }
    }
    $smarty->assign('link_filename_default', xos_href_link(FILENAME_DEFAULT));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_info');
}
// link_back will not be cached (nocache)
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
    $get_params_array = $_SESSION['navigation']->path[$back]['get'];
    $get_params_array['rmp'] = '0';
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:product_info.php

示例9: check_keywords

//              or (at your option) any later version.
//
//              XOS-Shop is distributed in the hope that it will be useful,
//              but WITHOUT ANY WARRANTY; without even the implied warranty of
//              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//              GNU General Public License for more details.
//
//              You should have received a copy of the GNU General Public License
//              along with XOS-Shop.  If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------
// this file is based on:
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2003 osCommerce
//              filename: search.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/search.php') == 'overwrite_all')) {
    if (CACHE_LEVEL > 0 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
        $smarty->caching = 1;
        $cache_id = 'L1|box_search|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
    }
    if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/search.tpl', $cache_id)) {
        $js_check_keywords_string .= '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function check_keywords() {' . "\n" . '  var error_message = "' . JS_ERROR . '";' . "\n" . '  var keywords = document.quick_find.keywords.value;' . "\n\n" . '  String.prototype.trim = function () {' . "\n" . '    return (this.replace(/\\s+$/,"").replace(/^\\s+/,""));' . "\n" . '  };' . "\n\n" . '  if ((keywords == "") || (keywords.trim().length < 1)) {' . "\n" . '    error_message = error_message + "* ' . JS_ERROR_KEYWORD_FIELD_EMPTY . '\\n";' . "\n" . '    alert(error_message);' . "\n" . '    document.quick_find.keywords.focus();' . "\n" . '    return false;' . "\n" . '  }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
        $smarty->assign(array('box_search_link_filename_advanced_search_and_results' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS), 'box_search_js_check_keywords' => $js_check_keywords_string, 'box_search_link_quick_search_suggest' => str_replace('&amp;', '&', substr(xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false), -4) == '.php' ? xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false) . '?keywords=' : xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false) . '&keywords='), 'box_search_imput_field' => xos_draw_input_field('keywords', '', 'class="form-control" id="box_search_keywords" autocomplete="off" style="width: 118px" maxlength="30"', 'text', false), 'box_search_form_begin' => xos_draw_form('quick_find', xos_href_link(FILENAME_SEARCH_RESULT, '', $request_type, false), 'post', 'onsubmit="return check_keywords(this);"') . xos_hide_session_id(), 'box_search_form_end' => '</form>'));
    }
    $output_search = $smarty->fetch(SELECTED_TPL . '/includes/boxes/search.tpl', $cache_id);
    $smarty->caching = 0;
    $smarty->assign('box_search', $output_search);
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:search.php

示例10: elseif

     } elseif (EMAIL_USE_HTML == 'true') {
         $smarty->assign(array('use_html' => true, 'textarea_content_text_htlm' => xos_draw_textarea_field('content_text_htlm', '130', '25', $nInfo->content_text_htlm)));
     }
     $smarty->assign('textarea_content_text_plain', xos_draw_textarea_field('content_text_plain', '130', '25', $nInfo->content_text_plain));
     $languages = xos_get_languages();
     if (sizeof($languages) > 1) {
         $languages_id_selected = '';
         $lang_array = array(array('id' => '0', 'text' => TEXT_ALL_LANGUAGES));
         for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
             $lang_array[] = array('id' => $languages[$i]['id'], 'text' => $languages[$i]['name']);
         }
         $smarty->assign(array('languages' => true, 'pull_down_languages' => xos_draw_pull_down_menu('language_id', $lang_array, $nInfo->language_id)));
     } else {
         $smarty->assign('hidden_field_language_id', xos_draw_hidden_field('language_id', $languages[0]['id']));
     }
     $smarty->assign(array('action' => 'new', 'form_begin_new' => xos_draw_form('newsletter', FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . ($form_action == 'insert' ? JS_CONFIRM_INSERT : JS_CONFIRM_UPDATE) . '\')" enctype="multipart/form-data"'), 'pull_down_module' => xos_draw_pull_down_menu('module', $modules_array, $nInfo->module), 'input_title' => xos_draw_input_field('title', $nInfo->title, '', true), 'link_filename_newsletters_cancel' => xos_href_link(FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (isset($_GET['nID']) ? 'nID=' . $_GET['nID'] : ''))));
 } elseif ($action == 'preview') {
     $nID = xos_db_prepare_input($_GET['nID']);
     $newsletter_query = xos_db_query("select title, content_text_plain, content_text_htlm, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
     $newsletter = xos_db_fetch_array($newsletter_query);
     $nInfo = new objectInfo($newsletter);
     if ($nInfo->content_text_htlm != '' && EMAIL_USE_HTML == 'true') {
         $smarty->assign(array('content_text_plain' => wordwrap($nInfo->content_text_plain, 100), 'content_text_htlm' => $nInfo->content_text_htlm));
     } else {
         $smarty->assign('content_text_plain', wordwrap($nInfo->content_text_plain, 100));
     }
     $smarty->assign(array('action' => 'preview', 'link_filename_newsletters_back' => xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])));
 } elseif ($action == 'send') {
     $nID = xos_db_prepare_input($_GET['nID']);
     $newsletter_query = xos_db_query("select ns.title, ns.language_id, ns.content_text_plain, ns.content_text_htlm, ns.module, ls.code as language_code, ls.directory as language_directory from " . TABLE_NEWSLETTERS . " ns left join " . TABLE_LANGUAGES . " ls on ns.language_id = ls.languages_id where newsletters_id = '" . (int) $nID . "'");
     $newsletter = xos_db_fetch_array($newsletter_query);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:newsletters.php

示例11: xos_db_query

     $categories_query = xos_db_query("select c.categories_or_pages_id, cpd.categories_or_pages_name, c.parent_id from " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_CATEGORIES_OR_PAGES_DATA . " cpd where c.categories_or_pages_id = cpd.categories_or_pages_id and cpd.language_id = '" . (int) $_SESSION['used_lng_id'] . "' and c.parent_id = '" . (int) $parent_id . "' order by c.sort_order, cpd.categories_or_pages_name");
     while ($categories = xos_db_fetch_array($categories_query)) {
         $categories_string .= " or p2c.categories_or_pages_id = '" . $categories['categories_or_pages_id'] . "'";
         $categories_string = xos_get_categories_string($categories['categories_or_pages_id'], '', $categories_string);
     }
     return $categories_string;
 }
 $javascript = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n\n" . 'function toggle() {' . "\n" . '  if (document.getElementById("options").style.display == "none"){' . "\n" . '    document.getElementById("filter").style.display="none";' . "\n" . '    document.getElementById("no-filter").style.display="";' . "\n" . '    document.getElementById("options").style.display="";' . "\n" . '    document.getElementById("attributes").style.display="none";' . "\n" . '  } else {' . "\n" . '    document.getElementById("filter").style.display="";' . "\n" . '    document.getElementById("no-filter").style.display="none";' . "\n" . '    document.getElementById("options").style.display="none";' . "\n" . '    document.getElementById("attributes").style.display="";' . "\n" . '  }' . "\n" . '}' . "\n\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
 require DIR_WS_INCLUDES . 'html_header.php';
 require DIR_WS_INCLUDES . 'header.php';
 require DIR_WS_INCLUDES . 'column_left.php';
 require DIR_WS_INCLUDES . 'footer.php';
 if ($pID) {
     $smarty->assign(array('single_product' => true, 'text_new_product' => sprintf(TEXT_NEW_PRODUCT_3, $form_action == 'insert_product' ? TEXT_NEW_PRODUCT_1 : TEXT_NEW_PRODUCT_2, xos_output_generated_category_path($current_category_id)), 'link_back_to_product_list' => xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pID), 'form_begin_filter_products_attributes' => xos_draw_form('filter_products_attributes', FILENAME_PRODUCTS_ATTRIBUTES, '', 'get'), 'pull_down_menu_max_rows' => xos_draw_pull_down_menu('max_rows', $max_display_rows_array, $_GET['max_rows'], 'style="width: 75px;"'), 'hidden_fields_page_info' => xos_draw_hidden_field('pID', $pID) . xos_draw_hidden_field('cPath', $cPath) . xos_draw_hidden_field('selected_tax_rate_id', $_GET['selected_tax_rate_id']) . xos_draw_hidden_field('option_page', $_GET['option_page']) . xos_draw_hidden_field('value_page', $_GET['value_page']) . xos_draw_hidden_field('attribute_page', $_GET['attribute_page']), 'form_end_filter' => '</form>'));
 } else {
     $smarty->assign(array('form_begin_filter_products_attributes' => xos_draw_form('filter_products_attributes', FILENAME_PRODUCTS_ATTRIBUTES, '', 'get'), 'pull_down_menu_categories_or_pages_id' => xos_draw_pull_down_menu('categories_or_pages_id', xos_get_category_tree(), $categories_or_pages_id), 'pull_down_menu_manufacturers_id' => xos_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $manufacturers_id), 'pull_down_menu_max_rows' => xos_draw_pull_down_menu('max_rows', $max_display_rows_array, $_GET['max_rows'], 'style="width: 75px;"'), 'pull_down_menu_max_products' => xos_draw_pull_down_menu('max_products_in_pullwown', $max_display_products_in_pulldown_array, $_GET['max_products_in_pullwown'], 'style="width: 155px;"'), 'hidden_fields_page_info' => xos_draw_hidden_field('selected_tax_rate_id', $_GET['selected_tax_rate_id']) . xos_draw_hidden_field('option_page', $_GET['option_page']) . xos_draw_hidden_field('value_page', $_GET['value_page']) . xos_draw_hidden_field('attribute_page', $_GET['attribute_page']), 'form_end_filter' => '</form>'));
 }
 if (SESSID) {
     $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
 }
 $js_init_style = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n\n";
 if ($_GET['first_entrance']) {
     $js_init_style .= '    document.getElementById("filter").style.display="";' . "\n" . '    document.getElementById("no-filter").style.display="none";' . "\n" . '    document.getElementById("options").style.display="none";' . "\n" . '    document.getElementById("attributes").style.display="none";' . "\n\n";
 } elseif ($_GET['options_page']) {
     $js_init_style .= '    document.getElementById("filter").style.display="none";' . "\n" . '    document.getElementById("no-filter").style.display="";' . "\n" . '    document.getElementById("options").style.display="";' . "\n" . '    document.getElementById("attributes").style.display="none";' . "\n\n";
 } else {
     $js_init_style .= '    document.getElementById("filter").style.display="";' . "\n" . '    document.getElementById("no-filter").style.display="none";' . "\n" . '    document.getElementById("options").style.display="none";' . "\n" . '    document.getElementById("attributes").style.display="";' . "\n\n";
 }
 $js_init_style .= '/* ]]> */' . "\n" . '</script>' . "\n";
 $smarty->assign('js_init_style', $js_init_style);
 if (!$_GET['first_entrance']) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:products_attributes.php

示例12: array

     if (isset($_GET['error_title'])) {
         if (empty($_GET['error_title'])) {
             $contents[] = array('text' => '<br />' . TEXT_INFO_TAX_CLASS_TITLE_ERROR_EMPTY . '<br />');
         } else {
             $contents[] = array('text' => '<br />' . sprintf(TEXT_INFO_TAX_CLASS_TITLE_ERROR, $_GET['error_title']) . '<br />');
         }
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_TITLE . '<br />' . xos_draw_input_field('tax_class_title', isset($_GET['tax_class_title']) ? $_GET['tax_class_title'] : $tcInfo->tax_class_title) . xos_draw_hidden_field('actual_tax_class_title', $tcInfo->tax_class_title));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br />' . xos_draw_input_field('tax_class_description', isset($_GET['tax_class_description']) ? $_GET['tax_class_description'] : $tcInfo->tax_class_description));
     $contents[] = array('text' => '<br /><a href="" onclick="classes.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPDATE . ' "><span>' . BUTTON_TEXT_UPDATE . '</span></a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     break;
 case 'delete':
     $check_query = xos_db_query("select tax_class_id from " . TABLE_TAX_RATES . " where tax_class_id = '" . $tcInfo->tax_class_id . "' LIMIT 1");
     $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_TAX_CLASS . '</b>';
     if (!xos_db_num_rows($check_query)) {
         $form_tag = xos_draw_form('classes', FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=deleteconfirm');
         $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
         $contents[] = array('text' => '<br /><b>' . $tcInfo->tax_class_title . '</b>');
         $contents[] = array('text' => '<br /><a href="" onclick="classes.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     } else {
         $contents[] = array('text' => TEXT_INFO_DELETE_NOT_ALLOWED . '<br /><br />');
         $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_TAX_CLASSES, xos_get_all_get_params(array('action'))) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br />&nbsp;');
     }
     break;
 default:
     if (isset($tcInfo) && is_object($tcInfo)) {
         $heading_title = '<b>' . $tcInfo->tax_class_title . '</b>';
         $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>');
         $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($tcInfo->date_added));
         $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($tcInfo->last_modified));
         $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br />' . $tcInfo->tax_class_description);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:infobox_tax_classes.php

示例13: xos_db_fetch_array

                $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) . "&nbsp;</acronym>" : $customers['entry_company'], 'lastname' => strlen($customers['customers_lastname']) > 15 ? "<acronym title=\"" . $customers['customers_lastname'] . "\">" . substr($customers['customers_lastname'], 0, 15) . "&nbsp;</acronym>" : $customers['customers_lastname'], 'firstname' => strlen($customers['customers_firstname']) > 15 ? "<acronym title=\"" . $customers['customers_firstname'] . "\">" . substr($customers['customers_firstname'], 0, 15) . "&nbsp;</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) . "&nbsp;</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);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:customers.php

示例14: array

                } 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_error'));
        }
        $smarty->assign(array('edit_prices' => true, 'product_id' => $product['products_id'], 'product_model' => $product['products_model'], 'product_status_image' => $products_status_image, 'product_name' => $product['products_name'], 'javascript' => $javascript, 'form_begin' => xos_draw_form($form_action, FILENAME_UPDATE_PRODUCTS_PRICES, 'product_ID=' . $product['products_id'] . '&categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows'] . '&page=' . $_GET['page'] . ($_GET['specials_only'] ? '&specials_only=' . $_GET['specials_only'] : '') . '&action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . JS_CONFIRM_UPDATE . '\')" enctype="multipart/form-data"'), 'pull_down_products_tax_class' => xos_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $product['products_tax_class_id']), 'pull_down_tax_rates' => xos_draw_pull_down_menu('tax_rates_final_id', $tax_rates_final_array, '', 'onchange="updatePrices(false, true)"'), 'update_prices' => 'updatePrices(true, true)', 'update_checked_string' => $update_checked_string, 'customers_groups' => $customers_groups_array, 'attributes_values' => $attributes_values_array, 'hidden_price_array' => xos_draw_hidden_field('price_array', $product['products_price']), 'hidden_attributes_price_array' => xos_draw_hidden_field('attributes_price_array', serialize($current_attributes_values_array)), 'link_filename_update_products_prices' => xos_href_link(FILENAME_UPDATE_PRODUCTS_PRICES, 'categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows'] . '&page=' . $_GET['page'] . ($_GET['specials_only'] ? '&specials_only=' . $_GET['specials_only'] : ''))));
    }
    $smarty->assign('form_end', '</form>');
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'update_products_prices');
    $output_update_products_prices = $smarty->fetch(ADMIN_TPL . '/update_products_prices.tpl');
    $smarty->assign('central_contents', $output_update_products_prices);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:update_products_prices.php

示例15: array

        $amount = $_POST['amount'];
        $message = $_POST['message'];
        $customers = array();
        $customers[] = array('id' => '', 'text' => TEXT_SELECT_CUSTOMER);
        $customers[] = array('id' => '***', 'text' => TEXT_ALL_CUSTOMERS);
        $customers[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_CUSTOMERS);
        $mail_query = xos_db_query("select customers_email_address, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " order by customers_lastname");
        while ($customers_values = xos_db_fetch_array($mail_query)) {
            $customers[] = array('id' => $customers_values['customers_email_address'], 'text' => $customers_values['customers_lastname'] . ', ' . $customers_values['customers_firstname'] . ' (' . $customers_values['customers_email_address'] . ')');
        }
        $languages = xos_get_languages();
        if (sizeof($languages) > 1) {
            $language_dir_selected = '';
            for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                if ($languages[$i]['id'] == $_SESSION['used_lng_id']) {
                    $language_dir_selected = $languages[$i]['directory'];
                }
                $lang_array[] = array('id' => $languages[$i]['directory'], 'text' => $languages[$i]['name']);
            }
            $smarty->assign(array('languages' => true, 'pull_down_languages' => xos_draw_pull_down_menu('language_dir', $lang_array, $language_dir ? $language_dir : $language_dir_selected)));
        } else {
            $smarty->assign('hidden_field_language_dir', xos_draw_hidden_field('language_dir', $languages[0]['directory']));
        }
        $smarty->assign(array('form_begin_action_preview' => xos_draw_form('mail', FILENAME_GV_MAIL, 'action=preview', 'post', 'onsubmit="return check_email_to();"'), 'pull_down_customers_email_address' => xos_draw_pull_down_menu('customers_email_address', $customers, isset($_GET['customer']) ? $_GET['customer'] : ''), 'input_email_to' => xos_draw_input_field('email_to', '', 'onkeyup="updateLanguage()"') . ($entry_email_to_error == true ? '&nbsp;' . ENTRY_EMAIL_ADDRESS_ERROR : ($entry_email_to_check_error ? '&nbsp;' . ENTRY_EMAIL_ADDRESS_CHECK_ERROR : '&nbsp;' . TEXT_SINGLE_EMAIL)), 'input_from' => xos_draw_input_field('from', EMAIL_FROM), 'input_subject' => xos_draw_input_field('subject'), 'input_amount' => xos_draw_input_field('amount'), 'textarea_message' => xos_draw_textarea_field('message', '60', '15'), 'form_end' => '</form>'));
    }
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'gv_mail');
    $output_gv_mail = $smarty->fetch(ADMIN_TPL . '/gv_mail.tpl');
    $smarty->assign('central_contents', $output_gv_mail);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:gv_mail.php


注:本文中的xos_draw_form函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。