コード例 #1
0
        }
        $product_images[] = array('img_no' => $img_no, 'selection_delete_image' => xos_draw_selection_field('delete_product_image_' . $i, 'checkbox', 'true'), 'radio_large_image_default_size' => xos_draw_radio_field('large_image_size_' . $i, 'default', true), 'radio_large_image_uploaded_size' => xos_draw_radio_field('large_image_size_' . $i, 'uploaded', false), 'radio_large_image_input_size' => xos_draw_radio_field('large_image_size_' . $i, 'input', false), 'input_large_image_max_width' => xos_draw_input_field('large_image_max_width_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'input_large_image_max_height' => xos_draw_input_field('large_image_max_height_' . $i, '', 'style="background: #fffffe;" size ="2"'), 'small_product_image_max_height' => SMALL_PRODUCT_IMAGE_MAX_HEIGHT, 'image' => xos_image(DIR_WS_CATALOG_IMAGES . 'products/small/' . $products_image[$i]['name'], $pInfo->products_name), 'file_image' => xos_draw_file_field('products_image_' . $i), 'image_name' => $products_image[$i]['name'], 'large_img_width' => $large_img_size[0], 'large_img_height' => $large_img_size[1], 'large_img_base' => $products_image[$i]['large_image_max_width'] == 'default' ? 'default_size' : ($products_image[$i]['large_image_max_width'] == '0' ? 'origin_size' : ((int) $products_image[$i]['large_image_max_width'] > 0 ? 'self_selected_size' : '')), 'hidden_current_image' => xos_draw_hidden_field('current_product_image_' . $i, $products_image[$i]['name']));
        if (empty($products_image[$i]['name'])) {
            $more_images = true;
        }
    }
    $product_values = array();
    if (WYSIWYG_FOR_PRODUCT == 'true') {
        $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&', '&', 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');
}
コード例 #2
0
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_backup.php') == 'overwrite_all')) {
    $contents = array();
    switch ($action) {
        case 'backup':
            $heading_title = '<b>' . TEXT_INFO_HEADING_NEW_BACKUP . '</b>';
            $form_tag = xos_draw_form('backup', FILENAME_BACKUP, 'action=backupnow');
            $contents[] = array('text' => TEXT_INFO_NEW_BACKUP);
            $contents[] = array('text' => '<br /><div class="radio"><label>' . xos_draw_radio_field('compress', 'no', true) . TEXT_INFO_USE_NO_COMPRESSION . '</label></div>');
            if (extension_loaded('zlib')) {
                $contents[] = array('text' => '<div class="radio"><label>' . xos_draw_radio_field('compress', 'gzip') . TEXT_INFO_USE_GZIP . '</label></div>');
            }
            if ($dir_ok == true) {
                $contents[] = array('text' => '<br /><div class="checkbox"><label>' . xos_draw_checkbox_field('download', 'yes') . ' ' . TEXT_INFO_DOWNLOAD_ONLY . '*</label></div>*' . TEXT_INFO_BEST_THROUGH_HTTPS);
            } else {
                $contents[] = array('text' => '<br /><div class="radio"><label>' . xos_draw_radio_field('download', 'yes', true) . TEXT_INFO_DOWNLOAD_ONLY . '*</label></div>*' . TEXT_INFO_BEST_THROUGH_HTTPS);
            }
            $contents[] = array('text' => '<br /><a href="" onclick="backup.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_BACKUP . ' ">' . BUTTON_TEXT_BACKUP . '</a><a href="' . xos_href_link(FILENAME_BACKUP) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
            break;
        case 'restore':
            $heading_title = '<b>' . $buInfo->date . '</b>';
            $contents[] = array('text' => xos_break_string(sprintf(TEXT_INFO_RESTORE, DIR_FS_BACKUP . ($buInfo->compression != TEXT_NO_EXTENSION ? substr($buInfo->file, 0, strrpos($buInfo->file, '.')) : $buInfo->file), $buInfo->compression != TEXT_NO_EXTENSION ? TEXT_INFO_UNPACK : ''), 35, ' '));
            $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_RESTORE . ' ">' . BUTTON_TEXT_RESTORE . '</a><a href="' . xos_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
            break;
        case 'restorelocal':
            $heading_title = '<b>' . TEXT_INFO_HEADING_RESTORE_LOCAL . '</b>';
            $form_tag = xos_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"');
            $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '<br /><br />' . TEXT_INFO_BEST_THROUGH_HTTPS);
            $contents[] = array('text' => '<br />' . xos_draw_file_field('sql_file'));
            $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE);
            $contents[] = array('text' => '<br /><a href="" onclick="restore.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_RESTORE . ' ">' . BUTTON_TEXT_RESTORE . '</a><a href="' . xos_href_link(FILENAME_BACKUP) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
コード例 #3
0
     break;
 case 'move_product':
     $heading_title = '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>';
     $form_tag = xos_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id);
     $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . xos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br /><div class="form-group">' . xos_draw_pull_down_menu('move_to_category_id', xos_get_category_tree_for_movings(0, '', '', true), $current_category_id, 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br /><a href="" onclick="products.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_MOVE . ' ">' . BUTTON_TEXT_MOVE . '</a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 case 'copy_to':
     $heading_title = '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>';
     $form_tag = xos_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id);
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . xos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br /><div class="form-group">' . xos_draw_pull_down_menu('categories_or_pages_id', xos_get_category_tree_for_movings(0, '', '', true), $current_category_id, 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br /><div class="form-group"><div class="radio"><label>' . xos_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '</label></div><div class="radio"><label>' . xos_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '</label></div></div>');
     $contents[] = array('text' => '<br /><a href="" onclick="copy_to.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_COPY . ' ">' . BUTTON_TEXT_COPY . '</a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 default:
     if ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $category_path_string = '';
             $category_path = xos_generate_category_path($cInfo->categories_or_pages_id);
             for ($i = sizeof($category_path[0]) - 1; $i > 0; $i--) {
                 $category_path_string .= $category_path[0][$i]['id'] . '_';
             }
             $category_path_string = substr($category_path_string, 0, -1);
             $heading_title = '<b>' . $cInfo->categories_or_pages_name . '</b>';
             $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=new_category') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=delete_category') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=move_category') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_MOVE . ' ">' . BUTTON_TEXT_MOVE . '</a>');
             $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added));
コード例 #4
0
         $shipping_modules_array = array();
         for ($i = 0, $n = sizeof($quotes); $i < $n; $i++) {
             if (!isset($quotes[$i]['error'])) {
                 $shipping_modules_methods_array = array();
                 for ($j = 0, $n2 = sizeof($quotes[$i]['methods']); $j < $n2; $j++) {
                     // set the radio button to be checked if it is the method chosen
                     $checked = $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $_SESSION['shipping']['id'] ? true : false;
                     $checked == true || $n == 1 && $n2 == 1 ? $actual_method = true : ($actual_method = false);
                     if ($n > 1 || $n2 > 1) {
                         $several_methods = true;
                         $cost = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $quotes[$i]['methods'][$j]['cost'], isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0));
                     } else {
                         $several_methods = false;
                         $cost = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax']));
                     }
                     $shipping_modules_methods_array[] = array('radio_field' => xos_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'id="shipping_' . $radio_buttons . '"'), 'several_methods' => $several_methods, 'hidden_field' => xos_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], 'id="shipping_' . $radio_buttons . '"'), 'cost' => $cost, 'actual_method' => $actual_method, 'title' => $quotes[$i]['methods'][$j]['title'], 'radio_select' => $radio_buttons);
                     $radio_buttons++;
                 }
             }
             $shipping_modules_array[] = array('name' => $quotes[$i]['module'], 'icon' => $quotes[$i]['icon'], 'error' => $quotes[$i]['error'], 'methods' => $shipping_modules_methods_array);
             unset($shipping_modules_methods_array);
         }
     }
     $smarty->assign(array('shipping_modules' => true, 'shipping_modules_array' => $shipping_modules_array));
 }
 $smarty->assign(array('form_begin' => xos_draw_form('checkout_address', xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'post', '', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'form_end' => '</form>', 'link_filename_checkout_shipping_address' => MAX_ADDRESS_BOOK_ENTRIES > 1 ? xos_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') : xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'address_label' => xos_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />'), 'textarea' => xos_draw_textarea_field('comments', '60', '5', $_SESSION['comments'], 'class="form-control" id="checkout_shipping_comments"')));
 $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_shipping');
 $output_checkout_shipping = $smarty->fetch(SELECTED_TPL . '/checkout_shipping.tpl');
 $smarty->assign('central_contents', $output_checkout_shipping);
 $smarty->display(SELECTED_TPL . '/frame.tpl');
 require DIR_WS_INCLUDES . 'application_bottom.php';
コード例 #5
0
ファイル: reviews.php プロジェクト: bamper/xos_shop_system
 require DIR_WS_INCLUDES . 'column_left.php';
 require DIR_WS_INCLUDES . 'footer.php';
 if ($action == 'edit') {
     $rID = xos_db_prepare_input($_GET['rID']);
     $reviews_query = xos_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $rID . "' and r.reviews_id = rd.reviews_id");
     $reviews = xos_db_fetch_array($reviews_query);
     $products_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'");
     $products = xos_db_fetch_array($products_query);
     $products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
     $products_name = xos_db_fetch_array($products_name_query);
     $rInfo_array = array_merge((array) $reviews, (array) $products, (array) $products_name);
     $rInfo = new objectInfo($rInfo_array);
     $product_image = xos_get_product_images($rInfo->products_image);
     $reviews_rating = '';
     for ($i = 1; $i <= 5; $i++) {
         $reviews_rating .= xos_draw_radio_field('reviews_rating', $i, '', $rInfo->reviews_rating);
     }
     if ($product_image['name']) {
         $smarty->assign('products_image', xos_image(DIR_WS_CATALOG_IMAGES . 'products/medium/' . $product_image['name'], $rInfo->products_name, '', '', 'style="margin: 5px;"'));
     }
     $smarty->assign(array('edit' => true, 'form_begin_review' => xos_draw_form('review', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=preview'), 'products_name' => $rInfo->products_name, 'customers_name' => $rInfo->customers_name, 'date_added' => xos_date_short($rInfo->date_added), 'textarea_reviews_text' => xos_draw_textarea_field('reviews_text', '60', '15', $rInfo->reviews_text), 'hidden_reviews_id' => xos_draw_hidden_field('reviews_id', $rInfo->reviews_id), 'hidden_products_id' => xos_draw_hidden_field('products_id', $rInfo->products_id), 'hidden_customers_name' => xos_draw_hidden_field('customers_name', $rInfo->customers_name), 'hidden_products_name' => xos_draw_hidden_field('products_name', $rInfo->products_name), 'hidden_products_image' => xos_draw_hidden_field('products_image', $rInfo->products_image), 'hidden_date_added' => xos_draw_hidden_field('date_added', $rInfo->date_added), 'link_filename_reviews_cancel' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID']), 'reviews_rating' => $reviews_rating, 'form_end' => '</form>'));
 } elseif ($action == 'preview') {
     if (xos_not_null($_POST)) {
         $rInfo = new objectInfo($_POST);
     } else {
         $rID = xos_db_prepare_input($_GET['rID']);
         $reviews_query = xos_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $rID . "' and r.reviews_id = rd.reviews_id");
         $reviews = xos_db_fetch_array($reviews_query);
         $products_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'");
         $products = xos_db_fetch_array($products_query);
         $products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
コード例 #6
0
 require DIR_WS_INCLUDES . 'header.php';
 require DIR_WS_INCLUDES . 'footer.php';
 if ($messageStack->size('account_edit') > 0) {
     $smarty->assign('message_stack', $messageStack->output('account_edit'));
     $smarty->assign('message_stack_error', $messageStack->output('account_edit', 'error'));
     $smarty->assign('message_stack_warning', $messageStack->output('account_edit', 'warning'));
     $smarty->assign('message_stack_success', $messageStack->output('account_edit', 'success'));
 }
 if (ACCOUNT_GENDER == 'true') {
     if (isset($gender)) {
         $male = $gender == 'm' ? true : false;
     } else {
         $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'];
         }
コード例 #7
0
//              Copyright (c) 2003 osCommerce
//              filename: categories.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/modules/new_category.php') == 'overwrite_all')) {
    $parameters = array('categories_or_pages_id' => '', 'category_name' => '', 'categories_image' => '', 'product_list_b' => '', 'sort_order' => '', 'categories_or_pages_status' => '');
    if (isset($_GET['cpID']) && $reload != true) {
        $cpID = xos_db_prepare_input($_GET['cpID']);
        $category_query = xos_db_query("select c.categories_or_pages_id, cpd.categories_or_pages_name as category_name, c.categories_image, c.product_list_b, c.sort_order, c.categories_or_pages_status from " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_CATEGORIES_OR_PAGES_DATA . " cpd where c.categories_or_pages_id = '" . (int) $cpID . "' and c.categories_or_pages_id = cpd.categories_or_pages_id and cpd.language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
        $category = xos_db_fetch_array($category_query);
        $cInfo = new objectInfo($category);
    } elseif (xos_not_null($_POST)) {
        $cInfo = new objectInfo($_POST);
    } else {
        $cInfo = new objectInfo($parameters);
    }
    if (WYSIWYG_FOR_CATEGORY == 'true') {
        $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'category_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/category_config.js', 'category_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
    }
    $languages = xos_get_languages();
    $contents_data_array = array();
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
        $category_data_query = xos_db_query("select categories_or_pages_name, categories_or_pages_heading_title, categories_or_pages_content from " . TABLE_CATEGORIES_OR_PAGES_DATA . " where categories_or_pages_id = '" . (int) $cInfo->categories_or_pages_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
        $category_data = xos_db_fetch_array($category_data_query);
        $categories_data_array[] = 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('categories_or_pages_name[' . $languages[$i]['id'] . ']', isset($cInfo->categories_or_pages_name[$languages[$i]['id']]) ? stripslashes(htmlspecialchars($cInfo->categories_or_pages_name[$languages[$i]['id']])) : htmlspecialchars($category_data['categories_or_pages_name']), 'maxlength="64" size="30"', true), 'input_heading_title' => xos_draw_input_field('categories_or_pages_heading_title[' . $languages[$i]['id'] . ']', isset($cInfo->categories_or_pages_heading_title[$languages[$i]['id']]) ? stripslashes($cInfo->categories_or_pages_heading_title[$languages[$i]['id']]) : $category_data['categories_or_pages_heading_title'], 'maxlength="255" size="80"'), 'category_description' => 'categories_or_pages_content[' . $languages[$i]['id'] . ']', 'category_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/category_template.js', 'category_template_lang' => $languages[$i]['directory'] . '_default', 'category_textarea' => xos_draw_textarea_field('categories_or_pages_content[' . $languages[$i]['id'] . ']', '130', '25', isset($cInfo->categories_or_pages_content[$languages[$i]['id']]) ? stripslashes($cInfo->categories_or_pages_content[$languages[$i]['id']]) : $category_data['categories_or_pages_content']));
    }
    $smarty->assign(array('update' => isset($_GET['cpID']) ? true : false, 'form_begin' => isset($_GET['cpID']) ? xos_draw_form('update_category', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath . '&cpID=' . $_GET['cpID'], 'post', 'onsubmit="return confirm(\'' . JS_CONFIRM_UPDATE . '\')" enctype="multipart/form-data"') . xos_draw_hidden_field('categories_or_pages_id', $cInfo->categories_or_pages_id) : xos_draw_form('insert_category', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'onsubmit="return confirm(\'' . JS_CONFIRM_INSERT . '\')" enctype="multipart/form-data"'), 'hidden_fields' => xos_draw_hidden_field('current_category_image', isset($cInfo->current_category_image) ? stripslashes($cInfo->current_category_image) : $cInfo->categories_image) . xos_draw_hidden_field('category_name', $cInfo->category_name) . xos_draw_hidden_field('current_categories_or_pages_status', $cInfo->categories_or_pages_status), 'categories_data' => $categories_data_array, 'category_image' => xos_not_null($cInfo->current_category_image) || xos_not_null($cInfo->categories_image) ? xos_image(DIR_WS_CATALOG_IMAGES . 'categories/medium/' . (isset($cInfo->current_category_image) ? stripslashes($cInfo->current_category_image) : $cInfo->categories_image), $cInfo->category_name) : '', 'selection_delete_image' => xos_draw_selection_field('delete_category_image', 'checkbox', 'true'), 'image_file_name' => isset($cInfo->current_category_image) ? stripslashes($cInfo->current_category_image) : $cInfo->categories_image, 'input_upload_image' => xos_draw_file_field('categories_image'), 'radio_product_list_b_0' => xos_draw_radio_field('product_list_b', '0', $cInfo->product_list_b == 1 ? false : true), 'radio_product_list_b_1' => xos_draw_radio_field('product_list_b', '1', $cInfo->product_list_b == 1 ? true : false), 'radio_status_0' => xos_draw_radio_field('categories_or_pages_status', '0', $cInfo->categories_or_pages_status == 1 ? false : true), 'radio_status_1' => xos_draw_radio_field('categories_or_pages_status', '1', $cInfo->categories_or_pages_status == 1 ? true : false), 'input_sort_order' => xos_draw_input_field('sort_order', $cInfo->sort_order, 'maxlength="5" size="3"'), 'text_new_category' => sprintf(TEXT_NEW_CATEGORY_3, !isset($_GET['cpID']) ? TEXT_NEW_CATEGORY_1 : TEXT_NEW_CATEGORY_2, xos_output_generated_category_path($current_category_id)), 'link_filename_categories' => xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['cpID']) ? '&cpID=' . (int) $_GET['cpID'] : '')), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'categories');
    $output_new_category = $smarty->fetch(ADMIN_TPL . '/includes/modules/new_category.tpl');
}
コード例 #8
0
ファイル: customers.php プロジェクト: bamper/xos_shop_system
         if ($entry_company_tax_id_error == true) {
             $smarty->assign('company_tax_id_in_out_values', xos_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"') . '&nbsp;' . ENTRY_COMPANY_TAX_ID_ERROR);
         } else {
             $smarty->assign('company_tax_id_in_out_values', $cInfo->entry_company_tax_id . xos_draw_hidden_field('entry_company_tax_id'));
         }
     } else {
         $smarty->assign('company_tax_id_in_out_values', xos_draw_input_field('entry_company_tax_id', $cInfo->entry_company_tax_id, 'maxlength="32"'));
     }
     if ($error == true) {
         if ($customers_group_ra_error == true) {
             $smarty->assign('customers_group_ra_in_out_values', '<span class="radio-wrapper-in-form-horizontal-first">' . xos_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . '</span>&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_NO . '&nbsp;&nbsp;<span class="radio-wrapper-in-form-horizontal-not-first">' . xos_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . '</span>&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_YES . '&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_ERROR);
         } else {
             $smarty->assign('customers_group_ra_in_out_values', ($cInfo->customers_group_ra == '' ? '' : ($cInfo->customers_group_ra == '0' ? ENTRY_CUSTOMERS_GROUP_RA_NO : ENTRY_CUSTOMERS_GROUP_RA_YES)) . xos_draw_hidden_field('customers_group_ra'));
         }
     } else {
         $smarty->assign('customers_group_ra_in_out_values', '<span class="radio-wrapper-in-form-horizontal-first">' . xos_draw_radio_field('customers_group_ra', '0', false, $cInfo->customers_group_ra) . '</span>&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_NO . '&nbsp;&nbsp;<span class="radio-wrapper-in-form-horizontal-not-first">' . xos_draw_radio_field('customers_group_ra', '1', false, $cInfo->customers_group_ra) . '</span>&nbsp;&nbsp;' . ENTRY_CUSTOMERS_GROUP_RA_YES);
     }
 }
 if ($error == true) {
     if ($entry_street_address_error == true) {
         $smarty->assign('street_address_in_out_values', xos_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"') . '&nbsp;' . ENTRY_STREET_ADDRESS_ERROR);
     } else {
         $smarty->assign('street_address_in_out_values', $cInfo->entry_street_address . xos_draw_hidden_field('entry_street_address'));
     }
 } else {
     $smarty->assign('street_address_in_out_values', xos_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true));
 }
 if (ACCOUNT_SUBURB == 'true') {
     $smarty->assign('account_suburb', true);
     if ($error == true) {
         $smarty->assign('suburb_in_out_values', $cInfo->entry_suburb . xos_draw_hidden_field('entry_suburb'));
コード例 #9
0
 $site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
 $site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
 $add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'var selected;' . "\n\n" . 'function selectRowEffect(object, buttonSelect) {' . "\n" . '  if (!selected) {' . "\n" . '    if (document.getElementById) {' . "\n" . '      selected = document.getElementById("default-selected");' . "\n" . '    } else {' . "\n" . '      selected = document.all["default-selected"];' . "\n" . '    }' . "\n" . '  }' . "\n\n" . '  if (selected) selected.className = "module-row";' . "\n" . '  object.className = "module-row-selected";' . "\n" . '  selected = object;' . "\n\n" . '// one button is not an array' . "\n" . '  if (document.checkout_payment.payment[0]) {' . "\n" . '    document.checkout_payment.payment[buttonSelect].checked=true;' . "\n" . '  } else {' . "\n" . '    document.checkout_payment.payment.checked=true;' . "\n" . '  }' . "\n" . '}' . "\n\n" . 'function rowOverEffect(object) {' . "\n" . '  if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . '  if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
 $add_header .= $payment_modules->javascript_validation();
 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';
 $selection = $payment_modules->selection();
 $radio_buttons = 0;
 $payment_modules_array = array();
 for ($i = 0, $n = sizeof($selection); $i < $n; $i++) {
     $modules = $selection[$i]['module'];
     $selection[$i]['id'] == $_SESSION['payment'] || $n == 1 ? $actual_payment_method = true : ($actual_payment_method = false);
     if (sizeof($selection) > 1) {
         $radio_field = xos_draw_radio_field('payment', $selection[$i]['id'], $selection[$i]['id'] == $_SESSION['payment'], 'id="payment_' . $radio_buttons . '"');
     } else {
         $radio_field = xos_draw_hidden_field('payment', $selection[$i]['id'], 'id="payment_' . $radio_buttons . '"');
     }
     $fields = false;
     $module_error = false;
     if (isset($selection[$i]['error'])) {
         $module_error = true;
         $module_error_text = $selection[$i]['error'];
     } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
         $fields = true;
         $selection_fields_array = array();
         for ($j = 0, $n2 = sizeof($selection[$i]['fields']); $j < $n2; $j++) {
             $selection_fields_array[] = array('title' => $selection[$i]['fields'][$j]['title'], 'field' => $selection[$i]['fields'][$j]['field']);
         }
     }
コード例 #10
0
     break;
 case 'move_product':
     $heading_title = '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>';
     $form_tag = xos_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id);
     $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . xos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br />' . xos_draw_pull_down_menu('move_to_category_id', xos_get_category_tree_for_movings(0, '', '', true), $current_category_id));
     $contents[] = array('text' => '<br /><a href="" onclick="products.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_MOVE . ' "><span>' . BUTTON_TEXT_MOVE . '</span></a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
     break;
 case 'copy_to':
     $heading_title = '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>';
     $form_tag = xos_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id);
     $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><b>' . xos_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
     $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . xos_draw_pull_down_menu('categories_or_pages_id', xos_get_category_tree_for_movings(0, '', '', true), $current_category_id));
     $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . xos_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xos_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
     $contents[] = array('text' => '<br /><a href="" onclick="copy_to.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_COPY . ' "><span>' . BUTTON_TEXT_COPY . '</span></a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_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 ($rows > 0) {
         if (isset($cInfo) && is_object($cInfo)) {
             // category info box contents
             $category_path_string = '';
             $category_path = xos_generate_category_path($cInfo->categories_or_pages_id);
             for ($i = sizeof($category_path[0]) - 1; $i > 0; $i--) {
                 $category_path_string .= $category_path[0][$i]['id'] . '_';
             }
             $category_path_string = substr($category_path_string, 0, -1);
             $heading_title = '<b>' . $cInfo->categories_or_pages_name . '</b>';
             $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=new_category') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=delete_category') . '" 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_CATEGORIES, 'cPath=' . $category_path_string . '&cpID=' . $cInfo->categories_or_pages_id . '&action=move_category') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_MOVE . ' "><span>' . BUTTON_TEXT_MOVE . '</span></a>');
             $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added));
コード例 #11
0
<?php

$contents = array();
switch ($action) {
    case 'backup':
        $heading_title = '<b>' . TEXT_INFO_HEADING_NEW_BACKUP . '</b>';
        $form_tag = xos_draw_form('backup', FILENAME_BACKUP, 'action=backupnow');
        $contents[] = array('text' => TEXT_INFO_NEW_BACKUP);
        $contents[] = array('text' => '<br />' . xos_draw_radio_field('compress', 'no', true) . ' ' . TEXT_INFO_USE_NO_COMPRESSION);
        if (extension_loaded('zlib')) {
            $contents[] = array('text' => xos_draw_radio_field('compress', 'gzip') . ' ' . TEXT_INFO_USE_GZIP);
        }
        if ($dir_ok == true) {
            $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('download', 'yes') . ' ' . TEXT_INFO_DOWNLOAD_ONLY . '*<br /><br />*' . TEXT_INFO_BEST_THROUGH_HTTPS);
        } else {
            $contents[] = array('text' => '<br />' . xos_draw_radio_field('download', 'yes', true) . ' ' . TEXT_INFO_DOWNLOAD_ONLY . '*<br /><br />*' . TEXT_INFO_BEST_THROUGH_HTTPS);
        }
        $contents[] = array('text' => '<br /><a href="" onclick="backup.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACKUP . ' "><span>' . BUTTON_TEXT_BACKUP . '</span></a><a href="' . xos_href_link(FILENAME_BACKUP) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    case 'restore':
        $heading_title = '<b>' . $buInfo->date . '</b>';
        $contents[] = array('text' => xos_break_string(sprintf(TEXT_INFO_RESTORE, DIR_FS_BACKUP . ($buInfo->compression != TEXT_NO_EXTENSION ? substr($buInfo->file, 0, strrpos($buInfo->file, '.')) : $buInfo->file), $buInfo->compression != TEXT_NO_EXTENSION ? TEXT_INFO_UNPACK : ''), 35, ' '));
        $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_RESTORE . ' "><span>' . BUTTON_TEXT_RESTORE . '</span></a><a href="' . xos_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
        break;
    case 'restorelocal':
        $heading_title = '<b>' . TEXT_INFO_HEADING_RESTORE_LOCAL . '</b>';
        $form_tag = xos_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"');
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '<br /><br />' . TEXT_INFO_BEST_THROUGH_HTTPS);
        $contents[] = array('text' => '<br />' . xos_draw_file_field('sql_file'));
        $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE);
        $contents[] = array('text' => '<br /><a href="" onclick="restore.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_RESTORE . ' "><span>' . BUTTON_TEXT_RESTORE . '</span></a><a href="' . xos_href_link(FILENAME_BACKUP) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br />&nbsp;');
コード例 #12
0
ファイル: info_pages.php プロジェクト: bamper/xos_shop_system
 }
 /// durch auskommentieren koennen neue popup's generiert werden.
 // /*
 if ($cInfo->type == 'system_popup') {
     $type_array[] = array('id' => 'system_popup', 'text' => 'system_popup');
 } else {
     $type_array[] = array('id' => 'index', 'text' => 'index');
     $type_array[] = array('id' => 'info', 'text' => 'info');
     $type_array[] = array('id' => 'not_in_menu', 'text' => 'not_in_menu');
 }
 // */
 //    $type_array[] = array('id' => 'index', 'text' => 'index');
 //    $type_array[] = array('id' => 'info', 'text' => 'info');
 //    $type_array[] = array('id' => 'system_popup', 'text' => 'system_popup');
 //    $type_array[] = array('id' => 'not_in_menu', 'text' => 'not_in_menu');
 $smarty->assign(array('pull_down_type' => xos_draw_pull_down_menu('type', $type_array, $cInfo->type, 'onchange="updateSort()"'), 'pull_down_link_request_type' => xos_draw_pull_down_menu('link_request_type', array(array('id' => 'NONSSL', 'text' => 'NONSSL'), array('id' => 'SSL', 'text' => 'SSL')), $cInfo->link_request_type), 'radio_status_0' => xos_draw_radio_field('status', '0', $cInfo->status == 1 ? false : true), 'radio_status_1' => xos_draw_radio_field('status', '1', $cInfo->status == 1 ? true : false), 'input_sort_order' => xos_draw_input_field('sort_order', $cInfo->sort_order, 'maxlength="3" size="3"')));
 if (WYSIWYG_FOR_INFO_PAGES == 'true') {
     $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'info_pages_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/info_pages_config.js', 'info_pages_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
 }
 $languages = xos_get_languages();
 $contents_data_array = array();
 $php_code_included = false;
 for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
     $contents_data_query = xos_db_query("select name, heading_title, content, php_source from " . TABLE_CONTENTS_DATA . " where content_id = '" . (int) $cInfo->content_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
     $contents_data = xos_db_fetch_array($contents_data_query);
     if (!empty($cInfo->php_source[$languages[$i]['id']]) || !empty($contents_data['php_source'])) {
         $php_code_included = true;
     }
     $contents_data_array[] = 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('name[' . $languages[$i]['id'] . ']', isset($cInfo->name[$languages[$i]['id']]) ? stripslashes(htmlspecialchars($cInfo->name[$languages[$i]['id']])) : htmlspecialchars($contents_data['name']), 'maxlength="64" size="30"', true), 'input_heading_title' => xos_draw_input_field('heading_title[' . $languages[$i]['id'] . ']', isset($cInfo->heading_title[$languages[$i]['id']]) ? stripslashes($cInfo->heading_title[$languages[$i]['id']]) : $contents_data['heading_title'], 'maxlength="255" size="80"'), 'content_name' => 'content[' . $languages[$i]['id'] . ']', 'info_pages_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/info_pages_template.js', 'info_pages_template_lang' => $languages[$i]['directory'] . '_default', 'textarea_content' => xos_draw_textarea_field('content[' . $languages[$i]['id'] . ']', '130', '25', isset($cInfo->content[$languages[$i]['id']]) ? stripslashes($cInfo->content[$languages[$i]['id']]) : $contents_data['content']), 'textarea_php_source' => xos_draw_textarea_field('php_source[' . $languages[$i]['id'] . ']', '130', '25', isset($cInfo->php_source[$languages[$i]['id']]) ? stripslashes($cInfo->php_source[$languages[$i]['id']]) : $contents_data['php_source'], 'class="textarea-php-code" readonly="readonly"'));
 }
 $smarty->assign(array('contents_data' => $contents_data_array, 'php_code_included' => $php_code_included, 'link_filename_info_pages_cancel' => xos_href_link(FILENAME_INFO_PAGES, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (isset($_GET['cID']) ? 'cID=' . $_GET['cID'] : ''))));
コード例 #13
0
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_CODE . '<br />' . xos_draw_input_field('code'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_IMAGE . '<br />' . xos_draw_input_field('image', 'icon.gif'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br />' . xos_draw_input_field('directory'));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_USE_IN . '<br />' . xos_draw_radio_field('use_in_id', '1', $use_in_admin, '', 'onclick="if (this.checked == true) { document.getElementsByName(\'display_in_catalog\')[0].checked = false; document.getElementsByName(\'display_in_catalog\')[0].disabled = true; }"') . ' ' . TEXT_INFO_ADMIN . '<br /><div style="background: #b4b4b4; padding: 0 3px 3px 0; float: left;">' . xos_draw_radio_field('use_in_id', '2', $use_in_catalog, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_CATALOG . '<br />' . xos_draw_radio_field('use_in_id', '3', $use_in_both, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_ADMIN_AND_CATALOG . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . '<span style="display:;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . xos_draw_checkbox_field('display_in_catalog', '1', true) . ' ' . TEXT_INFO_DISPLAY_IN_CATALOG . '</span></div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_SORT_ORDER . '<br />' . xos_draw_input_field('sort_order'));
     $contents[] = array('text' => '<br /><a href="" onclick="languages.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_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $_GET['lID']) . '" 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_INFO_HEADING_EDIT_LANGUAGE . '</b>';
     $form_tag = xos_draw_form('languages', FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_NAME . '<br />' . xos_draw_input_field('name', $lInfo->name));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_CODE . '<br />' . xos_draw_input_field('code', $lInfo->code));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_IMAGE . '<br />' . xos_draw_input_field('image', $lInfo->image));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br />' . xos_draw_input_field('directory', $lInfo->directory));
     DEFAULT_LANGUAGE != $lInfo->code ? $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_USE_IN . '<br />' . xos_draw_radio_field('use_in_id', '1', $use_in_admin, '', 'onclick="if (this.checked == true) { document.getElementsByName(\'display_in_catalog\')[0].checked = false; document.getElementsByName(\'display_in_catalog\')[0].disabled = true; }"') . ' ' . TEXT_INFO_ADMIN . '<br /><div style="background: #b4b4b4; padding: 0 3px 3px 0; float: left;">' . xos_draw_radio_field('use_in_id', '2', $use_in_catalog, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_CATALOG . '<br />' . xos_draw_radio_field('use_in_id', '3', $use_in_both, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_ADMIN_AND_CATALOG . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . '<span style="display:;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . xos_draw_checkbox_field('display_in_catalog', '1', $lInfo->display_in_catalog == '1' ? true : false) . ' ' . TEXT_INFO_DISPLAY_IN_CATALOG . '</span></div>') : ($contents[] = array('text' => xos_draw_hidden_field('use_in_id', $lInfo->use_in_id) . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . xos_draw_hidden_field('display_in_catalog', '1')));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_SORT_ORDER . '<br />' . xos_draw_input_field('sort_order', $lInfo->sort_order));
     if (DEFAULT_LANGUAGE != $lInfo->code && $use_in_both) {
         $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT);
     }
     $contents[] = array('text' => '<br /><a href="" onclick="languages.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_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_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_INFO_HEADING_DELETE_LANGUAGE . '</b>';
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $lInfo->name . '</b>');
     $contents[] = array('text' => '<br />' . ($remove_language ? '<a href="' . xos_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=deleteconfirm') . '" 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_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_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 (is_object($lInfo)) {
         $heading_title = '<b>' . $lInfo->name . '</b>';
コード例 #14
0
 if ($messageStack->size('checkout_address') > 0) {
     $smarty->assign('message_stack', $messageStack->output('checkout_address'));
     $smarty->assign('message_stack_error', $messageStack->output('checkout_address', 'error'));
     $smarty->assign('message_stack_warning', $messageStack->output('checkout_address', 'warning'));
     $smarty->assign('message_stack_success', $messageStack->output('checkout_address', 'success'));
 }
 if ($process == false) {
     $smarty->assign('address_label', xos_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'));
     if ($addresses_count > 1) {
         $radio_buttons = 0;
         $addresses_query = xos_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
         $addresses_array = array();
         while ($addresses = xos_db_fetch_array($addresses_query)) {
             $format_id = xos_get_address_format_id($addresses['country_id']);
             $addresses['address_book_id'] == $_SESSION['billto'] ? $actual_address = true : ($actual_address = false);
             $addresses_array[] = array('radio_field' => xos_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $_SESSION['billto'], 'id="address_' . $radio_buttons . '"'), 'actual_address' => $actual_address, 'address_name' => xos_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']), 'full_address' => xos_address_format($format_id, $addresses, true, ' ', ', '), 'radio_select' => $radio_buttons);
             $radio_buttons++;
         }
         $smarty->assign(array('several_addresses' => true, 'addresses' => $addresses_array));
     }
 }
 if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
     $smarty->assign('not_max_address_book_entries', true);
 }
 if ($process == true) {
     $smarty->assign(array('process' => true, 'link_filename_checkout_payment_address' => xos_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')));
 }
 $smarty->assign(array('form_begin' => xos_draw_form('checkout_address', xos_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'form_end' => '</form>', 'hidden_field_submit' => xos_draw_hidden_field('action', 'submit'), 'link_filename_checkout_shipping' => xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')));
 $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_payment_address');
 $output_checkout_payment_address = $smarty->fetch(SELECTED_TPL . '/checkout_payment_address.tpl');
 $smarty->assign('central_contents', $output_checkout_payment_address);
コード例 #15
0
ファイル: pages.php プロジェクト: bamper/xos_shop_system
     }
     if (WYSIWYG_FOR_PAGES == 'true') {
         $smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&amp;', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'page_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/page_config.js', 'page_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
     }
     $languages = xos_get_languages();
     $contents_data_array = array();
     $php_code_included = false;
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $page_data_query = xos_db_query("select categories_or_pages_name, categories_or_pages_heading_title, categories_or_pages_content, categories_or_pages_php_source from " . TABLE_CATEGORIES_OR_PAGES_DATA . " where categories_or_pages_id = '" . (int) $cInfo->categories_or_pages_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'");
         $page_data = xos_db_fetch_array($page_data_query);
         if (!empty($cInfo->categories_or_pages_php_source[$languages[$i]['id']]) || !empty($page_data['categories_or_pages_php_source'])) {
             $php_code_included = true;
         }
         $pages_data_array[] = 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('categories_or_pages_name[' . $languages[$i]['id'] . ']', isset($cInfo->categories_or_pages_name[$languages[$i]['id']]) ? stripslashes(htmlspecialchars($cInfo->categories_or_pages_name[$languages[$i]['id']])) : htmlspecialchars($page_data['categories_or_pages_name']), 'maxlength="64" size="30"', true), 'input_heading_title' => xos_draw_input_field('categories_or_pages_heading_title[' . $languages[$i]['id'] . ']', isset($cInfo->categories_or_pages_heading_title[$languages[$i]['id']]) ? stripslashes($cInfo->categories_or_pages_heading_title[$languages[$i]['id']]) : $page_data['categories_or_pages_heading_title'], 'maxlength="255" size="80"'), 'page_description' => 'categories_or_pages_content[' . $languages[$i]['id'] . ']', 'page_template_file' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN . 'includes/ckconfig/templates/' . $languages[$i]['directory'] . '/page_template.js', 'page_template_lang' => $languages[$i]['directory'] . '_default', 'page_textarea' => xos_draw_textarea_field('categories_or_pages_content[' . $languages[$i]['id'] . ']', '130', '25', isset($cInfo->categories_or_pages_content[$languages[$i]['id']]) ? stripslashes($cInfo->categories_or_pages_content[$languages[$i]['id']]) : $page_data['categories_or_pages_content']), 'page_textarea_php_source' => xos_draw_textarea_field('categories_or_pages_php_source[' . $languages[$i]['id'] . ']', '130', '25', isset($cInfo->categories_or_pages_php_source[$languages[$i]['id']]) ? stripslashes($cInfo->categories_or_pages_php_source[$languages[$i]['id']]) : $page_data['categories_or_pages_php_source'], 'class="textarea-php-code" readonly="readonly"'));
     }
     $smarty->assign(array('update' => isset($_GET['cpID']) ? true : false, 'php_code_included' => $php_code_included, 'form_begin' => isset($_GET['cpID']) ? xos_draw_form('update_page', FILENAME_PAGES, 'action=update_page&cPath=' . $cPath . '&cpID=' . $_GET['cpID'], 'post', 'onsubmit="return confirm(\'' . JS_CONFIRM_UPDATE . '\')" enctype="multipart/form-data"') . xos_draw_hidden_field('categories_or_pages_id', $cInfo->categories_or_pages_id) : xos_draw_form('insert_page', FILENAME_PAGES, 'action=insert_page&cPath=' . $cPath, 'post', 'onsubmit="return confirm(\'' . JS_CONFIRM_INSERT . '\')" enctype="multipart/form-data"'), 'hidden_fields' => xos_draw_hidden_field('page_name', $cInfo->page_name) . xos_draw_hidden_field('current_categories_or_pages_status', $cInfo->categories_or_pages_status), 'pages_data' => $pages_data_array, 'radio_page_not_in_menu_0' => xos_draw_radio_field('page_not_in_menu', '0', $cInfo->page_not_in_menu == 1 ? false : true), 'radio_page_not_in_menu_1' => xos_draw_radio_field('page_not_in_menu', '1', $cInfo->page_not_in_menu == 1 ? true : false), 'radio_status_0' => xos_draw_radio_field('categories_or_pages_status', '0', $cInfo->categories_or_pages_status == 1 ? false : true), 'radio_status_1' => xos_draw_radio_field('categories_or_pages_status', '1', $cInfo->categories_or_pages_status == 1 ? true : false), 'input_sort_order' => xos_draw_input_field('sort_order', $cInfo->sort_order, 'maxlength="5" size="3"'), 'pull_down_link_request_type' => xos_draw_pull_down_menu('link_request_type', array(array('id' => 'NONSSL', 'text' => 'NONSSL'), array('id' => 'SSL', 'text' => 'SSL')), $cInfo->link_request_type), 'text_new_page' => sprintf(TEXT_NEW_PAGE_3, !isset($_GET['cpID']) ? TEXT_NEW_PAGE_1 : TEXT_NEW_PAGE_2, xos_output_generated_page_path($current_page_id)), 'link_filename_pages' => xos_href_link(FILENAME_PAGES, 'cPath=' . $cPath . (isset($_GET['cpID']) ? '&cpID=' . (int) $_GET['cpID'] : '')), 'form_end' => '</form>'));
     $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'pages');
     $output_new_page = $smarty->fetch(ADMIN_TPL . '/includes/modules/new_page.tpl');
     $smarty->assign('central_contents', $output_new_page);
 } else {
     $pages_count = 0;
     $rows = 0;
     $pages_query = xos_db_query("select c.categories_or_pages_id, cpd.categories_or_pages_name, c.parent_id, c.page_not_in_menu, c.sort_order, c.date_added, c.last_modified, c.categories_or_pages_status  from " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_CATEGORIES_OR_PAGES_DATA . " cpd where c.parent_id = '" . (int) $current_page_id . "' and c.categories_or_pages_id = cpd.categories_or_pages_id and c.is_page != 'false' and cpd.language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by c.sort_order, cpd.categories_or_pages_name");
     $pages_array = array();
     while ($pages = xos_db_fetch_array($pages_query)) {
         $pages_count++;
         $rows++;
         $children_in_page = xos_children_in_page_count($pages['categories_or_pages_id']);
         if ((!isset($_GET['cpID']) && !isset($_GET['pID']) || isset($_GET['cpID']) && $_GET['cpID'] == $pages['categories_or_pages_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
             $page_children = array('children_count' => $children_in_page);
             $cInfo_array = array_merge((array) $pages, (array) $page_children);
コード例 #16
0
     if (!isset($products_prices[$customers_group['customers_group_id']]['special_status'])) {
         $products_prices[$customers_group['customers_group_id']]['special_status'] = $products_prices[0]['special_status'];
     }
     switch ($products_prices[$customers_group['customers_group_id']]['special_status']) {
         case '1':
             $in_special_status = true;
             $out_special_status = false;
             break;
         case '0':
         default:
             $in_special_status = false;
             $out_special_status = true;
     }
     $special_expires_date_query = xos_db_query("select date_format(expires_date, '" . DATE_FORMAT_SHORT . "') as expires_date from " . TABLE_SPECIALS . " where products_id = '" . (int) $product['products_id'] . "' and customers_group_id = '" . (int) $customers_group['customers_group_id'] . "'");
     $special_expires_date = xos_db_fetch_array($special_expires_date_query);
     $customers_groups_array[] = array('name' => $customers_group['customers_group_name'], 'id' => $customers_group['customers_group_id'], 'toggle_name' => 'toggle_' . $customers_group['customers_group_id'], 'display' => $sizeof > 2 ? '' : 'display: none', $customers_group['customers_group_id'] == 0 ? '' : 'input_checkbox' => xos_draw_checkbox_field('option[' . $customers_group['customers_group_id'] . ']', 'option[' . $customers_group['customers_group_id'] . ']', $products_prices[$customers_group['customers_group_id']][0] ? true : false, '', 'onclick="updateChecked(\'' . $customers_group['customers_group_id'] . '\')"'), 'input_price' => xos_draw_input_field('products_price_' . $customers_group['customers_group_id'], $products_prices[$customers_group['customers_group_id']][0]['regular'], 'style="background: #fffffe;" size ="11" onkeyup="updateGross(\'products_price_' . $customers_group['customers_group_id'] . '\', \'products_price_gross_' . $customers_group['customers_group_id'] . '\')"'), 'input_price_gross' => xos_draw_input_field('products_price_gross_' . $customers_group['customers_group_id'], $products_prices[$customers_group['customers_group_id']][0]['regular'], 'style="background: #fffffe;" size ="11" onkeyup="updateNet(\'products_price_gross_' . $customers_group['customers_group_id'] . '\', \'products_price_' . $customers_group['customers_group_id'] . '\')"'), 'input_special_price' => xos_draw_input_field('products_special_price_' . $customers_group['customers_group_id'], $products_prices[$customers_group['customers_group_id']][0]['special'], 'style="background: ' . (in_array($customers_group['customers_group_id'], $error_groups) && !$products_prices[$customers_group['customers_group_id']][0]['special'] > 0 ? '#000000' : '#ffe1e1') . '; color : red;" size ="11" onkeyup="updateGross(\'products_special_price_' . $customers_group['customers_group_id'] . '\', \'products_special_price_gross_' . $customers_group['customers_group_id'] . '\')"'), 'input_special_price_gross' => xos_draw_input_field('products_special_price_gross_' . $customers_group['customers_group_id'], $products_prices[$customers_group['customers_group_id']][0]['special'], 'style="background: ' . (in_array($customers_group['customers_group_id'], $error_groups) && !$products_prices[$customers_group['customers_group_id']][0]['special'] > 0 ? '#000000' : '#ffe1e1') . '; color : red;" size ="11" onkeyup="updateNet(\'products_special_price_gross_' . $customers_group['customers_group_id'] . '\', \'products_special_price_' . $customers_group['customers_group_id'] . '\')"'), 'input_special_expires_date' => xos_draw_input_field('special_expires_date_' . $customers_group['customers_group_id'], $special_expires_date['expires_date'], 'id ="special_expires_date_' . $customers_group['customers_group_id'] . '" style="background: #ffffcc;" size ="10"'), 'radio_special_status_1' => xos_draw_radio_field('products_special_status_' . $customers_group['customers_group_id'], '1', $in_special_status), 'radio_special_status_0' => xos_draw_radio_field('products_special_status_' . $customers_group['customers_group_id'], '0', $out_special_status), 'price_breaks' => $price_breaks_array);
     unset($price_breaks_array);
     $update_gross_string .= 'updateGross(\'products_price_' . $customers_group['customers_group_id'] . '\', \'products_price_gross_' . $customers_group['customers_group_id'] . '\');' . "\n" . 'updateGross(\'products_special_price_' . $customers_group['customers_group_id'] . '\', \'products_special_price_gross_' . $customers_group['customers_group_id'] . '\');';
     $update_net_string .= 'updateNet(\'products_price_gross_' . $customers_group['customers_group_id'] . '\', \'products_price_' . $customers_group['customers_group_id'] . '\');' . "\n" . 'updateNet(\'products_special_price_gross_' . $customers_group['customers_group_id'] . '\', \'products_special_price_' . $customers_group['customers_group_id'] . '\');';
     if ($customers_group['customers_group_id'] != 0) {
         $update_checked_string .= 'updateChecked(\'' . $customers_group['customers_group_id'] . '\');';
     }
     $javascript .= "\n" . '$(function() {' . "\n" . '  $( "#special_expires_date_' . $customers_group['customers_group_id'] . '" ).datepicker({' . "\n" . '    changeMonth: true,' . "\n" . '    changeYear: true' . "\n" . '  });' . "\n" . '});' . "\n";
 }
 ////////////////////////////////////////
 $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)) {
コード例 #17
0
ファイル: install_5.php プロジェクト: bamper/xos_shop_system
//              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: install_5.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
reset($_POST);
$hidden_fields = '';
while (list($key, $value) = each($_POST)) {
    if ($key != 'x' && $key != 'y' && $key != 'DB_SERVER' && $key != 'DB_SERVER_USERNAME' && $key != 'DB_SERVER_PASSWORD' && $key != 'DB_DATABASE' && $key != 'USE_PCONNECT' && $key != 'STORE_SESSIONS') {
        if (is_array($value)) {
            for ($i = 0; $i < sizeof($value); $i++) {
                $hidden_fields .= xos_draw_hidden_field($key . '[]', $value[$i]);
            }
        } else {
            $hidden_fields .= xos_draw_hidden_field($key, $value);
        }
    }
}
$smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=6" method="post">', 'form_end' => '</form>', 'input_field_server' => xos_draw_input_field('DB_SERVER'), 'input_field_username' => xos_draw_input_field('DB_SERVER_USERNAME'), 'password_field' => xos_draw_password_field('DB_SERVER_PASSWORD'), 'input_field_database' => xos_draw_input_field('DB_DATABASE'), 'checkbox_field_pconnect' => xos_draw_checkbox_field('USE_PCONNECT', 'true'), 'radio_field_store_sessions_files' => xos_draw_radio_field('STORE_SESSIONS', 'files', isset($_POST['STORE_SESSIONS']) ? '' : true), 'radio_field_store_sessions_mysql' => xos_draw_radio_field('STORE_SESSIONS', 'mysql'), 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
$output_install_5 = $smarty->fetch('install_5.tpl');
$smarty->clearAssign(array('form_begin', 'form_end', 'input_field_server', 'input_field_username', 'password_field', 'input_field_database', 'checkbox_field_pconnect', 'radio_field_store_sessions_files', 'radio_field_store_sessions_mysql', 'href_link_index', 'hidden_fields'));
$smarty->assign('install_inner_content', $output_install_5);
コード例 #18
0
ファイル: install_1.php プロジェクト: bamper/xos_shop_system
$not_writeable_directories_array = array();
$nonexistent_directories_array = array();
$not_writeable_files_array = array();
$nonexistent_files_array = array();
$error = false;
for ($i = 0, $n = sizeof($directories_array); $i < $n; $i++) {
    if (is_dir($fs_path . $directories_array[$i])) {
        if (!is_writable($fs_path . $directories_array[$i])) {
            $not_writeable_directories_array[] = array('directory' => $ws_path . $directories_array[$i]);
            $error = true;
        }
    } else {
        $nonexistent_directories_array[] = array('directory' => $ws_path . $directories_array[$i]);
        $error = true;
    }
}
for ($i = 0, $n = sizeof($files_array); $i < $n; $i++) {
    if (file_exists($fs_path . $files_array[$i])) {
        if (!is_writable($fs_path . $files_array[$i])) {
            $not_writeable_files_array[] = array('file' => $ws_path . $files_array[$i]);
            $error = true;
        }
    } else {
        $nonexistent_files_array[] = array('file' => $ws_path . $files_array[$i]);
        $error = true;
    }
}
$smarty->assign(array('error' => $error, 'not_writeable_directories' => $not_writeable_directories_array, 'nonexistent_directories' => $nonexistent_directories_array, 'not_writeable_files' => $not_writeable_files_array, 'nonexistent_files' => $nonexistent_files_array, 'form_begin' => $directories_error ? '<form name="install" action="install.php" method="post">' : '<form name="install" action="install.php?step=2" method="post">', 'form_end' => '</form>', 'checkbox_database' => xos_draw_checkbox_field('install[]', 'database', true), 'checkbox_configure' => xos_draw_checkbox_field('install[]', 'configure', true), 'radio_field_database_data_source_without_sample_data' => xos_draw_radio_field('database_data_source', 'xos-shop_without_sample_data.sql'), 'radio_field_database_data_source_with_sample_data' => xos_draw_radio_field('database_data_source', 'xos-shop_with_sample_data.sql', true), 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
$output_install_1 = $smarty->fetch('install_1.tpl');
$smarty->clearAssign(array('error', 'not_writeable_directories', 'nonexistent_directories', 'not_writeable_files', 'nonexistent_files', 'form_begin', 'form_end', 'checkbox_database', 'checkbox_configure', 'href_link_index', 'hidden_fields'));
$smarty->assign('install_inner_content', $output_install_1);
コード例 #19
0
                 $comb_elements = explode('_', $comb_string);
                 foreach ($comb_elements as $element) {
                     if (in_array($element, $attributes_not_updated)) {
                         $image_arrow_left_not_updated = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_arrow_left.gif', ICON_TITLE_ROW_IS_NOT_UPDATED, 11, 11);
                     }
                 }
             }
         }
         $opt_result_array[$i][sizeof($opt_values_array)] = STOCK_CHECK == 'true' ? xos_draw_input_field('attributes_quantity[' . $_GET['products_id'] . '][' . $comb_string . ']', isset($attributes_quantity[$comb_string]) ? $attributes_quantity[$comb_string] == 0 ? '0' : $attributes_quantity[$comb_string] : '', 'class="smallText" size="4" maxlength="4"') : (isset($attributes_quantity[$comb_string]) ? '&nbsp; &nbsp; 0' : '');
         $opt_result_array[$i][sizeof($opt_values_array) + 1] = xos_draw_checkbox_field('string_fragment[' . $_GET['products_id'] . '][]', $comb_string, $pos !== false || $combinations_string == '' ? true : false) . $image_arrow_left_not_updated;
     }
     unset($opt_array['rows_total']);
     $combinations_array = array();
     $combinations_array['options_names'] = $opt_array;
     $combinations_array['options_values'] = $opt_result_array;
     $smarty->assign(array('action' => 'combinations', 'products_name' => $product['products_name'], 'products_id' => $_GET['products_id'], 'radio_products_status_1' => xos_draw_radio_field('products_status[' . $_GET['products_id'] . ']', '1', $in_status), 'radio_products_status_0' => xos_draw_radio_field('products_status[' . $_GET['products_id'] . ']', '0', $out_status), 'combinations' => $combinations_array));
     break;
 case 'options_sort':
     $options_query = xos_db_query("select distinct pa.options_id, pa.options_sort_order, po.products_options_name from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS . " po where pa.products_id = '" . (int) $_GET['products_id'] . "' and pa.options_id = po.products_options_id and po.language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by pa.options_sort_order, pa.options_id");
     $options_sort_array = array();
     while ($options = xos_db_fetch_array($options_query)) {
         $options_sort_array[] = array('products_name' => $product['products_name'], 'options_name' => $options['products_options_name'], 'options_sort_order' => '<input type="text" name="option_sort_order[' . $_GET['products_id'] . '][' . $options['options_id'] . ']" value="' . $options['options_sort_order'] . '" class="smallText" size="2" maxlength="2" />');
     }
     $smarty->assign(array('action' => 'options_sort', 'products_id' => $_GET['products_id'], 'options_sort' => $options_sort_array));
     break;
 case 'options_values_sort':
     $options_values_query = xos_db_query("select distinct pa.products_attributes_id, pa.options_values_sort_order, 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['products_id'] . "' and pa.options_id = '" . (int) $_GET['options_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, pa.options_id, pa.options_values_sort_order, pov.products_options_values_name");
     $options_values_sort_array = array();
     while ($options_values = xos_db_fetch_array($options_values_query)) {
         $options_values_sort_array[] = array('options_name' => $options_values['products_options_name'], 'options_values_name' => $options_values['products_options_values_name'], 'options_values_sort_order' => '<input type="text" name="option_value_sort_order[' . $options_values['products_attributes_id'] . ']" value="' . $options_values['options_values_sort_order'] . '" class="smallText" size="2" maxlength="2" />');
     }
コード例 #20
0
     $shipping_allowed_array = array();
     for ($i = 0, $n = sizeof($ship_directory_array); $i < $n; $i++) {
         $file = $ship_directory_array[$i];
         if (in_array($ship_directory_array[$i], $ship_module_active)) {
             include $ship_module_directory . $file;
             include DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/modules/shipping/' . $file;
             $ship_class = substr($file, 0, strrpos($file, '.'));
             if (xos_class_exists($ship_class)) {
                 $ship_module = new $ship_class();
                 if ($ship_module->enabled) {
                     $shipping_allowed_array[] = array('group_shipping_allowed_in_values' => xos_draw_checkbox_field('shipping_allowed[' . $y . ']', $file, 0), 'group_shipping_allowed_title' => $ship_module->title);
                 }
             }
         }
     }
     $smarty->assign(array('shipping_allowed' => $shipping_allowed_array, 'new' => true, 'form_begin_customers_new' => xos_draw_form('customers', FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('action')) . 'action=newconfirm', 'post', 'onsubmit="return check_form();"'), 'group_name_in_values' => xos_draw_input_field('customers_group_name', '', 'maxlength="32"', false), 'group_discount_in_out_values' => xos_draw_input_field('customers_group_discount', $cInfo->customers_group_discount, 'maxlength="5" size="5"', false), 'group_show_tax_in_values' => xos_draw_pull_down_menu('customers_group_show_tax', $cg_show_tax_array, '1'), 'group_tax_exempt_in_values' => xos_draw_pull_down_menu('customers_group_tax_exempt', $cg_tax_exempt_array, '0'), 'group_payment_settings_in_values_1' => xos_draw_radio_field('group_payment_settings', '1', false, '0'), 'group_payment_settings_in_values_0' => xos_draw_radio_field('group_payment_settings', '0', false, '0'), 'group_shipment_settings_in_values_1' => xos_draw_radio_field('group_shipment_settings', '1', false, xos_not_null($cInfo->group_shipment_allowed) ? '1' : '0'), 'group_shipment_settings_in_values_0' => xos_draw_radio_field('group_shipment_settings', '0', false, xos_not_null($cInfo->group_shipment_allowed) ? '1' : '0'), 'link_filename_customers_groups' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('action', 'cID'))), 'form_end' => '</form>'));
 } else {
     switch ($_GET[listing]) {
         case "group":
             $order = "g.customers_group_name";
             break;
         case "group-desc":
             $order = "g.customers_group_name DESC";
             break;
         default:
             $order = "g.customers_group_id ASC";
     }
     $search_string = '';
     if ($_GET['search'] && xos_not_null($_GET['search'])) {
         $keywords = xos_db_input(xos_db_prepare_input($_GET['search']));
         $search_string = "where g.customers_group_name like '%" . $keywords . "%'";
コード例 #21
0
         } elseif (!$oldaction == 'new') {   // for action=voucheredit
           $coupon_finishdate = preg_split("/[-]/", date('Y-m-d', strtotime($coupon['coupon_expire_date'])));
         } else {   // error is being displayed
           $coupon_finishdate = preg_split("/[-]/", date('Y-m-d', mktime(0, 0, 0, $_POST['coupon_finishdate_month'],$_POST['coupon_finishdate_day'] ,$_POST['coupon_finishdate_year'] )));
         }
         
         'input_coupon_startdate' => xos_draw_date_selector('coupon_startdate', mktime(0,0,0, $coupon_startdate[1], $coupon_startdate[2], $coupon_startdate[0])),
         'input_coupon_finishdate' => xos_draw_date_selector('coupon_finishdate', mktime(0,0,0, $coupon_finishdate[1], $coupon_finishdate[2], $coupon_finishdate[0])),        
     */
     $languages = xos_get_languages();
     $coupon_content_array = array();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $language_id = $languages[$i]['id'];
         $coupon_content_array[] = array('languages_image' => xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']), 'input_coupon_name' => xos_draw_input_field('coupon_name[' . $languages[$i]['id'] . ']', $coupon_name[$language_id]), 'textarea_coupon_desc' => xos_draw_textarea_field('coupon_desc[' . $languages[$i]['id'] . ']', '24', '3', $coupon_desc[$language_id]));
     }
     $smarty->assign(array('new' => true, 'form_begin' => xos_draw_form('coupon', FILENAME_COUPON_ADMIN, 'action=update&oldaction=' . ($oldaction == 'voucheredit' ? $oldaction : $action) . '&cid=' . $_GET['cid'], 'post', 'enctype="multipart/form-data"'), 'radio_coupon_status_Y' => xos_draw_radio_field('coupon_status', 'Y', $in_status), 'radio_coupon_status_N' => xos_draw_radio_field('coupon_status', 'N', $out_status), 'input_coupon_amount' => xos_draw_input_field('coupon_amount', $coupon_amount), 'input_coupon_min_order' => xos_draw_input_field('coupon_min_order', $coupon_min_order), 'checkbox_coupon_free_ship' => xos_draw_checkbox_field('coupon_free_ship', $coupon_free_ship), 'input_coupon_code' => xos_draw_input_field('coupon_code', $coupon_code), 'input_coupon_uses_coupon' => xos_draw_input_field('coupon_uses_coupon', $coupon_uses_coupon), 'input_coupon_uses_user' => xos_draw_input_field('coupon_uses_user', $coupon_uses_user), 'input_coupon_products' => xos_draw_input_field('coupon_products', $coupon_products), 'input_coupon_categories' => xos_draw_input_field('coupon_categories', $coupon_categories), 'input_coupon_startdate' => xos_draw_input_field('coupon_startdate', xos_date_format(DATE_FORMAT_SHORT), 'id="coupon_startdate" style="background: #ffffcc;" size ="10"'), 'input_coupon_finishdate' => xos_draw_input_field('coupon_finishdate', xos_date_format(DATE_FORMAT_SHORT, mktime(0, 0, 0, date("m"), date("d"), date("Y") + 1)), 'id="coupon_finishdate" style="background: #ffffcc;" size ="10"'), 'link_filename_coupon_admin' => xos_href_link(FILENAME_COUPON_ADMIN), 'hidden_field_date_created' => xos_draw_hidden_field('date_created', $date_created), 'coupon_content' => $coupon_content_array, 'form_end' => '</form>'));
     break;
 default:
     if ($_GET['status'] == 'Y' || $_GET['status'] == 'N') {
         $cc_query_raw = "select coupon_active, coupon_id, coupon_code, coupon_amount, coupon_minimum_order, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified from " . TABLE_COUPONS . " where coupon_active='" . xos_db_input($_GET['status']) . "' and coupon_type != 'G'";
     } else {
         $cc_query_raw = "select coupon_active, coupon_id, coupon_code, coupon_amount, coupon_minimum_order, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified from " . TABLE_COUPONS . " where coupon_type != 'G'";
     }
     $cc_split = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS, $cc_query_raw, $cc_query_numrows);
     $cc_query = xos_db_query($cc_query_raw);
     $cc_list_array = array();
     while ($cc_list = xos_db_fetch_array($cc_query)) {
         $redeem_query = xos_db_query("select redeem_date from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $cc_list['coupon_id'] . "'");
         if ($_GET['status'] == 'R' && xos_db_num_rows($redeem_query) == 0) {
             continue;
         }
コード例 #22
0
            }
            $popup_img = DIR_WS_IMAGES . 'products/large/' . $products_img_name['name'];
            $pop_size = @GetImageSize("{$popup_img}");
            if ($pop_size[0] > $pop_width) {
                $pop_width = $pop_size[0];
            }
            if ($pop_size[1] > $pop_height) {
                $pop_height = $pop_size[1];
            }
        }
        if ($small_width_total > $pop_width) {
            $pop_width = $small_width_total;
        }
        $product_image = array_shift($products_image_name);
        $smarty->assign(array('box_width' => (int) ($pop_width + 50), 'box_height' => (int) ($pop_height + $small_height + 55), 'link_product_img' => xos_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&img_name=' . rawurlencode($product_image['name']), $request_type), 'link_product_img_noscript' => xos_href_link(FILENAME_IMAGES_WINDOW, 'pID=' . $product_info['products_id'], 'NONSSL', true, false, false, false, false), 'product_img' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($product_image['name']), addslashes($product_info['products_name']), '', '', 'style="margin: 5px;"')));
    }
    $back = sizeof($_SESSION['navigation']->path) - 2;
    if (!empty($_SESSION['navigation']->path[$back])) {
        $get_params_array = $_SESSION['navigation']->path[$back]['get'];
        $get_params_array['rmp'] = '0';
        $back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
    } else {
        $back_link = 'javascript:history.go(-1)';
    }
    $smarty->assign(array('form_begin' => xos_draw_form('product_reviews_write', xos_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'action')) . 'action=process', 'SSL'), 'post', 'onsubmit="return checkForm();"', true), 'form_end' => '</form>', 'radio_fields' => xos_draw_radio_field('rating', '1') . ' ' . xos_draw_radio_field('rating', '2') . ' ' . xos_draw_radio_field('rating', '3') . ' ' . xos_draw_radio_field('rating', '4') . ' ' . xos_draw_radio_field('rating', '5'), 'textarea_field' => xos_draw_textarea_field('review', '60', '15'), 'customers_name' => xos_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']), 'products_name' => $product_info['products_name'], 'products_p_unit' => $product_info['products_p_unit'], 'products_model' => $product_info['products_model'], 'products_price' => $product_price, 'products_price_special' => $product_price_special, 'products_price_breaks' => $price_breaks_array, 'products_tax_description' => xos_get_products_tax_description($product_info['products_tax_class_id'], $products_tax_rate), 'td_width_img' => MEDIUM_PRODUCT_IMAGE_MAX_WIDTH + 10, 'link_back' => $back_link, 'link_buy_now' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=buy_now')));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_reviews_write');
    $output_product_reviews_write = $smarty->fetch(SELECTED_TPL . '/product_reviews_write.tpl');
    $smarty->assign('central_contents', $output_product_reviews_write);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
コード例 #23
0
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_IMAGE . '<br /><div class="form-group">' . xos_draw_input_field('image', 'icon.gif', 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br /><div class="form-group">' . xos_draw_input_field('directory', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_USE_IN . '<br /><div class="form-group"><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '1', $use_in_admin, '', 'onclick="if (this.checked == true) { document.getElementsByName(\'display_in_catalog\')[0].checked = false; document.getElementsByName(\'display_in_catalog\')[0].disabled = true; }"') . ' ' . TEXT_INFO_ADMIN . '</label></div><div class="bg-aqua"><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '2', $use_in_catalog, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_CATALOG . '</label></div><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '3', $use_in_both, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_ADMIN_AND_CATALOG . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . '</label></div><div class="checkbox" style="margin: -10px 0 0 20px"><label>' . xos_draw_checkbox_field('display_in_catalog', '1', true) . ' ' . TEXT_INFO_DISPLAY_IN_CATALOG . '</label></div></div></div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_SORT_ORDER . '<br /><div class="form-group">' . xos_draw_input_field('sort_order', '', 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br /><a href="" onclick="languages.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_INSERT . ' ">' . BUTTON_TEXT_INSERT . '</a><a href="' . xos_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $_GET['lID']) . '" 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_LANGUAGE . '</b>';
     $form_tag = xos_draw_form('languages', FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=save');
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_NAME . '<br /><div class="form-group">' . xos_draw_input_field('name', $lInfo->name, 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', $lInfo->code, 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_IMAGE . '<br /><div class="form-group">' . xos_draw_input_field('image', $lInfo->image, 'class="form-control"') . '</div>');
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_DIRECTORY . '<br /><div class="form-group">' . xos_draw_input_field('directory', $lInfo->directory, 'class="form-control"') . '</div>');
     DEFAULT_LANGUAGE != $lInfo->code ? $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_USE_IN . '<br /><div class="form-group"><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '1', $use_in_admin, '', 'onclick="if (this.checked == true) { document.getElementsByName(\'display_in_catalog\')[0].checked = false; document.getElementsByName(\'display_in_catalog\')[0].disabled = true; }"') . ' ' . TEXT_INFO_ADMIN . '</label></div><div class="bg-aqua"><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '2', $use_in_catalog, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_CATALOG . '</label></div><div class="radio"><label>' . xos_draw_radio_field('use_in_id', '3', $use_in_both, '', 'onclick="document.getElementsByName(\'display_in_catalog\')[0].disabled = false;"') . ' ' . TEXT_INFO_ADMIN_AND_CATALOG . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . '</label></div><div class="checkbox" style="margin: -10px 0 0 20px"><label>' . xos_draw_checkbox_field('display_in_catalog', '1', $lInfo->display_in_catalog == '1' ? true : false) . ' ' . TEXT_INFO_DISPLAY_IN_CATALOG . '</label></div></div></div>') : ($contents[] = array('text' => xos_draw_hidden_field('use_in_id', $lInfo->use_in_id) . xos_draw_hidden_field('actual_use_in_id', $lInfo->use_in_id) . xos_draw_hidden_field('display_in_catalog', '1')));
     $contents[] = array('text' => '<br />' . TEXT_INFO_LANGUAGE_SORT_ORDER . '<br /><div class="form-group">' . xos_draw_input_field('sort_order', $lInfo->sort_order, 'class="form-control"') . '</div>');
     if (DEFAULT_LANGUAGE != $lInfo->code && $use_in_both) {
         $contents[] = array('text' => '<br /><div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT . '</label></div>');
     }
     $contents[] = array('text' => '<br /><a href="" onclick="languages.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_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_LANGUAGE . '</b>';
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br /><b>' . $lInfo->name . '</b>');
     $contents[] = array('text' => '<br />' . ($remove_language ? '<a href="' . xos_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=deleteconfirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>' : '') . '<a href="' . xos_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br />&nbsp;');
     break;
 default:
     if (is_object($lInfo)) {
         $heading_title = '<b>' . $lInfo->name . '</b>';