本文整理汇总了PHP中xos_draw_hidden_field函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_draw_hidden_field函数的具体用法?PHP xos_draw_hidden_field怎么用?PHP xos_draw_hidden_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xos_draw_hidden_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xos_draw_form
case 'delete_page':
$heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_PAGE . '</b>';
$form_tag = xos_draw_form('pages', FILENAME_PAGES, 'action=delete_page_confirm&cPath=' . $cPath) . xos_draw_hidden_field('categories_or_pages_id', $cInfo->categories_or_pages_id);
$contents[] = array('text' => TEXT_DELETE_PAGE_INTRO);
$contents[] = array('text' => '<br /><b>' . $cInfo->categories_or_pages_name . '</b>');
if ($cInfo->children_count > 0) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_CHILDREN, $cInfo->children_count));
}
if ($cInfo->products_count > 0) {
$contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count));
}
$contents[] = array('text' => '<br /><a href="" onclick="pages.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_PAGES, 'cPath=' . $cPath . '&cpID=' . $cInfo->categories_or_pages_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> ');
break;
case 'move_page':
$heading_title = '<b>' . TEXT_INFO_HEADING_MOVE_PAGE . '</b>';
$form_tag = xos_draw_form('pages', FILENAME_PAGES, 'action=move_page_confirm&cPath=' . $cPath) . xos_draw_hidden_field('categories_or_pages_id', $cInfo->categories_or_pages_id);
$contents[] = array('text' => sprintf(TEXT_MOVE_PAGES_INTRO, $cInfo->categories_or_pages_name));
$contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $cInfo->categories_or_pages_name) . '<br /><div class="form-group">' . xos_draw_pull_down_menu('move_to_page_id', xos_get_page_tree(), $cInfo->categories_or_pages_id, 'class="form-control"') . '</div>');
$contents[] = array('text' => '<br /><a href="" onclick="pages.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_MOVE . ' ">' . BUTTON_TEXT_MOVE . '</a><a href="' . xos_href_link(FILENAME_PAGES, 'cPath=' . $cPath . '&cpID=' . $cInfo->categories_or_pages_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> ');
break;
default:
if ($rows > 0) {
if (isset($cInfo) && is_object($cInfo)) {
// page info box contents
$page_path_string = '';
$page_path = xos_generate_page_path($cInfo->categories_or_pages_id);
for ($i = sizeof($page_path[0]) - 1; $i > 0; $i--) {
$page_path_string .= $page_path[0][$i]['id'] . '_';
}
$page_path_string = substr($page_path_string, 0, -1);
$heading_title = '<b>' . $cInfo->categories_or_pages_name . '</b>';
示例2: xos_draw_form
$heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>';
$form_tag = xos_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save');
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
if (isset($_GET['error_name'])) {
if (empty($_GET['error_name'])) {
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME_ERROR_EMPTY . '<br />');
} else {
$contents[] = array('text' => '<br />' . sprintf(TEXT_INFO_ZONES_NAME_ERROR, $_GET['error_name']) . '<br />');
}
}
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . xos_draw_input_field('zone_name', isset($_GET['zone_name']) ? $_GET['zone_name'] : $cInfo->zone_name) . xos_draw_hidden_field('actual_zone_name', $cInfo->zone_name));
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_CODE . '<br />' . xos_draw_input_field('zone_code', isset($_GET['zone_code']) ? $_GET['zone_code'] : $cInfo->zone_code));
if (!xos_db_num_rows($check_query) && STORE_ZONE != $cInfo->zone_id) {
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . xos_draw_pull_down_menu('zone_country_id', xos_get_countries(), isset($_GET['zone_country_id']) ? $_GET['zone_country_id'] : $cInfo->countries_id, 'style="font-size:9px"') . xos_draw_hidden_field('actual_zone_country_id', $cInfo->countries_id));
} else {
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br /><b>' . $cInfo->countries_name . '</b>' . xos_draw_hidden_field('zone_country_id', $cInfo->countries_id) . xos_draw_hidden_field('actual_zone_country_id', $cInfo->countries_id));
}
$contents[] = array('text' => '<br /><a href="" onclick="zones.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_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
break;
case 'delete':
$check_query = xos_db_query("select ab.entry_zone_id, zgz.zone_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_ZONES_TO_GEO_ZONES . " zgz where ab.entry_zone_id = '" . (int) $cInfo->zone_id . "' or zgz.zone_id = '" . (int) $cInfo->zone_id . "' LIMIT 1");
$heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>';
if (!xos_db_num_rows($check_query) && STORE_ZONE != $cInfo->zone_id) {
$form_tag = xos_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm');
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => '<br /><b>' . $cInfo->zone_name . '</b>');
$contents[] = array('text' => '<br /><a href="" onclick="zones.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_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
} else {
$contents[] = array('text' => TEXT_INFO_DELETE_NOT_ALLOWED . '<br /><br />');
$contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_ZONES, 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 /> ');
}
示例3: urlencode
$onclick_link = 'info=' . urlencode($contents[$i]['name']);
}
if ($contents[$i]['is_dir']) {
if ($contents[$i]['name'] == '..') {
$icon = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/previous_level.gif', ICON_TITLE_PREVIOUS_LEVEL);
} else {
$icon = isset($fInfo) && is_object($fInfo) && $contents[$i]['name'] == $fInfo->name ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/current_folder.gif', ICON_TITLE_CURRENT_FOLDER) : xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/folder.gif', ICON_TITLE_FOLDER);
}
$link = xos_href_link(FILENAME_FILE_MANAGER, 'goto=' . $goto_link);
} else {
$icon = $contents[$i]['is_image'] ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/image_download.gif', ICON_TITLE_FILE_DOWNLOAD) : xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/file_download.gif', ICON_TITLE_FILE_DOWNLOAD);
$link = xos_href_link(FILENAME_FILE_MANAGER, 'action=download&filename=' . urlencode($contents[$i]['name']));
}
if ($contents[$i]['name'] != '..') {
$link_delete = xos_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($contents[$i]['name']) . '&action=delete');
}
$folders_and_files_array[] = array('selected' => $selected, 'link_onclick' => xos_href_link(FILENAME_FILE_MANAGER, $onclick_link), 'link' => $link, 'icon' => $icon, 'name' => $contents[$i]['name'], 'size' => $contents[$i]['is_dir'] ? ' ' : $contents[$i]['size'], 'permissions' => $contents[$i]['permissions'], 'user' => $contents[$i]['user'], 'group' => $contents[$i]['group'], 'last_modified' => $contents[$i]['last_modified'], 'link_delete' => $link_delete, 'link_filename_file_manager_info' => xos_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($contents[$i]['name'])));
}
$smarty->assign(array('folders_and_files' => $folders_and_files_array, 'link_filename_file_manager_reset' => xos_href_link(FILENAME_FILE_MANAGER, 'action=reset'), 'link_filename_file_manager_upload' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=upload'), 'link_filename_file_manager_new_file' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=new_file'), 'link_filename_file_manager_new_folder' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=new_folder')));
require DIR_WS_BOXES . 'infobox_file_manager.php';
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_goto' => xos_draw_form('goto', FILENAME_FILE_MANAGER, '', 'get'), 'current_path' => $_SESSION['current_path'], 'pull_down_goto' => xos_draw_pull_down_menu('goto', $goto_array, $_SESSION['current_path'], 'onchange="this.form.submit();"'), 'form_end' => '</form>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'file_manager');
$output_file_manager = $smarty->fetch(ADMIN_TPL . '/file_manager.tpl');
$smarty->assign('central_contents', $output_file_manager);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例4: 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';
示例5: 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"> ' . MALE . ' </label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f"> ' . FEMALE . ' </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"') . ' ' . (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"') . ' ' . (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"') . ' ' . (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"') . ' ' . (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"') . ' ' . (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"') . ' ' . (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';
}
示例6: sprintf
$error_message = '';
$inputs_options_value = '';
if ($action == 'update_option_value' && $_GET['value_id'] == $values_values['products_options_values_id']) {
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;
}
}
$value_name = xos_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int) $values_values['products_options_values_id'] . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
$value_name = xos_db_fetch_array($value_name);
$inputs_options_value .= '<input type="text" name="value_name[' . $languages[$i]['id'] . ']" class="smallText" size="20" value="' . (isset($options_value_array[$languages[$i]['id']]) ? $options_value_array[$languages[$i]['id']] : $value_name['products_options_values_name']) . '" /> ' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . xos_draw_hidden_field('actual_value_name[' . $languages[$i]['id'] . ']', $value_name['products_options_values_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 />';
}
}
$max_values_id_query = xos_db_query("select max(products_options_values_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS_VALUES);
$max_values_id_values = xos_db_fetch_array($max_values_id_query);
$next_id = $max_values_id_values['next_id'];
$options_value[] = array('form_begin_values' => '<form name="values" action="' . xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_value&options_page=1&' . $parameter_string) . '" method="post">', 'error_message' => $error_message, 'inputs_options_value' => $inputs_options_value, 'id' => $values_values['products_options_values_id'], 'option_name' => $options_name, 'value_name' => $values_name, 'hidden_ids' => '<input type="hidden" name="value_id" value="' . $values_values['products_options_values_id'] . '" /><input type="hidden" name="option_id" value="' . $values_values['products_options_id'] . '" />', 'link_filename_products_attributes' => xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'options_page=1&' . $parameter_string), 'form_end' => '</form>', 'link_filename_products_attributes_action_update' => xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_value&value_id=' . $values_values['products_options_values_id'] . '&options_page=1&' . $parameter_string), 'link_filename_products_attributes_action_delete' => xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option_value&value_id=' . $values_values['products_options_values_id'] . '&options_page=1&' . $parameter_string));
}
$smarty->assign(array('split_page' => $values_split->display_links($values_query_numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $value_page, 'options_page=1&' . $cmm_parameter_string . '&option_page=' . $option_page . '&attribute_page=' . $attribute_page, 'value_page'), 'previous_option_the_same' => $previous_option_is_the_same, 'next_option_the_same' => $next_option_is_the_same, 'options' => $options_value));
if ($action != 'update_option_value') {
$inputs_options_name = '<select name="option_id">';
$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 {
示例7: elseif
$smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=6" method="post">', 'form_end' => '</form>', 'configuration_not_writable' => true, 'dir_fs_document_root' => $dir_fs_document_root, 'admin_dir_name' => $admin_dir_name, 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
} elseif (!is_writable($dir_fs_document_root) && $_POST['RENAME_ADMIN_DIR'] == 'true' && $_POST['ignore_renaming'] != 'true') {
reset($_POST);
$hidden_fields = '';
while (list($key, $value) = each($_POST)) {
if ($key != 'x' && $key != 'y') {
if (is_array($value)) {
for ($i = 0; $i < sizeof($value); $i++) {
$hidden_fields .= xos_draw_hidden_field($key . '[]', $value[$i]);
}
} else {
$hidden_fields .= xos_draw_hidden_field($key, $value);
}
}
}
$smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=6" method="post">', 'form_end' => '</form>', 'admin_can_not_be_renamed' => true, 'dir_fs_document_root' => substr($dir_fs_document_root, 0, strlen($dir_fs_document_root) - 1), 'admin_dir_name' => $admin_dir_name, 'hidden_field_ignore_renaming' => xos_draw_hidden_field('ignore_renaming', 'true'), 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
} else {
if ($_POST['RENAME_ADMIN_DIR'] == 'true') {
$possible_char = "123456789";
$rand_str = '';
while (strlen($rand_str) < 4) {
$rand_str .= substr($possible_char, rand() % strlen($possible_char), 1);
}
if (@rename($dir_fs_document_root . $admin_dir_name, $dir_fs_document_root . 'admin' . $rand_str)) {
$admin_dir_name = 'admin' . $rand_str;
}
}
$enable_ssl = isset($_POST['ENABLE_SSL']) && $_POST['ENABLE_SSL'] == 'true' ? 'true' : 'false';
$http_cookie_domain = $_POST['HTTP_COOKIE_DOMAIN'];
$http_cookie_path = $_POST['HTTP_COOKIE_PATH'];
$http_url = parse_url(urldecode($_POST['HTTP_WWW_ADDRESS']));
示例8: array
<?php
$contents = array();
switch ($action) {
case 'edit_process':
$heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
$contents[] = array('text' => TEXT_INFO_INTRO_EDIT_PROCESS . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
break;
case 'check_account':
$heading_title = '<b>' . TEXT_INFO_HEADING_CONFIRM_PASSWORD . '</b>';
$contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
if ($_GET['error']) {
$contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD_ERROR);
}
$contents[] = array('text' => xos_draw_password_field('password_confirmation'));
$contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_ACCOUNT) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><a href="" onclick="account.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CONFIRM . ' "><span>' . BUTTON_TEXT_CONFIRM . '</span></a><br /> ');
break;
default:
$heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
$contents[] = array('text' => TEXT_INFO_INTRO_DEFAULT);
if ($myAccount['admin_email_address'] == 'admin@localhost') {
$contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST, $myAccount['admin_firstname']) . '<br /> ');
} elseif ($myAccount['admin_modified'] == '0000-00-00 00:00:00' || $myAccount['admin_logdate'] <= 1) {
$contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST_TIME, $myAccount['admin_firstname']) . '<br /> ');
}
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents));
$output_infobox_admin_account = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_admin_account.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_contents'));
$smarty->assign('infobox_admin_account', $output_infobox_admin_account);
return 'overwrite_all';
示例9: xos_draw_hidden_field
//------------------------------------------------------------------------------
// this file is based on:
// osCommerce, Open Source E-Commerce Solutions
// http://www.oscommerce.com
// Copyright (c) 2003 osCommerce
// filename: tell_a_friend.php
//
// Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/subscribe_newsletter.php') == 'overwrite_all')) {
if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
$smarty->caching = 1;
$cache_id = 'L2|box_subscribe_newsletter|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
}
if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/subscribe_newsletter.tpl', $cache_id)) {
$hidden_get_variables = '';
if (!$session_started && xos_not_null($_GET['cur'])) {
$hidden_get_variables .= xos_draw_hidden_field('cur', $_GET['cur']);
}
if (!$session_started && xos_not_null($_GET['lnc'])) {
$hidden_get_variables .= xos_draw_hidden_field('lnc', $_GET['lnc']);
}
if (!$session_started && xos_not_null($_GET['tpl'])) {
$hidden_get_variables .= xos_draw_hidden_field('tpl', $_GET['tpl']);
}
$smarty->assign(array('box_subscribe_newsletter_input_field_subscriber_email_address' => xos_draw_input_field('subscriber_email_address', '', 'class="form-control" id="box_subscriber_email_address" maxlength="50" style="width: 80%"'), 'box_subscribe_newsletter_input_hide_session' => xos_hide_session_id(), 'box_subscribe_newsletter_link_filename_newsletter_subscribe' => xos_href_link(FILENAME_NEWSLETTER_SUBSCRIBE, '', 'SSL'), 'box_subscribe_newsletter_form_begin' => xos_draw_form('subscribe_newsletter', xos_href_link(FILENAME_NEWSLETTER_SUBSCRIBE, '', 'SSL', false), 'get') . $hidden_get_variables, 'box_subscribe_newsletter_form_end' => '</form>'));
}
$output_subscribe_newsletter = $smarty->fetch(SELECTED_TPL . '/includes/boxes/subscribe_newsletter.tpl', $cache_id);
$smarty->caching = 0;
$smarty->assign('box_subscribe_newsletter', $output_subscribe_newsletter);
}
示例10: array
for ($i = 0, $n = sizeof($quotes); $i < $n; $i++) {
if (!isset($quotes[$i]['error'])) {
$shipping_modules_methods_array = array();
for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j++) {
// set the radio button to be checked if it is the method chosen
$checked = $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id'] ? true : false;
$checked == true || $n == 1 && $n2 == 1 ? $actual_method = true : ($actual_method = false);
if ($n > 1 || $n2 > 1) {
$several_methods = true;
$cost = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0));
} else {
$several_methods = false;
$cost = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']));
}
$shipping_modules_methods_array[] = array('radio_field' => xos_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="shipping_' . $radio_buttons . '"'), 'several_methods' => $several_methods, 'hidden_field' => xos_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], 'id="shipping_' . $radio_buttons . '"'), 'cost' => $cost, 'actual_method' => $actual_method, 'title' => $quotes[$i]['methods'][$j]['title'], 'radio_select' => $radio_buttons);
$radio_buttons++;
}
}
$shipping_modules_array[] = array('name' => $quotes[$i]['module'], 'icon' => $quotes[$i]['icon'], 'error' => $quotes[$i]['error'], 'methods' => $shipping_modules_methods_array);
unset($shipping_modules_methods_array);
}
}
$smarty->assign(array('shipping_modules' => true, 'shipping_modules_array' => $shipping_modules_array));
}
$smarty->assign(array('form_begin' => xos_draw_form('checkout_address', xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'post', '', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'form_end' => '</form>', 'link_filename_checkout_shipping_address' => MAX_ADDRESS_BOOK_ENTRIES > 1 ? xos_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') : xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'address_label' => xos_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />'), 'textarea' => xos_draw_textarea_field('comments', '60', '5', $_SESSION['comments'], 'class="form-control" id="checkout_shipping_comments"')));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_shipping');
$output_checkout_shipping = $smarty->fetch(SELECTED_TPL . '/checkout_shipping.tpl');
$smarty->assign('central_contents', $output_checkout_shipping);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例11: array
}
$product_images[] = array('img_no' => $img_no, 'selection_delete_image' => xos_draw_selection_field('delete_product_image_' . $i, 'checkbox', 'true'), 'radio_large_image_default_size' => xos_draw_radio_field('large_image_size_' . $i, 'default', true), 'radio_large_image_uploaded_size' => xos_draw_radio_field('large_image_size_' . $i, 'uploaded', false), 'radio_large_image_input_size' => xos_draw_radio_field('large_image_size_' . $i, 'input', false), 'input_large_image_max_width' => xos_draw_input_field('large_image_max_width_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'input_large_image_max_height' => xos_draw_input_field('large_image_max_height_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'small_product_image_max_height' => SMALL_PRODUCT_IMAGE_MAX_HEIGHT, 'image' => xos_image(DIR_WS_CATALOG_IMAGES . 'products/small/' . $products_image[$i]['name'], $pInfo->products_name), 'file_image' => xos_draw_file_field('products_image_' . $i), 'image_name' => $products_image[$i]['name'], 'large_img_width' => $large_img_size[0], 'large_img_height' => $large_img_size[1], 'large_img_base' => $products_image[$i]['large_image_max_width'] == 'default' ? 'default_size' : ($products_image[$i]['large_image_max_width'] == '0' ? 'origin_size' : ((int) $products_image[$i]['large_image_max_width'] > 0 ? 'self_selected_size' : '')), 'hidden_current_image' => xos_draw_hidden_field('current_product_image_' . $i, $products_image[$i]['name']));
if (empty($products_image[$i]['name'])) {
$more_images = true;
}
}
$product_values = array();
if (WYSIWYG_FOR_PRODUCT == 'true') {
$smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'product_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/product_config.js', 'product_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
}
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
sizeof($languages) > 1 ? $sort_order = 'products_id' : ($sort_order = 'products_p_unit');
$products_p_units_array = array(array('id' => '', 'text' => TEXT_NONE));
$products_p_units_query = xos_db_query("select distinct products_p_unit from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages[$i]['id'] . "' order by '" . $sort_order . "'");
while ($products_p_units = xos_db_fetch_array($products_p_units_query)) {
if (!empty($products_p_units['products_p_unit'])) {
$products_p_units_array[] = array('id' => $products_p_units['products_p_unit'], 'text' => $products_p_units['products_p_unit']);
}
}
$product_values[] = array('languages_image' => xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']), 'input_name' => xos_draw_input_field('products_name[' . $languages[$i]['id'] . ']', isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : xos_get_products_name($pInfo->products_id, $languages[$i]['id']), 'size="30"'), 'input_description_tab_label' => xos_draw_input_field('products_description_tab_label[' . $languages[$i]['id'] . ']', isset($products_description_tab_label[$languages[$i]['id']]) ? stripslashes($products_description_tab_label[$languages[$i]['id']]) : xos_get_products_description_tab_label($pInfo->products_id, $languages[$i]['id']), 'size="90"'), 'pull_down_input_p_unit' => xos_draw_pull_down_menu('products_p_unit[' . $languages[$i]['id'] . ']', $products_p_units_array, isset($products_p_unit[$languages[$i]['id']]) ? stripslashes($products_p_unit[$languages[$i]['id']]) : xos_get_products_p_unit($pInfo->products_id, $languages[$i]['id']), 'style="width: 17em"'), 'input_new_p_unit' => xos_draw_input_field('products_new_p_unit[' . $languages[$i]['id'] . ']'), 'info_name' => 'products_info[' . $languages[$i]['id'] . ']', 'description_name' => 'products_description[' . $languages[$i]['id'] . ']', 'product_info_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/product_info_template.js', 'product_info_template_lang' => $languages[$i]['directory'] . '_default', 'product_description_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/product_description_template.js', 'product_description_template_lang' => $languages[$i]['directory'] . '_default', 'textarea_info' => xos_draw_textarea_field('products_info[' . $languages[$i]['id'] . ']', '90', '4', isset($products_info[$languages[$i]['id']]) ? stripslashes($products_info[$languages[$i]['id']]) : xos_get_products_info($pInfo->products_id, $languages[$i]['id'])), 'textarea_description' => xos_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', '90', '15', isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : xos_get_products_description($pInfo->products_id, $languages[$i]['id'])), 'input_url' => xos_draw_input_field('products_url[' . $languages[$i]['id'] . ']', isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : xos_get_products_url($pInfo->products_id, $languages[$i]['id'])));
}
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('javascript' => $javascript, 'form_begin' => xos_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . ($form_action == 'insert_product' ? JS_CONFIRM_INSERT : JS_CONFIRM_UPDATE) . '\')" enctype="multipart/form-data"'), '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)), 'radio_products_status_1' => xos_draw_radio_field('products_status', '1', $in_status), 'radio_products_status_0' => xos_draw_radio_field('products_status', '0', $out_status), 'pull_down_manufacturers' => xos_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id), 'pull_down_delivery_times' => xos_draw_pull_down_menu('products_delivery_time_id', $delivery_times_array, $pInfo->products_delivery_time_id == '' ? DEFAULT_DELIVERY_TIMES_ID : $pInfo->products_delivery_time_id), 'pull_down_products_tax_class' => xos_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->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, 'input_products_date_available' => xos_draw_input_field('products_date_available', $pInfo->products_date_available, 'id="products_date_available" style="background: #ebebff; color : red;" size ="10"'), 'input_products_quantity' => STOCK_CHECK == 'true' ? $has_product_attributes ? '<span id="total_qty">' . $pInfo->products_quantity . '</span> <a href="" onclick="get_attributes_qty_list(\'' . xos_href_link(FILENAME_ATTRIBUTES_QTY_LIST, 'products_id=' . $pInfo->products_id) . '\'); return false">' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_arrow_down.gif', '', 24, 15) . '</a>' . xos_draw_hidden_field('products_quantity', $pInfo->products_quantity) : xos_draw_input_field('products_quantity', $pInfo->products_quantity, 'size ="8"') : $pInfo->products_quantity, 'input_products_sort_order' => xos_draw_input_field('products_sort_order', $pInfo->products_sort_order, 'size ="8"'), 'input_products_model' => xos_draw_input_field('products_model', $pInfo->products_model), 'hidden_image_array' => xos_draw_hidden_field('image_array', $pInfo->products_image), 'hidden_price_array' => xos_draw_hidden_field('price_array', $pInfo->products_price), 'hidden_attributes_price_array' => xos_draw_hidden_field('attributes_price_array', serialize($current_attributes_values_array)), 'has_attributes_quantities' => STOCK_CHECK == 'true' && $has_product_attributes ? true : false, 'product_images' => $product_images, 'more_images' => $more_images, 'product_values' => $product_values, 'input_products_weight' => xos_draw_input_field('products_weight', $pInfo->products_weight, 'size ="8"'), 'hidden_products_date_added' => xos_draw_hidden_field('products_date_added', xos_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d')), 'link_filename_categories' => xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '')), 'form_end' => '</form>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'categories');
$output_new_product = $smarty->fetch(ADMIN_TPL . '/includes/modules/new_product.tpl');
}
示例12: process_button
function process_button()
{
global $order, $currencies;
switch (MODULE_PAYMENT_SECPAY_CURRENCY) {
case 'Default Currency':
$sec_currency = DEFAULT_CURRENCY;
break;
case 'Any Currency':
default:
$sec_currency = $_SESSION['currency'];
break;
}
switch (MODULE_PAYMENT_SECPAY_TEST_STATUS) {
case 'Always Fail':
$test_status = 'false';
break;
case 'Production':
$test_status = 'live';
break;
case 'Always Successful':
default:
$test_status = 'true';
break;
}
$process_button_string = xos_draw_hidden_field('merchant', MODULE_PAYMENT_SECPAY_MERCHANT_ID) . xos_draw_hidden_field('trans_id', STORE_NAME . date('Ymdhis')) . xos_draw_hidden_field('amount', number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.', '')) . xos_draw_hidden_field('bill_name', $order->billing['firstname'] . ' ' . $order->billing['lastname']) . xos_draw_hidden_field('bill_addr_1', $order->billing['street_address']) . xos_draw_hidden_field('bill_addr_2', $order->billing['suburb']) . xos_draw_hidden_field('bill_city', $order->billing['city']) . xos_draw_hidden_field('bill_state', $order->billing['state']) . xos_draw_hidden_field('bill_post_code', $order->billing['postcode']) . xos_draw_hidden_field('bill_country', $order->billing['country']['title']) . xos_draw_hidden_field('bill_tel', $order->customer['telephone']) . xos_draw_hidden_field('bill_email', $order->customer['email_address']) . xos_draw_hidden_field('ship_name', $order->delivery['firstname'] . ' ' . $order->delivery['lastname']) . xos_draw_hidden_field('ship_addr_1', $order->delivery['street_address']) . xos_draw_hidden_field('ship_addr_2', $order->delivery['suburb']) . xos_draw_hidden_field('ship_city', $order->delivery['city']) . xos_draw_hidden_field('ship_state', $order->delivery['state']) . xos_draw_hidden_field('ship_post_code', $order->delivery['postcode']) . xos_draw_hidden_field('ship_country', $order->delivery['country']['title']) . xos_draw_hidden_field('cur', $sec_currency) . xos_draw_hidden_field('callback', xos_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false) . ';' . xos_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code, 'SSL', false)) . xos_draw_hidden_field(xos_session_name(), xos_session_id()) . xos_draw_hidden_field('options', 'test_status=' . $test_status . ',dups=false,cb_post=true,cb_flds=' . xos_session_name());
return $process_button_string;
}
示例13: xos_redirect
xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
$site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'));
$add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function rowOverEffect(object) {' . "\n" . ' if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . ' if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n\n" . 'function checkBox(object) {' . "\n" . ' document.account_notifications.elements[object].checked = !document.account_notifications.elements[object].checked;' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
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 ($global['global_product_notifications'] != '1') {
$smarty->assign('not_global_product_notifications', true);
$products_check_query = xos_db_query("select count(*) as total from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$products_check = xos_db_fetch_array($products_check_query);
if ($products_check['total'] > 0) {
$smarty->assign('products_notification', true);
$counter = 0;
$products_query = xos_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . (int) $_SESSION['customer_id'] . "' and pn.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' order by pd.products_name");
$products_notifications_array = array();
while ($products = xos_db_fetch_array($products_query)) {
$products_notifications_array[] = array('product_counter' => $counter, 'product_name' => $products['products_name'], 'checkbox_field_product' => xos_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true, 'id="checkbox_product_' . (int) ($counter + 1) . '" onclick="checkBox(\'products[' . $counter . ']\')"'));
$counter++;
}
}
}
$smarty->assign(array('form_begin' => xos_draw_form('account_notifications', xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'), 'post', '', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'checkbox_field_product_global' => xos_draw_checkbox_field('product_global', '1', $global['global_product_notifications'] == '1' ? true : false, 'id="checkbox_products_global" onclick="checkBox(\'product_global\')"'), 'products_notifications_array' => $products_notifications_array, 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'form_end' => '</form>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_notifications');
$output_account_notifications = $smarty->fetch(SELECTED_TPL . '/account_notifications.tpl');
$smarty->assign('central_contents', $output_account_notifications);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例14: reset
$order_str .= " order by pd.products_name";
break;
case 'PRODUCT_LIST_WEIGHT':
$order_str .= " order by p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
break;
case 'PRODUCT_LIST_PRICE':
$order_str .= " order by final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
break;
}
}
if ($session_started) {
$hidden_get_variables = '';
reset($_GET);
while (list($key, $value) = each($_GET)) {
if ($key != 'mdsr' && $key != xos_session_name() && $key != 'page') {
$hidden_get_variables .= xos_draw_hidden_field($key, $value);
}
}
$pull_down_menu_display_search_results = xos_draw_form('display_search_results', xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, '', 'NONSSL', false, true, false, false, false), 'get');
$pull_down_menu_display_search_results_noscript = xos_draw_form('display_search_results', xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, '', 'NONSSL', false, false, false, false, false), 'get') . xos_hide_session_id();
$pull_down_menu_display_search_results_noscript .= $hidden_get_variables;
$max_display_search_results_array = array();
$max_display_search_results_array_noscript = array();
$set = false;
for ($i = 10; $i <= 50; $i = $i + 10) {
if (MAX_DISPLAY_SEARCH_RESULTS <= $i && $set == false) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . MAX_DISPLAY_SEARCH_RESULTS, 'NONSSL', true, true, false, false, false), 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS, 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$set = true;
}
if (MAX_DISPLAY_SEARCH_RESULTS != $i) {
示例15: while
while ($products = xos_db_fetch_array($products_query)) {
if ($products['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);
}
$products_array[] = array('product_id' => $products['products_id'], 'product_model' => $products['products_model'], 'product_status_image' => $products_status_image, 'product_name' => $products['products_name']);
}
$smarty->assign(array('new_products' => true, 'nav_bar_number' => $products_split->display_count($products_query_numrows, $_GET['max_rows'], $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS), 'nav_bar_result' => $products_split->display_links($products_query_numrows, $_GET['max_rows'], MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'x', 'y'))), 'products' => $products_array));
}
if ($product['products_status'] == '1') {
$smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN));
} else {
$smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED));
}
$smarty->assign(array('add_relating_products' => true, 'form_begin_add_relating_products' => xos_draw_form('runing_update', FILENAME_XSELL_PRODUCTS, xos_get_all_get_params()), 'hidden_field_run_update' => xos_draw_hidden_field('run_update', $_POST['run_update'] == true ? 'true' : 'false'), 'hidden_field_categories_or_pages_id' => xos_draw_hidden_field('categories_or_pages_id', $categories_or_pages_id), 'hidden_field_manufacturers_id' => xos_draw_hidden_field('manufacturers_id', $manufacturers_id), 'hidden_field_add_related_product_ID' => xos_draw_hidden_field('add_related_product_ID', $_GET['add_related_product_ID']), 'link_to_relating_products' => xos_href_link(FILENAME_XSELL_PRODUCTS, 'categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows']), 'product_id' => $product['products_id'], 'product_name' => $product['products_name'], 'product_model' => $product['products_model'], 'product_image' => xos_info_image('products/small/' . $product_image['name'], $product['products_name'])));
}
//////////////////////////////////////////////////////////////////////////////////
if ($_GET['sort'] == 1 && !$_GET['first_entrance']) {
$product_query = xos_db_query("select a.products_id, a.products_status, b.products_name, a.products_model, a.products_image from " . TABLE_PRODUCTS . " a, " . TABLE_PRODUCTS_DESCRIPTION . " b where b.products_id = a.products_id and b.language_id = '" . (int) $_SESSION['used_lng_id'] . "' and a.products_id = '" . $_GET['add_related_product_ID'] . "'");
$product = xos_db_fetch_array($product_query);
$product_image = xos_get_product_images($product['products_image']);
// first lets take care of the DB update.
if ($_POST) {
foreach ($_POST as $key_a => $value_a) {
xos_db_connect();
$query = "UPDATE " . TABLE_PRODUCTS_XSELL . " SET sort_order = '" . $value_a . "' WHERE products_id ='" . $product['products_id'] . "' and xsell_id= '{$key_a}' ";
if ($value_a != 'Update') {
if (!xos_db_query($query)) {
exit('Could not UPDATE DB');
}