⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit.php

📁 this the oscommerce 3.0 aplha 4
💻 PHP
字号:
<?php/*  $Id: edit.php 1498 2007-03-29 14:04:50Z hpdl $  osCommerce, Open Source E-Commerce Solutions  http://www.oscommerce.com  Copyright (c) 2007 osCommerce  This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License v2 (1991)  as published by the Free Software Foundation.*/  require('includes/classes/tax.php');  $osC_Tax = new osC_Tax_Admin();  $osC_Order = new osC_Order($_GET['oID']);  if ( !$osC_Order->isValid() ) {    $osC_MessageStack->add($osC_Template->getModule(), sprintf(ERROR_ORDER_DOES_NOT_EXIST, $_GET['oID']), 'error');  }?><link type="text/css" rel="stylesheet" href="external/tabpane/css/luna/tab.css" /><script type="text/javascript" src="external/tabpane/js/tabpane.js"></script><h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle()); ?></h1><?php  if ( $osC_MessageStack->size($osC_Template->getModule()) > 0 ) {    echo $osC_MessageStack->output($osC_Template->getModule());  }?><p align="right">  <?php echo '<input type="button" value="' . $osC_Language->get('button_orders_invoice') . '" onclick="window.open(\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&oID=' . $_GET['oID'] . '&action=invoice') . '\');" class="infoBoxButton"/> <input type="button" value="' . $osC_Language->get('button_orders_packaging_slip') . '" onclick="window.open(\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&oID=' . $_GET['oID'] . '&action=packaging_slip') . '\');" class="infoBoxButton" /> <input type="button" value="' . $osC_Language->get('button_back') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&' . (isset($_GET['search']) ? 'search=' . $_GET['search'] . '&' : '') . (isset($_GET['status']) ? 'status=' . $_GET['status'] . '&' : '') . (isset($_GET['cID']) ? 'cID=' . $_GET['cID'] . '&' : '') . 'page=' . $_GET['page']) . '\';" class="operationButton" />'; ?></p><?php  if ( $osC_Order->isValid() ) {?><div class="tab-pane" id="mainTabPane">  <script type="text/javascript"><!--    var mainTabPane = new WebFXTabPane( document.getElementById( "mainTabPane" ) );  //--></script>  <div class="tab-page" id="tabSummary">    <h2 class="tab"><?php echo $osC_Language->get('section_summary'); ?></h2>    <script type="text/javascript"><!--      mainTabPane.addTabPage( document.getElementById( "tabSummary" ) );    //--></script>    <table border="0" width="100%" cellspacing="0" cellpadding="2">      <tr>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('personal.png') . ' ' . $osC_Language->get('subsection_customer'); ?></legend>            <p><?php echo osC_Address::format($osC_Order->getCustomer(), '<br />'); ?></p>            <p><?php echo osc_icon('telephone.png') . ' ' . $osC_Order->getCustomer('telephone') . '<br />' . osc_icon('write.png') . ' ' . $osC_Order->getCustomer('email_address'); ?></p>          </fieldset>        </td>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('home.png') . ' ' . $osC_Language->get('subsection_shipping_address'); ?></legend>            <p><?php echo osC_Address::format($osC_Order->getDelivery(), '<br />'); ?></p>          </fieldset>        </td>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('bill.png') . ' ' . $osC_Language->get('subsection_billing_address'); ?></legend>            <p><?php echo osC_Address::format($osC_Order->getBilling(), '<br />'); ?></p>          </fieldset>        </td>      </tr>      <tr>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('payment.png') . ' ' . $osC_Language->get('subsection_payment_method'); ?></legend>            <p><?php echo $osC_Order->getPaymentMethod(); ?></p><?php    if ( $osC_Order->isValidCreditCard() ) {?>            <table border="0" cellspacing="0" cellpadding="0">              <tr>                <td><?php echo $osC_Language->get('credit_card_type'); ?></td>                <td><?php echo $osC_Order->getCreditCardDetails('type'); ?></td>              </tr>              <tr>                <td><?php echo $osC_Language->get('credit_card_owner_name'); ?></td>                <td><?php echo $osC_Order->getCreditCardDetails('owner'); ?></td>              </tr>              <tr>                <td><?php echo $osC_Language->get('credit_card_number'); ?></td>                <td><?php echo $osC_Order->getCreditCardDetails('number'); ?></td>              </tr>              <tr>                <td><?php echo $osC_Language->get('credit_card_expiry_date'); ?></td>                <td><?php echo $osC_Order->getCreditCardDetails('expires'); ?></td>              </tr>            </table><?php    }?>          </fieldset>        </td>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('history.png') . ' ' . $osC_Language->get('subsection_status'); ?></legend>            <p><?php echo $osC_Order->getStatus() . '<br />' . ($osC_Order->getDateLastModified() > $osC_Order->getDateCreated() ? osC_DateTime::getShort($osC_Order->getDateLastModified(), true) : osC_DateTime::getShort($osC_Order->getDateCreated(), true)); ?></p>            <p><?php echo $osC_Language->get('number_of_comments') . ' ' . $osC_Order->getNumberOfComments(); ?></p>          </fieldset>        </td>        <td width="33%" valign="top">          <fieldset style="border: 0; height: 100%;">            <legend style="margin-left: -20px; font-weight: bold;"><?php echo osc_icon('calculator.png') . ' ' . $osC_Language->get('subsection_total'); ?></legend>            <p><?php echo $osC_Order->getTotal(); ?></p>            <p><?php echo $osC_Language->get('number_of_products') . ' ' . $osC_Order->getNumberOfProducts() . '<br />' . $osC_Language->get('number_of_items') . ' ' . $osC_Order->getNumberOfItems(); ?></p>          </fieldset>        </td>      </tr>    </table>  </div>  <div class="tab-page" id="tabProducts">    <h2 class="tab"><?php echo $osC_Language->get('section_products'); ?></h2>    <script type="text/javascript"><!--      mainTabPane.addTabPage( document.getElementById( "tabProducts" ) );<?php    if ( isset($_GET['tabIndex']) && ( $_GET['tabIndex'] == 'tabProducts' ) ) {      echo 'mainTabPane.setSelectedIndex( mainTabPane.pages.length - 1 );';    }?>    //--></script>    <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">      <thead>        <tr>          <th colspan="2"><?php echo $osC_Language->get('table_heading_products'); ?></th>          <th><?php echo $osC_Language->get('table_heading_product_model'); ?></th>          <th><?php echo $osC_Language->get('table_heading_tax'); ?></th>          <th><?php echo $osC_Language->get('table_heading_price_net'); ?></th>          <th><?php echo $osC_Language->get('table_heading_price_gross'); ?></th>          <th><?php echo $osC_Language->get('table_heading_total_net'); ?></th>          <th><?php echo $osC_Language->get('table_heading_total_gross'); ?></th>        </tr>      </thead>      <tbody><?php    foreach ( $osC_Order->getProducts() as $products ) {?>        <tr>          <td valign="top" align="right"><?php echo $products['quantity'] . '&nbsp;x'; ?></td>          <td valign="top"><?php      echo $products['name'];      if ( isset($products['attributes']) && is_array($products['attributes']) && ( sizeof($products['attributes']) > 0 ) ) {        foreach ( $products['attributes'] as $attributes ) {          echo '<br /><nobr>&nbsp;&nbsp;&nbsp;<i>' . $attributes['option'] . ': ' . $attributes['value'] . '</i></nobr>';        }      }?>          </td>          <td valign="top"><?php echo $products['model']; ?></td>          <td valign="top" align="right"><?php echo $osC_Tax->displayTaxRateValue($products['tax']); ?></td>          <td valign="top" align="right"><?php echo $osC_Currencies->format($products['final_price'], $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()); ?></td>          <td valign="top" align="right"><?php echo $osC_Currencies->displayPriceWithTaxRate($products['final_price'], $products['tax'], 1, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()); ?></td>          <td valign="top" align="right"><?php echo $osC_Currencies->format($products['final_price'] * $products['quantity'], $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()); ?></td>          <td valign="top" align="right"><?php echo $osC_Currencies->displayPriceWithTaxRate($products['final_price'], $products['tax'], $products['quantity'], $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()); ?></td>        </tr><?php    }?>      </tbody>    </table>    <table border="0" width="100%" cellspacing="0" cellpadding="2">      <tbody><?php    foreach ( $osC_Order->getTotals() as $totals ) {?>        <tr>          <td align="right"><?php echo $totals['title']; ?></td>          <td align="right"><?php echo $totals['text']; ?></td>        </tr><?php    }?>      </tbody>    </table>  </div>  <div class="tab-page" id="tabTransactionHistory">    <h2 class="tab"><?php echo $osC_Language->get('section_transaction_history'); ?></h2>    <script type="text/javascript"><!--      mainTabPane.addTabPage( document.getElementById( "tabTransactionHistory" ) );<?php    if ( isset($_GET['tabIndex']) && ( $_GET['tabIndex'] == 'tabTransactionHistory' ) ) {      echo 'mainTabPane.setSelectedIndex( mainTabPane.pages.length - 1 );';    }?>    //--></script>    <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">      <thead>        <tr>          <th width="130"><?php echo $osC_Language->get('table_heading_date_added'); ?></th>          <th width="50"><?php echo $osC_Language->get('table_heading_status'); ?></th>          <th width="20">&nbsp;</th>          <th><?php echo $osC_Language->get('table_heading_comments'); ?></th>        </tr>      </thead>      <tbody><?php    foreach ( $osC_Order->getTransactionHistory() as $history ) {?>        <tr>          <td valign="top"><?php echo osC_DateTime::getShort($history['date_added'], true); ?></td>          <td valign="top"><?php echo ( !empty($history['status']) ) ? $history['status'] : $history['status_id']; ?></td>          <td valign="top" align="center"><?php echo osc_icon(($history['return_status'] === 1 ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'), null, null); ?></td>          <td valign="top"><?php echo nl2br($history['return_value']); ?></td>        </tr><?php    }?>      </tbody>    </table><?php    if ( $osC_Order->hasPostTransactionActions() ) {?>    <br />    <form name="transaction" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&' . (isset($_GET['search']) ? 'search=' . $_GET['search'] . '&' : '') . (isset($_GET['status']) ? 'status=' . $_GET['status'] . '&' : '') . (isset($_GET['cID']) ? 'cID=' . $_GET['cID'] . '&' : '') . 'page=' . $_GET['page'] . '&oID=' . $_GET['oID'] . '&action=updateTransaction'); ?>" method="post">    <p><?php echo $osC_Language->get('field_post_transaction_actions') . ' '. osc_draw_pull_down_menu('transaction', $osC_Order->getPostTransactionActions()) . ' ' . osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_execute') . '" class="operationButton" />'; ?></p>    </form><?php    }?>  </div>  <div class="tab-page" id="tabStatusHistory">    <h2 class="tab"><?php echo $osC_Language->get('section_status_history'); ?></h2>    <script type="text/javascript"><!--      mainTabPane.addTabPage( document.getElementById( "tabStatusHistory" ) );<?php    if ( isset($_GET['tabIndex']) && ( $_GET['tabIndex'] == 'tabStatusHistory' ) ) {      echo 'mainTabPane.setSelectedIndex( mainTabPane.pages.length - 1 );';    }?>    //--></script>    <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">      <thead>        <tr>          <th><?php echo $osC_Language->get('table_heading_date_added'); ?></th>          <th><?php echo $osC_Language->get('table_heading_status'); ?></th>          <th><?php echo $osC_Language->get('table_heading_comments'); ?></th>          <th align="right"><?php echo $osC_Language->get('table_heading_customer_notified'); ?></th>        </tr>      </thead>      <tbody><?php    foreach ( $osC_Order->getStatusHistory() as $status_history ) {?>        <tr>          <td valign="top"><?php echo osC_DateTime::getShort($status_history['date_added'], true); ?></td>          <td valign="top"><?php echo $status_history['status']; ?></td>          <td valign="top"><?php echo nl2br($status_history['comment']); ?></td>          <td align="right" valign="top"><?php echo osc_icon((($status_history['customer_notified'] === 1) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif'), null, null); ?></td>        </tr><?php    }?>      </tbody>    </table>    <br />    <form name="status" action="<?php echo osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&' . (isset($_GET['search']) ? 'search=' . $_GET['search'] . '&' : '') . (isset($_GET['status']) ? 'status=' . $_GET['status'] . '&' : '') . (isset($_GET['cID']) ? 'cID=' . $_GET['cID'] . '&' : '') . 'page=' . $_GET['page'] . '&oID=' . $_GET['oID'] . '&action=updateStatus'); ?>" method="post">    <table border="0" width="100%" cellspacing="0" cellpadding="2">      <tr>        <td><?php echo $osC_Language->get('field_status'); ?></td>        <td><?php echo osc_draw_pull_down_menu('status', $orders_statuses, $osC_Order->getStatusID()); ?></td>      </tr>      <tr>        <td valign="top"><?php echo $osC_Language->get('field_add_comment'); ?></td>        <td><?php echo osc_draw_textarea_field('comment', null, null, null, 'style="width: 100%"'); ?></td>      </tr>      <tr>        <td><?php echo $osC_Language->get('field_notify_customer'); ?></td>        <td><?php echo osc_draw_checkbox_field('notify_customer', null, true); ?></td>      </tr>        <td><?php echo $osC_Language->get('field_notify_customer_with_comments'); ?></td>        <td><?php echo osc_draw_checkbox_field('append_comment', null, true); ?></td>      </tr>      <tr>        <td colspan="2" align="right"><?php echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_update') . '" class="operationButton" />'; ?></td>      </tr>    </table>    </form>  </div></div><?php  }?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -