コード例 #1
0
 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 />&nbsp;');
     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 />&nbsp;');
     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
0
     $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 />&nbsp;');
     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 />&nbsp;');
     } 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 />&nbsp;');
     }
コード例 #3
0
                $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'] ? '&nbsp;' : $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
0
        $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
0
            $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';
}
コード例 #6
0
     $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']) . '" />&nbsp;' . 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">&nbsp;' . TEXT_OPTION_ERROR_EMPTY_MARK . '</font>' : '<font color="red">&nbsp;' . 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
0
ファイル: install_6.php プロジェクト: bamper/xos_shop_system
    $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
0
<?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 />&nbsp;');
        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 />&nbsp;');
        } 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 />&nbsp;');
        }
}
$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
0
//------------------------------------------------------------------------------
// 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
0
            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
0
        }
        $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('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&amp;', '&', 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('&amp;', '&', 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>&nbsp;<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
0
ファイル: secpay.php プロジェクト: bamper/xos_shop_system
 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
0
        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
0
             $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
0
ファイル: xsell.php プロジェクト: bamper/xos_shop_system
         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');
                 }
コード例 #16
0
        $smarty->assign('message_stack_warning', $messageStack->output('checkout_address', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('checkout_address', 'success'));
    }
    if ($process == false) {
        $smarty->assign('address_label', xos_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
        if ($addresses_count > 1) {
            $radio_buttons = 0;
            $addresses_query = xos_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
            $addresses_array = array();
            while ($addresses = xos_db_fetch_array($addresses_query)) {
                $format_id = xos_get_address_format_id($addresses['country_id']);
                $addresses['address_book_id'] == $_SESSION['billto'] ? $actual_address = true : ($actual_address = false);
                $addresses_array[] = array('radio_field' => xos_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $_SESSION['billto'], 'id="address_' . $radio_buttons . '"'), 'actual_address' => $actual_address, 'address_name' => xos_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']), 'full_address' => xos_address_format($format_id, $addresses, true, ' ', ', '), 'radio_select' => $radio_buttons);
                $radio_buttons++;
            }
            $smarty->assign(array('several_addresses' => true, 'addresses' => $addresses_array));
        }
    }
    if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
        $smarty->assign('not_max_address_book_entries', true);
    }
    if ($process == true) {
        $smarty->assign(array('process' => true, 'link_filename_checkout_payment_address' => xos_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')));
    }
    $smarty->assign(array('form_begin' => xos_draw_form('checkout_address', xos_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'form_end' => '</form>', 'hidden_field_submit' => xos_draw_hidden_field('action', 'submit'), 'link_filename_checkout_shipping' => xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_payment_address');
    $output_checkout_payment_address = $smarty->fetch(SELECTED_TPL . '/checkout_payment_address.tpl');
    $smarty->assign('central_contents', $output_checkout_payment_address);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
コード例 #17
0
ファイル: install_1.php プロジェクト: bamper/xos_shop_system
//              http://www.oscommerce.com
//              Copyright (c) 2003 osCommerce
//              filename: install.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
reset($_POST);
$hidden_fields = '';
while (list($key, $value) = each($_POST)) {
    if ($key != 'x' && $key != 'y' && $key != 'DB_TEST_CONNECTION') {
        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);
        }
    }
}
$directories_array = array($admin_dir_name . '/backups', $admin_dir_name . '/images/graphs', $admin_dir_name . '/tmp', 'contents', 'contents/file', 'contents/flash', 'contents/image', 'contents/media', 'images/banners', 'images/categories/medium', 'images/categories/small', 'images/categories/uploads', 'images/manufacturers', 'images/products/extra_small', 'images/products/large', 'images/products/medium', 'images/products/small', 'images/products/uploads', 'pub', 'smarty/admin/cache', 'smarty/admin/templates_c', 'smarty/catalog/cache', 'smarty/catalog/templates_c');
$files_array = array('includes/configure.php');
$ws_path = substr(dirname(getenv('SCRIPT_NAME')), 0, -7);
$fs_path = substr(dirname(getenv('SCRIPT_FILENAME')), 0, -7);
$not_writeable_directories_array = array();
$nonexistent_directories_array = array();
$not_writeable_files_array = array();
$nonexistent_files_array = array();
$error = false;
for ($i = 0, $n = sizeof($directories_array); $i < $n; $i++) {
    if (is_dir($fs_path . $directories_array[$i])) {
        if (!is_writable($fs_path . $directories_array[$i])) {
コード例 #18
0
     $form_tag = xos_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"');
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $manufacturer_inputs_string = '';
     $languages = xos_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $manufacturer_inputs_string .= '<br /><div class="input-group"><span class="input-group-addon">' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '</span>' . xos_draw_input_field('manufacturers_name[' . $languages[$i]['id'] . ']', xos_get_manufacturers_name($mInfo->manufacturers_id, $languages[$i]['id']), 'class="form-control"') . '</div>';
     }
     $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_NAME . $manufacturer_inputs_string);
     $manufacturer_inputs_string = '';
     $languages = xos_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $manufacturer_inputs_string .= '<br /><div class="input-group"><span class="input-group-addon">' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '</span>' . xos_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', xos_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']), 'class="form-control"') . '</div>';
     }
     $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
     if ($mInfo->manufacturers_image) {
         $contents[] = array('text' => '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'manufacturers/' . $mInfo->manufacturers_image, $mInfo->manufacturers_name) . '<br /><b>' . $mInfo->manufacturers_image . '</b><div class="checkbox"><label>' . xos_draw_selection_field('delete_manufacturer_image', 'checkbox', 'true') . TEXT_DELETE . '</label></div>' . xos_draw_hidden_field('current_manufacturer_image', $mInfo->manufacturers_image));
     }
     $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_IMAGE . '<br />' . xos_draw_file_field('manufacturers_image') . '<br />');
     $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_SAVE . ' ">' . BUTTON_TEXT_SAVE . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 case 'delete':
     $heading_title = '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>';
     $form_tag = xos_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm');
     $contents[] = array('text' => TEXT_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $mInfo->manufacturers_name . '</b>');
     if ($mInfo->manufacturers_image) {
         $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_image') . ' ' . TEXT_DELETE_IMAGE . '</label></div>');
     }
     if ($mInfo->products_count > 0) {
         $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS . '</label></div>');
         $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
コード例 #19
0
ファイル: orders.php プロジェクト: bamper/xos_shop_system
        while ($orders = xos_db_fetch_array($orders_query)) {
            $oder_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $orders['orders_id'] . "' and class = 'ot_total' order by orders_total_id DESC limit 1");
            $oder_total = xos_db_fetch_array($oder_total_query);
            if ((!isset($_GET['oID']) || isset($_GET['oID']) && $_GET['oID'] == $orders['orders_id']) && !isset($oInfo)) {
                $oInfo = new objectInfo($orders);
            }
            $selected = false;
            if (isset($oInfo) && is_object($oInfo) && $orders['orders_id'] == $oInfo->orders_id) {
                $selected = true;
                $link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit');
            } else {
                $link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']);
            }
            $orders_array[] = array('selected' => $selected, 'link_filename_orders' => $link_filename_orders, 'link_filename_orders_action_edit' => xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit'), 'customers_name' => $orders['customers_name'], 'order_total' => strip_tags($oder_total['text']), 'date_purchased' => xos_datetime_short($orders['date_purchased']), 'order_status_name' => $orders['orders_status_name']);
        }
        if (SESSID) {
            $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
        }
        $smarty->assign(array('form_begin_orders' => xos_draw_form('orders', FILENAME_ORDERS, '', 'get'), 'input_oid' => xos_draw_input_field('oID', '', 'size="12"'), 'hidden_action' => xos_draw_hidden_field('action', 'edit'), 'form_begin_status' => xos_draw_form('new_status', FILENAME_ORDERS, '', 'get'), 'pull_down_status' => xos_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), (array) $orders_statuses), '', 'onchange="this.form.submit();"'), 'form_end' => '</form>', 'orders' => $orders_array, 'nav_bar_number' => $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS), 'nav_bar_result' => $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'oID', 'action')))));
        require DIR_WS_BOXES . 'infobox_orders.php';
    }
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'orders');
    $language_directory_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where use_in_id > '1' and directory = '" . $order->info['language_directory'] . "'");
    if (xos_db_num_rows($language_directory_query)) {
        $smarty->configLoad(DIR_FS_SMARTY . 'catalog/languages/' . $order->info['language_directory'] . '.conf', 'order_info');
    }
    $output_orders = $smarty->fetch(ADMIN_TPL . '/orders.tpl');
    $smarty->assign('central_contents', $output_orders);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
コード例 #20
0
ファイル: gv_mail.php プロジェクト: bamper/xos_shop_system
        $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';
}
コード例 #21
0
ファイル: reviews.php プロジェクト: bamper/xos_shop_system
     $reviews_query = xos_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $rID . "' and r.reviews_id = rd.reviews_id");
     $reviews = xos_db_fetch_array($reviews_query);
     $products_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'");
     $products = xos_db_fetch_array($products_query);
     $products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
     $products_name = xos_db_fetch_array($products_name_query);
     $rInfo_array = array_merge((array) $reviews, (array) $products, (array) $products_name);
     $rInfo = new objectInfo($rInfo_array);
 }
 $product_image = xos_get_product_images($rInfo->products_image);
 if (xos_not_null($_POST)) {
     /* Re-Post all POST'ed variables */
     reset($_POST);
     $hidden_post_values = '';
     while (list($key, $value) = each($_POST)) {
         $hidden_post_values .= xos_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
     }
     $smarty->assign(array('hidden_post_values' => $hidden_post_values, 'link_filename_reviews_back_edit' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit'), 'link_filename_reviews_cancel' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id)));
 } else {
     if (isset($_GET['origin'])) {
         $back_url = $_GET['origin'];
         $back_url_params = '';
     } else {
         $back_url = FILENAME_REVIEWS;
         $back_url_params = 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id;
     }
     $smarty->assign('link_filename_reviews_back', xos_href_link($back_url, $back_url_params));
 }
 if ($product_image['name']) {
     $smarty->assign('products_image', xos_image(DIR_WS_CATALOG_IMAGES . 'products/medium/' . $product_image['name'], $rInfo->products_name, '', '', 'style="margin: 5px;"'));
 }
コード例 #22
0
                } 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';
}
コード例 #23
0
        $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" style="text-align: center; width: 60px;" class="form-control" maxlength="5"'), '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';
コード例 #24
0
       $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;
 */
 // Steuerklasse kann geaendert werden, auch wenn bereits zugeortnet
 case 'edit':
     $heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_TAX_CLASS . '</b>';
     $form_tag = xos_draw_form('classes', FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     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;');
     }
コード例 #25
0
     if ($_GET['gName'] == 'false') {
         $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_FALSE . '<br />&nbsp;');
     } elseif ($_GET['gName'] == 'used') {
         $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_USED . '<br />&nbsp;');
     }
     $contents[] = array('text' => TEXT_INFO_EDIT_GROUPS_INTRO . '<br />&nbsp;<br />' . xos_draw_input_field('admin_groups_name', $gInfo->admin_groups_name));
     $contents[] = array('text' => '<br /><a href="" onclick="edit_group.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_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     break;
 case 'del_group':
     $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_GROUPS . '</b>';
     $form_tag = xos_draw_form('delete_group', FILENAME_ADMIN_MEMBERS, 'action=group_delete&gID=' . $gInfo->admin_groups_id, 'post', 'enctype="multipart/form-data"');
     if ($gInfo->admin_groups_id == 1) {
         $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO_NOT, $gInfo->admin_groups_name));
         $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br />&nbsp;');
     } else {
         $contents[] = array('text' => xos_draw_hidden_field('set_groups_id', substr($del_groups_prepare, 4)));
         $contents[] = array('text' => sprintf(TEXT_INFO_DELETE_GROUPS_INTRO, $gInfo->admin_groups_name));
         $contents[] = array('text' => '<br /><a href="" onclick="delete_group.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_ADMIN_MEMBERS, 'gID=' . $_GET['gID']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     }
     break;
 case 'define_group':
     $heading_title = '<b>' . TEXT_INFO_HEADING_DEFINE . '</b>';
     $contents[] = array('text' => sprintf(TEXT_INFO_DEFINE_INTRO, $group_name['admin_groups_name']));
     if ($_GET['gPath'] == 1) {
         $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br />&nbsp;');
     }
     break;
 default:
     if (is_object($mInfo)) {
         $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
         $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->admin_id . '&action=edit_member') . '" 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_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->admin_id . '&action=del_member') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><br />&nbsp;');
コード例 #26
0
     if (WYSIWYG_FOR_NEWSLETTER == 'true' && EMAIL_USE_HTML == 'true') {
         $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&amp;', '&', 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('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'newsletter_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/newsletter_config.js', 'newsletter_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $_SESSION['language'] . '/newsletter_template.js', 'newsletter_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'newsletter_template_lang' => $_SESSION['language'] . '_default', 'lang_code' => xos_get_languages_code(), 'textarea_content_text_htlm' => xos_draw_textarea_field('content_text_htlm', '130', '25', $nInfo->content_text_htlm)));
     } 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']);
コード例 #27
0
    }
    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('addressbook') > 0) {
        $smarty->assign('message_stack', $messageStack->output('addressbook'));
        $smarty->assign('message_stack_error', $messageStack->output('addressbook', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('addressbook', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('addressbook', 'success'));
    }
    if (isset($_GET['delete'])) {
        $smarty->assign(array('delete_address' => true, 'address_label' => xos_address_label($_SESSION['customer_id'], $_GET['delete'], true, ' ', '<br />'), 'link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'link_filename_address_book_process_delete' => xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $_GET['delete'] . '&action=deleteconfirm&formid=' . md5($_SESSION['sessiontoken']), 'SSL')));
    } elseif (isset($_GET['edit']) && is_numeric($_GET['edit'])) {
        $smarty->assign(array('edit_address' => true, 'form_begin' => xos_draw_form('addressbook', xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, isset($_GET['edit']) ? 'edit=' . $_GET['edit'] : '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'hidden_field_update' => xos_draw_hidden_field('action', 'update'), 'hidden_field_edit' => xos_draw_hidden_field('edit', $_GET['edit']), 'form_end' => '</form>'));
        include DIR_WS_MODULES . 'address_book_details.php';
    } else {
        if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            $back_link = xos_href_link($_SESSION['navigation']->snapshot['page'], xos_array_to_query_string($_SESSION['navigation']->snapshot['get'], array(xos_session_name())), $_SESSION['navigation']->snapshot['mode']);
        } else {
            $back_link = xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL');
        }
        $smarty->assign(array('form_begin' => xos_draw_form('addressbook', xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, isset($_GET['edit']) ? 'edit=' . $_GET['edit'] : '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'link_back' => $back_link, 'hidden_field_process' => xos_draw_hidden_field('action', 'process'), 'form_end' => '</form>'));
        include DIR_WS_MODULES . 'address_book_details.php';
    }
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'address_book_process');
    $output_address_book_process = $smarty->fetch(SELECTED_TPL . '/address_book_process.tpl');
    $smarty->assign('central_contents', $output_address_book_process);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
コード例 #28
0
     $tax_description_inputs_string = '';
     $languages = xos_get_languages();
     $set_empty = false;
     $set_not_empty = false;
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         if (isset($tax_description_error_array[$languages[$i]['id']])) {
             if (empty($tax_description_error_array[$languages[$i]['id']]) && !$set_empty) {
                 $contents[] = array('text' => '<br />' . sprintf(TEXT_INFO_DESCRIPTION_ERROR_EMPTY, TEXT_INFO_DESCRIPTION_ERROR_EMPTY_MARK) . '<br />');
                 $set_empty = true;
             } elseif ($tax_description_error_array[$languages[$i]['id']] && !$set_not_empty) {
                 $contents[] = array('text' => '<br />' . sprintf(TEXT_INFO_DESCRIPTION_ERROR, TEXT_INFO_DESCRIPTION_ERROR_MARK) . '<br />');
                 $set_not_empty = true;
             }
         }
         $tax_description = xos_get_tax_rates_description($trInfo->tax_rates_id, $languages[$i]['id']);
         $tax_description_inputs_string .= '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . xos_draw_input_field('tax_description[' . $languages[$i]['id'] . ']', isset($tax_description_array[$languages[$i]['id']]) ? $tax_description_array[$languages[$i]['id']] : $tax_description) . xos_draw_hidden_field('actual_tax_description[' . $languages[$i]['id'] . ']', $tax_description) . (isset($tax_description_error_array[$languages[$i]['id']]) ? empty($tax_description_error_array[$languages[$i]['id']]) ? '<font color="red">&nbsp;' . TEXT_INFO_DESCRIPTION_ERROR_EMPTY_MARK . '</font>' : '<font color="red">&nbsp;' . TEXT_INFO_DESCRIPTION_ERROR_MARK . '</font>' : '');
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_RATE_DESCRIPTION . $tax_description_inputs_string);
     $contents[] = array('text' => '<br />' . TEXT_INFO_TAX_RATE_PRIORITY . '<br />' . xos_draw_input_field('tax_priority', isset($_GET['tax_priority']) ? $_GET['tax_priority'] : $trInfo->tax_priority));
     $contents[] = array('text' => '<br /><a href="" onclick="rates.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_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_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 tr.tax_class_id from " . TABLE_TAX_RATES . " tr left join " . TABLE_PRODUCTS . " p on tr.tax_class_id = p.products_tax_class_id where products_tax_class_id = '" . $trInfo->tax_class_id . "' group by tr.tax_rates_id");
     $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_TAX_RATE . '</b>';
     if (xos_db_num_rows($check_query) != 1) {
         $form_tag = xos_draw_form('rates', FILENAME_TAX_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_id . '&action=deleteconfirm');
         $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
         $contents[] = array('text' => '<br /><b>' . $trInfo->tax_class_title . ' ' . number_format($trInfo->tax_rate, TAX_DECIMAL_PLACES) . '%</b>');
         $contents[] = array('text' => '<br /><a href="" onclick="rates.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_RATES, 'page=' . $_GET['page'] . '&tID=' . $trInfo->tax_rates_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 />');
コード例 #29
0
                 $table_inner_array[] = array('case' => 'quantity', 'products_quantity' => $listing['products_quantity'] > 0 ? $listing['products_quantity'] : '<span class="red-mark">' . $listing['products_quantity'] . '</span>');
                 break;
             case 'PRODUCT_LIST_WEIGHT':
                 $table_inner_array[] = array('case' => 'weight', 'products_weight' => $listing['products_weight']);
                 break;
             case 'PRODUCT_LIST_IMAGE':
                 $products_image_name = xos_get_product_images($listing['products_image']);
                 if (!empty($_GET['m'])) {
                     $table_inner_array[] = array('case' => 'image', 'products_image_small' => xos_lazy_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_image_medium' => xos_lazy_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_link_image' => xos_href_link(FILENAME_PRODUCT_INFO, 'm=' . $_GET['m'] . '&p=' . $listing['products_id']));
                 } else {
                     $table_inner_array[] = array('case' => 'image', 'products_image_small' => xos_lazy_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_image_medium' => xos_lazy_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block lazy" style="display: none;"') . '<noscript>' . xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), $listing['products_name'], '', '', 'class="img-responsive center-block"') . '</noscript>', 'products_link_image' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . $listing['products_id']));
                 }
                 $smarty->assign('product_image', true);
                 break;
             case 'PRODUCT_LIST_BUY_NOW':
                 $table_inner_array[] = array('case' => 'buy_now', 'products_buy_form_begin' => xos_draw_form('cart_quantity_' . $rows, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=add_product', $request_type)), 'form_name' => 'cart_quantity_' . $rows, 'form_end' => '</form>', 'label_for_products_input_quantity' => 'products_quantity_' . $listing['products_id'], 'products_input_quantity' => xos_draw_input_field('products_quantity', '1', 'id="products_quantity_' . $listing['products_id'] . '" class="form-control input-quantity" maxlength="5"'), 'products_hidden_field' => xos_draw_hidden_field('p', $listing['products_id']));
                 break;
         }
     }
     $table_outer_array[] = array('table_inner' => $table_inner_array);
     unset($price_breaks_array);
     unset($table_inner_array);
 }
 if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
     $smarty->assign('nav_bar_top', true);
 }
 if (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3') {
     $smarty->assign('nav_bar_bottom', true);
 }
 $smarty->assign(array('listing' => true, 'selected_none' => $selected_none, 'table_heading' => $table_heading_array, 'table_heading_alt' => $table_heading_alt_array, 'nav_bar_number' => $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS), 'nav_bar_result' => '<nav><ul class="pagination">' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))) . '</ul></nav>', 'table_data_list' => $table_outer_array));
 if ($product_list_b) {
コード例 #30
0
                 $options_values_price = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $attributes_values['options_values_price'], $products_tax_rate));
             }
             $attributes_array[] = array('products_options_name' => $attributes_values['products_options_name'], 'options_values_id' => $value, 'products_options_values_name' => $attributes_values['products_options_values_name'], 'options_values_price' => $options_values_price, 'hidden_field' => $hidden_field, 'price_prefix' => $attributes_values['price_prefix']);
         }
     }
     if (STOCK_CHECK == 'true') {
         $stock_check = xos_check_stock($products[$i]['id'], $products[$i]['quantity']);
         if (xos_not_null($stock_check)) {
             $any_out_of_stock = 1;
             $products_name .= $stock_check;
         }
     }
     $tax_rate = xos_display_tax_value($products_tax_rate);
     $product_image = xos_get_product_images($products[$i]['image']);
     $popup_content_id = xos_get_delivery_times_values($products[$i]['delivery_time_id'], 'popup_content_id');
     $products_array[] = array('checkbox_cart_delete' => xos_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false, 'id="cart_delete_' . ($i + 1) . '"'), 'link_filename_product_info' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . urlencode($products[$i]['id'])), 'link_remove_product' => xos_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&rmp=0&p=' . urlencode($products[$i]['id'])), 'products_image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $products[$i]['name']), 'products_name' => $products[$i]['name'], 'products_packaging_unit' => $products[$i]['packaging_unit'], 'products_delivery_time' => xos_get_delivery_times_values($products[$i]['delivery_time_id']), 'link_filename_popup_content_products_delivery_time' => $popup_content_id > 0 ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=' . $popup_content_id . '&p=' . $products[$i]['id'], $request_type) : '', 'products_model' => $products[$i]['model'], 'stock_check' => $stock_check, 'input_and_hidden_fields_quantity' => xos_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'id="cart_quantity_' . ($i + 1) . '" class="form-control cart-input-quantity" size="2" maxlength="5"') . xos_draw_hidden_field('p[]', $products[$i]['id']), 'products_tax' => xos_display_tax_value($products_tax_rate), 'products_price' => $currencies->format($products[$i]['price']), 'products_final_single_price' => $currencies->format($products[$i]['final_price']), 'products_final_price' => $currencies->format($products[$i]['quantity'] * $products[$i]['final_price']), 'products_attributes_option_price' => $attributes_options_values_price, 'products_attributes' => $attributes_array);
     if (isset($tax_rate)) {
         $tax_rates[$tax_rate] = '1';
     }
     unset($attributes_array);
 }
 include DIR_WS_CLASSES . 'payment.php';
 $payment_modules = new payment();
 $initialize_checkout_methods = $payment_modules->checkout_initialization_method();
 $alternative_checkout_methods_array = array();
 if (!empty($initialize_checkout_methods)) {
     reset($initialize_checkout_methods);
     while (list(, $value) = each($initialize_checkout_methods)) {
         $alternative_checkout_methods_array[] = array('value' => $value);
     }
 }