// osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // filename: orders.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_orders.php') == 'overwrite_all')) { $contents = array(); switch ($action) { case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>'; $form_tag = xos_draw_form('order', FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&oSC=' . $oInfo->orders_status_code . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br /><br /><b>' . TEXT_ORDER_ID . $oInfo->orders_id . '</b>'); if ($oInfo->orders_status_code != 'paypal_st' && STOCK_LIMITED == 'true' && STOCK_CHECK == 'true') { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY . '</label></div>'); } $contents[] = array('text' => '<br /><a href="" onclick="order.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading_title = '<b>[' . $oInfo->orders_id . '] ' . xos_datetime_short($oInfo->date_purchased) . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $contents[] = array('text' => '<a href="javascript:popupWindow(\'' . xos_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '\')" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_ORDERS_INVOICE . ' ">' . BUTTON_TEXT_ORDERS_INVOICE . '</a><a href="javascript:popupWindow(\'' . xos_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '\')" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_ORDERS_PACKINGSLIP . ' ">' . BUTTON_TEXT_ORDERS_PACKINGSLIP . '</a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . xos_date_short($oInfo->date_purchased)); if (xos_not_null($oInfo->last_modified)) { $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . xos_date_short($oInfo->last_modified)); } $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method); } break;
$customer_notified = true; } $orders_history_array[] = array('date_added' => xos_datetime_short($orders_history['date_added']), 'status' => $orders_status_array[$orders_history['orders_status_id']], 'comments' => nl2br(xos_db_output($orders_history['comments'])), 'customer_notified' => $customer_notified); } $smarty->assign('orders_history', $orders_history_array); } else { } $languages_query = xos_db_query("select name from " . TABLE_LANGUAGES . " where use_in_id > '1' and languages_id = '" . $order->info['language_id'] . "'"); if (!xos_db_num_rows($languages_query)) { $lang_query = xos_db_query("select name from " . TABLE_LANGUAGES . " where code = '" . xos_db_input(DEFAULT_LANGUAGE) . "'"); $languages = xos_db_fetch_array($lang_query); } else { $languages = xos_db_fetch_array($languages_query); } if (SEND_EMAILS == 'true') { $smarty->assign(array('send_emails' => true, 'checkbox_notify' => xos_draw_checkbox_field('notify', '', true), 'checkbox_notify_comments' => xos_draw_checkbox_field('notify_comments', '', true))); } if (sizeof($order->info['tax_groups']) > 1) { $smarty->assign('tax_groups', true); } $smarty->assign(array('order_id' => $oID, 'order_language_name' => $languages['name'], 'date_purchased' => xos_datetime_short($order->info['date_purchased']), 'customer_address' => xos_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'), 'delivery_address' => xos_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'), 'billing_address' => xos_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'), 'c_id' => $order->customer['c_id'], 'telephone_number' => $order->customer['telephone'], 'email_address' => $order->customer['email_address'], 'payment_method' => $order->info['payment_method'], 'order_products' => $order_products_array, 'order_totals' => $order_totals_array, 'form_begin_status' => xos_draw_form('new_status', FILENAME_ORDERS, xos_get_all_get_params(array('action')) . 'action=update_order'), 'textarea_comments' => xos_draw_textarea_field('comments', '60', '5'), 'pull_down_status' => xos_draw_pull_down_menu('status', $orders_statuses, $order->info['orders_status']), 'form_end' => '</form>', 'link_filename_orders_invoice' => xos_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $_GET['oID']), 'link_filename_orders_packingslip' => xos_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $_GET['oID']), 'link_filename_orders' => xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('action'))), 'edit' => true)); } else { $orders_statuses = array(); $orders_status_query = xos_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int) $_SESSION['used_lng_id'] . "'"); while ($orders_status = xos_db_fetch_array($orders_status_query)) { $orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']); } $status = $_GET['status']; if (isset($_GET['cID'])) { $cID = xos_db_prepare_input($_GET['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, s.orders_status_code, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int) $cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['used_lng_id'] . "' and ot.class = 'ot_total' group by o.orders_id order by o.orders_id DESC";
} } } $smarty->assign('payment_allowed', $payment_allowed_array); $ship_module_active = explode(";", MODULE_SHIPPING_INSTALLED); $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";
if ($mInfo->manufacturers_image) { $contents[] = array('text' => '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'manufacturers/' . $mInfo->manufacturers_image, $mInfo->manufacturers_name) . '<br /><b>' . $mInfo->manufacturers_image . '</b><br />' . TEXT_DELETE . xos_draw_hidden_field('current_manufacturer_image', $mInfo->manufacturers_image) . xos_draw_selection_field('delete_manufacturer_image', 'checkbox', 'true')); } $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_IMAGE . '<br />' . xos_draw_file_field('manufacturers_image') . '<br />'); $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_SAVE . ' "><span>' . BUTTON_TEXT_SAVE . '</span></a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>'; $form_tag = xos_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $mInfo->manufacturers_name . '</b>'); if ($mInfo->manufacturers_image) { $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('delete_image') . ' ' . TEXT_DELETE_IMAGE); } if ($mInfo->products_count > 0) { $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS); $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)); } $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (isset($mInfo) && is_object($mInfo)) { $heading_title = '<b>' . $mInfo->manufacturers_name . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($mInfo->date_added)); if (xos_not_null($mInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xos_date_short($mInfo->last_modified)); } $manufacturer_inputs_string = ''; $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
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)) {
xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL')); } $site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL')); $site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL')); $add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function rowOverEffect(object) {' . "\n" . ' if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . ' if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n\n" . 'function checkBox(object) {' . "\n" . ' document.account_notifications.elements[object].checked = !document.account_notifications.elements[object].checked;' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n"; require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; if ($global['global_product_notifications'] != '1') { $smarty->assign('not_global_product_notifications', true); $products_check_query = xos_db_query("select count(*) as total from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'"); $products_check = xos_db_fetch_array($products_check_query); if ($products_check['total'] > 0) { $smarty->assign('products_notification', true); $counter = 0; $products_query = xos_db_query("select pd.products_id, pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where pn.customers_id = '" . (int) $_SESSION['customer_id'] . "' and pn.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' order by pd.products_name"); $products_notifications_array = array(); while ($products = xos_db_fetch_array($products_query)) { $products_notifications_array[] = array('product_counter' => $counter, 'product_name' => $products['products_name'], 'checkbox_field_product' => xos_draw_checkbox_field('products[' . $counter . ']', $products['products_id'], true, 'id="checkbox_product_' . (int) ($counter + 1) . '" onclick="checkBox(\'products[' . $counter . ']\')"')); $counter++; } } } $smarty->assign(array('form_begin' => xos_draw_form('account_notifications', xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'), 'post', '', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'checkbox_field_product_global' => xos_draw_checkbox_field('product_global', '1', $global['global_product_notifications'] == '1' ? true : false, 'id="checkbox_products_global" onclick="checkBox(\'product_global\')"'), 'products_notifications_array' => $products_notifications_array, 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'form_end' => '</form>')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_notifications'); $output_account_notifications = $smarty->fetch(SELECTED_TPL . '/account_notifications.tpl'); $smarty->assign('central_contents', $output_account_notifications); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
// // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// 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 /> '); 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 /> '); 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' => '<br /><a href="" onclick="categories.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 . '&cpID=' . $cInfo->categories_or_pages_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; case 'delete_product': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>'; $form_tag = xos_draw_form('products', FILENAME_CATEGORIES, 'action=delete_product_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id); $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO); $contents[] = array('text' => '<br /><b>' . $pInfo->products_name . '</b>'); $product_categories_string = ''; $product_categories = xos_generate_category_path($pInfo->products_id, 'product'); for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) { $category_path = ''; for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) { $category_path .= $product_categories[$i][$j]['text'] . ' > '; } $category_path = substr($category_path, 0, -16); $product_categories_string .= xos_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i]) - 1]['id'], true) . ' ' . $category_path . '<br />'; } $product_categories_string = substr($product_categories_string, 0, -6); $contents[] = array('text' => '<br />' . $product_categories_string); $contents[] = array('text' => '<br /><a href="" onclick="products.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_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 /> '); 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 /> '); break; case 'copy_to': $heading_title = '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>';
// needs to be included earlier to set the success message in the messageStack require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_ACCOUNT_NEWSLETTERS; $newsletter_query = xos_db_query("select newsletter_status from " . TABLE_NEWSLETTER_SUBSCRIBERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'"); $newsletter = xos_db_fetch_array($newsletter_query); if (isset($_POST['action']) && $_POST['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) { if (isset($_POST['newsletter_general']) && is_numeric($_POST['newsletter_general'])) { $newsletter_general = xos_db_prepare_input($_POST['newsletter_general']); } else { $newsletter_general = '0'; } if ($newsletter_general != $newsletter['newsletter_status']) { $newsletter_general = $newsletter['newsletter_status'] == '1' ? '0' : '1'; xos_db_query("update " . TABLE_NEWSLETTER_SUBSCRIBERS . " set newsletter_status = '" . (int) $newsletter_general . "', newsletter_status_change = now() where customers_id = '" . (int) $_SESSION['customer_id'] . "'"); } $messageStack->add_session('account', SUCCESS_NEWSLETTER_UPDATED, 'success'); xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL')); } $site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL')); $site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL')); $add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function rowOverEffect(object) {' . "\n" . ' if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . ' if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n\n" . 'function checkBox(object) {' . "\n" . ' document.account_newsletter.elements[object].checked = !document.account_newsletter.elements[object].checked;' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n"; require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; $smarty->assign(array('form_begin' => xos_draw_form('account_newsletter', xos_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'), 'post', '', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'checkbox_field' => xos_draw_checkbox_field('newsletter_general', '1', $newsletter['newsletter_status'] == '1' ? true : false, 'id="checkbox_newsletter_general" onclick="checkBox(\'newsletter_general\')"'), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'form_end' => '</form>')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_newsletters'); $output_account_newsletters = $smarty->fetch(SELECTED_TPL . '/account_newsletters.tpl'); $smarty->assign('central_contents', $output_account_newsletters); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
} 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']); } } $payment_modules_array[] = array('radio_field' => $radio_field, 'actual_payment_method' => $actual_payment_method, 'loaded_modules' => $modules, 'module_error_text' => $module_error_text, 'module_error' => $module_error, 'fields' => $fields, 'selection_fields' => $selection_fields_array, 'radio_select' => $radio_buttons); unset($selection_fields_array); $radio_buttons++; } if (sizeof($selection) > 0) { $smarty->assign('payment_modules', true); } if (sizeof($selection) > 1) { $smarty->assign('several_payment_modules', true); } if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) { $smarty->assign(array('payment_error' => true, 'payment_error_title' => xos_output_string($error['title']), 'payment_error_sting' => xos_output_string($error['error']))); } if (MUST_ACCEPT_CONDITIONS == 'true') { $smarty->assign('checkbox_accept_conditions', xos_draw_checkbox_field('accept_conditions', '1', false, 'id="accept_conditions"')); } $popup_status_query = xos_db_query("select status from " . TABLE_CONTENTS . " where type = 'system_popup' and status = '1' and content_id = '8' LIMIT 1"); $smarty->assign(array('form_begin' => xos_draw_form('checkout_payment', xos_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'), 'post', 'onsubmit="return check_form();"', true), 'form_end' => '</form>', 'link_filename_popup_content_8' => xos_db_num_rows($popup_status_query) ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=8', $request_type) : '', 'link_filename_checkout_payment_address' => MAX_ADDRESS_BOOK_ENTRIES > 1 ? xos_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') : xos_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'), 'link_filename_checkout_shipping' => xos_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'address_label' => xos_address_label($_SESSION['customer_id'], $_SESSION['billto'], true, ' ', '<br />'), 'payment_modules' => $payment_modules_array, 'textarea' => xos_draw_textarea_field('comments', '60', '5', $_SESSION['comments'], 'class="form-control" id="checkout_payment_comments"'))); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'checkout_payment'); $output_checkout_payment = $smarty->fetch(SELECTED_TPL . '/checkout_payment.tpl'); $smarty->assign('central_contents', $output_checkout_payment); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
if (in_array($_GET['gPath'], $groupsArray)) { $del_boxes = array($_GET['gPath']); $result = array_diff($groupsArray, $del_boxes); sort($result); $checkedBox = $selectedGroups; $uncheckedBox = implode(",", $result); $checked = true; } else { $add_boxes = array($_GET['gPath']); $result = array_merge($add_boxes, (array) $groupsArray); sort($result); $checkedBox = implode(",", $result); $uncheckedBox = $selectedGroups; $checked = false; } $files_to_boxes_array[] = array('checkbox' => xos_draw_checkbox_field('groups_to_boxes[]', $group_boxes_files['admin_files_id'], $checked, '', 'id="subgroups_' . $boxe_id_number . '_' . $i . $j . '" onclick="checkSub(this)"'), 'checkbox_id' => 'subgroups_' . $boxe_id_number . '_' . $i . $j, 'file_name' => constant($group_boxes_files['admin_files_languages_key']), 'hidden_checked' => xos_draw_hidden_field('checked_' . $group_boxes_files['admin_files_id'], $checkedBox), 'hidden_unchecked' => xos_draw_hidden_field('unchecked_' . $group_boxes_files['admin_files_id'], $uncheckedBox)); $j++; } $boxes_array[$i]['files'] = $files_to_boxes_array; $i++; } $smarty->assign('boxes', $boxes_array); if ($_GET['gPath'] != 1) { $smarty->assign('link_filename_admin_members', xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath'])); } } elseif ($_GET['gID']) { $smarty->assign('g_id', true); $db_groups_query = xos_db_query("select * from " . TABLE_ADMIN_GROUPS . " order by admin_groups_id"); $add_groups_prepare = '\'0\''; $del_groups_prepare = '\'0\''; $count_groups = 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 /> '); 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 /> '); 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 /> ');
<?php $contents = array(); switch ($action) { case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>'; $form_tag = xos_draw_form('order', FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&oSC=' . $oInfo->orders_status_code . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br /><br /><b>' . TEXT_ORDER_ID . $oInfo->orders_id . '</b>'); if ($oInfo->orders_status_code != 'paypal_st' && STOCK_LIMITED == 'true' && STOCK_CHECK == 'true') { $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY); } $contents[] = array('text' => '<br /><a href="" onclick="order.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading_title = '<b>[' . $oInfo->orders_id . '] ' . xos_datetime_short($oInfo->date_purchased) . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>'); $contents[] = array('text' => '<a href="javascript:popupWindow(\'' . xos_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '\')" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_ORDERS_INVOICE . ' "><span>' . BUTTON_TEXT_ORDERS_INVOICE . '</span></a><a href="javascript:popupWindow(\'' . xos_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '\')" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_ORDERS_PACKINGSLIP . ' "><span>' . BUTTON_TEXT_ORDERS_PACKINGSLIP . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . xos_date_short($oInfo->date_purchased)); if (xos_not_null($oInfo->last_modified)) { $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . xos_date_short($oInfo->last_modified)); } $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method); } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_orders = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_orders.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_orders', $output_infobox_orders); return 'overwrite_all';
function ht_robot_noindex_edit_pages($values, $key) { $file_extension = substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['PHP_SELF']), '.')); $files_array = array(); if ($dir = @dir(DIR_FS_CATALOG)) { while ($file = $dir->read()) { if (!is_dir(DIR_FS_CATALOG . $file)) { if (substr($file, strrpos($file, '.')) == $file_extension) { $files_array[] = $file; } } } sort($files_array); $dir->close(); } $values_array = explode(';', $values); $output = ''; foreach ($files_array as $file) { $output .= xos_draw_checkbox_field('ht_robot_noindex_file[]', $file, in_array($file, $values_array)) . ' ' . xos_output_string($file) . '<br />'; } if (!empty($output)) { $output = '<br />' . substr($output, 0, -6); } $output .= xos_draw_hidden_field('configuration[' . $key . ']', '', 'id="htrn_files"'); $output .= ' <script type="text/javascript"> /* <![CDATA[ */ function htrn_update_cfg_value() { var htrn_selected_files = \'\'; if ($(\'input[name="ht_robot_noindex_file[]"]\').length > 0) { $(\'input[name="ht_robot_noindex_file[]"]:checked\').each(function() { htrn_selected_files += $(this).attr(\'value\') + \';\'; }); if (htrn_selected_files.length > 0) { htrn_selected_files = htrn_selected_files.substring(0, htrn_selected_files.length - 1); } } $(\'#htrn_files\').val(htrn_selected_files); } $(function() { htrn_update_cfg_value(); if ($(\'input[name="ht_robot_noindex_file[]"]\').length > 0) { $(\'input[name="ht_robot_noindex_file[]"]\').change(function() { htrn_update_cfg_value(); }); } }); /* ]]> */ </script>' . "\n"; return $output; }
} 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; }
$languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $currency_query = xos_db_query("select title, symbol_left, symbol_right, decimal_point, thousands_point from " . TABLE_CURRENCIES . " where currencies_id = '" . $cInfo->currencies_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'"); $currency = xos_db_fetch_array($currency_query); $contents[] = array('text' => '<br /> <br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . '<br />' . xos_draw_input_field('title[' . $languages[$i]['id'] . ']', $currency['title'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br />' . xos_draw_input_field('symbol_left[' . $languages[$i]['id'] . ']', $currency['symbol_left'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br />' . xos_draw_input_field('symbol_right[' . $languages[$i]['id'] . ']', $currency['symbol_right'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br />' . xos_draw_input_field('decimal_point[' . $languages[$i]['id'] . ']', $currency['decimal_point'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br />' . xos_draw_input_field('thousands_point[' . $languages[$i]['id'] . ']', $currency['thousands_point'])); } $contents[] = array('text' => '<br /> <br /> <br />' . TEXT_INFO_CURRENCY_CODE . '<br />' . xos_draw_input_field('code', $cInfo->code)); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br />' . xos_draw_input_field('decimal_places', $cInfo->decimal_places)); $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br />' . xos_draw_input_field('value', $cInfo->value)); if (DEFAULT_CURRENCY != $cInfo->code) { $contents[] = array('text' => xos_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT); } $contents[] = array('text' => '<br /><a href="" onclick="currencies.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_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_CURRENCY . '</b>'; $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $cInfo->title . '</b>'); $contents[] = array('text' => '<br />' . ($remove_currency ? '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_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_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (is_object($cInfo)) { $heading_title = '<b>' . $cInfo->title . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>'); $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
return $output_string; } $add_header = '<script type="text/javascript" src="' . DIR_WS_CATALOG . DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $_SESSION['language'] . '/jquery.ui.datepicker-language.min.js"></script>' . "\n" . '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n\n" . '$(function() {' . "\n" . ' $( "#id_dfrom" ).datepicker({' . "\n" . ' changeMonth: true,' . "\n" . ' changeYear: true' . "\n" . ' });' . "\n\n" . ' $( "#id_dto" ).datepicker({' . "\n" . ' changeMonth: true,' . "\n" . ' changeYear: true' . "\n" . ' });' . "\n\n" . '});' . "\n\n" . 'function UpdateManufacturers() {' . "\n" . ' var NumManufacturers = document.advanced_search_and_results._m.options.length;' . "\n" . ' var PostNumManufacturers = "";' . "\n" . ' var SelectedManufacturer = "";' . "\n" . ' var SelectedCategory = "";' . "\n\n" . ' SelectedManufacturer = document.advanced_search_and_results._m.options[document.advanced_search_and_results._m.selectedIndex].value;' . "\n" . ' SelectedCategory = document.advanced_search_and_results.copid.options[document.advanced_search_and_results.copid.selectedIndex].value;' . "\n\n" . ' while(NumManufacturers > 0) {' . "\n" . ' NumManufacturers--;' . "\n" . ' document.advanced_search_and_results._m.options[NumManufacturers] = null;' . "\n" . ' }' . "\n\n" . xos_js_manufacturers_list('SelectedCategory', 'advanced_search_and_results', '_m') . "\n\n" . ' PostNumManufacturers = document.advanced_search_and_results._m.options.length;' . "\n\n" . ' while(PostNumManufacturers > 0) {' . "\n" . ' PostNumManufacturers--;' . "\n" . ' if (document.advanced_search_and_results._m.options[PostNumManufacturers].value == SelectedManufacturer)' . "\n" . ' document.advanced_search_and_results._m.options[PostNumManufacturers].selected = true;' . "\n" . ' }' . "\n\n" . '}' . "\n\n" . 'function SetFocus(TargetFormName) {' . "\n" . ' var target = 0;' . "\n" . ' if (TargetFormName != "") {' . "\n" . ' for (i=0; i<document.forms.length; i++) {' . "\n" . ' if (document.forms[i].name == TargetFormName) {' . "\n" . ' target = i;' . "\n" . ' break;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' var TargetForm = document.forms[target];' . "\n\n" . ' for (i=0; i<TargetForm.length; i++) {' . "\n" . ' if ( (TargetForm.elements[i].type != "image") && (TargetForm.elements[i].type != "hidden") && (TargetForm.elements[i].type != "reset") && (TargetForm.elements[i].type != "submit") ) {' . "\n" . ' TargetForm.elements[i].focus();' . "\n\n" . ' if ( (TargetForm.elements[i].type == "text") || (TargetForm.elements[i].type == "password") ) {' . "\n" . ' TargetForm.elements[i].select();' . "\n" . ' }' . "\n\n" . ' break;' . "\n" . ' }' . "\n" . ' }' . "\n" . '}' . "\n\n" . 'function RemoveFormatString(TargetElement, FormatString) {' . "\n" . ' if (TargetElement.value == FormatString) {' . "\n" . ' TargetElement.value = "";' . "\n" . ' }' . "\n\n" . ' TargetElement.select();' . "\n" . '}' . "\n\n" . 'function IsValidDate(DateToCheck, FormatString, RemoveFormat) {' . "\n" . ' var strDateToCheck;' . "\n" . ' var strDateToCheckArray;' . "\n" . ' var strFormatArray;' . "\n" . ' var strFormatString;' . "\n" . ' var strDay;' . "\n" . ' var strMonth;' . "\n" . ' var strYear;' . "\n" . ' var intday;' . "\n" . ' var intMonth;' . "\n" . ' var intYear;' . "\n" . ' var intDateSeparatorIdx = -1;' . "\n" . ' var intFormatSeparatorIdx = -1;' . "\n" . ' var strSeparatorArray = new Array("-"," ","/",".");' . "\n" . ' var strMonthArray = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");' . "\n" . ' var intDaysArray = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);' . "\n\n" . ' strDateToCheck = DateToCheck.toLowerCase();' . "\n" . ' strFormatString = FormatString.toLowerCase();' . "\n\n" . ' if (strDateToCheck.length != strFormatString.length) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' for (i=0; i<strSeparatorArray.length; i++) {' . "\n" . ' if (strFormatString.indexOf(strSeparatorArray[i]) != -1) {' . "\n" . ' intFormatSeparatorIdx = i;' . "\n" . ' break;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' for (i=0; i<strSeparatorArray.length; i++) {' . "\n" . ' if (strDateToCheck.indexOf(strSeparatorArray[i]) != -1) {' . "\n" . ' intDateSeparatorIdx = i;' . "\n" . ' break;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if (intDateSeparatorIdx != intFormatSeparatorIdx) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' if (intDateSeparatorIdx != -1) {' . "\n" . ' strFormatArray = strFormatString.split(strSeparatorArray[intFormatSeparatorIdx]);' . "\n" . ' if (strFormatArray.length != 3) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' strDateToCheckArray = strDateToCheck.split(strSeparatorArray[intDateSeparatorIdx]);' . "\n" . ' if (strDateToCheckArray.length != 3) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' for (i=0; i<strFormatArray.length; i++) {' . "\n" . ' if (strFormatArray[i] == "mm" || strFormatArray[i] == "mmm") {' . "\n" . ' strMonth = strDateToCheckArray[i];' . "\n" . ' }' . "\n\n" . ' if (strFormatArray[i] == "dd") {' . "\n" . ' strDay = strDateToCheckArray[i];' . "\n" . ' }' . "\n\n" . ' if (strFormatArray[i] == "yyyy") {' . "\n" . ' strYear = strDateToCheckArray[i];' . "\n" . ' }' . "\n" . ' }' . "\n" . ' } else {' . "\n" . ' if (FormatString.length > 7) {' . "\n" . ' if (strFormatString.indexOf("mmm") == -1) {' . "\n" . ' strMonth = strDateToCheck.substring(strFormatString.indexOf("mm"), 2);' . "\n" . ' } else {' . "\n" . ' strMonth = strDateToCheck.substring(strFormatString.indexOf("mmm"), 3);' . "\n" . ' }' . "\n\n" . ' strDay = strDateToCheck.substring(strFormatString.indexOf("dd"), 2);' . "\n" . ' strYear = strDateToCheck.substring(strFormatString.indexOf("yyyy"), 2);' . "\n" . ' } else {' . "\n" . ' return false;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if (RemoveFormat == true) {' . "\n" . ' return strYear + strMonth + strDay;' . "\n" . ' }' . "\n\n" . ' if (strYear.length != 4) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' intday = parseInt(strDay, 10);' . "\n" . ' if (isNaN(intday)) {' . "\n" . ' return false;' . "\n" . ' }' . "\n" . ' if (intday < 1) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' intMonth = parseInt(strMonth, 10);' . "\n" . ' if (isNaN(intMonth)) {' . "\n" . ' for (i=0; i<strMonthArray.length; i++) {' . "\n" . ' if (strMonth == strMonthArray[i]) {' . "\n" . ' intMonth = i+1;' . "\n" . ' break;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' if (isNaN(intMonth)) {' . "\n" . ' return false;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' if (intMonth > 12 || intMonth < 1) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' intYear = parseInt(strYear, 10);' . "\n" . ' if (isNaN(intYear)) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' if (IsLeapYear(intYear) == true) {' . "\n" . ' intDaysArray[1] = 29;' . "\n" . ' }' . "\n\n" . ' if (intday > intDaysArray[intMonth - 1]) {' . "\n" . ' return false;' . "\n" . ' }' . "\n\n" . ' return true;' . "\n" . '}' . "\n\n" . 'function IsLeapYear(intYear) {' . "\n" . ' if (intYear % 100 == 0) {' . "\n" . ' if (intYear % 400 == 0) {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . ' } else {' . "\n" . ' if ((intYear % 4) == 0) {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' return false;' . "\n" . '}' . "\n\n" . 'function check_form() {' . "\n" . ' var error_message = "' . JS_ERROR . '";' . "\n" . ' var error_found = false;' . "\n" . ' var error_field;' . "\n" . ' var keywords = document.advanced_search_and_results.keywords.value;' . "\n" . ' var dfrom = document.advanced_search_and_results.dfrom.value;' . "\n" . ' var dto = document.advanced_search_and_results.dto.value;' . "\n" . ' var pfrom = document.advanced_search_and_results.pfrom.value;' . "\n" . ' var pto = document.advanced_search_and_results.pto.value;' . "\n" . ' var pfrom_float;' . "\n" . ' var pto_float;' . "\n\n" . ' String.prototype.trim = function () {' . "\n" . ' return (this.replace(/\\s+$/,"").replace(/^\\s+/,""));' . "\n" . ' };' . "\n\n" . ' if ( ((keywords == "") || (keywords.trim().length < 1)) && ((dfrom == "") || (dfrom == "' . AS_FORMAT_STRING . '") || (dfrom.length < 1)) && ((dto == "") || (dto == "' . AS_FORMAT_STRING . '") || (dto.length < 1)) && ((pfrom == "") || (pfrom.length < 1)) && ((pto == "") || (pto.length < 1)) ) {' . "\n" . ' error_message = error_message + "* ' . ERROR_AT_LEAST_ONE_INPUT . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.keywords;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n\n" . ' if ((dfrom.length > 0) && (dfrom != "' . AS_FORMAT_STRING . '")) {' . "\n" . ' if (!IsValidDate(dfrom, "' . AS_FORMAT_STRING_JS . '")) {' . "\n" . ' error_message = error_message + "* ' . ERROR_INVALID_FROM_DATE . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.dfrom;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if ((dto.length > 0) && (dto != "' . AS_FORMAT_STRING . '")) {' . "\n" . ' if (!IsValidDate(dto, "' . AS_FORMAT_STRING_JS . '")) {' . "\n" . ' error_message = error_message + "* ' . ERROR_INVALID_TO_DATE . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.dto;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if ((dfrom.length > 0) && (dfrom != "' . AS_FORMAT_STRING . '") && (IsValidDate(dfrom, "' . AS_FORMAT_STRING_JS . '")) && (dto.length > 0) && (dto != "' . AS_FORMAT_STRING . '") && (IsValidDate(dto, "' . AS_FORMAT_STRING_JS . '"))) {' . "\n" . ' if (IsValidDate(dfrom, "' . AS_FORMAT_STRING_JS . '", true) > IsValidDate(dto, "' . AS_FORMAT_STRING_JS . '", true)) {' . "\n" . ' error_message = error_message + "* ' . ERROR_TO_DATE_LESS_THAN_FROM_DATE . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.dto;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if (pfrom.length > 0) {' . "\n" . ' pfrom_float = parseFloat(pfrom);' . "\n" . ' if (isNaN(pfrom_float)) {' . "\n" . ' error_message = error_message + "* ' . ERROR_PRICE_FROM_MUST_BE_NUM . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.pfrom;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' } else {' . "\n" . ' pfrom_float = 0;' . "\n" . ' }' . "\n\n" . ' if (pto.length > 0) {' . "\n" . ' pto_float = parseFloat(pto);' . "\n" . ' if (isNaN(pto_float)) {' . "\n" . ' error_message = error_message + "* ' . ERROR_PRICE_TO_MUST_BE_NUM . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.pto;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' } else {' . "\n" . ' pto_float = 0;' . "\n" . ' }' . "\n\n" . ' if ( (pfrom.length > 0) && (pto.length > 0) ) {' . "\n" . ' if ( (!isNaN(pfrom_float)) && (!isNaN(pto_float)) && (pto_float <= pfrom_float) ) {' . "\n" . ' error_message = error_message + "* ' . ERROR_PRICE_TO_LESS_THAN_PRICE_FROM . '\\n";' . "\n" . ' error_field = document.advanced_search_and_results.pto;' . "\n" . ' error_found = true;' . "\n" . ' }' . "\n" . ' }' . "\n\n" . ' if (error_found == true) {' . "\n" . ' alert(error_message);' . "\n" . ' error_field.focus();' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' $( "#id_dfrom, #id_dto" ).datepicker( "destroy" );' . "\n" . ' RemoveFormatString(document.advanced_search_and_results.dfrom, "' . AS_FORMAT_STRING . '");' . "\n" . ' RemoveFormatString(document.advanced_search_and_results.dto, "' . AS_FORMAT_STRING . '");' . "\n" . ' $( "#id_dfrom, #id_dto" ).blur();' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n"; require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; $search_in_description = $_GET['sid']; if ($messageStack->size('search') > 0) { $smarty->assign('message_stack', $messageStack->output('search')); $smarty->assign('message_stack_error', $messageStack->output('search', 'error')); $smarty->assign('message_stack_warning', $messageStack->output('search', 'warning')); $smarty->assign('message_stack_success', $messageStack->output('search', 'success')); } $popup_status_query = xos_db_query("select status from " . TABLE_CONTENTS . " where type = 'system_popup' and status = '1' and content_id = '9' LIMIT 1"); $smarty->assign(array('form_begin' => xos_draw_form('advanced_search_and_results', xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, '', 'NONSSL', false), 'post', 'onsubmit="return check_form(this);"'), 'hide_session_id' => xos_hide_session_id(), 'input_field_keywords' => xos_draw_input_field('keywords', stripslashes($_GET['keywords']), 'class="form-control" id="keywords"'), 'checkbox_search_in_description' => xos_draw_checkbox_field('sid', '1', $action && !isset($_GET['sid']) ? false : true, 'id="search_in_description"'), 'link_filename_advanced_search_and_results' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS), 'link_filename_popup_content_9' => xos_db_num_rows($popup_status_query) ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=9', $request_type) : '', 'categories_pull_down_menu' => xos_draw_pull_down_menu('copid', $categories_array, $_GET['copid'], 'class="form-control" id="categories_or_pages_id" onchange="UpdateManufacturers();"'), 'manufacturers_pull_down_menu' => xos_draw_pull_down_menu('_m', xos_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))), $_GET['_m'], 'class="form-control" id="manufacturers_id"'), 'input_field_pfrom' => xos_draw_input_field('pfrom', $_GET['pfrom'], 'class="form-control" id="pfrom"'), 'input_field_pto' => xos_draw_input_field('pto', $_GET['pto'], 'class="form-control" id="pto"'), 'input_field_dfrom' => xos_draw_input_field('dfrom', $_GET['dfrom'] ? $_GET['dfrom'] : AS_FORMAT_STRING, 'class="form-control" id="id_dfrom"'), 'input_field_dto' => xos_draw_input_field('dto', $_GET['dto'] ? $_GET['dto'] : AS_FORMAT_STRING, 'class="form-control" id="id_dto"'), 'body_tag_params' => 'onload="UpdateManufacturers();"', 'form_end' => '</form>')); /////////////////////////////////////////////////////////// if ($action && !$error) { is_numeric($_GET['mdsr']) && $_GET['mdsr'] >= 1 ? $_SESSION['mdsr'] = (int) $_GET['mdsr'] : ''; if ($_GET['srv'] == 'list') { $_SESSION['srv'] = 'list'; } elseif ($_GET['srv'] == 'grid') { $_SESSION['srv'] = 'grid'; } if (PRODUCT_LISTS_FOR_SEARCH_RESULTS == 'B' && $_SESSION['srv'] != 'list' || $_SESSION['srv'] == 'grid') { $product_list_b = true; // create column list $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_B_MODEL, 'PRODUCT_LIST_NAME' => PRODUCT_LIST_B_NAME, 'PRODUCT_LIST_INFO' => PRODUCT_LIST_B_INFO, 'PRODUCT_LIST_PACKING_UNIT' => PRODUCT_LIST_B_PACKING_UNIT, 'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_B_MANUFACTURER, 'PRODUCT_LIST_PRICE' => PRODUCT_LIST_B_PRICE, 'PRODUCT_LIST_QUANTITY' => STOCK_CHECK == 'true' ? PRODUCT_LIST_B_QUANTITY : '', 'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_B_WEIGHT, 'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_B_IMAGE, 'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_B_BUY_NOW); } else { $product_list_b = false; // create column list
$contents[] = array('text' => '<br />' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT); $contents[] = array('text' => '<br /><a href="" onclick="delivery_time.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_DELIVERY_TIMES, 'page=' . $_GET['page']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; case 'edit': $heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_DELIVERY_TIME . '</b>'; $form_tag = xos_draw_form('delivery_time', FILENAME_DELIVERY_TIMES, 'page=' . $_GET['page'] . '&dID=' . $dInfo->delivery_times_id . '&action=save'); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $delivery_times_inputs_string = ''; $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $delivery_times_inputs_string .= '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . xos_draw_input_field('delivery_times_text[' . $languages[$i]['id'] . ']', xos_get_delivery_times_values($dInfo->delivery_times_id, 'delivery_times_text', $languages[$i]['id'])); } $contents[] = array('text' => '<br />' . TEXT_INFO_DELIVERY_TIMES_TEXT . $delivery_times_inputs_string); $contents[] = array('text' => '<br />' . TEXT_INFO_POPUP_CONTENT_ID . '<br />' . xos_draw_input_field('popup_content_id', $dInfo->popup_content_id > 0 ? $dInfo->popup_content_id : '')); if (DEFAULT_DELIVERY_TIMES_ID != $dInfo->delivery_times_id) { $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT); } $contents[] = array('text' => '<br /><a href="" onclick="delivery_time.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_DELIVERY_TIMES, 'page=' . $_GET['page'] . '&dID=' . $dInfo->delivery_times_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_DELIVERY_TIME . '</b>'; $form_tag = xos_draw_form('delivery_time', FILENAME_DELIVERY_TIMES, 'page=' . $_GET['page'] . '&dID=' . $dInfo->delivery_times_id . '&action=deleteconfirm'); if ($remove_delivery_time) { $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); } $contents[] = array('text' => '<br /><b>' . $dInfo->delivery_times_text . '</b>'); $contents[] = array('text' => '<br />' . ($remove_delivery_time ? '<a href="" onclick="delivery_time.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>' : '') . '<a href="' . xos_href_link(FILENAME_DELIVERY_TIMES, 'page=' . $_GET['page'] . '&dID=' . $dInfo->delivery_times_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (isset($dInfo) && is_object($dInfo)) { $heading_title = '<b>' . $dInfo->delivery_times_text . '</b>';
// osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // filename: customers.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_customers.php') == 'overwrite_all')) { $contents = array(); switch ($action) { case 'confirm': $heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>'; $form_tag = xos_draw_form('customers', FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); if (isset($cInfo->number_of_reviews) && $cInfo->number_of_reviews > 0) { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews) . '</label></div>'); } $contents[] = array('text' => '<br /><a href="" onclick="customers.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_ORDERS . ' ">' . BUTTON_TEXT_ORDERS . '</a><a href="' . xos_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EMAIL . ' ">' . BUTTON_TEXT_EMAIL . '</a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . xos_date_short($cInfo->date_account_created)); $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . xos_date_short($cInfo->date_account_last_modified)); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . xos_date_short($cInfo->date_last_logon)); $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons); $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name); $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews); } break;
// 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);
} } if (ACCOUNT_SUBURB == 'true') { $smarty->assign(array('account_suburb' => true, 'input_suburb' => xos_draw_input_field('suburb', $entry['entry_suburb'], 'class="form-control" id="suburb"') . ' ' . (xos_not_null(ENTRY_SUBURB_TEXT) ? '<span class="input-requirement">' . ENTRY_SUBURB_TEXT . '</span>' : ''))); } if (ACCOUNT_STATE == 'true') { $smarty->assign('account_state', true); if ($process == true) { if ($entry_state_has_zones == true) { $zones_array = array(); $zones_query = xos_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' order by zone_name"); while ($zones_values = xos_db_fetch_array($zones_query)) { $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); } $smarty->assign('input_state', xos_draw_pull_down_menu('state', $zones_array, '', 'class="form-control" id="state"') . ' ' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : '')); } else { $smarty->assign('input_state', xos_draw_input_field('state', '', 'class="form-control" id="state"') . ' ' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : '')); } } else { $smarty->assign('input_state', xos_draw_input_field('state', xos_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']), 'class="form-control" id="state"') . ' ' . (xos_not_null(ENTRY_STATE_TEXT) ? '<span class="input-requirement">' . ENTRY_STATE_TEXT . '</span>' : '')); } } if (isset($_GET['edit']) && $_SESSION['customer_default_address_id'] != $_GET['edit'] || isset($_GET['edit']) == false) { $smarty->assign(array('not_default_address' => true, 'checkbox_field_primary_address' => xos_draw_checkbox_field('primary', 'on', isset($_POST['primary']) && $_POST['primary'] == 'on' ? true : false, 'id="primary"'))); } $smarty->assign(array('input_firstname' => xos_draw_input_field('firstname', $entry['entry_firstname'], 'class="form-control" id="firstname"') . ' ' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', $entry['entry_lastname'], 'class="form-control" id="lastname"') . ' ' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_street_address' => xos_draw_input_field('street_address', $entry['entry_street_address'], 'class="form-control" id="street_address"') . ' ' . (xos_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>' : ''), 'input_postcode' => xos_draw_input_field('postcode', $entry['entry_postcode'], 'class="form-control" id="postcode"') . ' ' . (xos_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="input-requirement">' . ENTRY_POST_CODE_TEXT . '</span>' : ''), 'input_city' => xos_draw_input_field('city', $entry['entry_city'], 'class="form-control" id="city"') . ' ' . (xos_not_null(ENTRY_CITY_TEXT) ? '<span class="input-requirement">' . ENTRY_CITY_TEXT . '</span>' : ''), 'input_country' => xos_get_country_list('country', xos_not_null($country) ? $country : $entry['entry_country_id'], 'class="form-control" id="country"') . ' ' . (xos_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="input-requirement">' . ENTRY_COUNTRY_TEXT . '</span>' : ''))); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'address_book_details'); $output_address_book_details = $smarty->fetch(SELECTED_TPL . '/includes/modules/address_book_details.tpl'); $smarty->clearAssign('account_gender', 'input_gender', 'account_company', 'input_company', 'company_tax_id', 'account_suburb', 'input_suburb', 'account_state', 'input_state', 'not_default_address', 'checkbox_field_primary_address', 'input_firstname', 'input_lastname', 'input_street_address', 'input_postcode', 'input_city', 'input_country'); $smarty->assign('address_book_details', $output_address_book_details); }
$www_location = substr($www_location, 0, stripos($www_location, 'install')); $script_filename = getenv('PATH_TRANSLATED'); if (empty($script_filename)) { $script_filename = getenv('SCRIPT_FILENAME'); } $script_filename = str_replace('\\', '/', $script_filename); $script_filename = str_replace('//', '/', $script_filename); $dir_fs_www_root_array = explode('/', dirname($script_filename)); $dir_fs_www_root = array(); for ($i = 0, $n = sizeof($dir_fs_www_root_array) - 1; $i < $n; $i++) { $dir_fs_www_root[] = $dir_fs_www_root_array[$i]; } $dir_fs_www_root = implode('/', $dir_fs_www_root) . '/'; reset($_POST); $hidden_fields = ''; while (list($key, $value) = each($_POST)) { if ($key != 'x' && $key != 'y') { if (is_array($value)) { for ($i = 0; $i < sizeof($value); $i++) { $hidden_fields .= xos_draw_hidden_field($key . '[]', $value[$i]); } } else { $hidden_fields .= xos_draw_hidden_field($key, $value); } } } $hidden_fields .= xos_draw_hidden_field('install[]', 'configure'); $smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=5" method="post">', 'form_end' => '</form>', 'input_field_http_www_address' => xos_draw_input_field('HTTP_WWW_ADDRESS', $www_location), 'input_field_document_root' => xos_draw_input_field('DIR_FS_DOCUMENT_ROOT', $dir_fs_www_root), 'input_field_http_cookie_domain' => xos_draw_input_field('HTTP_COOKIE_DOMAIN', getenv('HTTP_HOST')), 'input_field_http_cookie_path' => xos_draw_input_field('HTTP_COOKIE_PATH', $cookie_path), 'checkbox_field_rename_admin_dir' => xos_draw_checkbox_field('RENAME_ADMIN_DIR', 'true'), 'checkbox_field_enable_ssl' => xos_draw_checkbox_field('ENABLE_SSL', 'true'), 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields)); $output_install_4 = $smarty->fetch('install_4.tpl'); $smarty->clearAssign(array('form_begin', 'form_end', 'input_field_http_www_address', 'input_field_document_root', 'input_field_http_cookie_domain', 'input_field_http_cookie_path', 'checkbox_field_enable_ssl', 'href_link_index', 'hidden_fields')); $smarty->assign('install_inner_content', $output_install_4);
if ($mInfo->manufacturers_image) { $contents[] = array('text' => '<br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'manufacturers/' . $mInfo->manufacturers_image, $mInfo->manufacturers_name) . '<br /><b>' . $mInfo->manufacturers_image . '</b><div class="checkbox"><label>' . xos_draw_selection_field('delete_manufacturer_image', 'checkbox', 'true') . TEXT_DELETE . '</label></div>' . xos_draw_hidden_field('current_manufacturer_image', $mInfo->manufacturers_image)); } $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_IMAGE . '<br />' . xos_draw_file_field('manufacturers_image') . '<br />'); $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_SAVE . ' ">' . BUTTON_TEXT_SAVE . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>'; $form_tag = xos_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $mInfo->manufacturers_name . '</b>'); if ($mInfo->manufacturers_image) { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_image') . ' ' . TEXT_DELETE_IMAGE . '</label></div>'); } if ($mInfo->products_count > 0) { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS . '</label></div>'); $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)); } $contents[] = array('text' => '<br /><a href="" onclick="manufacturers.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; default: if (isset($mInfo) && is_object($mInfo)) { $heading_title = '<b>' . $mInfo->manufacturers_name . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($mInfo->date_added)); if (xos_not_null($mInfo->last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xos_date_short($mInfo->last_modified)); } $manufacturer_inputs_string = ''; $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
function xos_cfg_checkbox_templates() { $registered_tpls_array = array(); $registered_tpls_array = explode(',', REGISTERED_TPLS); $handle = opendir(DIR_FS_CATALOG_IMAGES . 'catalog/templates/'); $tpl_array = array(); while (($tpl = readdir($handle)) !== false) { if (is_dir(DIR_FS_CATALOG_IMAGES . 'catalog/templates/' . $tpl) && $tpl != '.' && $tpl != '..') { $tpl_array[] = $tpl; } } closedir($handle); $handle = opendir(DIR_FS_SMARTY . 'catalog/templates/'); $tpl_array_1 = array(); while (($tpl = readdir($handle)) !== false) { if (in_array($tpl, $tpl_array) && is_dir(DIR_FS_SMARTY . 'catalog/templates/' . $tpl) && $tpl != '.' && $tpl != '..') { $tpl_array_1[] = '<div class="checkbox"><label>' . xos_draw_checkbox_field('configuration_value[]', $tpl, in_array($tpl, $registered_tpls_array) ? true : false, '', $tpl == DEFAULT_TPL ? 'disabled="disabled"' : '') . $tpl . ($tpl == DEFAULT_TPL ? xos_draw_hidden_field('configuration_value[]', $tpl) . '</label></div>' : '</label></div>') . "\n"; } } closedir($handle); sort($tpl_array_1); $tpl_string = "\n"; $tpl_string .= implode($tpl_array_1); return '<div class="form-group">' . $tpl_string . '</div>'; }
$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);
$pos = strpos($combinations_string, $comb_string); $image_arrow_left_not_updated = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/pixel_trans.gif', '', 11, 11); if ($pos === false) { if ($combinations_string == '') { $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); } else { $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]) ? ' 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;
<?php $contents = array(); switch ($action) { case 'confirm': $heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>'; $form_tag = xos_draw_form('customers', FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'); if (isset($cInfo->number_of_reviews) && $cInfo->number_of_reviews > 0) { $contents[] = array('text' => '<br />' . xos_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews)); } $contents[] = array('text' => '<br /><a href="" onclick="customers.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '" 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_ORDERS, 'cID=' . $cInfo->customers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_ORDERS . ' "><span>' . BUTTON_TEXT_ORDERS . '</span></a><a href="' . xos_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EMAIL . ' "><span>' . BUTTON_TEXT_EMAIL . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . xos_date_short($cInfo->date_account_created)); $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . xos_date_short($cInfo->date_account_last_modified)); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . xos_date_short($cInfo->date_last_logon)); $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons); $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name); $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews); } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_customers = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_customers.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_customers', $output_infobox_customers); return 'overwrite_all';
$options_values_price = $currencies->format(xos_add_tax($currencies->currencies[$_SESSION['currency']]['value'] * $attributes_values['options_values_price'], $products_tax_rate)); } $attributes_array[] = array('products_options_name' => $attributes_values['products_options_name'], 'options_values_id' => $value, 'products_options_values_name' => $attributes_values['products_options_values_name'], 'options_values_price' => $options_values_price, 'hidden_field' => $hidden_field, 'price_prefix' => $attributes_values['price_prefix']); } } if (STOCK_CHECK == 'true') { $stock_check = xos_check_stock($products[$i]['id'], $products[$i]['quantity']); if (xos_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } $tax_rate = xos_display_tax_value($products_tax_rate); $product_image = xos_get_product_images($products[$i]['image']); $popup_content_id = xos_get_delivery_times_values($products[$i]['delivery_time_id'], 'popup_content_id'); $products_array[] = array('checkbox_cart_delete' => xos_draw_checkbox_field('cart_delete[]', $products[$i]['id'], false, 'id="cart_delete_' . ($i + 1) . '"'), 'link_filename_product_info' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . urlencode($products[$i]['id'])), 'link_remove_product' => xos_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&rmp=0&p=' . urlencode($products[$i]['id'])), 'products_image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $products[$i]['name']), 'products_name' => $products[$i]['name'], 'products_packaging_unit' => $products[$i]['packaging_unit'], 'products_delivery_time' => xos_get_delivery_times_values($products[$i]['delivery_time_id']), 'link_filename_popup_content_products_delivery_time' => $popup_content_id > 0 ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=' . $popup_content_id . '&p=' . $products[$i]['id'], $request_type) : '', 'products_model' => $products[$i]['model'], 'stock_check' => $stock_check, 'input_and_hidden_fields_quantity' => xos_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'id="cart_quantity_' . ($i + 1) . '" class="form-control cart-input-quantity" size="2" maxlength="5"') . xos_draw_hidden_field('p[]', $products[$i]['id']), 'products_tax' => xos_display_tax_value($products_tax_rate), 'products_price' => $currencies->format($products[$i]['price']), 'products_final_single_price' => $currencies->format($products[$i]['final_price']), 'products_final_price' => $currencies->format($products[$i]['quantity'] * $products[$i]['final_price']), 'products_attributes_option_price' => $attributes_options_values_price, 'products_attributes' => $attributes_array); if (isset($tax_rate)) { $tax_rates[$tax_rate] = '1'; } unset($attributes_array); } include DIR_WS_CLASSES . 'payment.php'; $payment_modules = new payment(); $initialize_checkout_methods = $payment_modules->checkout_initialization_method(); $alternative_checkout_methods_array = array(); if (!empty($initialize_checkout_methods)) { reset($initialize_checkout_methods); while (list(, $value) = each($initialize_checkout_methods)) { $alternative_checkout_methods_array[] = array('value' => $value); } }
$languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $currency_query = xos_db_query("select title, symbol_left, symbol_right, decimal_point, thousands_point from " . TABLE_CURRENCIES . " where currencies_id = '" . $cInfo->currencies_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'"); $currency = xos_db_fetch_array($currency_query); $contents[] = array('text' => '<br /> <br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . '<br /><div class="form-group">' . xos_draw_input_field('title[' . $languages[$i]['id'] . ']', $currency['title'], 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_LEFT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_left[' . $languages[$i]['id'] . ']', $currency['symbol_left'], 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . '<br /><div class="form-group">' . xos_draw_input_field('symbol_right[' . $languages[$i]['id'] . ']', $currency['symbol_right'], 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_POINT . '<br /><div class="form-group">' . xos_draw_input_field('decimal_point[' . $languages[$i]['id'] . ']', $currency['decimal_point'], 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . '<br /><div class="form-group">' . xos_draw_input_field('thousands_point[' . $languages[$i]['id'] . ']', $currency['thousands_point'], 'class="form-control"') . '</div>'); } $contents[] = array('text' => '<br /> <br /> <br />' . TEXT_INFO_CURRENCY_CODE . '<br /><div class="form-group">' . xos_draw_input_field('code', $cInfo->code, 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . '<br /><div class="form-group">' . xos_draw_input_field('decimal_places', $cInfo->decimal_places, 'class="form-control"') . '</div>'); $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br /><div class="form-group">' . xos_draw_input_field('value', $cInfo->value, 'class="form-control"') . '</div>'); if (DEFAULT_CURRENCY != $cInfo->code) { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT . '</label></div>'); } $contents[] = array('text' => '<br /><a href="" onclick="currencies.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_CURRENCY . '</b>'; $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $cInfo->title . '</b>'); $contents[] = array('text' => '<br />' . '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a>' . ($remove_currency ? '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>' : '') . '<br /> '); break; default: if (is_object($cInfo)) { $heading_title = '<b>' . $cInfo->title . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$contents[] = array('text' => '<br /><a href="" onclick="categories.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 . '&cpID=' . $cInfo->categories_or_pages_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; case 'delete_product': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</b>'; $form_tag = xos_draw_form('products', FILENAME_CATEGORIES, 'action=delete_product_confirm&cPath=' . $cPath) . xos_draw_hidden_field('products_id', $pInfo->products_id); $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO); $contents[] = array('text' => '<br /><b>' . $pInfo->products_name . '</b>'); $product_categories_string = ''; $product_categories = xos_generate_category_path($pInfo->products_id, 'product'); for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) { $category_path = ''; for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) { $category_path .= $product_categories[$i][$j]['text'] . ' > '; } $category_path = substr($category_path, 0, -16); $product_categories_string .= '<div class="checkbox"><label>' . xos_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i]) - 1]['id'], true) . ' ' . $category_path . '</label></div>'; } $product_categories_string = '<div class="form-group">' . $product_categories_string . '</div>'; $contents[] = array('text' => $product_categories_string); $contents[] = array('text' => '<br /><a href="" onclick="products.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</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 /> '); 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 /> '); break; case 'copy_to': $heading_title = '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>';