This repository has been archived on 2024-11-28. You can view files and clone it, but cannot push or open issues or pull requests.
LuisLeon_WebOSC/catalog/admin/create_order.php

1 line
6.5 KiB
PHP
Raw Normal View History

<?php /* $Id: create_order.php,v 1 2003/08/17 23:21:34 frankl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // #### Get Available Customers $query = tep_db_query("select customers_id, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " ORDER BY customers_lastname"); $result = $query; if (tep_db_num_rows($result) > 0) { // Query Successful $SelectCustomerBox = "<select name='Customer'><option value=''>" . TEXT_SELECT_CUST . "</option>\n"; while($db_Row = tep_db_fetch_array($result)) { $SelectCustomerBox .= "<option value='" . $db_Row["customers_id"] . "'"; if(IsSet($HTTP_GET_VARS['Customer']) and $db_Row["customers_id"]==$HTTP_GET_VARS['Customer']) $SelectCustomerBox .= " SELECTED "; //$SelectCustomerBox .= ">" . $db_Row["customers_lastname"] . " , " . $db_Row["customers_firstname"] . " - " . $db_Row["customers_id"] . "</option>\n"; $SelectCustomerBox .= ">" . $db_Row["customers_lastname"] . " , " . $db_Row["customers_firstname"] . "</option>\n"; } $SelectCustomerBox .= "</select>\n"; } $query = tep_db_query("select code, value from " . TABLE_CURRENCIES . " ORDER BY code"); $result = $query; if (tep_db_num_rows($result) > 0) { // Query Successful $SelectCurrencyBox = "<select name='Currency'><option value='' SELECTED>" . TEXT_SELECT_CURRENCY . "</option>\n"; while($db_Row = tep_db_fetch_array($result)) { $SelectCurrencyBox .= "<option value='" . $db_Row["code"] . " , " . $db_Row["value"] . "'"; $SelectCurrencyBox .= ">" . $db_Row["code"] . "</option>\n"; } $SelectCurrencyBox .= "</select>\n"; } if(IsSet($HTTP_GET_VARS['Customer'])) { $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'"); $account = tep_db_fetch_array($account_query); $customer = $account['customers_id']; $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'"); $address = tep_db_fetch_array($address_query); //$customer = $account['customers_id']; } elseif (IsSet($HTTP_GET_VARS['Customer_nr'])) { $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'"); $account = tep_db_fetch_array($account_query); $customer = $account['customers_id']; $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'"); $address = tep_db_fetch_array($address_query); //$customer = $account['customers_id']; } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ORDER_PROCESS); // #### Generate Page ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // BOF: WebMakers.com Changed: Header Tag Controller v1.0 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo HEADING_TITLE ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <?php require('includes/form_check.js.php'); ?> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text /