Esempio n. 1
0
     $orders_query = xos_db_query($orders_query_raw);
     $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 ((!isset($_GET['oID']) || isset($_GET['oID']) && $_GET['oID'] == $orders['orders_id']) && !isset($oInfo)) {
             $oInfo = new objectInfo($orders);
         }
         $selected = false;
         if (isset($oInfo) && is_object($oInfo) && $orders['orders_id'] == $oInfo->orders_id) {
             $selected = true;
             $link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit');
         } else {
             $link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']);
         }
         $orders_array[] = array('selected' => $selected, 'link_filename_orders' => $link_filename_orders, 'link_filename_orders_action_edit' => xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit'), 'customers_name' => $orders['customers_name'], 'order_total' => strip_tags($oder_total['text']), 'date_purchased' => xos_datetime_short($orders['date_purchased']), 'order_status_name' => $orders['orders_status_name']);
     }
     if (SESSID) {
         $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
     }
     $smarty->assign(array('form_begin_orders' => xos_draw_form('orders', FILENAME_ORDERS, '', 'get'), 'input_oid' => xos_draw_input_field('oID', '', 'size="12"'), 'hidden_action' => xos_draw_hidden_field('action', 'edit'), 'form_begin_status' => xos_draw_form('new_status', FILENAME_ORDERS, '', 'get'), 'pull_down_status' => xos_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), (array) $orders_statuses), '', 'onchange="this.form.submit();"'), 'form_end' => '</form>', 'orders' => $orders_array, 'nav_bar_number' => $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS), 'nav_bar_result' => $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'oID', 'action')))));
     require DIR_WS_BOXES . 'infobox_orders.php';
 }
 $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'orders');
 $language_directory_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where use_in_id > '1' and directory = '" . $order->info['language_directory'] . "'");
 if (xos_db_num_rows($language_directory_query)) {
     $smarty->configLoad(DIR_FS_SMARTY . 'catalog/languages/' . $order->info['language_directory'] . '.conf', 'order_info');
 }
 $output_orders = $smarty->fetch(ADMIN_TPL . '/orders.tpl');
 $smarty->assign('central_contents', $output_orders);
 $smarty->display(ADMIN_TPL . '/frame.tpl');
//              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) 2013 osCommerce
//              filename: action_recorder.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_action_recorder.php') == 'overwrite_all')) {
    $contents = array();
    switch ($action) {
        default:
            if (isset($aInfo) && is_object($aInfo)) {
                $heading_title = '<b>' . $aInfo->module . '</b>';
                $contents[] = array('text' => TEXT_INFO_IDENTIFIER . '<br />' . (!empty($aInfo->identifier) ? '<a href="' . xos_href_link(FILENAME_ACTION_RECORDER, 'search=' . $aInfo->identifier) . '"><u>' . xos_output_string_protected($aInfo->identifier) . '</u></a>' : '(empty)'));
                $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_datetime_short($aInfo->date_added));
            }
            break;
    }
    $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents));
    $output_infobox_action_recorder = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_action_recorder.tpl');
    $smarty->clearAssign(array('info_box_heading_title', 'info_box_contents'));
    $smarty->assign('infobox_action_recorder', $output_infobox_action_recorder);
}
Esempio n. 3
0
    while ($actions = xos_db_fetch_array($actions_query)) {
        $module_title = $actions['module'];
        if (is_object(${$actions['module']})) {
            $module_title = ${$actions['module']}->title;
        }
        if ((!isset($_GET['aID']) || isset($_GET['aID']) && $_GET['aID'] == $actions['id']) && !isset($aInfo)) {
            $actions_extra_query = xos_db_query("select identifier from " . TABLE_ACTION_RECORDER . " where id = '" . (int) $actions['id'] . "'");
            $actions_extra = xos_db_fetch_array($actions_extra_query);
            $aInfo_array = array_merge($actions, $actions_extra, array('module' => $module_title));
            $aInfo = new objectInfo($aInfo_array);
        }
        $selected = false;
        if (isset($aInfo) && is_object($aInfo) && $actions['id'] == $aInfo->id) {
            $selected = true;
        }
        $actions_array[] = array('selected' => $selected, 'link_filename_action_recorder' => xos_href_link(FILENAME_ACTION_RECORDER, xos_get_all_get_params(array('aID')) . 'aID=' . $actions['id']), 'module_title' => $module_title, 'success_flag' => $actions['success'] == '1' ? true : false, 'user_name' => xos_output_string_protected($actions['user_name']), 'user_id' => (int) $actions['user_id'], 'date_added' => xos_datetime_short($actions['date_added']));
    }
    if (SESSID) {
        $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
    }
    if (!empty($actions_array) && empty($_GET['search'])) {
        $smarty->assign('link_filename_action_recorder_delete', xos_href_link(FILENAME_ACTION_RECORDER, 'action=expire' . (isset($_GET['module']) && in_array($_GET['module'], $modules_array) ? '&module=' . $_GET['module'] : '')));
    }
    $smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_ACTION_RECORDER, '', 'get'), 'input_search' => xos_draw_input_field('search', isset($_GET['search']) ? xos_output_string_protected($_GET['search']) : ''), 'hidden_module' => xos_draw_hidden_field('module', isset($_GET['module']) ? xos_output_string_protected($_GET['module']) : ''), 'hidden_search' => xos_draw_hidden_field('search', isset($_GET['search']) ? xos_output_string_protected($_GET['search']) : ''), 'form_begin_filter' => xos_draw_form('filter', FILENAME_ACTION_RECORDER, '', 'get'), 'pull_down_module' => xos_draw_pull_down_menu('module', $modules_list_array, isset($_GET['module']) ? xos_output_string_protected($_GET['module']) : '', 'onchange="this.form.submit();"'), 'form_end' => '</form>', 'actions' => $actions_array, 'nav_bar_number' => $actions_split->display_count($actions_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ENTRIES), 'nav_bar_result' => $actions_split->display_links($actions_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], (isset($_GET['module']) && in_array($_GET['module'], $modules_array) && is_object(${$_GET['module']}) ? 'module=' . $_GET['module'] : null) . '&' . (isset($_GET['search']) && !empty($_GET['search']) ? 'search=' . $_GET['search'] : null))));
    require DIR_WS_BOXES . 'infobox_action_recorder.php';
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'action_recorder');
    $output_action_recorder = $smarty->fetch(ADMIN_TPL . '/action_recorder.tpl');
    $smarty->assign('central_contents', $output_action_recorder);
    $smarty->display(ADMIN_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
Esempio n. 4
0
function xos_get_system_information($link = 'db_link')
{
    global ${$link};
    $db_query = xos_db_query("select now() as datetime");
    $db = xos_db_fetch_array($db_query);
    list($system, $host, $kernel) = preg_split('/[\\s,]+/', @exec('uname -a'), 5);
    return array('date' => xos_datetime_short(date('Y-m-d H:i:s')), 'system' => $system, 'kernel' => $kernel, 'host' => $host, 'ip' => gethostbyname($host), 'uptime' => @exec('uptime'), 'http_server' => $_SERVER['SERVER_SOFTWARE'], 'php' => PHP_VERSION, 'zend' => function_exists('zend_version') ? zend_version() : '', 'db_server' => DB_SERVER, 'db_ip' => gethostbyname(DB_SERVER), 'db_version' => 'MySQL ' . (class_exists('mysqli') && version_compare(PHP_VERSION, '5.3.0', '>=') ? mysqli_get_server_info(${$link}) : (function_exists('mysql_get_server_info') ? mysql_get_server_info() : '')), 'db_date' => xos_datetime_short($db['datetime']));
}
Esempio n. 5
0
<?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 />&nbsp;');
        break;
    default:
        if (isset($oInfo) && is_object($oInfo)) {
            $heading_title = '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . 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';