Browse code

Wandle IBAN in Großbuchstaben

Bernd Wurst authored on 16/07/2018 12:57:24
Showing 1 changed files
... ...
@@ -51,7 +51,7 @@ if ($_GET['action'] == 'new') {
51 51
     if (empty($_REQUEST['iban'])) {
52 52
         system_failure('Es wurde keine IBAN angegeben.');
53 53
     }
54
-    $iban = str_replace(' ', '', $_REQUEST['iban']);
54
+    $iban = str_replace(' ', '', strtoupper($_REQUEST['iban']));
55 55
     if (! verify_iban($iban)) {
56 56
         system_failure("Die IBAN scheint nicht korrekt zu sein!");
57 57
     }
Browse code

remove whitespace in empty lines

Hanno authored on 26/06/2018 23:36:40
Showing 1 changed files
... ...
@@ -26,7 +26,7 @@ $section = 'invoice_current';
26 26
 
27 27
 if ($_GET['action'] == 'new') {
28 28
     check_form_token('sepamandat_neu');
29
-  
29
+
30 30
     $gueltig_ab = $_REQUEST['gueltig_ab'];
31 31
     if ($gueltig_ab == 'datum') {
32 32
         $gueltig_ab = $_REQUEST['gueltig_ab_datum_year'].'-'.$_REQUEST['gueltig_ab_datum_month'].'-'.$_REQUEST['gueltig_ab_datum_day'];
... ...
@@ -75,8 +75,8 @@ if ($_GET['action'] == 'new') {
75 75
     }
76 76
     DEBUG('BIC: '.$bic);
77 77
 
78
-  
78
+
79 79
     sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab);
80
-  
80
+
81 81
     redirect($prefix.'go/invoice/current');
82 82
 }
Browse code

Fix coding style with php-cs-checker, see https://cs.sensiolabs.org/

Hanno authored on 26/06/2018 13:58:19
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely
8 8
 
9 9
 To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10 10
 
11
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
12 12
 http://creativecommons.org/publicdomain/zero/1.0/
13 13
 
14 14
 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.
... ...
@@ -24,60 +24,59 @@ global $debugmode;
24 24
 $section = 'invoice_current';
25 25
 
26 26
 
27
-if ($_GET['action'] == 'new')
28
-{
29
-  check_form_token('sepamandat_neu');
27
+if ($_GET['action'] == 'new') {
28
+    check_form_token('sepamandat_neu');
30 29
   
31
-  $gueltig_ab = $_REQUEST['gueltig_ab'];
32
-  if ($gueltig_ab == 'datum') {
33
-    $gueltig_ab = $_REQUEST['gueltig_ab_datum_year'].'-'.$_REQUEST['gueltig_ab_datum_month'].'-'.$_REQUEST['gueltig_ab_datum_day'];
34
-  }
35
-  if (! check_date($gueltig_ab)) {
36
-    system_failure('Konnte das Datum nicht auslesen');
37
-  }
38
-  DEBUG('Gültig ab: '.$gueltig_ab);
30
+    $gueltig_ab = $_REQUEST['gueltig_ab'];
31
+    if ($gueltig_ab == 'datum') {
32
+        $gueltig_ab = $_REQUEST['gueltig_ab_datum_year'].'-'.$_REQUEST['gueltig_ab_datum_month'].'-'.$_REQUEST['gueltig_ab_datum_day'];
33
+    }
34
+    if (! check_date($gueltig_ab)) {
35
+        system_failure('Konnte das Datum nicht auslesen');
36
+    }
37
+    DEBUG('Gültig ab: '.$gueltig_ab);
39 38
 
40
-  if (empty($_REQUEST['kontoinhaber'])) {
41
-    system_failure('Bitte geben Sie den Kontoinhaber so an, wie dies bei Ihrer Bank hinterlegt ist.');
42
-  }
43
-  $name = $_REQUEST['kontoinhaber'];
44
-  DEBUG('Kontoinhaber:'.$name);
39
+    if (empty($_REQUEST['kontoinhaber'])) {
40
+        system_failure('Bitte geben Sie den Kontoinhaber so an, wie dies bei Ihrer Bank hinterlegt ist.');
41
+    }
42
+    $name = $_REQUEST['kontoinhaber'];
43
+    DEBUG('Kontoinhaber:'.$name);
45 44
 
46
-  if (empty($_REQUEST['adresse'])) {
47
-    system_failure('Bitte geben Sie die Adresse des Kontoinhabers an.');
48
-  }
49
-  $adresse = $_REQUEST['adresse'];
50
-  DEBUG('Adresse: '.$adresse);
45
+    if (empty($_REQUEST['adresse'])) {
46
+        system_failure('Bitte geben Sie die Adresse des Kontoinhabers an.');
47
+    }
48
+    $adresse = $_REQUEST['adresse'];
49
+    DEBUG('Adresse: '.$adresse);
51 50
 
52
-  if (empty($_REQUEST['iban'])) {
53
-    system_failure('Es wurde keine IBAN angegeben.');
54
-  }
55
-  $iban = str_replace(' ', '', $_REQUEST['iban']);
56
-  if (! verify_iban($iban)) {
57
-    system_failure("Die IBAN scheint nicht korrekt zu sein!");
58
-  }
59
-  DEBUG('IBAN: '.$iban);
51
+    if (empty($_REQUEST['iban'])) {
52
+        system_failure('Es wurde keine IBAN angegeben.');
53
+    }
54
+    $iban = str_replace(' ', '', $_REQUEST['iban']);
55
+    if (! verify_iban($iban)) {
56
+        system_failure("Die IBAN scheint nicht korrekt zu sein!");
57
+    }
58
+    DEBUG('IBAN: '.$iban);
60 59
 
61
-  $bankname = $_REQUEST['bankname'];
62
-  if (empty($_REQUEST['bankname'])) {
63
-    system_failure('Bitte geben Sie den Namen der Bank an.');
64
-  }
65
-  DEBUG('Bank: '.$bankname);
60
+    $bankname = $_REQUEST['bankname'];
61
+    if (empty($_REQUEST['bankname'])) {
62
+        system_failure('Bitte geben Sie den Namen der Bank an.');
63
+    }
64
+    DEBUG('Bank: '.$bankname);
66 65
 
67
-  $bic = NULL;
68
-  if (empty($_REQUEST['bic'])) {
69
-    if (substr($iban, 0, 2) == 'DE') {
70
-      $bic=NULL;
66
+    $bic = null;
67
+    if (empty($_REQUEST['bic'])) {
68
+        if (substr($iban, 0, 2) == 'DE') {
69
+            $bic=null;
70
+        } else {
71
+            system_failure('Sie haben keinen BIC angegeben. Für Konten außerhalb Deutschlands ist ein BIC weiterhin erforderlich.');
72
+        }
71 73
     } else {
72
-      system_failure('Sie haben keinen BIC angegeben. Für Konten außerhalb Deutschlands ist ein BIC weiterhin erforderlich.');
74
+        $bic = $_REQUEST['bic'];
73 75
     }
74
-  } else {
75
-    $bic = $_REQUEST['bic'];
76
-  } 
77
-  DEBUG('BIC: '.$bic);
76
+    DEBUG('BIC: '.$bic);
78 77
 
79 78
   
80
-  sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab);
79
+    sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab);
81 80
   
82
-  redirect($prefix.'go/invoice/current');
81
+    redirect($prefix.'go/invoice/current');
83 82
 }
Browse code

Copyright year update

Bernd Wurst authored on 13/01/2018 06:07:05
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2014 by schokokeks.org Hosting, namely
5
+Written 2008-2018 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Entferne Spaces aus der IBAN

Bernd Wurst authored on 10/08/2017 12:59:34
Showing 1 changed files
... ...
@@ -52,7 +52,7 @@ if ($_GET['action'] == 'new')
52 52
   if (empty($_REQUEST['iban'])) {
53 53
     system_failure('Es wurde keine IBAN angegeben.');
54 54
   }
55
-  $iban = $_REQUEST['iban'];
55
+  $iban = str_replace(' ', '', $_REQUEST['iban']);
56 56
   if (! verify_iban($iban)) {
57 57
     system_failure("Die IBAN scheint nicht korrekt zu sein!");
58 58
   }
Browse code

Fehlendes Include

Bernd Wurst authored on 29/11/2014 18:41:07
Showing 1 changed files
... ...
@@ -18,6 +18,7 @@ require_role(ROLE_CUSTOMER);
18 18
 
19 19
 require('invoice.php');
20 20
 require_once("inc/debug.php");
21
+require_once("inc/security.php");
21 22
 global $debugmode;
22 23
 
23 24
 $section = 'invoice_current';
Browse code

Lizenzinfos in eigenes Modul ausgelagert und Copyright auf 2014 angepasst

Bernd Wurst authored on 08/02/2014 05:45:07
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 /*
3 3
 This file belongs to the Webinterface of schokokeks.org Hosting
4 4
 
5
-Written 2008-2013 by schokokeks.org Hosting, namely
5
+Written 2008-2014 by schokokeks.org Hosting, namely
6 6
   Bernd Wurst <bernd@schokokeks.org>
7 7
   Hanno Böck <hanno@schokokeks.org>
8 8
 
Browse code

Erste Version des SEPA-Mandat-Webinterface

Bernd Wurst authored on 20/12/2013 19:13:16
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,82 @@
1
+<?php
2
+/*
3
+This file belongs to the Webinterface of schokokeks.org Hosting
4
+
5
+Written 2008-2013 by schokokeks.org Hosting, namely
6
+  Bernd Wurst <bernd@schokokeks.org>
7
+  Hanno Böck <hanno@schokokeks.org>
8
+
9
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
10
+
11
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see 
12
+http://creativecommons.org/publicdomain/zero/1.0/
13
+
14
+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.
15
+*/
16
+
17
+require_role(ROLE_CUSTOMER);
18
+
19
+require('invoice.php');
20
+require_once("inc/debug.php");
21
+global $debugmode;
22
+
23
+$section = 'invoice_current';
24
+
25
+
26
+if ($_GET['action'] == 'new')
27
+{
28
+  check_form_token('sepamandat_neu');
29
+  
30
+  $gueltig_ab = $_REQUEST['gueltig_ab'];
31
+  if ($gueltig_ab == 'datum') {
32
+    $gueltig_ab = $_REQUEST['gueltig_ab_datum_year'].'-'.$_REQUEST['gueltig_ab_datum_month'].'-'.$_REQUEST['gueltig_ab_datum_day'];
33
+  }
34
+  if (! check_date($gueltig_ab)) {
35
+    system_failure('Konnte das Datum nicht auslesen');
36
+  }
37
+  DEBUG('Gültig ab: '.$gueltig_ab);
38
+
39
+  if (empty($_REQUEST['kontoinhaber'])) {
40
+    system_failure('Bitte geben Sie den Kontoinhaber so an, wie dies bei Ihrer Bank hinterlegt ist.');
41
+  }
42
+  $name = $_REQUEST['kontoinhaber'];
43
+  DEBUG('Kontoinhaber:'.$name);
44
+
45
+  if (empty($_REQUEST['adresse'])) {
46
+    system_failure('Bitte geben Sie die Adresse des Kontoinhabers an.');
47
+  }
48
+  $adresse = $_REQUEST['adresse'];
49
+  DEBUG('Adresse: '.$adresse);
50
+
51
+  if (empty($_REQUEST['iban'])) {
52
+    system_failure('Es wurde keine IBAN angegeben.');
53
+  }
54
+  $iban = $_REQUEST['iban'];
55
+  if (! verify_iban($iban)) {
56
+    system_failure("Die IBAN scheint nicht korrekt zu sein!");
57
+  }
58
+  DEBUG('IBAN: '.$iban);
59
+
60
+  $bankname = $_REQUEST['bankname'];
61
+  if (empty($_REQUEST['bankname'])) {
62
+    system_failure('Bitte geben Sie den Namen der Bank an.');
63
+  }
64
+  DEBUG('Bank: '.$bankname);
65
+
66
+  $bic = NULL;
67
+  if (empty($_REQUEST['bic'])) {
68
+    if (substr($iban, 0, 2) == 'DE') {
69
+      $bic=NULL;
70
+    } else {
71
+      system_failure('Sie haben keinen BIC angegeben. Für Konten außerhalb Deutschlands ist ein BIC weiterhin erforderlich.');
72
+    }
73
+  } else {
74
+    $bic = $_REQUEST['bic'];
75
+  } 
76
+  DEBUG('BIC: '.$bic);
77
+
78
+  
79
+  sepamandat($name, $adresse, $iban, $bankname, $bic, $gueltig_ab);
80
+  
81
+  redirect($prefix.'go/invoice/current');
82
+}