3b131abf6b6f6930bb66e112c5929d71e7bca240
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

1) <?php
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
13) 
14) require_once('inc/base.php');
15) require_once('inc/debug.php');
16) 
17) require_once('invoice.php');
18) 
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

19) $result = [
20)     "iban_ok" => 0,
21)     "iban" => null,
22)     "bic" => null,
Bernd Wurst fix coding style warning

Bernd Wurst authored 1 year ago

23)     "bankname" => null,
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

24) ];
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

25) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

26) $iban = null;
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

27) if (isset($_GET['iban'])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

28)     $iban = $_GET['iban'];
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

29) } elseif (isset($_GET['kto']) && isset($_GET['blz'])) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

30)     $iban = find_iban($_GET['blz'], $_GET['kto']);
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

31) }
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

32) if ($iban != null) {
33)     $iban_ok = (verify_iban($iban) ? '1' : '0');
34)     if ($iban_ok) {
35)         $result["iban_ok"] = 1;
36)         $result["iban"] = $iban;
37)         $bank = get_bank_info($iban);
38)         $result["bic"] = $bank["bic"];
39)         $result["bankname"] = $bank["name"];
40)     }
Bernd Wurst Ermögliche das Berechnen de...

Bernd Wurst authored 10 years ago

41) }
Bernd Wurst Vervollständige Bankname un...

Bernd Wurst authored 10 years ago

42) 
Bernd Wurst removed jquery and jqueryUI...

Bernd Wurst authored 1 year ago

43) header("Content-Type: application/json; charset=utf-8");
44) echo json_encode($result);