Location: PHPKode > projects > Quick.Cart - free and simple to use shopping cart script > templates/admin/shipping-form.php
<?php
if( !defined( 'ADMIN_PAGE' ) )
  exit;

$oOrder = new OrdersAdmin( );

if( isset( $_POST['sName'] ) ){
  $iId = $oOrder->savePaymentShipping( $_POST, 2 );
  if( isset( $_POST['sOptionList'] ) )
    header( 'Location: '.$_SERVER['PHP_SELF'].'?p=shipping-list&sOption=save' );
  else
    header( 'Location: '.$_SERVER['PHP_SELF'].'?p=shipping-form&sOption=save&iId='.$iId );
  exit;
}

if( isset( $iId ) && is_numeric( $iId ) ){
  $aData = $oOrder->throwPaymentShipping( $iId, 2 );
}

if( !isset( $aData['iId'] ) )
  $aData['iId'] = null;

require_once DIR_TEMPLATES.'admin/_header.php'; // include headers
require_once DIR_TEMPLATES.'admin/_menu.php'; // include menu

if( isset( $sOption ) ){
  echo '<div id="msg">'.$lang['Operation_completed'].'</div>';
}

$sPayments = $oOrder->listShippingPaymentsForm( $aData['iId'] );

?>
<h1><?php echo $lang['Shipping_form']; ?><a href="<?php echo $config['manual_link']; ?>instruction#1.20" title="<?php echo $lang['Manual']; ?>" target="_blank"></a></h1>

<form action="?p=<?php echo $p; ?>" method="post" id="mainForm" onsubmit="return checkForm( this );">
  <fieldset id="type2">
    <input type="hidden" name="iId" value="<?php echo $aData['iId']; ?>" />
    <input type="hidden" name="iType" value="2" />
    <table cellspacing="1" class="mainTable" id="shipping">
      <thead>
        <tr class="save">
          <th colspan="3">
            <input type="submit" value="<?php echo $lang['save_list']; ?> &raquo;" name="sOptionList" />
            <input type="submit" value="<?php echo $lang['save']; ?> &raquo;" name="sOption" />
          </th>
        </tr>
      </thead>
      <tfoot>
        <tr class="save">
          <th colspan="3">
            <input type="submit" value="<?php echo $lang['save_list']; ?> &raquo;" name="sOptionList" />
            <input type="submit" value="<?php echo $lang['save']; ?> &raquo;" name="sOption" />
          </th>
        </tr>
      </tfoot>
      <tbody>
        <!-- name start -->
        <tr class="l0">
          <th>
            <?php echo $lang['Name']; ?>
          </th>
          <td>
            <input type="text" name="sName" value="<?php if( isset( $aData['sName'] ) ) echo $aData['sName']; ?>" size="30" maxlength="30" class="input" alt="simple" />
          </td>
          <td rowspan="4" class="tabs">
            <div id="tabs">
              <ul id="tabsNames">
                <!-- tabs start -->
                <li class="tabPayments"><a href="#more" onclick="displayTab( 'tabPayments' )"><?php echo $lang['Payment_methods']; ?></a></li>
                <!-- tabs end -->
              </ul>
              <div id="tabsForms">
                <!-- tabs list start -->
                <table class="tab" id="tabPayments">
                  <?php if( !empty( $sPayments ) ){ ?>
                  <thead>
                    <tr>
                      <td></td>
                      <td><?php $lang['Name']; ?></td>
                      <td><?php $lang['Price']; ?></td>
                    </tr>
                  </thead>
                  <tbody>
                    <?php echo $sPayments; ?>
                  </tbody>
                  <?php } ?>
                  <!-- tab payments -->
                </table>
                <!-- tabs list end -->
              </div>
            </div>
          </td>
        </tr>
        <!-- name end -->
        <!-- price start -->
        <tr class="l1">
          <th>
            <?php echo $lang['Price']; ?>
          </th>
          <td>
            <input type="text" name="fPrice" value="<?php if( isset( $aData['fPrice'] ) ) echo $aData['fPrice']; ?>" class="inputr" size="10" alt="float" /> <?php echo $config['currency_symbol']; ?>
          </td>
        </tr>
        <!-- price end -->
        <tr class="l0">
          <th>
            <?php echo $lang['Status']; ?>
          </th>
          <td>
            <?php echo throwYesNoBox( 'iStatus', isset( $aData['iStatus'] ) ? $aData['iStatus'] : 1 ); ?>
          </td>
        </tr>
        <tr class="end">
          <td colspan="2">&nbsp;</td>
        </tr>
      </tbody>
    </table>
  </fieldset>
  <script type="text/javascript">
    <!--
    AddOnload( getTabsArray );
    AddOnload( checkSelectedTab );
    //-->
  </script>
</form>
<?php
require_once DIR_TEMPLATES.'admin/_footer.php'; // include footer
?>
Return current item: Quick.Cart - free and simple to use shopping cart script