$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++) { $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 . ' ' . $currency['title']); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . ' ' . $currency['symbol_left']); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . ' ' . $currency['symbol_right']); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_DECIMAL_POINT . ' ' . $currency['decimal_point']); $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . ' ' . $currency['thousands_point']); } $contents[] = array('text' => '<br /> <br /> <br />' . TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . ' ' . $cInfo->decimal_places); $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . ' ' . number_format($cInfo->value, 8)); $contents[] = array('text' => TEXT_INFO_CURRENCY_EXAMPLE . ' ' . $currencies->format('30') . ' = ' . $currencies->format('30', true, $cInfo->code)); $contents[] = array('text' => TEXT_INFO_CURRENCY_LAST_UPDATED . ' ' . xos_date_short($cInfo->last_updated)); } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_currencies = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_currencies.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_currencies', $output_infobox_currencies); }
$smarty->assign('message_stack', $messageStack->output('account_edit')); $smarty->assign('message_stack_error', $messageStack->output('account_edit', 'error')); $smarty->assign('message_stack_warning', $messageStack->output('account_edit', 'warning')); $smarty->assign('message_stack_success', $messageStack->output('account_edit', 'success')); } if (ACCOUNT_GENDER == 'true') { if (isset($gender)) { $male = $gender == 'm' ? true : false; } else { $male = $account['customers_gender'] == 'm' ? true : false; } $female = !$male; $smarty->assign(array('account_gender' => true, 'input_gender' => xos_draw_radio_field('gender', 'm', $male, 'id="gender_m"') . '<label class="control-label" for="gender_m"> ' . MALE . ' </label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f"> ' . FEMALE . ' </label>' . (xos_not_null(ENTRY_GENDER_TEXT) ? '<span class="input-requirement">' . ENTRY_GENDER_TEXT . '</span>' : ''))); } if (ACCOUNT_DOB == 'true') { $smarty->assign(array('account_dob' => true, 'input_dob' => xos_draw_input_field('dob', xos_date_short($account['customers_dob']), 'class="form-control" id="dob"') . ' ' . (xos_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="input-requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : ''))); } reset($lng->catalog_languages); if (sizeof($lng->catalog_languages) > 1) { $lang_array = array(); $languages_selected = ''; while (list($key, $value) = each($lng->catalog_languages)) { $lang_array[] = array('id' => $value['id'], 'text' => $value['name']); if (!empty($language_id)) { $languages_selected = $language_id; } elseif ($value['id'] == $account['customers_language_id']) { $languages_selected = $account['customers_language_id']; } } $smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"'))); } else {
$contents = array(); switch ($action) { case 'edit': $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>'; if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . $cInfo->configuration_value . '");'); } else { $value_field = xos_draw_input_field('configuration_value', $cInfo->configuration_value); } $form_tag = xos_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br /><b>' . constant($cInfo->lang_key . '_TITLE') . '</b><br />' . constant($cInfo->lang_key . '_DESCRIPTION') . '<br />' . $value_field); $contents[] = array('text' => '<br /><a href="" onclick="configuration.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPDATE . ' "><span>' . BUTTON_TEXT_UPDATE . '</span></a><a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> '); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a>'); $contents[] = array('text' => '<br />' . constant($cInfo->lang_key . '_DESCRIPTION')); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added)); if (xos_not_null($cInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($cInfo->last_modified)); } } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_configuration = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_configuration.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_configuration', $output_infobox_configuration); return 'overwrite_all';
<?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';
<?php $contents = array(); if (isset($pInfo) && is_object($pInfo)) { $heading_title = '<b>' . $pInfo->products_name . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CATEGORIES, 'pID=' . $pInfo->products_id . '&action=new_product') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_EXPECTED . ' ' . xos_date_short($pInfo->products_date_available)); } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents)); $output_infobox_products_expected = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_products_expected.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_contents')); $smarty->assign('infobox_products_expected', $output_infobox_products_expected); return 'overwrite_all';
$reviews_text_query = xos_db_query("select r.reviews_read, r.customers_name, length(rd.reviews_text) as reviews_text_size from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $reviews['reviews_id'] . "' and r.reviews_id = rd.reviews_id"); $reviews_text = xos_db_fetch_array($reviews_text_query); $products_image_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'"); $products_image = xos_db_fetch_array($products_image_query); $products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'"); $products_name = xos_db_fetch_array($products_name_query); $reviews_average_query = xos_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int) $reviews['products_id'] . "'"); $reviews_average = xos_db_fetch_array($reviews_average_query); $review_info = array_merge((array) $reviews_text, (array) $reviews_average, (array) $products_name); $rInfo_array = array_merge((array) $reviews, (array) $review_info, (array) $products_image); $rInfo = new objectInfo($rInfo_array); } $selected = false; if (isset($rInfo) && is_object($rInfo) && $reviews['reviews_id'] == $rInfo->reviews_id) { $selected = true; $link_filename_reviews = xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=preview'); } else { $link_filename_reviews = xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id']); } $reviews_array[] = array('selected' => $selected, 'link_filename_reviews_review' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=preview'), 'products_name' => xos_get_products_name($reviews['products_id']), 'stars_image' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/stars_' . $reviews['reviews_rating'] . '.gif'), 'date_added' => xos_date_short($reviews['date_added']), 'link_filename_reviews' => $link_filename_reviews); } $smarty->assign(array('reviews' => $reviews_array, 'nav_bar_number' => $reviews_split->display_count($reviews_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_REVIEWS), 'nav_bar_result' => $reviews_split->display_links($reviews_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']))); require DIR_WS_BOXES . 'infobox_reviews.php'; } $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"'); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'reviews'); $output_reviews = $smarty->fetch(ADMIN_TPL . '/reviews.tpl'); $smarty->assign('central_contents', $output_reviews); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$options_values_price = $order->products[$i]['attributes'][$j]['price_formated']; } $order_attributes_array[] = array('option_name' => $order->products[$i]['attributes'][$j]['option'], 'option_value_name' => $order->products[$i]['attributes'][$j]['value'], 'option_price' => $options_values_price, 'option_price_prefix' => $order->products[$i]['attributes'][$j]['prefix']); } } $order_products_array[] = array('qty' => $order->products[$i]['qty'], 'model' => $order->products[$i]['model'], 'name' => $order->products[$i]['name'], 'packaging_unit' => $order->products[$i]['packaging_unit'], 'tax' => xos_display_tax_value($order->products[$i]['tax']), 'price' => $order->products[$i]['price_formated'], 'final_single_price' => $order->products[$i]['final_price_formated'], 'final_price' => $order->products[$i]['total_price_formated'], 'products_attributes_option_price' => $attributes_options_values_price, 'product_attributes' => $order_attributes_array); unset($order_attributes_array); } $order_totals_array = array(); for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) { $order_totals_array[] = array('totals_title' => $order->totals[$i]['title'], 'totals_text' => $order->totals[$i]['text'], 'totals_tax' => $order->totals[$i]['class'] == 'ot_shipping' || $order->totals[$i]['class'] == 'ot_loworderfee' || $order->totals[$i]['class'] == 'ot_cod_fee' ? xos_display_tax_value($order->totals[$i]['tax']) : -1); } $statuses_query = xos_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int) $_GET['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int) $_SESSION['languages_id'] . "' and os.public_flag = '1' order by osh.date_added, osh.orders_status_history_id"); $statuses_array = array(); while ($statuses = xos_db_fetch_array($statuses_query)) { $statuses_array[] = array('order_date_added' => xos_date_short($statuses['date_added']), 'order_status_name' => $statuses['orders_status_name'], 'order_comments' => empty($statuses['comments']) ? ' ' : nl2br(xos_output_string_protected($statuses['comments']))); } $back = sizeof($_SESSION['navigation']->path) - 2; if (!empty($_SESSION['navigation']->path[$back])) { $get_params_array = $_SESSION['navigation']->path[$back]['get']; $get_params_array['rmp'] = '0'; $back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']); } else { $back_link = 'javascript:history.go(-1)'; } $smarty->assign(array('order_id' => $_GET['order_id'], 'orders_status' => $order->info['orders_status'], 'date_purchased' => xos_date_long($order->info['date_purchased']), 'order_total' => $order->info['total'], 'order_products' => $order_products_array, 'billing_address' => xos_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br />'), 'payment_method' => $order->info['payment_method'], 'order_totals' => $order_totals_array, 'statuses' => $statuses_array, 'link_back' => $back_link)); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_history_info'); $language_directory_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where use_in_id > '1' and directory = '" . $order->info['language_directory'] . "'"); if (xos_db_num_rows($language_directory_query)) { $smarty->configLoad('languages/' . $order->info['language_directory'] . '.conf', 'order_info'); }
case 'delete': $heading_title = '<b>' . $nInfo->title . '</b>'; $form_tag = xos_draw_form('newsletters', FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $nInfo->title . '</b>'); $contents[] = array('text' => '<br /><a href="" onclick="newsletters.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; default: if (is_object($nInfo)) { $heading_title = '<b>' . $nInfo->title . '</b>'; if ($nInfo->locked > 0) { if (SEND_EMAILS == 'true') { $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=new') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_PREVIEW . ' ">' . BUTTON_TEXT_PREVIEW . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=send') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_SEND . ' ">' . BUTTON_TEXT_SEND . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=unlock') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UNLOCK . ' ">' . BUTTON_TEXT_UNLOCK . '</a>'); } else { $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=new') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_PREVIEW . ' ">' . BUTTON_TEXT_PREVIEW . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=unlock') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UNLOCK . ' ">' . BUTTON_TEXT_UNLOCK . '</a>'); } } else { $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_PREVIEW . ' ">' . BUTTON_TEXT_PREVIEW . '</a><a href="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->newsletters_id . '&action=lock') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_LOCK . ' ">' . BUTTON_TEXT_LOCK . '</a>'); } $contents[] = array('text' => '<br />' . TEXT_NEWSLETTER_DATE_ADDED . ' ' . xos_date_short($nInfo->date_added)); if ($nInfo->status == '1') { $contents[] = array('text' => TEXT_NEWSLETTER_DATE_SENT . ' ' . xos_date_short($nInfo->date_sent)); } } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_newsletters = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_newsletters.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_newsletters', $output_infobox_newsletters); }
$country_query = xos_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int) $customers['entry_country_id'] . "'"); $country = xos_db_fetch_array($country_query); $reviews_query = xos_db_query("select count(*) as number_of_reviews from " . TABLE_REVIEWS . " where customers_id = '" . (int) $customers['customers_id'] . "'"); $reviews = xos_db_fetch_array($reviews_query); $customer_info = array_merge((array) $country, (array) $info, (array) $reviews); $cInfo_array = array_merge((array) $customers, (array) $customer_info); $cInfo = new objectInfo($cInfo_array); } $selected = false; if (isset($cInfo) && is_object($cInfo) && $customers['customers_id'] == $cInfo->customers_id) { $selected = true; $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit'); } else { $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']); } $customers_array[] = array('selected' => $selected, 'link_filename_customers' => $link_filename_customers, 'company' => strlen($customers['entry_company']) > 16 ? "<acronym title=\"" . $customers['entry_company'] . "\">" . substr($customers['entry_company'], 0, 16) . " </acronym>" : $customers['entry_company'], 'lastname' => strlen($customers['customers_lastname']) > 15 ? "<acronym title=\"" . $customers['customers_lastname'] . "\">" . substr($customers['customers_lastname'], 0, 15) . " </acronym>" : $customers['customers_lastname'], 'firstname' => strlen($customers['customers_firstname']) > 15 ? "<acronym title=\"" . $customers['customers_firstname'] . "\">" . substr($customers['customers_firstname'], 0, 15) . " </acronym>" : $customers['customers_firstname'], 'group_name' => strlen($customers['customers_group_name']) > 17 ? "<acronym title=\"" . $customers['customers_group_name'] . "\"> " . substr($customers['customers_group_name'], 0, 17) . " </acronym>" : $customers['customers_group_name'], 'date_account_created' => xos_date_short($info['date_account_created']), 'group_ra_status_image' => $customers['customers_group_ra'] == '1' ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_GREEN) : xos_draw_separator('pixel_trans.gif', '10', '10')); } $smarty->assign(array('link_self_company_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company'), 'link_self_lastname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname'), 'link_self_firstname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname'), 'link_self_cg_name_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name'), 'link_self_id_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-asc'), 'link_self_ra_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra'), 'link_self_company_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company-desc'), 'link_self_lastname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname-desc'), 'link_self_firstname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname-desc'), 'link_self_cg_name_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name-desc'), 'link_self_id_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-desc'), 'link_self_ra_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra-desc'), 'text_company_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_lastname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_firstname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_cg_name_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_id_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_ra_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_company_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_lastname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_firstname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_cg_name_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_id_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_ra_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX)); if (SESSID) { $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id())); } $smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_CUSTOMERS, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'customers' => $customers_array, 'nav_bar_number' => $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS), 'nav_bar_result' => $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))))); if (isset($_GET['search']) && xos_not_null($_GET['search'])) { $smarty->assign('link_filename_customers_reset', xos_href_link(FILENAME_CUSTOMERS)); } require DIR_WS_BOXES . 'infobox_customers.php'; } $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"'); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers'); $output_customers = $smarty->fetch(ADMIN_TPL . '/customers.tpl'); $smarty->assign('central_contents', $output_customers);
$category_path_string = ''; $category_path = xos_generate_category_path($pInfo->products_id, 'product'); for ($i = 0, $n = sizeof($category_path[0]); $i < $n; $i++) { $category_path_string .= $category_path[0][$i]['id'] . '_'; } $category_path_string = substr($category_path_string, 0, -1); $product_image = xos_get_product_images($pInfo->products_image); $products_prices = xos_get_product_prices($pInfo->products_price); $heading_title = '<b>' . xos_get_products_name($pInfo->products_id, $_SESSION['used_lng_id']) . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&pID=' . $pInfo->products_id . '&action=new_product') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&pID=' . $pInfo->products_id . '&action=delete_product') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&pID=' . $pInfo->products_id . '&action=move_product') . '" 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=' . $category_path_string . '&pID=' . $pInfo->products_id . '&action=copy_to') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_COPY_TO . ' "><span>' . BUTTON_TEXT_COPY_TO . '</span></a><a href="' . xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'cPath=' . $category_path_string . '&pID=' . $pInfo->products_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_PRODUCTS_ATTRIBUTES . ' "><span>' . BUTTON_TEXT_PRODUCTS_ATTRIBUTES . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . xos_date_short($pInfo->products_date_added)); if (xos_not_null($pInfo->products_last_modified)) { $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . xos_date_short($pInfo->products_last_modified)); } if (date('Y-m-d') < $pInfo->products_date_available) { $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . xos_date_short($pInfo->products_date_available)); } $contents[] = array('text' => '<br />' . xos_info_image('products/small/' . $product_image['name'], $pInfo->products_name) . '<br />' . $product_image['name']); $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($products_prices[0][0]['regular']) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity); $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_AVERAGE_RATING . ' ' . number_format($pInfo->average_rating, 2) . '%'); } } else { $heading_title = '<b>' . EMPTY_CATEGORY . '</b>'; $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS); } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_categories = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_categories.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_categories', $output_infobox_categories);
$contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $contents[] = array('text' => '<br />' . TEXT_BANNERS_DATE_ADDED . ' ' . xos_date_short($bInfo->date_added)); if (function_exists('imagecreate') && $dir_ok && $banner_extension) { $banner_id = $bInfo->banners_id; $days = '3'; include DIR_WS_INCLUDES . 'graphs/banner_infobox.php'; $contents[] = array('text' => '<br />' . xos_image(DIR_WS_ADMIN . DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension, '', '', '', 'id="banner_infobox"') . "\n" . '<script>' . "\n" . ' document.images.banner_infobox.src="' . DIR_WS_ADMIN . DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension . '?" + new Date().getTime();' . "\n" . '</script>' . "\n"); } else { include DIR_WS_FUNCTIONS . 'html_graphs.php'; $contents[] = array('text' => '<br />' . xos_banner_graph_infoBox($bInfo->banners_id, '3')); } $contents[] = array('text' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '<br />' . xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS); if ($bInfo->date_scheduled) { $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, xos_date_short($bInfo->date_scheduled))); } if ($bInfo->expires_date) { $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, xos_date_short($bInfo->expires_date))); } elseif ($bInfo->expires_impressions) { $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions)); } if ($bInfo->date_status_change) { $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_STATUS_CHANGE, xos_date_short($bInfo->date_status_change))); } } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_banner_manager = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_banner_manager.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_banner_manager', $output_infobox_banner_manager); }
// // XOS-Shop is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with XOS-Shop. If not, see <http://www.gnu.org/licenses/>. //------------------------------------------------------------------------------ // this file is based on: // osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // filename: upcoming_products.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/modules/upcoming_products.php') == 'overwrite_all')) { $expected_query = xos_db_query("select distinct p.products_id, pd.products_name, p.products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_OR_PAGES . " c where c.categories_or_pages_status = '1' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and p.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "' and p.products_status = '1' and p.products_date_available > '" . date("Y-m-d") . "' order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . " limit " . MAX_DISPLAY_UPCOMING_PRODUCTS); if (xos_db_num_rows($expected_query) > 0) { $upcoming_products_array = array(); while ($expected = xos_db_fetch_array($expected_query)) { $upcoming_products_array[] = array('link_filename_product_info' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . $expected['products_id']), 'date_expected' => xos_date_short($expected['date_expected']), 'name' => $expected['products_name']); } $smarty->assign('upcoming_products', $upcoming_products_array); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'upcoming_products'); $output_upcoming_products = $smarty->fetch(SELECTED_TPL . '/includes/modules/upcoming_products.tpl'); $smarty->clearAssign('upcoming_products'); $smarty->assign('upcoming_products', $output_upcoming_products); } }
if ($cInfo->restrict_to_products) { $prod_details = '<a href="listproducts.php?cid=' . $cInfo->coupon_id . '" target="_blank" onclick="window.open(\'listproducts.php?cid=' . $cInfo->coupon_id . '\', \'Valid_Categories\', \'scrollbars=yes,resizable=yes,menubar=yes,width=600,height=600\'); return false">View</A>'; } $cat_details = NONE; if ($cInfo->restrict_to_categories) { $cat_details = '<a href="listcategories.php?cid=' . $cInfo->coupon_id . '" target="_blank" onclick="window.open(\'listcategories.php?cid=' . $cInfo->coupon_id . '\', \'Valid_Categories\', \'scrollbars=yes,resizable=yes,menubar=yes,width=600,height=600\'); return false">View</A>'; } $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_COUPON_ADMIN, 'action=voucheredit&cid=' . $cInfo->coupon_id) . '" 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_COUPON_ADMIN, 'action=voucherdelete&status=' . $status . ($_GET['page'] > 1 ? '&page=' . $_GET['page'] : '') . '&cid=' . $cInfo->coupon_id) . '" 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_COUPON_ADMIN, 'action=voucherreport&cid=' . $cInfo->coupon_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_REPORT . ' "><span>' . BUTTON_TEXT_REPORT . '</span></a><a href="' . xos_href_link(FILENAME_COUPON_ADMIN, 'action=email&cid=' . $cInfo->coupon_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EMAIL . ' "><span>' . BUTTON_TEXT_EMAIL . '</span></a>'); $coupon_name_query = xos_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cInfo->coupon_id . "' and language_id = '" . $_SESSION['languages_id'] . "'"); $coupon_name = xos_db_fetch_array($coupon_name_query); $contents[] = array('text' => '<br />' . COUPON_NAME . ' : ' . $coupon_name['coupon_name']); $contents[] = array('text' => COUPON_AMOUNT . ' : ' . $amount); $contents[] = array('text' => REDEEM_DATE_LAST . ' : ' . (isset($rInfo->redeem_date) ? xos_date_short($rInfo->redeem_date) : '')); $contents[] = array('text' => COUPON_MIN_ORDER . ' : ' . $coupon_min_order); $contents[] = array('text' => COUPON_STARTDATE . ' : ' . xos_date_short($cInfo->coupon_start_date)); $contents[] = array('text' => COUPON_FINISHDATE . ' : ' . xos_date_short($cInfo->coupon_expire_date)); $contents[] = array('text' => COUPON_USES_COUPON . ' : ' . $cInfo->uses_per_coupon); $contents[] = array('text' => COUPON_USES_USER . ' : ' . $cInfo->uses_per_user); $contents[] = array('text' => COUPON_PRODUCTS . ' : ' . $prod_details); $contents[] = array('text' => COUPON_CATEGORIES . ' : ' . $cat_details); $contents[] = array('text' => DATE_CREATED . ' : ' . xos_date_short($cInfo->date_created)); $contents[] = array('text' => DATE_MODIFIED . ' : ' . xos_date_short($cInfo->date_modified) . '<br /> <br />'); } // } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents)); $output_infobox_coupon_admin = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_coupon_admin.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_contents')); $smarty->assign('infobox_coupon_admin', $output_infobox_coupon_admin); }
//////////////////////////////////////////////////////////////////////////////// require 'includes/application_top.php'; if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/' . FILENAME_PRODUCTS_EXPECTED) == 'overwrite_all')) { xos_db_query("update " . TABLE_PRODUCTS . " set products_last_modified = now(), products_date_available = '' where to_days(now()) > to_days(products_date_available)"); $javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n"; require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'column_left.php'; require DIR_WS_INCLUDES . 'footer.php'; $products_query_raw = "select pd.products_id, pd.products_name, p.products_date_available from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where p.products_id = pd.products_id and p.products_date_available != '' and pd.language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by p.products_date_available DESC"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS, $products_query_raw, $products_query_numrows); $products_query = xos_db_query($products_query_raw); $products_array = array(); while ($products = xos_db_fetch_array($products_query)) { if ((!isset($_GET['pID']) || isset($_GET['pID']) && $_GET['pID'] == $products['products_id']) && !isset($pInfo)) { $pInfo = new objectInfo($products); } $selected = false; if (isset($pInfo) && is_object($pInfo) && $products['products_id'] == $pInfo->products_id) { $selected = true; } $products_array[] = array('selected' => $selected, 'link_filename_categories' => xos_href_link(FILENAME_CATEGORIES, 'pID=' . $products['products_id'] . '&action=new_product'), 'link_filename_products_expected' => xos_href_link(FILENAME_PRODUCTS_EXPECTED, 'page=' . $_GET['page'] . '&pID=' . $products['products_id']), 'name' => $products['products_name'], 'date_available' => xos_date_short($products['products_date_available'])); } $smarty->assign(array('BODY_TAG_PARAMS' => 'onload="SetFocus();"', 'products' => $products_array, 'nav_bar_number' => $products_split->display_count($products_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS_EXPECTED), 'nav_bar_result' => $products_split->display_links($products_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']))); require DIR_WS_BOXES . 'infobox_products_expected.php'; $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'products_expected'); $output_products_expected = $smarty->fetch(ADMIN_TPL . '/products_expected.tpl'); $smarty->assign('central_contents', $output_products_expected); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
<?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';
require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; if (xos_count_customer_orders() > 0) { $orders_query = xos_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int) $_SESSION['customer_id'] . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['languages_id'] . "' and s.public_flag = '1' group by o.orders_id order by o.orders_id desc limit 3"); $orders_array = array(); while ($orders = xos_db_fetch_array($orders_query)) { $oder_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $orders['orders_id'] . "' and class = 'ot_total' order by orders_total_id DESC limit 1"); $oder_total = xos_db_fetch_array($oder_total_query); if (xos_not_null($orders['delivery_name'])) { $order_name = $orders['delivery_name']; $order_country = $orders['delivery_country']; } else { $order_name = $orders['billing_name']; $order_country = $orders['billing_country']; } $orders_array[] = array('link_filename_account_history_info' => xos_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL'), 'date_purchased' => xos_date_short($orders['date_purchased']), 'order_id' => $orders['orders_id'], 'order_name' => xos_output_string_protected($order_name), 'order_country' => $order_country, 'order_status_name' => $orders['orders_status_name'], 'order_total' => strip_tags($oder_total['text'])); } $smarty->assign('customer_orders', true); } if ($messageStack->size('account') > 0) { $smarty->assign('message_stack', $messageStack->output('account')); $smarty->assign('message_stack_error', $messageStack->output('account', 'error')); $smarty->assign('message_stack_warning', $messageStack->output('account', 'warning')); $smarty->assign('message_stack_success', $messageStack->output('account', 'success')); } $smarty->assign(array('orders' => $orders_array, 'link_filename_account_history' => xos_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), 'link_filename_account_edit' => xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'link_filename_account_password' => xos_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), 'link_filename_account_newsletters' => NEWSLETTER_ENABLED == 'true' ? xos_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL') : '', 'link_filename_account_notifications' => PRODUCT_NOTIFICATION_ENABLED == 'true' ? xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') : '')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account'); $output_account = $smarty->fetch(SELECTED_TPL . '/account.tpl'); $smarty->assign('central_contents', $output_account); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php';