1 <? $title ='Payment Accounts'; include('elements/header.php'); ?>
2 <? $current_menu = 'payment_accounts.php'; include('elements/menu.php'); ?>
3 <H1>My Payment Accounts</H1>
7 if ( isset($_GET['action']) && $_GET['action'] ) {
8 $action = $_GET['action'];
11 if ($action == 'deleteaccount') {
13 if ( isset($_GET['paybynum']) && $_GET['paybynum'] ) {
14 if ( preg_match( '/^(\d+)$/', $_GET['paybynum'] ) ) {
15 $paybynum = $_GET['paybynum'];
16 $error = $freeside->delete_payby( array(
17 'session_id' => $_COOKIE['session_id'],
18 'custpaybynum' => $paybynum,
22 $error['error'] = 'Bad Payby Number';
26 if ( isset($error['error']) && $error['error'] ) {
27 $error = $error['error'];
30 $error = "Account " . $paybynum . " Deleted";
34 <FONT COLOR="red"><? echo $error ?></FONT>
39 $payment_info = $freeside->list_payby( array(
40 'session_id' => $_COOKIE['session_id'],
43 if ( isset($payment_info['error']) && $payment_info['error'] ) {
44 $error = $payment_info['error'];
45 header('Location:index.php?error='. urlencode($error));
49 extract($payment_info);
62 foreach ($payby as $payaccount) {
65 <TD><A HREF="payment_accounts.php?action=deleteaccount&paybynum=<? echo $payaccount['custpaybynum'] ?>">delete</A></TD>
66 <TD><? echo $payaccount['payby'] ?></TD>
67 <TD><? echo $payaccount['paytype'] ?></TD>
68 <TD><? echo $payaccount['paymask'] ?></TD>
69 <TD><? echo htmlspecialchars($payaccount['payname']) ?></TD>
77 <? include('elements/menu_footer.php'); ?>
78 <? include('elements/footer.php'); ?>