[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/ -> create_order.php (source)

   1  <?php
   2  /*

   3  $Id: create_order.php 3 2006-05-27 04:59:07Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

   9  

  10    Released under the GNU General Public License

  11    

  12  */
  13  
  14  
  15    require ('includes/application_top.php');
  16  
  17  // #### Get Available Customers

  18  
  19      $query = tep_db_query("select customers_id, customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " ORDER BY customers_lastname");
  20      $result = $query;
  21  
  22      
  23      if (tep_db_num_rows($result) > 0)
  24      {
  25           // Query Successful

  26           $SelectCustomerBox = "<select name='Customer'><option value=''>" . TEXT_SELECT_CUST . "</option>\n";
  27           while($db_Row = tep_db_fetch_array($result))
  28           { $SelectCustomerBox .= "<option value='" . $db_Row["customers_id"] . "'";
  29            if(IsSet($HTTP_GET_VARS['Customer']) and $db_Row["customers_id"]==$HTTP_GET_VARS['Customer'])
  30              $SelectCustomerBox .= " SELECTED ";
  31            //$SelectCustomerBox .= ">" . $db_Row["customers_lastname"] . " , " . $db_Row["customers_firstname"] . " - " . $db_Row["customers_id"] . "</option>\n"; 

  32            $SelectCustomerBox .= ">" . $db_Row["customers_lastname"] . " , " . $db_Row["customers_firstname"] . "</option>\n";
  33          
  34          }
  35          
  36          $SelectCustomerBox .= "</select>\n";
  37      }
  38      
  39      $query = tep_db_query("select code, value from " . TABLE_CURRENCIES . " ORDER BY code");
  40      $result = $query;
  41      
  42      if (tep_db_num_rows($result) > 0)
  43      {
  44           // Query Successful

  45           $SelectCurrencyBox = "<select name='Currency'><option value='' SELECTED>" . TEXT_SELECT_CURRENCY . "</option>\n";
  46           while($db_Row = tep_db_fetch_array($result))
  47           { 
  48              $SelectCurrencyBox .= "<option value='" . $db_Row["code"] . " , " . $db_Row["value"] . "'";
  49                $SelectCurrencyBox .= ">" . $db_Row["code"] . "</option>\n";
  50          }
  51          
  52          $SelectCurrencyBox .= "</select>\n";
  53      }
  54  
  55      if(IsSet($HTTP_GET_VARS['Customer']))
  56      {
  57       $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'");
  58       $account = tep_db_fetch_array($account_query);
  59       $customer = $account['customers_id'];
  60       $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer'] . "'");
  61       $address = tep_db_fetch_array($address_query);
  62       //$customer = $account['customers_id'];

  63      } elseif (IsSet($HTTP_GET_VARS['Customer_nr']))
  64      {
  65       $account_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'");
  66       $account = tep_db_fetch_array($account_query);
  67       $customer = $account['customers_id'];
  68       $address_query = tep_db_query("select * from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $HTTP_GET_VARS['Customer_nr'] . "'");
  69       $address = tep_db_fetch_array($address_query);
  70       //$customer = $account['customers_id'];

  71      }
  72  
  73  
  74    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ORDER_PROCESS);
  75   
  76  
  77  // #### Generate Page

  78      ?>    
  79              <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
  80          <html <?php echo HTML_PARAMS; ?>>
  81          <head>
  82          <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
  83  <?php
  84  // BOF: WebMakers.com Changed: Header Tag Controller v1.0

  85  // Replaced by header_tags.php

  86  if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
  87    require(DIR_WS_INCLUDES . 'header_tags.php');
  88  } else {
  89  ?> 
  90    <title><?php echo HEADING_TITLE ?></title>
  91              <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
  92          <?php require ('includes/form_check.js.php'); ?>
  93          </head>
  94  <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
  95          <!-- header //-->
  96          <?php
  97                require (DIR_WS_INCLUDES . 'header.php');
  98          ?>
  99          <!-- header_eof //-->        
 100      
 101  <!-- body //-->
 102  <table border="0" width="100%" cellspacing="2" cellpadding="2">
 103    <tr>
 104      <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2" class="columnLeft">
 105  <!-- left_navigation //-->
 106  <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?>
 107  <!-- left_navigation_eof //-->
 108      </table></td>
 109  <!-- body_text //-->
 110  
 111  <td valign="top">
 112          <table border='0' bgcolor='#7c6bce' width='100%'>
 113              <tr>
 114                <td class=main><font color='#ffffff'><b><?php echo TEXT_STEP_1 ?></b></td>
 115              </tr>
 116          </table>
 117          <table border='0' cellpadding='7'><tr><td class="main" valign="top">
 118  
 119  <?php
 120      print "<form action='$PHP_SELF' method='GET'>\n";
 121      print "<table border='0'>\n";
 122      print "<tr>\n";
 123      print "<td><br>$SelectCustomerBox</td>\n";
 124      print "<td valign='bottom'><input type='submit' value=\"" . BUTTON_SUBMIT . "\"></td>\n";
 125      print "</tr>\n";
 126      print "</table>\n";
 127      print "</form>\n";
 128  ?>
 129  <?php
 130      print "<form action='$PHP_SELF' method='GET'>\n";
 131      print "<table border='0'>\n";
 132      print "<tr>\n";
 133      print "<td><font class=main><b><br>" . TEXT_OR_BY . "</b></font><br><br><input type=text name='Customer_nr'></td>\n";
 134      print "<td valign='bottom'><input type='submit' value=\"" . BUTTON_SUBMIT . "\"></td>\n";
 135      print "</tr>\n";
 136      print "</table>\n";
 137      print "</form>\n";
 138  ?>    
 139          <tr>
 140          
 141      <td width="100%" valign="top"><?php echo tep_draw_form('create_order', FILENAME_CREATE_ORDER_PROCESS, '', 'post', '', '') . tep_draw_hidden_field('customers_id', $account->customers_id); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
 142                                    
 143       </tr> <tr>
 144          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 145            <tr>
 146              <td class="pageHeading"><?php echo HEADING_CREATE; ?></td>
 147            </tr>
 148          </table></td>
 149        </tr>
 150        <tr>
 151          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 152        </tr>
 153        <tr>
 154          <td>
 155  <?php
 156  
 157  //onSubmit="return check_form();"

 158  
 159    require (DIR_WS_MODULES . 'create_order_details.php');
 160   
 161  ?>
 162          </td>
 163        </tr>
 164        <tr>
 165          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 166        </tr>
 167        <tr>
 168          <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
 169            <tr>
 170              <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
 171              <td class="main" align="right"><?php echo tep_image_submit('button_confirm.gif', IMAGE_BUTTON_CONFIRM); ?></td>
 172            </tr>
 173          </table></td>
 174        </tr>
 175      </table></form></td>
 176  <!-- body_text_eof //-->
 177  
 178    </tr>
 179  </table>
 180  <!-- body_eof //-->
 181  
 182  <!-- footer //-->
 183  <?php require (DIR_WS_INCLUDES . 'footer.php'); ?>
 184  <!-- footer_eof //-->
 185  <br>
 186  </body>
 187  </html>
 188  <?php 
 189  require (DIR_WS_INCLUDES . 'application_bottom.php'); 
 190  }
 191  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7