Location: PHPKode > projects > Quick.Cart - free and simple to use shopping cart script > actions/admin-payments.php
<?php
$oOrder = new OrdersAdmin( );

if( $a == 'list' ){
  if( isset( $sOption ) ){
    $content .= $oTpl->tBlock( 'messages.tpl', 'DONE' );
  }
  
  $content .= $oTpl->tBlock( 'payments_shipping.tpl', 'PAYMENTS_TITLE' );
  $sList = $oOrder->listPaymentsShippingAdmin( 'payments_shipping.tpl', 1 );
  $content .= !empty( $sList ) ? $sList : $oTpl->tBlock( 'messages.tpl', 'EMPTY' );
}
elseif( $a == 'form' ){
  if( isset( $_POST['sName'] ) ){
    $iId = $oOrder->savePaymentShipping( $_POST, 1 );
    if( isset( $_POST['sOptionList'] ) )
      header( 'Location: '.$_SERVER['PHP_SELF'].'?p='.$aActions['f'].'-list&sOption=save' );
    else
      header( 'Location: '.$_SERVER['PHP_SELF'].'?p='.$p.'&sOption=save&iId='.$iId );
    exit;
  }

  if( isset( $sOption ) )
    $content .= $oTpl->tBlock( 'messages.tpl', 'DONE' );

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

  $sStatusBox = throwYesNoBox( 'iStatus', isset( $aData['iStatus'] ) ? $aData['iStatus'] : 1 );
  $oTpl->unsetVariables( );
  $content .= $oTpl->tBlock( 'payments_shipping.tpl', 'PAYMENTS_FORM' );
}
elseif( $a == 'delete' && isset( $iId ) && is_numeric( $iId ) ){
  $oOrder->deletePaymentShipping( $iId );
  header( 'Location: '.$_SERVER['PHP_SELF'].'?p='.$aActions['f'].'-list&sOption=del' );
  exit;
}
?>
Return current item: Quick.Cart - free and simple to use shopping cart script