コード例 #1
0
require_once '../src/SepaUtilities.php';
$results = array();
if (isset($_POST['check'])) {
    foreach ($_POST as $field => $input) {
        if (!in_array($field, array('pmtinfid', 'dbtr', 'iban', 'bic', 'ccy', 'btchbookg', 'ultmtdebtr', 'pmtid', 'instdamt', 'cdtr', 'ultmtcdrt', 'rmtinf', 'ci'))) {
            continue;
        }
        $results[$field] = SepaUtilities::check($field, $input);
    }
}
if (isset($_POST['sanitize'])) {
    foreach ($_POST as $field => $input) {
        if (!in_array($field, array('cdtr', 'dbtr', 'rmtinf', 'ultmtcdrt', 'ultmtdebtr'))) {
            continue;
        }
        $results[$field] = SepaUtilities::sanitize($field, $input);
    }
}
?>

<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Document</title>
    <style>
        input[type=text]
        {
            width: 20em;
            padding: 3px;
            margin: 3px;