}
        $product_images[] = array('img_no' => $img_no, 'selection_delete_image' => xos_draw_selection_field('delete_product_image_' . $i, 'checkbox', 'true'), 'radio_large_image_default_size' => xos_draw_radio_field('large_image_size_' . $i, 'default', true), 'radio_large_image_uploaded_size' => xos_draw_radio_field('large_image_size_' . $i, 'uploaded', false), 'radio_large_image_input_size' => xos_draw_radio_field('large_image_size_' . $i, 'input', false), 'input_large_image_max_width' => xos_draw_input_field('large_image_max_width_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'input_large_image_max_height' => xos_draw_input_field('large_image_max_height_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'small_product_image_max_height' => SMALL_PRODUCT_IMAGE_MAX_HEIGHT, 'image' => xos_image(DIR_WS_CATALOG_IMAGES . 'products/small/' . $products_image[$i]['name'], $pInfo->products_name), 'file_image' => xos_draw_file_field('products_image_' . $i), 'image_name' => $products_image[$i]['name'], 'large_img_width' => $large_img_size[0], 'large_img_height' => $large_img_size[1], 'large_img_base' => $products_image[$i]['large_image_max_width'] == 'default' ? 'default_size' : ($products_image[$i]['large_image_max_width'] == '0' ? 'origin_size' : ((int) $products_image[$i]['large_image_max_width'] > 0 ? 'self_selected_size' : '')), 'hidden_current_image' => xos_draw_hidden_field('current_product_image_' . $i, $products_image[$i]['name']));
        if (empty($products_image[$i]['name'])) {
            $more_images = true;
        }
    }
    $product_values = array();
    if (WYSIWYG_FOR_PRODUCT == 'true') {
        $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'product_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/product_config.js', 'product_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
    }
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
        sizeof($languages) > 1 ? $sort_order = 'products_id' : ($sort_order = 'products_p_unit');
        $products_p_units_array = array(array('id' => '', 'text' => TEXT_NONE));
        $products_p_units_query = xos_db_query("select distinct products_p_unit from " . TABLE_PRODUCTS_DESCRIPTION . " where language_id = '" . $languages[$i]['id'] . "' order by '" . $sort_order . "'");
        while ($products_p_units = xos_db_fetch_array($products_p_units_query)) {
            if (!empty($products_p_units['products_p_unit'])) {
                $products_p_units_array[] = array('id' => $products_p_units['products_p_unit'], 'text' => $products_p_units['products_p_unit']);
            }
        }
        $product_values[] = array('languages_image' => xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']), 'input_name' => xos_draw_input_field('products_name[' . $languages[$i]['id'] . ']', isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : xos_get_products_name($pInfo->products_id, $languages[$i]['id']), 'size="30"'), 'input_description_tab_label' => xos_draw_input_field('products_description_tab_label[' . $languages[$i]['id'] . ']', isset($products_description_tab_label[$languages[$i]['id']]) ? stripslashes($products_description_tab_label[$languages[$i]['id']]) : xos_get_products_description_tab_label($pInfo->products_id, $languages[$i]['id']), 'size="90"'), 'pull_down_input_p_unit' => xos_draw_pull_down_menu('products_p_unit[' . $languages[$i]['id'] . ']', $products_p_units_array, isset($products_p_unit[$languages[$i]['id']]) ? stripslashes($products_p_unit[$languages[$i]['id']]) : xos_get_products_p_unit($pInfo->products_id, $languages[$i]['id']), 'style="width: 17em"'), 'input_new_p_unit' => xos_draw_input_field('products_new_p_unit[' . $languages[$i]['id'] . ']'), 'info_name' => 'products_info[' . $languages[$i]['id'] . ']', 'description_name' => 'products_description[' . $languages[$i]['id'] . ']', 'product_info_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/product_info_template.js', 'product_info_template_lang' => $languages[$i]['directory'] . '_default', 'product_description_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/product_description_template.js', 'product_description_template_lang' => $languages[$i]['directory'] . '_default', 'textarea_info' => xos_draw_textarea_field('products_info[' . $languages[$i]['id'] . ']', '90', '4', isset($products_info[$languages[$i]['id']]) ? stripslashes($products_info[$languages[$i]['id']]) : xos_get_products_info($pInfo->products_id, $languages[$i]['id'])), 'textarea_description' => xos_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', '90', '15', isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : xos_get_products_description($pInfo->products_id, $languages[$i]['id'])), 'input_url' => xos_draw_input_field('products_url[' . $languages[$i]['id'] . ']', isset($products_url[$languages[$i]['id']]) ? stripslashes($products_url[$languages[$i]['id']]) : xos_get_products_url($pInfo->products_id, $languages[$i]['id'])));
    }
    if (isset($_GET['pID'])) {
        $smarty->assign('update', true);
    }
    if ($messageStack->size('price_error') > 0) {
        $smarty->assign('message_price_error', $messageStack->output('price_error'));
    }
    $smarty->assign(array('javascript' => $javascript, 'form_begin' => xos_draw_form($form_action, FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . ($form_action == 'insert_product' ? JS_CONFIRM_INSERT : JS_CONFIRM_UPDATE) . '\')" enctype="multipart/form-data"'), 'text_new_product' => sprintf(TEXT_NEW_PRODUCT_3, $form_action == 'insert_product' ? TEXT_NEW_PRODUCT_1 : TEXT_NEW_PRODUCT_2, xos_output_generated_category_path($current_category_id)), 'radio_products_status_1' => xos_draw_radio_field('products_status', '1', $in_status), 'radio_products_status_0' => xos_draw_radio_field('products_status', '0', $out_status), 'pull_down_manufacturers' => xos_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id), 'pull_down_delivery_times' => xos_draw_pull_down_menu('products_delivery_time_id', $delivery_times_array, $pInfo->products_delivery_time_id == '' ? DEFAULT_DELIVERY_TIMES_ID : $pInfo->products_delivery_time_id), 'pull_down_products_tax_class' => xos_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id), 'pull_down_tax_rates' => xos_draw_pull_down_menu('tax_rates_final_id', $tax_rates_final_array, '', 'onchange="updatePrices(false, true)"'), 'update_prices' => 'updatePrices(true, true)', 'update_checked_string' => $update_checked_string, 'customers_groups' => $customers_groups_array, 'attributes_values' => $attributes_values_array, 'input_products_date_available' => xos_draw_input_field('products_date_available', $pInfo->products_date_available, 'id="products_date_available" style="background: #ebebff; color : red;" size ="10"'), 'input_products_quantity' => STOCK_CHECK == 'true' ? $has_product_attributes ? '<span id="total_qty">' . $pInfo->products_quantity . '</span>&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');
}
 }
 $javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n";
 require DIR_WS_INCLUDES . 'html_header.php';
 require DIR_WS_INCLUDES . 'header.php';
 require DIR_WS_INCLUDES . 'column_left.php';
 require DIR_WS_INCLUDES . 'footer.php';
 if ($action == 'new_file' && $directory_writeable == true || $action == 'edit') {
     if (isset($_GET['info']) && strstr($_GET['info'], '..')) {
         xos_redirect(xos_href_link(FILENAME_FILE_MANAGER));
     }
     if (!isset($file_writeable)) {
         $file_writeable = true;
     }
     $file_contents = '';
     if ($action == 'new_file') {
         $filename_input_field = xos_draw_input_field('filename');
     } elseif ($action == 'edit') {
         if ($file_array = file($_SESSION['current_path'] . '/' . $_GET['info'])) {
             $file_contents = implode('', $file_array);
         }
         $filename_input_field = $_GET['info'] . xos_draw_hidden_field('filename', $_GET['info']);
     }
     if ($file_writeable == true) {
         $smarty->assign('file_writeable', true);
     }
     $smarty->assign(array('new_edit_file' => true, 'form_begin_new_file' => xos_draw_form('new_file', FILENAME_FILE_MANAGER, 'action=save'), 'filename_or_input_filename' => $filename_input_field, 'textarea_file_contents' => xos_draw_textarea_field('file_contents', '110', '25', $file_contents, 'style="width: 99%; height: 500px;"' . ($file_writeable ? '' : 'readonly="readonly"')), 'link_filename_file_manager' => xos_href_link(FILENAME_FILE_MANAGER, isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) : '')));
 } elseif ($action == 'view') {
     $ws_path = str_replace(DIR_FS_DOCUMENT_ROOT, DIR_WS_CATALOG, $_SESSION['current_path']);
     $ws_path .= substr($ws_path, -1) != '/' ? '/' : '';
     $smarty->assign(array('image_view' => true, 'filename' => $_GET['info'], 'image_data' => @getimagesize($_SESSION['current_path'] . '/' . $_GET['info']), 'image_src' => $ws_path . rawurlencode($_GET['info']), 'link_filename_file_manager' => xos_href_link(FILENAME_FILE_MANAGER, isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) : '')));
 } else {
                 $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) {
         $contents[] = array('text' => TEXT_INFO_GROUPS_NAME_USED . '<br />&nbsp;');
     }
     $contents[] = array('text' => xos_draw_hidden_field('set_groups_id', substr($add_groups_prepare, 4)));
     $contents[] = array('text' => TEXT_INFO_GROUPS_NAME . '<br />');
     $contents[] = array('text' => xos_draw_input_field('admin_groups_name'));
     $contents[] = array('text' => '<br /><a href="" onclick="new_group.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_INSERT . ' "><span>' . BUTTON_TEXT_INSERT . '</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 'edit_group':
     $heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_GROUP . '</b>';
     $form_tag = xos_draw_form('edit_group', FILENAME_ADMIN_MEMBERS, 'action=group_edit&gID=' . $_GET['gID'], 'post', 'enctype="multipart/form-data"');
     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':
 */
 // Kanton/Bundesland kann geaendert werden, auch wenn bereits zugeortnet
 case 'edit':
     $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_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;');
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2002 osCommerce
//              filename: search.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/login_my_account.php') == 'overwrite_all')) {
    if (CACHE_LEVEL > 1 && !isset($_SESSION['customer_id']) && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
        $smarty->caching = 1;
        $cache_id = 'L2|box_login_my_account|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
    }
    if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id)) {
        if (isset($_SESSION['customer_first_name']) && isset($_SESSION['customer_id'])) {
            if (ACCOUNT_GENDER == 'true' && isset($_SESSION['customer_gender']) && $_SESSION['customer_gender'] != '') {
                $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, ($_SESSION['customer_gender'] == 'm' ? MALE_ADDRESS : FEMALE_ADDRESS) . '<br />' . xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname']));
            } else {
                $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname']));
            }
        } else {
            $box_welcome_string = BOX_TEXT_GREETING_GUEST;
        }
        if (SEND_EMAILS == 'true') {
            $smarty->assign('box_login_my_account_link_filename_password_forgotten', xos_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'));
        }
        $smarty->assign(array('box_login_my_account_link_filename_create_account' => xos_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account_edit' => xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'box_login_my_account_link_filename_account_history' => xos_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), 'box_login_my_account_link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'box_login_my_account_link_filename_account_notifications' => PRODUCT_NOTIFICATION_ENABLED == 'true' ? xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') : '', 'box_login_my_account_link_filename_logoff' => xos_href_link(FILENAME_LOGOFF, '', 'SSL'), 'box_login_my_account_display_box_my_account' => isset($_SESSION['customer_id']) ? true : false, 'box_login_my_account_welcome_string' => $box_welcome_string, 'box_login_my_account_input_field_email_address' => xos_draw_input_field('email_address', '', 'class="form-control input-sm" id="box_login_email_address" size="10" maxlength="40" style="width: 130px"'), 'box_login_my_account_input_field_password' => xos_draw_password_field('password', '', 'class="form-control input-sm" id="box_login_password" size="10" style="width: 130px"'), 'box_login_my_account_form_begin' => xos_draw_form('box_login', xos_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true), 'box_login_my_account_form_end' => '</form>'));
    }
    $output_login_my_account = $smarty->fetch(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id);
    $smarty->caching = 0;
    $smarty->assign('box_login_my_account', $output_login_my_account);
}
        $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';
 }
 ////////////////////////////////////////
 $has_product_attributes = xos_has_product_attributes($_GET['product_ID']);
 if ($has_product_attributes) {
     $attributes = xos_db_query("select distinct pa.*, po.products_options_name, pov.products_options_values_name from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id ='" . (int) $_GET['product_ID'] . "' and pa.options_id = po.products_options_id and pa.options_values_id = pov.products_options_values_id and po.language_id = pov.language_id and po.language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by pa.options_sort_order, po.products_options_id, pa.options_values_sort_order, pov.products_options_values_name");
     $current_attributes_values_array = array();
     $attributes_values_array = array();
     while ($attributes_values = xos_db_fetch_array($attributes)) {
         if ($attributes_values['options_id'] != $options_id) {
             $options_id = $attributes_values['options_id'];
             $options_name = $attributes_values['products_options_name'];
         } else {
             $options_name = '';
         }
         $current_attributes_values_array[$attributes_values['products_attributes_id']] = array('value_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']);
         $attributes_values_array[] = array('option_name' => $options_name, 'value_name' => $attributes_values['products_options_values_name'], 'input_value_price' => xos_draw_input_field('value_price_' . $attributes_values['products_attributes_id'], $attributes_values['options_values_price'], 'style="background: #fffffe;" size ="11" onkeyup="updateGross(\'value_price_' . $attributes_values['products_attributes_id'] . '\', \'value_price_gross_' . $attributes_values['products_attributes_id'] . '\')"'), 'input_value_price_gross' => xos_draw_input_field('value_price_gross_' . $attributes_values['products_attributes_id'], $attributes_values['options_values_price'], 'style="background: #fffffe;" size ="11" onkeyup="updateNet(\'value_price_gross_' . $attributes_values['products_attributes_id'] . '\', \'value_price_' . $attributes_values['products_attributes_id'] . '\')"'), 'input_price_prefix' => xos_draw_input_field('price_prefix_' . $attributes_values['products_attributes_id'], $attributes_values['price_prefix'], 'style="background: #fffffe; text-align:center;" size ="1"'));
         $update_gross_string .= 'updateGross(\'value_price_' . $attributes_values['products_attributes_id'] . '\', \'value_price_gross_' . $attributes_values['products_attributes_id'] . '\');' . "\n";
         $update_net_string .= 'updateNet(\'value_price_gross_' . $attributes_values['products_attributes_id'] . '\', \'value_price_' . $attributes_values['products_attributes_id'] . '\');' . "\n";
     }
 }
 ///////////////////////////////////////
 $javascript .= "\n" . 'function toggle(targetId, iState) {' . "\n" . '  var obj = document.getElementById(targetId).style;' . "\n" . '  if (obj.display == "none" && iState != 0 && iState != 1){' . "\n" . '    obj.display="";' . "\n" . '  } else if (iState != 0 && iState != 1){' . "\n" . '    obj.display="none";' . "\n" . '  }' . "\n" . '  if (iState == 1){' . "\n" . '    obj.display="";' . "\n" . '  } else if (iState == 0){' . "\n" . '    obj.display="none";' . "\n" . '  }' . "\n" . '}' . "\n\n" . 'function updateChecked(cuID) {' . "\n" . '  var selected = document.forms["' . $form_action . '"].elements["option[" + cuID + "]"].checked;' . "\n" . '  if (selected) {' . "\n" . '    toggle("box_" + cuID,1);' . "\n" . '  } else {' . "\n" . '    toggle("box_" + cuID,0);' . "\n" . '  }' . "\n" . '}' . "\n\n" . 'function doRound(x, places) {' . "\n" . '  return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);' . "\n" . '}' . "\n\n" . 'function getTaxRate() {' . "\n" . '  var selected_value = document.forms["' . $form_action . '"].tax_rates_final_id.selectedIndex;' . "\n" . '  var parameterVal = document.forms["' . $form_action . '"].tax_rates_final_id[selected_value].value;' . "\n\n" . '  if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {' . "\n" . '    return tax_rates[parameterVal];' . "\n" . '  } else {' . "\n" . '    return 0;' . "\n" . '  }' . "\n" . '}' . "\n\n" . 'function updateGross(inField, setField) {' . "\n" . '  var taxRate = getTaxRate();' . "\n" . '  var grossValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . '  if (taxRate > 0) {' . "\n" . '    grossValue = grossValue * ((taxRate / 100) + 1);' . "\n" . '  }' . "\n\n" . '  document.forms["' . $form_action . '"].elements[setField].value = doRound(grossValue, 4);' . "\n" . '}' . "\n\n" . 'function updateNet(inField, setField) {' . "\n" . '  var taxRate = getTaxRate();' . "\n" . '  var netValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . '  if (taxRate > 0) {' . "\n" . '    netValue = netValue / ((taxRate / 100) + 1);' . "\n" . '  }' . "\n\n" . '  document.forms["' . $form_action . '"].elements[setField].value = doRound(netValue, 4);' . "\n" . '}' . "\n\n" . 'function updatePrices(net, gross) {' . "\n\n" . '  if (gross) {' . "\n" . '    ' . $update_gross_string . "\n" . '  }' . "\n\n" . '  if (net) {' . "\n" . '    ' . $update_net_string . "\n" . '  }' . "\n\n" . '}' . "\n\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
 if ($product['products_status'] == '1') {
     $products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN);
 } else {
     $products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED);
 }
 if (isset($_GET['pID'])) {
     $smarty->assign('update', true);
 }
 if ($messageStack->size('price_error') > 0) {
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2003 osCommerce
//              filename: configuration.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_configuration.php') == 'overwrite_all')) {
    $contents = array();
    switch ($action) {
        case 'edit':
            $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>';
            if ($cInfo->set_function) {
                eval('$value_field = ' . $cInfo->set_function . '"' . $cInfo->configuration_value . '");');
            } else {
                $value_field = '<div class="form-group">' . xos_draw_input_field('configuration_value', $cInfo->configuration_value, 'class="form-control"') . '</div>';
            }
            $form_tag = xos_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save');
            $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
            $contents[] = array('text' => '<br /><b>' . constant($cInfo->lang_key . '_TITLE') . '</b><br />' . constant($cInfo->lang_key . '_DESCRIPTION') . '<br />' . $value_field);
            $contents[] = array('text' => '<br /><a href="" onclick="configuration.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
            break;
        default:
            if (isset($cInfo) && is_object($cInfo)) {
                $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>';
                $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a>');
                $contents[] = array('text' => '<br />' . constant($cInfo->lang_key . '_DESCRIPTION'));
                $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added));
                if (xos_not_null($cInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($cInfo->last_modified));
                }
//------------------------------------------------------------------------------
// 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);
}
Exemple #11
0
        $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';
}
        $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_COMPANY == 'true') {
        $smarty->assign(array('account_company' => true, 'input_company' => xos_draw_input_field('company', '', 'class="form-control" id="company"') . '&nbsp;' . (xos_not_null(ENTRY_COMPANY_TEXT) ? '<span class="input-requirement">' . ENTRY_COMPANY_TEXT . '</span>' : '')));
    }
    if (ACCOUNT_SUBURB == 'true') {
        $smarty->assign(array('account_suburb' => true, 'input_suburb' => xos_draw_input_field('suburb', '', 'class="form-control" id="suburb"') . '&nbsp;' . (xos_not_null(ENTRY_SUBURB_TEXT) ? '<span class="input-requirement">' . ENTRY_SUBURB_TEXT . '</span>' : '')));
    }
    if (ACCOUNT_STATE == 'true') {
        $smarty->assign('account_state', true);
        if ($process == true) {
            if ($entry_state_has_zones == true) {
                $zones_array = array();
                $zones_query = xos_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' order by zone_name");
                while ($zones_values = xos_db_fetch_array($zones_query)) {
                    $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
                }
                $smarty->assign('input_state', xos_draw_pull_down_menu('state', $zones_array, '', 'class="form-control" id="state"') . '&nbsp;' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : ''));
            } else {
                $smarty->assign('input_state', xos_draw_input_field('state', '', 'class="form-control" id="state"') . '&nbsp;' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : ''));
            }
        } else {
            $smarty->assign('input_state', xos_draw_input_field('state', '', 'class="form-control" id="state"') . '&nbsp;' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : ''));
        }
    }
    $smarty->assign(array('input_firstname' => xos_draw_input_field('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', '', 'class="form-control" id="lastname"') . '&nbsp;' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_street_address' => xos_draw_input_field('street_address', '', 'class="form-control" id="street_address"') . '&nbsp;' . (xos_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>' : ''), 'input_postcode' => xos_draw_input_field('postcode', '', 'class="form-control" id="postcode"') . '&nbsp;' . (xos_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="input-requirement">' . ENTRY_POST_CODE_TEXT . '</span>' : ''), 'input_city' => xos_draw_input_field('city', '', 'class="form-control" id="city"') . '&nbsp;' . (xos_not_null(ENTRY_CITY_TEXT) ? '<span class="input-requirement">' . ENTRY_CITY_TEXT . '</span>' : ''), 'input_country' => xos_get_country_list('country', '', 'class="form-control" id="country"') . '&nbsp;' . (xos_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="input-requirement">' . ENTRY_COUNTRY_TEXT . '</span>' : '')));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_new_address');
    $output_checkout_new_address = $smarty->fetch(SELECTED_TPL . '/includes/modules/checkout_new_address.tpl');
    $smarty->clearAssign(array('account_gender', 'input_gender', 'account_company', 'input_company', 'account_suburb', 'input_suburb', 'account_state', 'input_state', 'input_firstname', 'input_lastname', 'input_street_address', 'input_postcode', 'input_city', 'input_country'));
    $smarty->assign('checkout_new_address', $output_checkout_new_address);
}
<?php

$contents = array();
switch ($action) {
    case 'delete':
        $heading_title = '<b>' . $fInfo->name . '</b>';
        $form_tag = xos_draw_form('file', FILENAME_FILE_MANAGER, 'info=' . urlencode($fInfo->name) . '&action=deleteconfirm');
        $contents[] = array('text' => TEXT_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $fInfo->name . '</b>');
        $contents[] = array('text' => '<br /><a href="" onclick="file.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_FILE_MANAGER, xos_not_null($fInfo->name) ? 'info=' . urlencode($fInfo->name) : '') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    case 'new_folder':
        $heading_title = '<b>' . TEXT_NEW_FOLDER . '</b>';
        $form_tag = xos_draw_form('folder', FILENAME_FILE_MANAGER, 'action=insert');
        $contents[] = array('text' => TEXT_NEW_FOLDER_INTRO);
        $contents[] = array('text' => '<br />' . TEXT_FILE_NAME . '<br />' . xos_draw_input_field('folder_name'));
        $contents[] = array('text' => '<br />' . ($directory_writeable == true ? '<a href="" onclick="folder.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_SAVE . ' "><span>' . BUTTON_TEXT_SAVE . '</span></a>' : '') . '<a href="' . xos_href_link(FILENAME_FILE_MANAGER, isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) : '') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    case 'upload':
        $heading_title = '<b>' . TEXT_INFO_HEADING_UPLOAD . '</b>';
        $form_tag = xos_draw_form('file', FILENAME_FILE_MANAGER, 'action=processuploads', 'post', 'enctype="multipart/form-data"');
        $contents[] = array('text' => TEXT_UPLOAD_INTRO);
        $file_upload = '';
        for ($i = 1; $i < 6; $i++) {
            $file_upload .= xos_draw_file_field('file_' . $i) . '<br />';
        }
        $contents[] = array('text' => '<br />' . $file_upload);
        $contents[] = array('text' => '<br />' . ($directory_writeable == true ? '<a href="" onclick="file.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPLOAD . ' "><span>' . BUTTON_TEXT_UPLOAD . '</span></a>' : '') . '<a href="' . xos_href_link(FILENAME_FILE_MANAGER, isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) : '') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    default:
        if (isset($fInfo) && is_object($fInfo)) {
     $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_SAVE . ' "><span>' . BUTTON_TEXT_SAVE . '</span></a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     break;
 case 'edit':
     $heading_title = '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>';
     $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 />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . xos_draw_input_field('manufacturers_name[' . $languages[$i]['id'] . ']', xos_get_manufacturers_name($mInfo->manufacturers_id, $languages[$i]['id']));
     }
     $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 />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . xos_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', xos_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
     }
     $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><br />' . TEXT_DELETE . xos_draw_hidden_field('current_manufacturer_image', $mInfo->manufacturers_image) . xos_draw_selection_field('delete_manufacturer_image', 'checkbox', 'true'));
     }
     $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="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_SAVE . ' "><span>' . BUTTON_TEXT_SAVE . '</span></a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_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':
     $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' => '<br />' . xos_draw_checkbox_field('delete_image') . ' ' . TEXT_DELETE_IMAGE);
         $orders_status_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('orders_status_name[' . $languages[$i]['id'] . ']', '', 'class="form-control"') . '</div>';
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_ORDERS_STATUS_NAME . $orders_status_inputs_string);
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('public_flag', '1') . ' ' . TEXT_SET_PUBLIC_STATUS . '</label></div>');
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('downloads_flag', '1') . ' ' . TEXT_SET_DOWNLOADS_STATUS . '</label></div>');
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT . '</label></div>');
     $contents[] = array('text' => '<br /><a href="" onclick="status.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_INSERT . ' ">' . BUTTON_TEXT_INSERT . '</a><a href="' . xos_href_link(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page']) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 case 'edit':
     $heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_ORDERS_STATUS . '</b>';
     $form_tag = xos_draw_form('status', FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->orders_status_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $orders_status_inputs_string = '';
     $languages = xos_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $orders_status_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('orders_status_name[' . $languages[$i]['id'] . ']', xos_get_orders_status_name($oInfo->orders_status_id, $languages[$i]['id']), 'class="form-control"') . '</div>';
     }
     $contents[] = array('text' => '<br />' . TEXT_INFO_ORDERS_STATUS_NAME . $orders_status_inputs_string);
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('public_flag', '1', $oInfo->public_flag) . ' ' . TEXT_SET_PUBLIC_STATUS . '</label></div>');
     $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('downloads_flag', '1', $oInfo->downloads_flag) . ' ' . TEXT_SET_DOWNLOADS_STATUS . '</label></div>');
     if (DEFAULT_ORDERS_STATUS_ID != $oInfo->orders_status_id) {
         $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT . '</label></div>');
     }
     $contents[] = array('text' => '<br /><a href="" onclick="status.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->orders_status_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_INFO_HEADING_DELETE_ORDERS_STATUS . '</b>';
     $form_tag = xos_draw_form('status', FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->orders_status_id . '&action=deleteconfirm');
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $oInfo->orders_status_name . '</b>');
     $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_ORDERS_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->orders_status_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a>' . ($remove_status ? '<a href="" onclick="status.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>' : '') . '<br />&nbsp;');
Exemple #16
0
                $reviews = xos_db_fetch_array($reviews_query);
                $customer_info = array_merge((array) $country, (array) $info, (array) $reviews);
                $cInfo_array = array_merge((array) $customers, (array) $customer_info);
                $cInfo = new objectInfo($cInfo_array);
            }
            $selected = false;
            if (isset($cInfo) && is_object($cInfo) && $customers['customers_id'] == $cInfo->customers_id) {
                $selected = true;
                $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit');
            } else {
                $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']);
            }
            $customers_array[] = array('selected' => $selected, 'link_filename_customers' => $link_filename_customers, 'company' => strlen($customers['entry_company']) > 16 ? "<acronym title=\"" . $customers['entry_company'] . "\">" . substr($customers['entry_company'], 0, 16) . "&nbsp;</acronym>" : $customers['entry_company'], 'lastname' => strlen($customers['customers_lastname']) > 15 ? "<acronym title=\"" . $customers['customers_lastname'] . "\">" . substr($customers['customers_lastname'], 0, 15) . "&nbsp;</acronym>" : $customers['customers_lastname'], 'firstname' => strlen($customers['customers_firstname']) > 15 ? "<acronym title=\"" . $customers['customers_firstname'] . "\">" . substr($customers['customers_firstname'], 0, 15) . "&nbsp;</acronym>" : $customers['customers_firstname'], 'group_name' => strlen($customers['customers_group_name']) > 17 ? "<acronym title=\"" . $customers['customers_group_name'] . "\"> " . substr($customers['customers_group_name'], 0, 17) . "&nbsp;</acronym>" : $customers['customers_group_name'], 'date_account_created' => xos_date_short($info['date_account_created']), 'group_ra_status_image' => $customers['customers_group_ra'] == '1' ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_GREEN) : xos_draw_separator('pixel_trans.gif', '10', '10'));
        }
        $smarty->assign(array('link_self_company_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company'), 'link_self_lastname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname'), 'link_self_firstname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname'), 'link_self_cg_name_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name'), 'link_self_id_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-asc'), 'link_self_ra_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra'), 'link_self_company_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company-desc'), 'link_self_lastname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname-desc'), 'link_self_firstname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname-desc'), 'link_self_cg_name_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name-desc'), 'link_self_id_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-desc'), 'link_self_ra_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra-desc'), 'text_company_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_lastname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_firstname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_cg_name_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_id_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_ra_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_company_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_lastname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_firstname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_cg_name_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_id_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_ra_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX));
        if (SESSID) {
            $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
        }
        $smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_CUSTOMERS, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'customers' => $customers_array, 'nav_bar_number' => $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS), 'nav_bar_result' => $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'info', 'x', 'y', 'cID')))));
        if (isset($_GET['search']) && xos_not_null($_GET['search'])) {
            $smarty->assign('link_filename_customers_reset', xos_href_link(FILENAME_CUSTOMERS));
        }
        require DIR_WS_BOXES . 'infobox_customers.php';
    }
    $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers');
    $output_customers = $smarty->fetch(ADMIN_TPL . '/customers.tpl');
    $smarty->assign('central_contents', $output_customers);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
                if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $customers_groups['customers_group_id']) && !isset($cInfo)) {
                    $cInfo = new objectInfo($customers_groups);
                }
                $selected = false;
                if (is_object($cInfo) && $customers_groups['customers_group_id'] == $cInfo->customers_group_id) {
                    $selected = true;
                    $link_filename_customers_groups = xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id . '&action=edit');
                } else {
                    $link_filename_customers_groups = xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers_groups['customers_group_id']);
                }
                $customers_groups_array[] = array('selected' => $selected, 'link_filename_customers_groups' => $link_filename_customers_groups, 'group_name' => $customers_groups['customers_group_name']);
            }
            if (SESSID) {
                $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
            }
            $smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_CUSTOMERS_GROUPS, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'link_filename_customers_groups_sort_asc' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'listing=group'), 'text_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_NAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'link_filename_customers_groups_sort_desc' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'listing=group-desc'), 'text_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_NAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'customers_groups' => $customers_groups_array, 'nav_bar_number' => $customers_groups_split->display_count($customers_groups_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS_GROUPS), 'nav_bar_result' => $customers_groups_split->display_links($customers_groups_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'info', 'x', 'y', 'cID')))));
            if (isset($_GET['search']) && xos_not_null($_GET['search'])) {
                $smarty->assign('link_filename_customers_groups_reset', xos_href_link(FILENAME_CUSTOMERS_GROUPS));
            } else {
                $smarty->assign('link_filename_customers_groups_insert', xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'page=' . $_GET['page'] . '&action=new'));
            }
            require DIR_WS_BOXES . 'infobox_customers_groups.php';
        }
    }
    $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers_groups');
    $output_customers_groups = $smarty->fetch(ADMIN_TPL . '/customers_groups.tpl');
    $smarty->assign('central_contents', $output_customers_groups);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
       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;');
     }
     break;
        $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';
     } elseif (EMAIL_USE_HTML == 'true') {
         $smarty->assign(array('use_html' => true, 'textarea_content_text_htlm' => xos_draw_textarea_field('content_text_htlm', '130', '25', $nInfo->content_text_htlm)));
     }
     $smarty->assign('textarea_content_text_plain', xos_draw_textarea_field('content_text_plain', '130', '25', $nInfo->content_text_plain));
     $languages = xos_get_languages();
     if (sizeof($languages) > 1) {
         $languages_id_selected = '';
         $lang_array = array(array('id' => '0', 'text' => TEXT_ALL_LANGUAGES));
         for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
             $lang_array[] = array('id' => $languages[$i]['id'], 'text' => $languages[$i]['name']);
         }
         $smarty->assign(array('languages' => true, 'pull_down_languages' => xos_draw_pull_down_menu('language_id', $lang_array, $nInfo->language_id)));
     } else {
         $smarty->assign('hidden_field_language_id', xos_draw_hidden_field('language_id', $languages[0]['id']));
     }
     $smarty->assign(array('action' => 'new', 'form_begin_new' => xos_draw_form('newsletter', FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . ($form_action == 'insert' ? JS_CONFIRM_INSERT : JS_CONFIRM_UPDATE) . '\')" enctype="multipart/form-data"'), 'pull_down_module' => xos_draw_pull_down_menu('module', $modules_array, $nInfo->module), 'input_title' => xos_draw_input_field('title', $nInfo->title, '', true), 'link_filename_newsletters_cancel' => xos_href_link(FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (isset($_GET['nID']) ? 'nID=' . $_GET['nID'] : ''))));
 } elseif ($action == 'preview') {
     $nID = xos_db_prepare_input($_GET['nID']);
     $newsletter_query = xos_db_query("select title, content_text_plain, content_text_htlm, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
     $newsletter = xos_db_fetch_array($newsletter_query);
     $nInfo = new objectInfo($newsletter);
     if ($nInfo->content_text_htlm != '' && EMAIL_USE_HTML == 'true') {
         $smarty->assign(array('content_text_plain' => wordwrap($nInfo->content_text_plain, 100), 'content_text_htlm' => $nInfo->content_text_htlm));
     } else {
         $smarty->assign('content_text_plain', wordwrap($nInfo->content_text_plain, 100));
     }
     $smarty->assign(array('action' => 'preview', 'link_filename_newsletters_back' => xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])));
 } elseif ($action == 'send') {
     $nID = xos_db_prepare_input($_GET['nID']);
     $newsletter_query = xos_db_query("select ns.title, ns.language_id, ns.content_text_plain, ns.content_text_htlm, ns.module, ls.code as language_code, ls.directory as language_directory from " . TABLE_NEWSLETTERS . " ns left join " . TABLE_LANGUAGES . " ls on ns.language_id = ls.languages_id where newsletters_id = '" . (int) $nID . "'");
     $newsletter = xos_db_fetch_array($newsletter_query);
            $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';
}
Exemple #22
0
//              or (at your option) any later version.
//
//              XOS-Shop is distributed in the hope that it will be useful,
//              but WITHOUT ANY WARRANTY; without even the implied warranty of
//              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//              GNU General Public License for more details.
//
//              You should have received a copy of the GNU General Public License
//              along with XOS-Shop.  If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------
// this file is based on:
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2003 osCommerce
//              filename: search.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/search.php') == 'overwrite_all')) {
    if (CACHE_LEVEL > 0 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
        $smarty->caching = 1;
        $cache_id = 'L1|box_search|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
    }
    if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/search.tpl', $cache_id)) {
        $js_check_keywords_string .= '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function check_keywords() {' . "\n" . '  var error_message = "' . JS_ERROR . '";' . "\n" . '  var keywords = document.quick_find.keywords.value;' . "\n\n" . '  String.prototype.trim = function () {' . "\n" . '    return (this.replace(/\\s+$/,"").replace(/^\\s+/,""));' . "\n" . '  };' . "\n\n" . '  if ((keywords == "") || (keywords.trim().length < 1)) {' . "\n" . '    error_message = error_message + "* ' . JS_ERROR_KEYWORD_FIELD_EMPTY . '\\n";' . "\n" . '    alert(error_message);' . "\n" . '    document.quick_find.keywords.focus();' . "\n" . '    return false;' . "\n" . '  }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
        $smarty->assign(array('box_search_link_filename_advanced_search_and_results' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS), 'box_search_js_check_keywords' => $js_check_keywords_string, 'box_search_link_quick_search_suggest' => str_replace('&amp;', '&', substr(xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false), -4) == '.php' ? xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false) . '?keywords=' : xos_href_link(FILENAME_QUICK_SEARCH_SUGGEST, '', $request_type, true, false) . '&keywords='), 'box_search_imput_field' => xos_draw_input_field('keywords', '', 'class="form-control" id="box_search_keywords" autocomplete="off" style="width: 118px" maxlength="30"', 'text', false), 'box_search_form_begin' => xos_draw_form('quick_find', xos_href_link(FILENAME_SEARCH_RESULT, '', $request_type, false), 'post', 'onsubmit="return check_keywords(this);"') . xos_hide_session_id(), 'box_search_form_end' => '</form>'));
    }
    $output_search = $smarty->fetch(SELECTED_TPL . '/includes/boxes/search.tpl', $cache_id);
    $smarty->caching = 0;
    $smarty->assign('box_search', $output_search);
}
Exemple #23
0
    }
    if ($error == true) {
        unset($_SESSION['access_allowed']);
        $messageStack->add('offline', TEXT_OFFLINE_ERROR);
    }
    $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_OFFLINE, '', 'SSL'));
    require DIR_WS_INCLUDES . 'html_header.php';
    //  require(DIR_WS_INCLUDES . 'boxes.php');
    //  require(DIR_WS_INCLUDES . 'header.php');
    //  require(DIR_WS_INCLUDES . 'footer.php');
    if ($messageStack->size('offline') > 0) {
        $smarty->assign('message_stack', $messageStack->output('offline'));
        $smarty->assign('message_stack_error', $messageStack->output('offline', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('offline', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('offline', 'success'));
    }
    $language_string = '';
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        while (list($key, $value) = each($lng->catalog_languages)) {
            $language_str .= ' <a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'dfrom', 'dto')) . 'lnc=' . $key, $request_type) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
        }
        $smarty->assign('language_str', $language_str);
    }
    $smarty->assign(array('form_begin' => xos_draw_form('offline', xos_href_link(FILENAME_OFFLINE, 'action=process', 'SSL')), 'input_field_email_address' => xos_draw_input_field('email_address', '', 'id="email_address"'), 'input_field_password' => xos_draw_password_field('password', '', 'id="password"'), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'offline');
    $output_offline = $smarty->fetch(SELECTED_TPL . '/offline.tpl');
    $smarty->assign('central_contents', $output_offline);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
     $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 />');
         $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_TAX_RATES, xos_get_all_get_params(array('action'))) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br />&nbsp;');
     }
     break;
<?php

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

$contents = array();
switch ($action) {
    case 'edit':
        $keys = '';
        reset($mInfo->keys);
        while (list($key, $value) = each($mInfo->keys)) {
            $keys .= '<b>' . $value['title'] . '</b><br />' . $value['description'] . '<br />';
            if ($value['set_function']) {
                eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
            } else {
                $keys .= xos_draw_input_field('configuration[' . $key . ']', $value['value']);
            }
            $keys .= '<br /><br />';
        }
        $keys = substr($keys, 0, strrpos($keys, '<br /><br />'));
        $heading_title = '<b>' . $mInfo->title . '</b>';
        $form_tag = xos_draw_form('modules', FILENAME_MODULES, 'set=' . $set . '&module=' . $_GET['module'] . '&action=save');
        $contents[] = array('text' => $keys);
        $contents[] = array('text' => '<br /><a href="" onclick="modules.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_MODULES, 'set=' . $set . '&module=' . $_GET['module']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    default:
        $heading_title = '<b>' . $mInfo->title . '</b>';
        if ($mInfo->status == '1') {
            $keys = '';
            reset($mInfo->keys);
            while (list(, $value) = each($mInfo->keys)) {
                $keys .= '<b>' . $value['title'] . '</b><br />';
                if ($value['use_function']) {
                    $use_function = $value['use_function'];
     $form_tag = xos_draw_form('currencies', FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $languages = xos_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $currency_query = xos_db_query("select title, symbol_left, symbol_right, decimal_point, thousands_point from " . TABLE_CURRENCIES . " where currencies_id = '" . $cInfo->currencies_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
         $currency = xos_db_fetch_array($currency_query);
         $contents[] = array('text' => '<br />&nbsp;<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']));
         $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . '<br /><div class="form-group">' . xos_draw_input_field('title[' . $languages[$i]['id'] . ']', $currency['title'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_left[' . $languages[$i]['id'] . ']', $currency['symbol_left'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_right[' . $languages[$i]['id'] . ']', $currency['symbol_right'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br /><div class="form-group">' . xos_draw_input_field('decimal_point[' . $languages[$i]['id'] . ']', $currency['decimal_point'], 'class="form-control"') . '</div>');
         $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br /><div class="form-group">' . xos_draw_input_field('thousands_point[' . $languages[$i]['id'] . ']', $currency['thousands_point'], 'class="form-control"') . '</div>');
     }
     $contents[] = array('text' => '<br />&nbsp;<br />&nbsp;<br />' . TEXT_INFO_CURRENCY_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', $cInfo->code, 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br /><div class="form-group">' . xos_draw_input_field('decimal_places', $cInfo->decimal_places, 'class="form-control"') . '</div>');
     $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br /><div class="form-group">' . xos_draw_input_field('value', $cInfo->value, 'class="form-control"') . '</div>');
     if (DEFAULT_CURRENCY != $cInfo->code) {
         $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT . '</label></div>');
     }
     $contents[] = array('text' => '<br /><a href="" onclick="currencies.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_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_INFO_HEADING_DELETE_CURRENCY . '</b>';
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $cInfo->title . '</b>');
     $contents[] = array('text' => '<br />' . '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a>' . ($remove_currency ? '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>' : '') . '<br />&nbsp;');
     break;
 default:
     if (is_object($cInfo)) {
         $heading_title = '<b>' . $cInfo->title . '</b>';
         $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>');
Exemple #28
0
        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';
}
             $comb_string = '';
             for ($ii = 0, $m = sizeof($opt_values_array); $ii < $m; $ii++) {
                 if ($i < $opt_array[$ii]['rows_per_value'] * max(1, $opt_rows_array[$ii] + 1)) {
                 } else {
                     $opt_rows_array[$ii] = $opt_rows_array[$ii] + 1;
                     $opt_out_array[$ii] = $opt_out_array[$ii] + 1;
                     if ($opt_out_array[$ii] % $opt_array[$ii]['options_values_qty'] == 0) {
                         $opt_out_array[$ii] = 0;
                     }
                 }
                 $opt_result_array[$i][$ii] = $opt_values_array[$opt_array[$ii]['options_id']][max(0, $opt_out_array[$ii])]['options_values_name'];
                 $comb_string .= $opt_array[$ii]['options_id'] . ',' . $opt_values_array[$opt_array[$ii]['options_id']][max(0, $opt_out_array[$ii])]['options_values_id'] . '_';
             }
             $comb_string = substr($comb_string, 0, -1);
             if (isset($attributes_quantity[$comb_string])) {
                 $opt_result_array[$i][sizeof($opt_values_array)] = xos_draw_input_field('attributes_quantity[' . $comb_string . ']', isset($attributes_quantity[$comb_string]) ? $attributes_quantity[$comb_string] == 0 ? '0' : $attributes_quantity[$comb_string] : '', 'onfocus="caching_qty(\'attributes_quantity[' . $comb_string . ']\')" onchange="update_total_qty(\'attributes_quantity[' . $comb_string . ']\')" class="smallText" size="8" maxlength="4"');
             } else {
                 unset($opt_result_array[$i]);
             }
         }
         unset($opt_array['rows_total']);
         $combinations_array = array();
         $combinations_array['options_names'] = $opt_array;
         $combinations_array['options_values'] = $opt_result_array;
     } else {
         $combinations_array['options_error'] = true;
     }
 }
 $smarty->assign('input_attributes_quantities', $combinations_array);
 $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'categories');
 $smarty->display(ADMIN_TPL . '/attributes_qty_list.tpl');
        $smarty->assign('form_begin_check_account', xos_draw_form('account', FILENAME_ADMIN_ACCOUNT, 'action=check_account', 'post', 'enctype="multipart/form-data"'));
    }
    if ($action == 'edit_process') {
        $smarty->assign('link_filename_admin_account', xos_href_link(FILENAME_ADMIN_ACCOUNT));
        if (isset($_SESSION['confirm_account'])) {
            $smarty->assign('confirm_account', true);
        }
    }
    if ($action == 'edit_process' && isset($_SESSION['confirm_account'])) {
        $smarty->assign(array('input_admin_firstname' => xos_draw_input_field('admin_firstname', $myAccount['admin_firstname']), 'input_admin_lastname' => xos_draw_input_field('admin_lastname', $myAccount['admin_lastname']), 'input_admin_password' => xos_draw_password_field('admin_password'), 'input_admin_password_confirm' => xos_draw_password_field('admin_password_confirm')));
        if ($_GET['error'] == 'email_used') {
            $smarty->assign(array('email_used' => TEXT_INFO_ERROR_EMAIL_USED, 'input_admin_email_address' => xos_draw_input_field('admin_email_address')));
        } elseif ($_GET['error'] == 'email_not_valid') {
            $smarty->assign(array('email_not_valid' => TEXT_INFO_ERROR_EMAIL_NOT_VALID, 'input_admin_email_address' => xos_draw_input_field('admin_email_address')));
        } else {
            $smarty->assign('input_admin_email_address', xos_draw_input_field('admin_email_address', $myAccount['admin_email_address']));
        }
    } else {
        if (isset($_SESSION['confirm_account'])) {
            unset($_SESSION['confirm_account']);
        }
        $smarty->assign(array('admin_firstname' => $myAccount['admin_firstname'], 'admin_lastname' => $myAccount['admin_lastname'], 'admin_email_address' => $myAccount['admin_email_address'], 'admin_groups_name' => $myAccount['admin_groups_name'], 'admin_created' => $myAccount['admin_created'], 'admin_lognum' => $myAccount['admin_lognum'], 'admin_logdate' => $myAccount['admin_logdate']));
    }
    $smarty->assign(array('BODY_TAG_PARAMS' => 'onload="SetFocus();"', 'admin_modified' => $myAccount['admin_modified'], 'form_end' => '</form>'));
    require DIR_WS_BOXES . 'infobox_admin_account.php';
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'admin_account');
    $output_admin_account = $smarty->fetch(ADMIN_TPL . '/admin_account.tpl');
    $smarty->assign('central_contents', $output_admin_account);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}