function get_card_type($card_type) { $card_types = get_card_types(); foreach ($card_types as $card) { if (in_array($card_type, $card_types)) { return $card; } } return FALSE; }
<?php require_once '../../../util/main.php'; require_once '../../../util/tags.php'; require_once '../../../model/database.php'; require_once '../../../model/card_type_db.php'; $types = get_card_types(); ?> <form action="#" method="post" id="listForm"> <div class="table-responsive"> <table class="table table-striped table-bordered sodon-table-middle"> <thead> <tr> <th style="width: 1px;"><input type="checkbox" onclick="return sodon_common.checkAll(this);"/></th> <th class="text-center" style="width: 40px;">ID</th> <th class="text-center">Description</th> </tr> </thead> <tbody> <?php if (count($types) == 0) { ?> <tr><td style="text-align: center;" colspan="5">There are no card types.</td></tr> <p></p> <?php } else { ?>
require_once 'header.php'; require_once '../model/database.php'; require_once '../model/customer_db.php'; require_once '../model/card_type_db.php'; require_once '../model/order_db.php'; require_once '../model/payment_db.php'; if (!isset($_SESSION['order'])) { header("Location:step1.php"); } if (!isset($_SESSION['orderLines'])) { header("Location:step2.php"); } if (!isset($_SESSION['customer'])) { header("Location:step3.php"); } $cardTypes = get_card_types(); $states = array('AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY'); $months = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'); $years = array('2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023', '2024', '2025', '2026'); $order = $_SESSION['order']; $customer = $_SESSION['customer']; $error_cardTypeID = ''; $error_cardNumber = ''; $error_cardSecurityCode = ''; $error_billingStreet = ''; $error_billingCity = ''; $error_billingState = ''; $error_billingZipCode = ''; $error_shippingStreet = ''; $error_shippingCity = ''; $error_shippingState = '';